I am trying to use an Arduino to turn a relay on and off. I am using a 5V relay, an NPN transistor, a silicone diode, and a resistor. Please see my schematic below.
I am learning a ton about electrical engineering, but do not know for sure if my understanding is all correct. Can someone please check my work to see if I'm doing the right thing, understanding this right, and doing the calcs right? If I am, this could be useful to someone else, so I am posting all of my work on this here.
My goal is to 1) connect everything up correctly (especially the transistor, since that's confusing), and 2) intelligently choose the right resistor from the Arduino to the transistor.
See attached Excel Spreadsheet. All necessary datasheets are also attached, for your convenience, to download below.
Everything checks out, you've clearly done your homework!
The only worry I have is: what are you planning to switch? It is much easier on the relay contacts to switch AC loads than DC loads, in fact the relay contact ratings are quite different for DC and AC.
My only comment: assuming the Arduino 5v can supply 500mA (and I can't find that number anywhere right now 8)), that's a little close to the 450mA that the relay says it draws..... so presumably you're not using that 5v for anything else?
jremington:
Everything checks out, you've clearly done your homework!
The only worry I have is: what are you planning to switch? It is much easier on the relay contacts to switch AC loads than DC loads, in fact the relay contact ratings are quite different for DC and AC.
I'm planning on starting a 120V AC fluorescent lamp with the relay (just to see if I can). For future projects I may use it to do anything AC, just for fun. Ex: turn on a lamp. For DC though, how much can I pull? I found this in the datasheet:
10A 120V ac/24V dc (1C).
15A 120V ac/24V dc (1A).
But I'm not sure what 1C or 1A is in this context, or even what this is saying. Do you know?
JimboZA:
My only comment: assuming the Arduino 5v can supply 500mA (and I can't find that number anywhere right now 8)), that's a little close to the 450mA that the relay says it draws..... so presumably you're not using that 5v for anything else?
I'd have to google the # again, but I think that's what the switching regulator on the Arduino is rated for (500mAh--I need to find the datasheet myself to be sure). And the relay pulls 450mW, not mA. 450mW at 5V is 90mA, and I can only give it 4.7V, so that makes 95.7mA. If it was 450mA I'd fry my transistor, as that little guy is only rated for 200mA!
The relay coil resistance is 50 ohms for the 5V coil, so your calculations there are correct.
The relay data sheet indicates that there are two types of contacts, A and C. I don't know what that means (perhaps the normally open and normally closed contacts are of different types), but depending on the type you can switch 10 amps or 15 amps at either 120 VAC or 24VDC. Assume the lowest rating for safety and you should be OK.
From the data sheet:
Contact Arrangement : 1 Form A , 1 Form C.
Contact Material : AgCdo.
Contact Rating : 10A 120V ac/24V dc (1C).
15A 120V ac/24V dc (1A).
A little bit clarification on relay and contactor ratings:
Every time you break a current in a electromechnical switching device you get an electrical arc. This is because the electrical field strenght at the moment the contact surfaces start to separate is very high. This because the distance is very small. So this arc cannot be avoided. This arc consists of very hot gas hat scorches the contact sufaces. This damage depends on two parameters
The arcing time wich is shortened by moving speed of the contact surfaces and prolonged by voltage. In order to move the contact surfaces quickly a strong spring is needed which in turn needs higher coil power.
The intensity of the arc wich is dependent on the current.
Resistive AC loads (AC1) extinguish the arc at the next zero crossing and are considered light loads.
Inductive AC loads(AC3) prolong the arcing time becuse of the inductance involved. This gives a voltage rise across the contact surfaces.
DC loads dont self-extinguis the arc. The arc burns until the voltage cannot longer maintain it. This is why DC ratings are consideratebly lower than AC ratings.
Resistive AC loads (AC1) extinguish the arc at the next zero crossing and are considered light loads.
Inductive AC loads(AC3) prolong the arcing time becuse of the inductance involved. This gives a voltage rise across the contact surfaces.
DC loads dont self-extinguis the arc. The arc burns until the voltage cannot longer maintain it. This is why DC ratings are consideratebly lower than AC ratings.
JimboZA:
On the other hand, you could take the easy road and get a factory built one!
Very good link! That looks really useful. I'll still build my own since it's cheaper, but that is really cool, and gives me alternatives and additional info. when I need it!
nilton61:
A little bit clarification on relay and contactor ratings:
Every time you break a current in a electromechnical switching device you get an electrical arc. This is because the electrical field strenght at the moment the contact surfaces start to separate is very high. This because the distance is very small. So this arc cannot be avoided. This arc consists of very hot gas hat scorches the contact sufaces. This damage depends on two parameters
The arcing time wich is shortened by moving speed of the contact surfaces and prolonged by voltage. In order to move the contact surfaces quickly a strong spring is needed which in turn needs higher coil power.
The intensity of the arc wich is dependent on the current.
Resistive AC loads (AC1) extinguish the arc at the next zero crossing and are considered light loads.
Inductive AC loads(AC3) prolong the arcing time becuse of the inductance involved. This gives a voltage rise across the contact surfaces.
DC loads dont self-extinguis the arc. The arc burns until the voltage cannot longer maintain it. This is why DC ratings are consideratebly lower than AC ratings.
In this case RC snubbers are usually just a resistor in series with a capacitor across the input. The Cap eats the high frequency pulse and the resistor limits the current through the snubber. However, from my experience, the kickback diode you have should handle everything you throw at it in this case Use something like a 1N4007. Another similar device to a Varistor (And possibly the same, but I think it is built slightly different) is a Transient Voltage Suppressor.
I also believe, but I'm having trouble finding something to confirm it, that in Relays: 1A is a NO SPST, where as 1C is NO/NC SPDT. 2A and 2C would be DPST and DPDT respectively.
mirith:
....
I also believe, but I'm having trouble finding something to confirm it, that in Relays: 1A is a NO SPST, where as 1C is NO/NC SPDT. 2A and 2C would be DPST and DPDT respectively.
this is correct. you can google form-A and form-c to get hits.
an electro-mechanical relay is a break before make device. by design, it has to open [break] one set of contacts so that it can make on another set.
Panther3001: I was reading your post/ Questions. I notice you was asking about AC Amps and DC amps . Nilton61 is 100 percent correct about arcs at higher volts etc. What he didn’t say is that both AC and DC amps is listed because of the caraticis between AC-DC Volts. Just with in the AC volts class its can be tricky if you not careful. I will start first just the different between AC and DC volts/ Amps. First when a relay/switch is rated what they are rating is the mechanical metal linkage that makes the internal switch. Usually the thicker and better conductor type of metal used makes a higher amperage and better relay/switch. Now back to Volts/Amps. AC volts are much higher than DC volts when rating relays at a stated amp. This is because DC volts is Constance and AC volts pulse . By the AC Volts able to pulse it gives enough time for the wire to rid the heat that come from the flow of electricity . DC Volts does not pulse there for it become warm due to the Constance flow of electricity. Rating AC relays. Lets say you have a 220vac 10amp relay. A rule of thumb is that same relay will be rated at 110vac 18amps. The relay will at 110vac will be just shy of double the 220vac rating. The relay is rated little shy is because a safety factor in place due to the linkage gets a little warmer because the volts. is less. A little FYI Amps is another word for Heat. Breaker in you house panel box measure heat in the wire not the electric as mean people thinks. I am pretty sure you already knew that by you being here. You stated that you was hooking up a light. Lets look at what a light pulls as for as amps. Ok lets take a 100w light bulb. I’m going to use 110volts for this figure. Y you may have few more volts not all devices are the same but for this I will use 110vac. So if you say Volts x Amps = Watts That would be 110 x ???= 100 so 110 x .91 = 100.1
That 100watts light buld will pull .91 Amps. Now you must figure in the wire in which you will run the light. So lets just say after you add the wire and the light together you come up with 1 Amp total. You will next have to add 20% heat factor in . Now you will have a total of 1.2 amps. So you will need a relay that will handle 1.2 amps for 110vac. In the real world you not going to find a 1.2 amp relay so you will need a 1.5 Amp knowing our figures we know that this relay should have a long lifespan.
Another FYI. A normal house with a #12 wire with 20Amp @ 110Volts breaker. Will handle 1760Watts.
110Volts X 20Amps = 2200Watts 2200 Watts X 80%Heat Factor = 1760 Watts. This is what a 20 Amp circuit / breaker is rated for. A beaker is a type of Switch. Just like that relay. They are both figure same way. Now lets say you have 10 Plugs on this circuit. Ok so at 1760Watts / 10Plugs = 176Watts so Ea Plug can handle 176 watts equally. Lets see how many Amps that is. 110v / 176w = 1.6 Amps equally. 10P X 1.6A= 16A 110V X 16A- 1760W 1760 W X 20% H= 2200W = 20Amp Breaker
Last FYI. All Normal plus are rated at 15 Amps. If you buy a heavy Duty Plug them you are buying A 20Amp. Which is a waste of money. If you had something that pulled of spike that amount of current. You need to up size your wire or have an independent circuit., I hope this is some help to you.
JRoberson, thanks for your insight on the house wiring; I really appreciate that. What's your background? Is the 80% "heat factor," as you call it, standard for house wiring?