Any Doctor Who fans out there? [Pat] just sent us his project on home automation… using a Sonic Screwdriver!
Ever since he pre-ordered his Raspberry Pi at the beginning of February 2012, he knew he wanted to try his hand at home automation. The easy way was to use X10 outlets, but at $20+ an outlet, it’s not that affordable. Instead, he managed to find a rather cheap system on Amazon — RF controlled outlets. They only cost about $35 for a 5-pack!
It’s a very basic system: five outlets with five buttons on the remote. All he had to do was wire up the Raspberry Pi to simulate the button presses by setting the GPIO pins high, and presto, a simple but effective home automation setup.
This is where it starts to get fun. Unfortunately, unlike a real Time Lord, [Pat] didn’t build his sonic from scratch. Instead, he found a universal remote control — styled after [Smith]’s sonic. Add another RF receiver to the Pi, a web-based interface to extend the range, and bam, you’ve got one geeky, but awesome, home automation setup.
Stick around after the break to see it in action!
Kinda reminds us of my RFID Sonic I use at work! I prefer the Tennant edition though…
There’s an IR sensor attached to the Pi. The Pi then brings the GPIO pins high to control the sockets’ RF remote, so it’s a little combination of both. Line of sight isn’t really an issue. I implemented screwdriver functionality because it was one of those “wow” factors. I love Doctor Who and it’s fun to play around with, but most of the time I’m using my phone to control the lights over WiFI.
And this was a reply to a comment that seems to have gone missing. Oh well. Oh, and I also plan to install some more IR sensors in the room to kind of help with the line of sight issue!
I’ve been playing with LiRC and RF sockets but all of the ones over here in the UK that are cheap loose their programming when there is a power cut. This is a problem if you want to hide them somewhere. Thankfully all default to off, but running around the house resetting 20 of them is going to be a PITA and I also wanted to embed them in the ceiling voids…
There is space on the board for adding an eeprom and net detective work suggested that by just doing that and changing the pinning on the MPU that it would save the values.
Cue release of magic smoke. Perhaps it would have been worth a hackaday fail.
Anyway, these sockets you are using, do they remember their programming if there is a power cut ?
Can you crack open the sockets and wire in a small battery with a diode to keep the sockets logic circuit working?
Yep. Would certainly do the trick. Small rewire to block the relay from powering up. Figured a supercap.
Just would have been easier (and cooler) if the eeprom would have worked.
Other than that, I’m basically doing as per Stefan below, but with LIRC.
Recently got the ebay transmitter receiver pair ($2 shipped !!!) prior to that just hacked out tx from the original remote which meant could also sniff the codes as they transmitted :)
These sockets don’t keep memory of what position they were in. You could try using those sockets that have separate buttons for on and off on the remote. Keep the memory of which ones were on or off on the Pi itself, and then when power is restored to the Pi, trigger “On” for the the lights that should be on.
With these RF sockets and the fact that the R-Pi can transmit RF http://www.icrobotics.co.uk/wiki/index.php/Turning_the_Raspberry_Pi_Into_an_FM_Transmitter
Would it be possible to get the PI to control the sockets without the use of the remote?
Disclaimer:not a radio expert
It’s been done!
http://www.skagmo.com/page.php?p=projects/22_pihat
Note that as it relies on using harmonics of a square wave to hit the right frequency, it needs an external bandpass filter on the RF output.
I use my PI to control a couple of NEXA remote sockets. I do this with one of these cheap eBay 433Mhz RF transmitters http://tinyurl.com/nq25s8o. I make them send the same sequence as the remote does to control the outlets with the help of a PIC. Works really well.
This is an awesome implementation! I wrote an instructable a few years ago doing something similar, but didn’t ever think of ripping apart my sonic screwdriver to incorporate that!!! I don’t have one of the universal remote screwdrivers though…just the toy one that lights up…maybe I’ll get an ATMega and an accelerometer and see if I can squeeze them in with an IR blaster to duplicate this, I REALLY like the idea of using the screwdriver. Big Dr. Who fan here too! Feel free to coment on my instructable and rip it to shreds too!
http://www.instructables.com/id/Arduino-Remote-Control-Lights-with-Universal-Remot/