Arduino Project 1 – web enabled 12V and 240V relay control box

I’ve actually just finished this one so I thought it should make a good first project post 🙂

The project:

The general idea in my head was to switch 240V circuits both from a webserver and a wall mounted control board. This currently allows control for three circuits. Channel one switches a 240V 4-way extender (this one feeds the power supplies for the other two channels, I wanted to be able to easily turn them off when not needed or when I work on things), channel two switches 12V DC for the night vision boosters (the CCTV cams have night night vision rings built in but they did not reach the far end of the garden) and channel three switches 12V AC for the new outside path/wall/mood lights.

Now the more intricate details. I’ve used an  ATmega328 based Arduino Duemilanove with one of my old network shields (the one without an SD-Card reader). It runs webduino (http://code.google.com/p/webduino/) which I have tweaked slightly to only allow switching of the digital pins 5-9 for this setup. Obviously I needed an external 5V PSU to run all this as the Arduino wouldn’t handle the  load on it’s own so I used an old but very reliable IOMEGA ZIP PSU. Each of the 5-7 digital Arduino pins then drives a 5V Relay via a transistor to open and close the actual payload circuits which are handled by individual Sparkfun Inline Power Control boards (http://www.sparkfun.com/tutorials/119). The Potter and Brumfield Relays on those are switched with 5V DC and can deal with up to 30A 240V AC 🙂

All this has been installed in a nice black plastic enclosure, the 240V supply comes into the box through a fused inlet plug (like the ones found on a Computer PSU but with a built in fuse holder). Each of the little 5V relays in the main box has one green LED and one red LED which against each side for diagnostics purposes (I’m lying here, I just love to watch LEDs 😉 and I have passed the same through to the little wall mounted control box which comes with matching red/green LEDs but also three little rocker switches which put 5V straight through to the Inline Power Control boards.

More ideas:

This setup has now been in use for a few days and works very well. Things I’d like to add in the future are a temperature sensor inside the main Arduino enclosure (I’m always afraid that it might get too hot in there for the little Arduino) which could drive a tiny  fan if needed and I want to add the temperature readout to the webserver including a little on/off status for the fan. Obviously the whole setup can control more circuits either through the other Arduino pins or just an added shift register. It is very likely that I’m going to extend this in the future. I’ll also make the webduino website a bit prettier, so far it’s very functional and doesn’t even explain what the pins are switching…

And here come the pictures:

The first breadboard prototype for five channels (fifth one on the small breadboard and with a little button to experiment for the wall mounted control box setup).

And this is the finished wall mounted control box: