I wanted a way to know when the mail person was here, so I could go help with whatever heavy thing they seem to feel obligated to carry to my door, which is a decent trek from the road. Due to the terrain and other limitations, a raspberry pi with a camera and motion detectors can't see this spot and still be in wifi - and power supply - range. While thinking about how I'd design such a thing, I stumbled on a surplus solution that didn't seem to need much more work. But which, of course, did need a couple of tricks to make it useful, so here's the skinny,
I'm sure there are other things out there, cheap, that wouldn't need as much as this did - but it's an interesting take on a little ranch-grade engineering exercise anyway. No doubt other "solutions" would have their own issues as well.
Here's a link to the thing I got - a transmitter/receiver pair for < $3 looked worth playing with: https://www.mpja.com/315MHz-Remote-Cont ... /31960+MP/
Due to an issue I discovered, it would have been pretty useless for its original intended purpose - the output is random in no-signal conditions, and burst-error prone when a signal is there. But there's a decent and simple, if non-obvious, workaround for that when used for my application. IF you were trying for data...you'd need some really magic high overhead error detection and correction, and/or some protocol that allows retries - which means you'd need to have the other direction of data transmission, some smarts...and it gets out of hand quick.
I'm just inside wifi-with-some-retries range, and had considered an ESP 8266 class thing, but...this was more fun and will have much longer battery life even though I'll be using switched power in either case - getting on the network takes time - which also means I'd need something fancier than the trivial magnetic switch to latch power (what if the mail man is fast?) and it spirals out of hand again.
At the point of considering something like a laser I could see some modulation on via backscatter, sanity prevailed. I do have other things to do!
Here is the transmitter circuit.
Basically an AM transmitter with on-off control. I'm running it from a 9v battery here. Current drain is on the order of 10ma when operating CW. Due to issues in the receiver, this needs to be modulated to provide a signal that can be reliably told from the noise at the receiver end. There are a ton of ways to skin that cat, but I was out of 555's and didn't want to get complex, as in an Arduino Uno clone. I also didn't want to have to come up with a stable frequency if I didn't need to, and use special components to get there. So I settled on a really simple discrete multivibrator. This does produce a somewhat variable frequency depending on supply voltage, temperature, phase of the moon and so on, but for this that's fine.
Unlike some other possible oscillator circuits, this one swings right down to ground, so it'll turn off the transistor in the modulator fully.
Parts are:
a couple of generic NPN transistors, I used 2n3904.
10k collector resistors.
100k base bias and output current reduction resistors. You don't need the 1% ones I used - I buy the stock values in bulk and they are super cheap.
.01 uf tuning capacitors. This gives around 650 Hz output, it's not critical in this design.
I didn't even use any power bypass caps - a little noise makes it more likely to reliably start oscillating. I'm switching this on and off with a standard alarm system type magnet and reed switch pair, placed so the mailbox door opening turns on power. This is the opposite switch sense from most alarm uses, as for those, the circuit is closed until the door opens. So look for a switch that allows that, for example: https://www.amazon.com/Magnetic-Switch- ... 583&sr=8-5
The range for these is listed as around 200 meters. I'm betting that double that is easy, based on signal strength measured via my RTL-SDR. If you know RF, just do the antennas marginally correctly for 1/4 wave whips over ground and you're going to be good. As used here, at something over 100 yards and with an intervening small hill, it overloads the SDR using rabbit ears on receive.
Some pix as it is. I used a nice box from Marlin Jones, which happens to perfectly fit a standard perfboard I got cheap from some Chinese vendor at Amazon. I made a bracket to replace one end so as to mount this up under the mailbox out of the weather. I made a little battery guide for the tight fit.