Where to begin, oh I know the problem I wanted to solve.
Problem:
I have a 7 year old daughter, who likes to ride her bike, ride her scooter, go play with her friends in the neighborhood, all normal and fun activities. However there has also been some reports of tools stolen from open garages and other unsavory happenings that at the very least require you to be aware when the garage door has been left open.
Solution:
My first idea was to have an Arduino Uno monitor a magnetic reed switch and have it communicate in some way with my some sort of display in the main room. I had thought to have the Uno mounted in a box near where I have the door opener switch in the garage, which is also near the media closet with my home control computer. I could then talk to the Uno via its USB port and that would also power it.
However I happened across an article on Hackaday that showed an implementation of a similar problem, though the author of the article had been wanting to control the door more than monitor it.
It was like a lightbulb went off in my head!
Implementation:
So a quick summary of my implementation, then I will go over it again in a little more detail.
At the garage door, I have a home security magnetic reed switch bought off Amazon, this is connected to a board hosting a Roving Networks WiFly (RN-XV) which transmits a UDP status update every 2 seconds to my home network. It also allows a single TCP connection from my home control system over which I could control the output pins and via a relay the garage door.
On my home control system, I implemented an application that monitors the UDP broadcasts and maintains an internal state, when the state changes it sends a command via an XBEE module connected via USB to a remote XBEE module in the main room. The remote XBEE is connected to an ultra-bright LED and hidden in an old camera.
The same software I implemented to monitor the WiFly UDP packets, also implements the OSC protocol, and listens for messages from OSCTouch running on my iDevices (iPod touch, iPad, iPhone) and allows me via the TCP link to control the garage door and monitor the doors status from other areas of the house and remotely.
The screenshot from my iPhone shows the UI I created using TouchOSC and its associated editor. The embedded circle in the large button updates and shows the button is pressed, the large circle bottom right shows the status of the door, off is closed and on (it’s an LED) when the door is open. The home control software on;y sends updates when it knows a remote control is connected, the keep-alives from the handheld weren’t starting soon enough for me, so I wasn’t getting updates started in a timely manner, hence the refresh button to kick things off (most of the time I don’t actually need it).
So, basically the UI will send a command to the home control server, it sends a button down and a button up, I trigger a message from the home controller to the WiFly when I see the button up. The WiFly toggles a relay for 250ms when it receives the command; the relay is in parallel with the normal garage door opener; to open or close the door.
XBEE:
Enough has been written about the XBEE elsewhere, but basically I’m finding the command interface a little unreliable, I guess I need to implement a more robust sender so that it can tell if the remote node was updated and the light switched. I’m sure this is my fault rather than that of the XBEEs, but they are frustrating. I’m sure as a wire replacement for a host to micro controller they would have been fine.
WiFly:
After the frustrations of the XBEEs I love this little thing! A drop in replacement for the XBEE that talks over WiFi and broadcasts status messages, not only that you can remote into it to control it’s outputs or use it as a WiFi to serial adaptor for a micro-controller. Props to the guys at Roving Networks and thanks also for their technical guy Mike Conrad for calling me to give me advice on setup.
I used a XBEE USB Explorer to program it, using a terminal application, then wired it into a board, very similar to the one mentioned in the Hackaday article. This is wired into the garage door control via a couple of spade connectors in parallel with the existing door switch. I also wired up the reed relay to an input and the status of the inputs is broadcast every 2 seconds. Fast enough for the front room display and the UI on the TouchOSC.
Remote Display:
It took me a considerable amount to time to find something in which to mount the LED that would tell me that the garage door was open. It had to be something that has the all important WAF (Wife Approval Factor) and that she wouldn’t mind sitting in plain sight at all times, lots of ideas were considered and eventually I settled on an old camera I bought during the summer, neither it nor the attached flash worked, but it’s a beautiful piece of machinery and looks cool too.
The flash was the perfect place to mount the ultra bright LED, and the lens of the flash diffuses it nicely.
I gutted the inside of the flash, large capacitor and large battery, this made room for the XBEE module, a power regulator and some wires.
Ok, enough for now, will draw up a diagram or two for the next post and some of the code.






Example above shows a faulted zone (motion detector).
A little googling later and I found an awesome single tasker application called
I have a few project ideas for which a small micro-controller would be a perfect fit. Once such project is a traffic light controller for entry into my garage, to let me know when I am close enough to the wall to allow the garage door to close, while still allowing me to walk in front of the parked car for access to the workbench. The other part of the same project is for leaving the garage, when the door is opening I don’t want to start backing up and hitting the door before it’s fully open. Yes I could manage the former by paying attention, or judging the distance, the latter by being patient and waiting, but where is the fun in that?