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.

Garduino: Gardening + Arduino

Step 3Build Your Relays

Build Your Relays
«
  • relay1.jpg
  • relay2.jpg
  • lightcontrol.jpg
  • DSCF2086.jpg
  • relay3.jpg
This was a lot more difficult before Sparkfun released their guide; y'all have it easy now:)

I used Omron G5LE-1 relays, attaching wires with solder for the electrical connections and then adding hot glue around them for some structural integrity.

As per this guide, you should make sure to run the white wire directly to the outlet / end of extension cord and the black wire through the relay. For this to be useful, you'll also need to make sure you plug your creation into the wall corectly: black wire to small slot...

See photo 3 for a view of how you place the diode.

Obviously, you're now dealing with more potential to hurt yourself: AC does not feel good!

Oh, and there's no reason you can't use outlets or extension cords for both of these. I just switched it up for variety:)
« Previous StepDownload PDFView All StepsNext Step »
4 comments
Nov 8, 2010. 6:05 PMmbainrot says:
Its best practice regardless of how much power draw to drive the relay via a opto-isolator & power transistor pair.

Reason being is if you have any significant load on the AC side, when the power shuts off there could be a strong back EMF that upsets the micro and causes it to spaz.

Because your working with mains you need to stress that due care must be taken, due to the absence of the opto isolator there is a risk that any part of the circuit could become live with 120v mains
Mar 2, 2010. 7:02 PMPristopher says:
 Hi, I'm planning to replicate this project for college. I'm wondering, if I have a 5v relay from another brand that pulls 76mA, could it also be used on the arduino?
Jul 12, 2010. 10:11 AMozziegt says:
You can use that relay but you will need to power it with a transistor or opto isolator...but you have probably figure this out by now...
Jul 12, 2010. 7:13 PMPristopher says:
Yup, i did combine the opto isolator with an transistor in a Darlington pair. It worked like a charm.

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!
66
Followers
18
Author:liseman
bicycles, gardening, and other important stuff