Last time I showed you several ways to make your Arduino projects speech-driven. through SiriProxy, OS X’s built-in voice elements, some Automator scripts, or even a dedicated voice recognition hardware chip. I left you with a quick demo of how I turned on the light, but didn’t explain how I achieved it from the hardware side. Let’s see today how you can control high power devices like kettle or floor lamps.

Warning: fiddling with your home’s electrical supply is not something to be taken lightly. A 9V battery may tingle your tongue, but 120-240V can fry it and potentially kill you. If you die from this, I take absolutely zero responsibility. If you don’t accept this, stop reading now.

If you’re new to this, be sure to check out our guide to Also, I wouldn’t advise trying to control your particular kettle (for example) because of the high current — a 1500W kettle will use about 12.5A (depending on your national voltage level).

Solid State Relays

Relays are electrically controlled mechanical switches; apply voltage to the trigger side and the magnet inside will flip the switch mechanically.

They come in different sizes and ratings, so it’s absolutely essential to check the total current and voltage you intend to switch; if you try to apply 240VAC through a relay rated for only 5VDC, then bad things will happen .

The characteristics of the relays also mean that you can’t just connect them directly to the Arduino — you need to isolate them somewhat with a transistor and provide a «flyback» diode. Relays contain magnets that are inductive so they hold a charge of electricity. When you suddenly drop a charge, the inductive load goes back into the circuit it came from, in reverse polarity; a flyback diode protects the circuit.

Arduino home automation

Relays can be wired as normally open meaning «off unless you turn them on»; or normally closed meaning «on unless you turn them off».

If this is the route you want to take, be aware that this is the most dangerous as there will be exposed wires. You can purchase a relay kit from SparkFun for $20; it includes a small circuit board and all the necessary additional components to switch up to 240 V AC .

Arduino house projects

«PowerSwitch Tail»

If the idea of ​​touching any live wire scares you, but you still want a reliable wired approach, these ready-made repeaters are likely to be your best bet, selling for around $25 each. You simply plug them into the connection between the wall outlet and the device, then run the Arduino power supply and digital I/O out of the way.

Arduino house projects

They fit 120V AC in the US, but for UK 240V and other countries they only make kit form and you will need to add your own plugs. Be careful with kits as bugs could mean frying your Arduino or yourself so they are not 100% safe. To be completely sure, you should look at the next option.

Hack some sockets with a remote control

You can currently get a remote RC network jack for as little as $10-$20, and they all tend to use the same 433MHz frequency to control things, and possibly the same chip. If you’re willing to sacrifice the remote, or at least make some wire holes in the case, you can easily connect it to the Arduino.

Start by opening the remote and identifying the chip being used; the following diagram shows the output you are looking for if you have an IC SC5262 (HX2262 and PT2262 are also compatible with the same pin used) . Connect this pin to a digital output on the Arduino and you can even bypass the remote battery using a 5V power supply and ground (or just continuing to use the included battery, whatever) .

Arduino home automation

You will then want to download and place in your folder Arduino/Libraries library RFSwitch from Google Code — this will give you access to some simple device activation functions and eliminate the needless complexity of command signals. Start by creating a new class instance:

  RCSwitch mySwitch = RCSwitch (); 

In your setup() function, instantiate it on the appropriate output pin (10 in this case):

  mySwitch.enableTransmit (10); 

And in your main logic use:

 mySwitch.switchOff (3, 1);  mySwitch.switchOn (3, 1); 

(where 3 is the channel and 1 is the device number) to turn devices on and off. There are typically 4 of each channel and 4 devices, giving you 16 unique addressable devices to turn on and off.

The best part about cracking these existing consumer products is that you won’t be touching high voltage wires; everything is contained in the socket module.

Now combine this with a little Arduino internet control. , and you can turn on your devices from your mobile phone anywhere in the world. I’m pretty sure I don’t want to hand over control of anything on the internet, but to each his own. Can your Arduino dreams for home automation finally come true? You have already begun your journey to Arduino ?

Image Credit: Shutterstock — Rosette,

Похожие записи