How do I use 5VDC to switch 120VAC?

Thread Starter

Ingeniir

Joined Jun 29, 2011
19
Hey all,

I want to use an Arduino (can output a maximum of 5VDC) to switch 120VAC lightbulbs. However, most 120VAC relays have turn-on voltages of around 30VDC. So what kind of circuitry can I use link the Arduino to the lightbulbs? Should I just use another relay in between the Arduino and the larger relay?

Thanks
 

SgtWookie

Joined Jul 17, 2007
22,230
You need to supply more information about these 120vac light bulbs; what will the total wattage requirement be?

The Arduino will have a limited I/O current capability on its' pins; probably around 20mA. It will not be able to drive an electromechanical relay coil directly, but it could drive a solid state relay (SSR) directly. You could also use a transistor to drive a relay coil.

There are electromechanical relays available with contacts rated for >120v and significant currents, with coils rated for 5VDC. Digikey and Mouser have search engines that will allow you to narrow the selection down to meet your requirements.

However, we do not know where on the planet you live, so can't really suggest a supplier. You should put your general location (at least your country) in your profile, accessible under the "User CP" link - make certain that you click the "save" button at the bottom after entering your location)
 

strantor

Joined Oct 3, 2010
6,782
What are you powering your arduino with? In my case, I use a 12VDC wall wart that puts out 2.4A. I use transistors (TIP 120 usually) to drive 12V relay coils to switch 120VAC; the relay coils are powered by the same 12V wall wart as the Arduino, it's a simple setup. look here for the diagram (all the way at the right hand side). use a 1n4004 diode in parallel with the relay coil. If you are using a 9V battery, you might want to upgrade; if the battery does have enough juice to power the relay, it probaby won't last too long.

EDIT: but since it's 120VAC, it would probably be more efficient to use a SSR as sgtWookie suggested, not too sure which option is cheaper, look around
 

Thread Starter

Ingeniir

Joined Jun 29, 2011
19
This IS pretty much what I need, but the price is too high for me. I need to switch 4 lightbulbs independently, and 4 of those devices would cost $80.
 

Thread Starter

Ingeniir

Joined Jun 29, 2011
19
I just took a look on Mouser, and found exactly what I needed, a relay that is capable of switching 120VAC, with a must-operate-voltage of <5VDC: http://www.omron247.com/marcom/pdfcatal.nsf/PDFLookupByUniqueID/64AC57FB68FACE4586256D35004F60AC/$File/D20G5LE0503.pdf?OpenElement. Thanks!
 

strantor

Joined Oct 3, 2010
6,782
I just took a look on Mouser, and found exactly what I needed, a relay that is capable of switching 120VAC, with a must-operate-voltage of <5VDC: http://www.omron247.com/marcom/pdfcatal.nsf/PDFLookupByUniqueID/64AC57FB68FACE4586256D35004F60AC/$File/D20G5LE0503.pdf?OpenElement. Thanks!
that coil draws 79.4 mA, double what the arduino can put out, 40mA. That's why we didn't recommend a relay from the beginning

If you want to use a relay, refer to post#3. better to use a MOSFET than a TIP120 transistor.
 
Last edited:

Thread Starter

Ingeniir

Joined Jun 29, 2011
19
Thanks for the replies everyone, but there's some terminology flying around that I don't understand, and I just want to clarify some things.

Wouldn't arduino(5VDC)-->transistor(about12VDC)-->electromechanical relay (120VAC) be the equivalent of arduino-->smaller electromechanical relay --> large electromechanical relay?
 

strantor

Joined Oct 3, 2010
6,782
Thanks for the replies everyone, but there's some terminology flying around that I don't understand, and I just want to clarify some things.

Wouldn't arduino(5VDC)-->transistor(about12VDC)* -->electromechanical relay (120VAC)** be the equivalent of arduino-->smaller electromechanical relay --> large electromechanical relay?
You are only acknowledging 1 aspect of your 5V output from arduino; Voltage. There is another limiting factor, Amperage. The arduino is only capable of outputting 5V at 40milliamps(mA). you would be very hard-pressed to find a relay where the coil draws less than 40 milliamps. Relay coils are power hungry when compared to what the arduino is capable of supplying.

* the transistor is not a 12V device. The part I originally specified (TIP120) will take a 5V signal with very very little milliamps and switch up to 60VDC. I may have mislead you with the 12V I mentioned. the 12V is what the transistor will switch. The transistor will be switched by 5V and it will switch 12v to your relay.

** the relay is not to be a 120VAC relay; it will have 120VAC rated contacts. it will be a 12VDC relay with 120VAC contacts. the relay will be switched by 12VDC from the transistor and it will switch 120VAC

There are better (more efficient) options than a TIP120 transistor, such as MOSFETs, but TIP120s are redily available and I have experience using them, which is why I recommended that. someone else may be able to advise you of a better MOSFET option, but I cannot at this time.
 

Thread Starter

Ingeniir

Joined Jun 29, 2011
19
OK, I think I understand all of what you're saying. I'm definitely going to give all this a bit more thinking, you're definitely correct when you said I have not been considering amperage as a limiting factor.

But I don't think my main question has been answered: why use a transistor rather than a electromechanical relay?
 

strantor

Joined Oct 3, 2010
6,782
...I don't think my main question has been answered: why use a transistor rather than a electromechanical relay?
Ok, let's recap:

1.
The Arduino will have a limited I/O current capability on its' pins; probably around 20mA (40ma). It will not be able to drive an electromechanical relay coil directly, but it could drive a solid state relay (SSR) directly. You could also use a transistor to drive a relay coil.
I just took a look on Mouser, and found exactly what I needed, a relay that is capable of switching 120VAC, with a must-operate-voltage of <5VDC: http://www.omron247.com/marcom/pdfcatal.nsf/PDFLookupByUniqueID/64AC57FB68FACE4586256D35004F60AC/$File/D20G5LE0503.pdf?OpenElement. Thanks!
2.

that coil draws 79.4 mA, double what the arduino can put out, 40mA.
3.

you would be very hard-pressed to find a relay where the coil draws less than 40 milliamps. Relay coils are power hungry when compared to what the arduino is capable of supplying.
Your question has been answered 3 times; here goes #4:
You are not going to find a relay that draws so little current that the arduino will be able to power it directly. the arduino can only output 40ma!
 

mcgyvr

Joined Oct 15, 2009
5,394
yeah but why do you need a transistor...:p:D:p

Your relay needs to get paid 100 milliamps to do work...
Your arduino only has 40 milliamps...
Your transistor takes the 40 milliamps from the arduino grabs the 60 milliamps in his wallet and pays the relay. and the circuit works... :)
 

Thread Starter

Ingeniir

Joined Jun 29, 2011
19
Sorry everyone for the repetition! Reading back on all the posts in this thread, especially the ones quoted by strantor, I can't believe I didn't understand it before now. I must not have been reading the posts closely enough.

You are not going to find a relay that draws so little current that the arduino will be able to power it directly. the arduino can only output 40ma!
I understand now that the reason everyone is suggesting I use a transistor to act as an intermediate between the arduino and the relay instead of a smaller relay is because electromechanical relays small enough to operate within the 40mA range of the arduino simply don't exist. Thanks everyone, for your patience!
 

nsaspook

Joined Aug 27, 2009
13,086
Small 5vdc relays that use under 40mA do exist and can switch 120AC with ease. (how cost effective is another question but it reduces interconnect and circuit complexity with no extra drivers)
I use several of this 40mA type in my solar monitor project directly driven from PIC18 output ports. The measured hold current is about 20-25mA.
http://www.mouser.com/ProductDetail/Omron/G6B-1174P-US-DC5/?qs=CX134%2bdLMDE2sGcCBpxiIw==
http://farm3.static.flickr.com/2504/5761948773_bdcd6e4098_b_d.jpg

5vdc 24mA relays with 5A 230 VAC/30 VDC contacts.
http://www.mouser.com/ProductDetail/Omron/G6DS-1A-H-DC5/?qs=Qrpqs4v%2bmsZg6FhbxWzU8w==
 
Last edited:

strantor

Joined Oct 3, 2010
6,782
Small 5vdc relays that use under 40mA do exist and can switch 120AC with ease. (how cost effective is another question but it reduces interconnect and circuit complexity with no extra drivers)
I use several of this 40mA type in my solar monitor project directly driven from PIC18 output ports. The measured hold current is about 20-25mA.
http://www.mouser.com/ProductDetail/Omron/G6B-1174P-US-DC5/?qs=CX134%2bdLMDE2sGcCBpxiIw==
http://farm3.static.flickr.com/2504/5761948773_bdcd6e4098_b_d.jpg

5vdc 24mA relays with 5A 230 VAC/30 VDC contacts.
http://www.mouser.com/ProductDetail/Omron/G6DS-1A-H-DC5/?qs=Qrpqs4v%2bmsZg6FhbxWzU8w==
I eat my words. I have spent hours looking for this in the past (last year?). Last time I played with an Arduino, ironically. It's a good thing I didn't have a money bet on it.

You know, at that time, I even went to the arduino forum looking for a relay recommendation and everybody said that arduino can't power a relay. that's where I learned about doing it with a TIP120.
 
Top