Instructables

Reverse engineering: USB controlled home automation hack

FeaturedContest Winner
Picture of Reverse engineering: USB controlled home automation hack
Hack a wireless home automation system to be USB controlled using two AVR microcontrollers!

Check out the video! The system is really more responsive, but the browser on my phone is slow.

If you like this, you may also like this:

http://www.instructables.com/id/Reverse-Engineering-RGB-LED-Bulb-with-IR-remote/


 
Remove these adsRemove these ads by Signing Up

Step 1: Skills ans tools

Picture of Skills ans tools
saleae_screenshot.png
There are two ways of hacking an RF remote to be controlled by a computer or a microcontroller.

The lame way:
Soldering wires onto the button pads on the remote and hooking them up to an Arduino.

The cool way:
Most RF remotes have a separate module for transmitting data. This device usually has a VCC and a GND line and a DATA line. You can easily transmit your own wireless data by connecting a microcontroller to the DATA line.

However, in order to transmit something that the wireless receivers can understand, you first have to figure out how the wireless data is formatted and transmitted.

To do this hack you will need a logic analyzer and optionally an oscilloscope.

I use the Logic from Saleae. This is an awesome tool and I have done a few reverse engineering hacks using this device!

Check it out at http://www.saleae.com/logic/

It costs 149 USD but it's a good investment for any hacker!

You also need to be familiar and comfortable with microcontrollers and programming in C.

Step 2: Parts required

You will need:
  • 1x wireless home automation kit
  • 1x project box
  • 1x USB type B connector
  • 2x 3.6v zener diode
  • 1x 8.2v zener diode
  • 1x BC548 transistor
  • 2x 22pF ceramic capacitor
  • 2x 100nF ceramic capacitor
  • 1x 4.7uF capacitor
  • 1x 100uF capacitor
  • 1x 470uF capacitor
  • 1x 330uF capacitor
  • 1x 12MHz crystal
  • 2x LED with resistor (I used 1k ohm)
  • 2x 68R resistor
  • 1x 1k5 resistor
  • 1x 2k2 resistor
  • 1x 1m resistor
  • 1x 270uH inductor
  • 1x 1N4004 diode
  • 1x ATmega8 microcontroller
  • 1x protoboard. Solder eye type, not stripboard.
mdobariya3 months ago
just few minute back, I post a thread http://www.edaboard.com/thread305974.html#post1309531
, but now I found very useful page(this)..
I have not read whole article but ,, it seems very useful for me..
thanks to author of this post.. chr
ammyent1 year ago
G8 Work........
ammyent1 year ago
G8 Work
Bought a 5-pack of these things (US 120V version) and will hopefully have them next week! I really hope they have the separate radio chip like yours, this is such a clean way to do it (opposed to the soldering wires on button pads). If it has a standard 433MHz transmitter I might buy one just so I can keep the remote and still have PC/network/phone control.

Ultimate goal is a home automation system driven off a RasPi, with web interface, timers, sensors, etc.
Link so i can buy some too please
They didn't work out too well, ended up buying some from Walmart (Holiday Time brand, seasonal only) that were 3 to a pack (bought 2 packs). The 5-pack only had toggle buttons, they didn't have different commands for on and off. I did the same method of reverse engineering the protocol and used an ATTiny to reproduce the signals. I did my own Instructable about it as well.
janisalnis1 year ago
Hi!
Like your tutorial very much.

It inspired me to put togather an instructable too.
http://www.instructables.com/id/Wireless-power-outlets-for-home-automation-using-A/


Can one use voltage doubler for RF transmitter using 2 capacitors and 2 diodes.
http://www.reuk.co.uk/Making-Voltage-Doublers-and-Multipliers.htm
Sorry, I put your picture about voltage booster in the description. Is it OK or should I remove it.
007fred3 years ago
very good, its great !
fred
blackghost3 years ago
i love how thorough your explanations are !
well done
you made me interested in taking my circuits course again ha ha
cool thanks
camdenhersh3 years ago
i have absolutely no experience with building things like this but im starting my studies in electrical engineering soon and i want to build something cool like this very badly. any thoughts or suggestions?
This deserves to win the contest =)
helllordkb3 years ago
I was an EE student and this instructable was fantastic. It was an excellent walkthrough that teaches you the theory of digital circuits through a custom/cool and practical implementation. Awesome Logic analyzer btw, gonna pick up one of those for myself perhaps to replace the one i hate. Incredibly well done and really invaluable. This is like a digital control programming class and a lab in ONE instructable. Just amazing.

Nice Oscilloscope btw, looks like an expensive one. Sparkfun has a really nice usb oscilloscope just like the logic analyzer you used/referenced. Both of them are at the bottom of their tools page. http://www.sparkfun.com/categories/177. I'd love to see this done with some of the xbee units they sell, but doing it this way might be cheaper.
jonnyt63 years ago
Thanks for the excellent explanaition and idea!!!!
its nice that you explain the logic and order.
keep it up!
tundrawolf3 years ago
This is an awesome inscrutable. It has helped me a great deal with digital circuits. Thanks again.
Some projects are, I'm sure, quite inscrutable--this doesn't sound too bad. ;-)
tuleele3 years ago
This is exactly why this site and DIY is AWSOME!
pixiandreas3 years ago
Hello Everyone!

Realy nice prodjekt :-)

There is a product from a swedish company www.telldus.se named tellstick.
I have run this i 4 years with linux and windows and itś very easy to set up and work like a charm
there is also many 3part application.

/Andreas
itaross3 years ago
This is simply AMAZING!
This is what i was looking for! V-USB + RF+Android !
How can i say.....you're the best (:
Best instructable I've ever read!
Very very nice. Cool beginners guide to reverse engineering. Thanks for that!
dagob3 years ago
\\\\\\\Genious!
yizhak3 years ago
Isn't the zener diode reverse connected in the schematic?
We want the diode to reverse bias, not to forward bias.
studleylee3 years ago
Very Well Done!!!! -Lee
This is pretty cool. For my A-Level electronics project I reverse engineered an RGB LED remote that I got cheap of eBay, found the protocol much like you, and used it to control my own coloured lights which decoded the protocol! Cool
polossatik3 years ago
Don't turn it on, take it apart!..

I assume you are also suffering from an eevblog overdose? :)

nice writeup, cheers!
maltep3 years ago
I've published a similar project some weeks ago (but more protocols and pcb available):
http://www.maltepoeggel.de/?site=usbfunk
javipz3 years ago
Nice work!
That's COOL!
I understand you can control the mcu by PC through USB, but how do you control the PC by cell phone?!?! By blue tooth?! wifi? How?!!?
RetroPlayer3 years ago
Another option is to purchase the encoder ICs that most of these remote systems are based on. I picked up several encoders and decoders on ebay for a similar project. Had to order from China, though.

They are usually PT2262 (encoder) and PT2272(decoder)

I think this is awesome that you decoded the protocol, however. Lower parts count, yeah!
woodega3 years ago
Excellent! I have fairly rudimentary electronics knowledge, so this was practically a tutorial on using a logic analyzer and reverse engineering communication protocols. Not just a quick how-to, but something that I can take as a beginning step for doing similar stuff. Thanks!
one2one3 years ago
Nice: here is something similar that i did
http://linux-utils.blogspot.com/2011/01/arduino-remote-control-outlet.html
the kit was cheap (15€, 2 RF outlets modules and the remote control)
H3PO3 years ago
to do the thing with an rfm12 module, take a look at ethersex. there even is another libra set on the compatibility list, so i think it should work out of the box.
http://ethersex.de/index.php/RFM12_ASK
johnnyrun3 years ago
coool...
can we have the pcb layout??
chr (author)  johnnyrun3 years ago
There is no pcb layout, it is soldered on a protoboard..
johnnyrun chr3 years ago
Only now I see that you published .sch too... sorry.
very funny project.
I've made it in the lame way (16f627 + transistors), but it should be fine to control a lot of other receiver.
tnx a lot
TOCO3 years ago
Very impressive!
jensenr303 years ago
This is so BOSS! its awesome!
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!