3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

A Remotely Programable Relay Controller (Christmas Lights or Home Automation Controller)

Step 2The Hardware

The Hardware

The basis for my project was my Arduino Ethernet controller board - I simply connected 6 switched relays of some spare I/O lines, and designed a new PCB layout because I enjoy the quiet Zen state when I am laying out a new PCB.

There is nothing stopping you from putting a set of relays onto a piece of stripboard, and running them from an Arduino board with an Ethernet shield.  The only caveat is that the Ethernet shield has to be based on the ENC28J60 chipset.  That is what I support in my code.

Here is the circuit diagram of one of the relay outputs.  You can see that each relay is driven using a BC547 transistor.  There is nothing fancy about the BC547 (except that they cost about $0.03 in quantity)  you can use whatever type of NPN switching transistor you like.  There is a current limiting resistor between the base of the switching transistor and the Arduino output to protect the transistor from damage.  There is also a spike protection diode across the transistor to protect it from the large electrical spike that occurs when the relay is switched off.  There is also a LED installed so that you can visually see the state of the outputs.

You will also find the full schematic diagram for the project here as a PDF.  For more information, have a look at my Ethernet Arduino Instructable.

Update - It was suggested that the protection diodes should be placed straight across the relay - so I have amended the pcb layout, as well as fixed the schematic.  Thanks for that!

« Previous StepDownload PDFView All StepsNext Step »
11 comments
Aug 9, 2011. 2:39 PMabishur says:
So do I have to have an Arduino to program the main chip or is there another method for programming it? I know they're not too expensive, but I'd prefer a bit of a cheaper option
Apr 20, 2012. 4:21 AMdiy_bloke says:
probably a bit late for you, but if someone else has that same question:

On the Arduino.cc website there is a link for a parallel port programmer that does not ask much more than a subd 25 connector and some resistors.

For sending programs to the bootlaoded chip, consider serial upload:
http://arduinodiy.wordpress.com/2012/03/19/serial-connection-for-your-arduino-atmega/
Dec 30, 2010. 5:50 AMmantux100 says:
What P3 does?
Dec 22, 2010. 8:11 AMmantux100 says:
on schematic you wrote that the controler is Atmega8 and on parts list you write that it's AtMega 328 and that gate ic is 74ls08 but on pats list you write 74HC08 . WTF????
Dec 11, 2010. 5:26 PMhightekrednek2396 says:
what relay did you use
Dec 12, 2010. 3:49 PMhightekrednek2396 says:
will any relay that has the sepecs of this one work
Sep 4, 2010. 2:36 PMSwishercutter says:
One slight problem I think I found with your circuit. To get rid of the "inductive kick" you need to place D5 on the relay coil with the cathode on pin 4 and the anode on pin 5. Tested it in Multisim and the configuration you have still has the spikes...the point of the diode is not to shunt to ground but to route the spike back to the coil/voltage source. Also...not that it makes a ton of difference but the way its setup now you have to apply power to keep the relay inactive, if power is a concern (operating on batteries etc.) I would move Q1 so that the +12V was at the collector and Pin 4 on the coil connected to the emitter and Pin 5 on the coil to ground. It works either way...just depends on if you want an active high or an active low from your input.
Sep 4, 2010. 6:17 PMSwishercutter says:
Sorry, was reading a point wrong, the second part was completely off base...was thinking in terms of digital inputs...I was envisioning the coil as a digital input with a pullup resistor, in that sense it would give you a logic high when the input was low (I have been working on 555 stuff lately). Completely wrong for a coil I apologize but the first half is still right.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
361
Followers
11
Author:drj113
I have a background in digital electronics, and am very interested in computers. I love things that blink, and am in awe of the physics associated with making blue LEDs.