Dual Elephants Weblog

Arduino controlled lights - The Hardware

Friday Mar 27, 2009

Okay - now that I have a box it is time to wire it all up.

After playing around with various methods of switching I settled on a bunch of solid-state relays connected to the arduino.

The advantage of solid-state relays over mechanical onese are that they switched quicker, are less likely to arc and don't require any additional components to up the voltage in order to throw them.  I ended up with a bunch of FSS1-102Z relays which can be bought from jaycar for about $12 each as part SY4088.

These relays can switch 250VAC happily with only a 5V switch current.  This means I could wire them straight to the arduino.

Power comes into the box from the side goes to two distribution blocks.

One block splits the earth (green) and neutral (blue) lines into three sets with one set going to the internal powerpoint (used to power the arduino plugpack) and the other two sets going up the left and right columns of power points.  Each powerpoint is linked to the one above it which helped to keep the wiring minimal and tidy.

The other, much larger, block provides a bunch of points for connecting the live (brown) wires.  From here power is sent to the internal powerpoint and one live wire to each row of powerpoints.


The live wires go up to each row and are split in two at the last moment to each connect to one point on the load side of a relay.  The other point on the load side of the relay connects to the live plug on the powerpoint.

On the input side of the relays the negatives are all linked together and head down to ground on the arduino.

The positives are kept separate and go down to the digital outputs on the arduino.

To make things a bit easier for testing I soldered each of the incoming lines to a row of pin headers.  This means I can quickly unplug/plug in the lines to the arduino in case I need to use it elsewhere.  It also helps to keep them in order :-)

Because this box is running 240V I added a small 240v light to the top of the box that is lit up whenever the box has power (even if the arduino is not running)  This just serves as a little warning.

The final result is seen below

Next up - the software!

Like this post? del.icio.us | furl | slashdot | technorati | digg

Arduino controlled lights - The Box

Thursday Mar 26, 2009

The aim was to start with 10 outlets and build out from there.

To make things easier I decided to make a box with room for 10 standard 240V wall powerpoints.

Each powerpoint is 117x70mm so allowing for two columns of five points (with space between each to allow for plugpacks)I ended up with a base of 250x460mm.  I ended up making the box 220mm deep so that it wouldn't fall over (the exact dimension was mostly determined by the size of the piece of wood I had)

In the end I needed the following cuts:

  • 2 * 250x460 for front/back
  • 2 * 220x460 for sides
  • 2 * 250x210 for top/bottom

I cut the sides out of a sheet of melamine MDF and assembled by connecting with small right-angle brackets.  I then finished it up by applying some melamine lining to the exposed wood for aestetics.  The back panel was attached by a large hinge and a small handle was added.

Here is the final result:


Like this post? del.icio.us | furl | slashdot | technorati | digg

Arduino controlled lights

Thursday Mar 26, 2009

Last Christmas was my first Christmas in my very own house (was renting before) and so I was able to put up more lights than before.  In the process of setting up the lights I thought about making them computer controlled (so as to sync to music etc)

I had some X10 appliance modules which did the job for turning them on/off at the right times of day, but there was so much lag that I couldn't use it for anything fancy.  As such I started looking around for how to do this properly.  Most of the stuff I found was only available in the US and/or was very expensive so I figured I'd just do it myself :-)

To that end for Christmas my wife bought me an Arduino and various little bits.  I then spent a while learning how to program it.  Then after a bit more time I began work on an arduino controlled power box.  At long last I have finished it (hardware-wise - better software is still to come)

So that others may get some benefit from my testing I figured I'd blog how I made it. I'll split the build up into a few posts for easier digestion - The box, the hardware and finally the software.

Here goes nothing.

Like this post? del.icio.us | furl | slashdot | technorati | digg