Hi, I'm just starting with arduino and I have some questions regarding my project that includes relays. I need to control 4 relays (I think I'm good with low voltage DPDT, I just need to guide an audio signal path to bypass a stage or not). I must be able to activate them all at once. Looking on these forums, I understood that I can't just use the digital outs to power the relay's coils, but I need something like this
If I'm getting this right, you control the base of the transistor to open or close the power path that goes to the coils. Why can't I just use the outputs? With a 5V relay with a coil resistance of at least 250 ohm I should remain inside the current safe zone of 20mA. I never used relays before so I think I'm missing something...
Thanks everyone
Giulio
Great for one relay. but on your plain Arduino, you can easily use 10 pins. so, 10 pins x 250mA each for 10 relays.
what about the power spike or dip when your power supply has to deliver more power ?
what if you want to do 75 relays ?
broocee:
Ok! But is there a general minimum current need for the coils? Usually just the maximum is indicated.
Giulio
EDIT: I was wrong, the minimus IS indicated with a proper search. Thank you.
yes, of course there is.
spend some time with google and learn about coils. all you will get from us is tiny slices of information that do not make a whole understanding of how they work.
there is an initial power required to create the magnetic field.
then a second, much lower power needed to sustain that field.
without the first, you cannot have the second.
if you do not deliver the first in the speed needed, you cannot create the field.
if you dip below min, it will not hold.
it is dependant on the number of winds of the coil. read the data sheet for the coil.
coils that are from the same lot, same brand, same manufacturer can be off by 10% estimate on the high side.
then give it some additional power so when relay #2 is energized and the power dips, the first coil does not drop out.
broocee:
If I'm getting this right, you control the base of the transistor to open or close the power path that goes to the coils. Why can't I just use the outputs? With a 5V relay with a coil resistance of at least 250 ohm I should remain inside the current safe zone of 20mA. I never used relays before so I think I'm missing something...
The purpose of the transistor is to isolate the micro-controller to switch a load. If you are going to switch a large load, you have to isolate the uC.
AWOL:
If the coil current is low enough, sure, drive it directly, but don't forget the diode across the coil
Yes, this is true. Diodes are there in order to suppress the fly-back voltage. It should be reversed-biased from the voltage source to the coil.
The Arduino has a maximum limit to which it can supply a certain amount of current. If you are planning to drive more relays, you might have a power issue.
This is where the transistor comes in. You can safely switch the relays using the transistors, and you can get the 5V input from your source(Which we assume is a higher rated one that the pin can handle)
Gin319:
The purpose of the transistor is to isolate the micro-controller to switch a load. If you are going to switch a large load, you have to isolate the uC.
No, the purpose of a transistor here is to switch a higher current load with a lower current signal.
The circuits are not isolated.
For isolation you will need 2 separate power supplies and an optocoupler.