Getting an Arduino to control a wireless outlet

arduino-433-mhz-outlet-control

[Reza's] methodical investigation of this remote controlled outlet let him patch in with an Arduino using a 433 MHz transmitter. This is a single-device unit, but the techniques used here should allow you to take control of wireless rigs that have multiple modules to control many devices.

We’ve seen some folks at our local hackerspace try to patch into the remote control itself. That used some type of weird button scanning (not just connecting a pin to ground or voltage) and didn’t pan out. [Reza] doesn’t even crack open the case of either of the units seen above. Instead, he goes straight for a wireless receiver he had on hand, using a logic analyzer to capture the signals coming from the remote.

Once he had a good snapshot of the signals sent when pressing the on or off button of the remote he set out to replicate it in his Arduino code. His function called setStateWithDelay takes three parameters: the transmit pin, the level (high or low), and a number of milliseconds to delay. Each signal calls this function many times, but working the bugs out is pretty easy; just capture the signal with the logic sniffer and compare to the stock remote.

Comments

  1. Sector67 says:

    The encoder and decoder are tri-state logic, so it’s difficult to trigger the “button presses” on the transmitter. It’s easier to just spoof the RF signal. We’ve done a few classes on it, buy those outlets around the holidays and you can get a 3 pack for about $20, it’s totally worth it just for the outlet form factor and relay, you could always put Zigbee in the case.

    http://www.sector67.org/classes.php?class_id=38

  2. Karl Sander says:

    or you could take the easy route and use this fantastic arduino library: http://code.google.com/p/rc-switch/

    I have it set up with some outlets that are 10€ for 3 outlets + 1 remote and with some 10€ E27 Sockets. I think i might be running the cheapest home automation setup possible :-)

  3. Jasper says:

    Here is a very easy to use lilbrary for different types of receivers: http://arduino.cc/forum/index.php/topic,38075.0.html

  4. Nunya Bidness says:

    The Mag Pi had a great article on capturing and reproducing these signals using the GPIO pins on a raspberry pi.

    You don’t need a logic analyzer. Hook a 50 cent receiver up to a headphone jack through a resistor and you get the same result in audacity.

    On the pi you can then control them using a cgi webapp or a cron job.

    Looks like another russian pencil.

  5. fucter says:

    Question; are wireless doorbells usually 433mHz? Because this leads to some ultra cheap home automation if so. Doorbell rings, arduino/raspi turns on light, send email/sms. We need to make our own internet of things, it wont come unless we build it ourselves. I just bought the receiver/transmitter on ebay and have everything else, will keep ya posted.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 93,803 other followers