Garage Project Complete
The garage project was a little project to scratch the itch of “did I leave the garage open?” and if it’s open, close it.
I went with the Netduino to handle interfacing with the garage. It has an ethernet jack built in so networking it shouldn’t be a problem. It runs .NET code which I work with during the day and it would be interesting to see how .NET works out on the Netduino.
The Netduino has a bunch of GPIO pins which can be used for inputs as well as outputs. I was going to need one input and one output. The input would be used to monitor a switch I added to the door. This switch would provide the status of if the garage is open or not. Basically, it’s a magnet attached to the garage door and when the door is down, it closes the reed switch. By monitoring this switch, the Netduino can tell when the garage is open or closed.
To actually open and close the door, I wanted something that was rather secure, didn’t require too much engineering work, would be portable (in case I moved the Netduino or moved to a new house) and simple and cheap. I ended up purchasing a spare garage door remote. I popped the case off and wired in a relay that would keep the 9v of the garage door opener separate from the 5v of the Netduino. The relay then runs back to the Netduino’s output. When the output pin is toggled on, it simulates pressing the button on the garage door remote, triggering the garage.
Pics of the Netduino setup: https://www.rsb0.com/gallery2/v/MoreRecent/electronics/
By itself, this is pretty cool, but not that useful. I added a socket server on the Netduino so a remote connection could be made. I setup a socket client in PHP to connect to the Netduino to listen for when the garage status would change but also issue commands to the Netduino.
From the PHP script, all sorts of additional neat things could be done. I set it up to be web accessible under the right conditions. I’ve also added hooks to the script so commands could be run when the garage opens and closes. For example, the porch light turns on when the garage opens and off when it closes. So when I get home at night, I won’t be arriving in the dark.
I’ve also created an Android app which uses a collection of different Android services available to keep tabs on the garage. For instance, Google Cloud Messaging is used to subscribe to garage status updates and provide a notification on the phone.