First a simple hardware layout. An ATTINY13 creates a data stream, sends to to the transmitter on one board. The receiver on the 2nd board picks up the signal, sends it to the 2nd ATTINY13 for decoding. Finally the ATTINY13 controls 2 LEDs, one fora Door Open/Closed, the indicator, the other LED to indicate loss of signal. I figured the signal loss indicator was a good idea because, that way if I lost the transmitter or it’s signal, I could differentiate that from a safely closed garage door.
The design of the data stream was the next task. I only needed to send a single bit of data, but I wanted to include error detection and I wanted a data stream that was easy to decode. The data part was easy, single data bit + parity bit. ie 10 for door open and 01 for door closed. To make decoding easy, I wanted unique start and stop bits that did not show up in the valid data stream. Thus, 11 for the start bits and 00 for the stop bits made sense. End result: 110100 = the data stream for ‘door closed’ and 111000 = the data stream for ‘door open’.
At this point, I threw together a breadboard prototype to validate the hardware and software configuration:
This worked great on the breadboard, so I put together a pair of circuit boards, both point to point and wired because the circuit was so simple. One board for the transmitter with a switch, one for the receiver with 2 indicator LEDs.
Threw it up in the garage, confirmed that everything still worked. Great, then went back inside the house to close the garage door. There, I’ve got a 2nd wireless transmitter to close the garage door from inside, the house. Nothing. the door won’t close! Or at least the remote will no longer close or open the door. At this point, I feared the worst and powered off the transmitter on my door open detector. Sure enough, now the door remote works again. The transmitter on the door open sensor is swamping out the remote transmitter.
I tried trimming the antenna wire on the sensor transmitter. Yep, sure enough I can trim it short enough to get the door remote to work again, but at that point the sensor receiver isn’t getting a clear signal. Finally a bit of digging on the internet and yes, the two transmitters are pretty close. 434Mhz vs 390Mhz sigh…
All is not lost, SparkFun has another variant, same form factor, same price that runs at a 315Mhz. So I ordered a 315Mhz TX/RX pair. Swapped’em out, put’em up in the garage and yes! the door remote still works!
I think I’m done until I try to leave to drive to work the next day. Press the door remote, the garage door opens. Sweet. Get to the car, hit the remote car alarm disable/door unlock and…. no response from the car alarm. No matter how many times or how long I mash the button, no response. %$#@. So… this variant probably has the same frequency as my car alarm remote. Unplug the door sensor transmitter and still no car alarm! Evidential the rolling code has gotten confused because of either the noise or the number of times I mashed the button with no response. Sigh… I end up having to reprogram the car alarm remote in order to get it functional again. More internet digging, the car alarm is exactly 315Mhz as well.
Back to the drawing board.
So, I think maybe the comments about needing to continuously transmit a data stream are incorrect. Some software and hardware modification are required so the ATTINY13 running the transmitter can power the transmitter on/off. It appears one ATTINY13 I/O pin can put out just about enough power to drive the transmitter. So I re-wire the transmitter board to connect one of the ATTINY13 pins to the transmitter power pin.
I then recoded the software to turn on the transmitter every 10 seconds, then send a couple of copies of the data stream and then turn off the transmitter. The receiver is recoded to only show an error if it’s been more than 20 seconds without a valid data stream. I figure that way I can miss one of the every 10 second transmits and still be OK. I also figure that a brief burst of signal every 10 seconds really should not interfere with the car alarm. I mean, what’s the chance that I’ll hit the alarm remote right when the door sensor transmits. Besides, if I do, then just pressing the alarm remote button again should get a signal through as by then the door sensor will be into it’s idle state.
Code it up, install it, it works! The door sensor works, the garage door remote works, the car alarm works. I do every now and then see erroneous data on the door sensor receiver, but it clears up upon the next 10 second transmit.