I am using Wemos D1 mini and trying to use ULN2083A Darlington Arrays to drive SRD-05VDC-SL-C relay. The relay does work properly when the circuit is connected as attached schematic.
The Darlington array (ULN2803A) would decrease the load voltage by about 1 volt across the internal transistor. If I have a 5V supply connect to the array and wish to use it to drive a 5v relay, the coil would end up receiving ~4 volt when it is activated. Is it acceptable? How would this affect on the relay?
I also tried the same thing to drive SRD-12VDC-SL-C relay with the 12v supply. The voltage would drop to about 11v as well. The relay does work but I have the same question, is it acceptable?
If the both scenarios are acceptable, which setup is preferable? Also, the circuit seems too simple to me, am I missing anything to improve it?
According to the datasheet of the relay you're using both setups should work just fine. The pickup voltage is at 75% of the nominal voltage for both the 12V and the 5V version. When using a higher voltage this threshold gets lower but if you're using a relatively stable supply you shouldn't experience any problems.
Are you planing on powering your entire circuit rom a 12VDC source? Then I'd go with the 12V relay. If, however, you could also power everything from a 5V supply I'd go with that because then you'd avoid any losses from your step down converter.
These relay modules come with all complementary components needed such as freewheeling diode. You could consider placing a big cap close to the supply of your microcontroller but again, if you're using a stable supply that wont be necessary.
Jocobes:
According to the datasheet of the relay you're using both setups should work just fine. The pickup voltage is at 75% of the nominal voltage for both the 12V and the 5V version. When using a higher voltage this threshold gets lower but if you're using a relatively stable supply you shouldn't experience any problems.
Are you planing on powering your entire circuit rom a 12VDC source? Then I'd go with the 12V relay. If, however, you could also power everything from a 5V supply I'd go with that because then you'd avoid any losses from your step down converter.
These relay modules come with all complementary components needed such as freewheeling diode. You could consider placing a big cap close to the supply of your microcontroller but again, if you're using a stable supply that wont be necessary.
Thanks for the detailed answer. However, I still have some questions:
The datasheet specified:
a. pull-in voltage: 75%max -> does this mean that if the voltage is above 75% of the nominal voltage, it is okay? In this case, the minimum supply voltage to the coil for the 5v relay is 3.75v(5x0.75) and for the 12v relay is 9v*12x0.75). Does that mean 12v relay which has lower threshold as you mentioned, is better.
b. drop-out voltage: 10%min, what does it mean?
c. max-allowable voltage: 120% -> does this mean the maximum voltage for 5v relay is 6v (5x1.2) and for the 12v relay is 14.4v(12x1.2)
The input power source is 12V and I will use a step down converter to step the 12v to 5v for the micro-controller
however, you could also power everything from a 5V supply I'd go with that because then you'd avoid any losses from your step down converter.
How does it result in losses if I choose to power the relay with 12v?
Assuming my 12V source is stable, should circuit should be as it without long term problem?
a) Yes, in volts the 12V relay has a larger margin. In percentage the margin is the same.
b) It means the voltage has to drop below 10% of nominal to make the relay open again. So after being energize you need to drop below 0,5V or 1,2V for the 5V and 12V relay respectively to be sure the relay opened again. Otherwise it may hold.
c) yes
Every conversion has a bit of loss. But if you only convert 12V to 5V for the micro and use 12V for the relay the differences will be minimal. But note the ESP runs at 3V3 again so it does a conversion as well.
Use a TPIC6B595, no voltage drop and control all 8 outputs with only three pins.
That chip doesn't have free-wheel diodes and only has 30mJ avalanche energy rating for inductive loads.
You might want to check that's a good enough rating for the relay coils involved. Freewheel diodes wlll be
more bomb-proof, but will have slower switch-off times.
Generating 50V spikes in your relay driver also makes EMI problems worse.