Relay Question

Hello I'm pretty new to all of this, can you tell me if this relay would work for using a 5v out of the arduino to switch the 120v electrical cord?

http://www.google.com/url?q=http%3A%2F%2Fwww.te.com%2Fcatalog%2Fbin%2FTE.Connect%3FC%3D15155%26M%3DPPROP%26P%3D%26BML%3D18110%2C18112%26LG%3D1%26PG%3D1%26IDS%3D128918%2C128924%2C128930%2C112583%2C112589%2C112590%2C112647%2C112650%2C112651%2C112652%2C112576%2C112575%2C112577%2C112520%2C112518%2C112525%2C112528%2C112531%2C113309%2C112570%26N%3D5&sa=D&sntz=1&usg=AFQjCNGWKcgrfGpd-CALjPkwIABaZu7e6g

to answer this question it is requiered to know the current you want to switch as well as the kind of device you want to connect.

It is designed to be "triggered" by 5V so it will work with the Arduino. And it's rated for 3 Amps, which is about 300 Watts. For something like a 100W light bulb, it would be perfect.

DVDdoug: It is designed to be "triggered" by 5V so it will work with the Arduino.

The linked page is silent (afaics) on the triggering current though, which may be more than an Arduino i/o pin can supply (40ma absolute, about 20-30 much better) and so an intermediary transistor or opto-isolator may be required.

It would be easy to measure that trigger current by hooking the relay up to 5V with an ammeter in series and see what it draws....

I'd favour an opto-isolator anyway, since it does exactly that, isolates, and taking extra steps to keep the mains supply out of you Arduino and your fingers makes very good sense to me.

edit.... Makes even more sense to buy a relay on a board where the connections are easy to make (low voltage male / female plugs, high voltage screw terminals) and opto-isolation is built in.

That is a good one. You can get it with 1, 2, 4, 8 or 16 relays.

JimboZA: I'd favour an opto-isolator anyway, since it does exactly that, isolates, and taking extra steps to keep the mains supply out of you Arduino and your fingers makes very good sense to me.

edit.... Makes even more sense to buy a relay on a board where the connections are easy to make (low voltage male / female plugs, high voltage screw terminals) and opto-isolation is built in.

Just remember, unless the power supply for the relay board is seperate from the Arduino, the opto-isolators does nothing for the "safety"-aspect of the board. http://s3.amazonaws.com/thmb.inkfrog.com/pix/geiliablestore/4_relay_module_2.png/450/0

Also, most of the boards on the market is directly dangerous, and is clearly designed by people that know nothing about electronics.

I wrote some more in this post here: http://forum.arduino.cc/index.php?topic=256043.msg1811917#msg1811917

// Per.

Also, most of the boards on the market is directly dangerous, and is clearly designed by people that know nothing about electronics.

I tend to agree with you.

And recommending that an opto-Isolator be used in 120V switching situation in a solution that includes a mechanical relay is damn close to creating a Rube Goldberg device. http://www.rubegoldberg.com/

You do not need to do ANY optical isolation if you have a mechanical relay in a solution.

This image attached is all you need in a circuit that wants to eventually control a 120V AC lamp. You just need to make sure that your RELAY CONTACTS are rated for more than your nominal AC load. IE; use a relay with switch contacts rated for 3-5 amps at 250V and you are done. Your AC voltage is completely isolated from the low voltage side.

If you want to start talking about optical Isolation and 120V AC circuits, the logical solution is to use a Solid State Relay. A commonly available, and sometimes quite affordable pre-assembled solution for switching AC that appears to the low voltage (arduino side) as a simple LED.

…and if you are confused by AC circuits in general, best to avoid them altogether until you gain that knowledge.