Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Driving 4 LEDs and 4 Relays with a ULN2803?

Status
Not open for further replies.

blueroomelectronics

Well-Known Member
Any thoughts on problems driving 4 LEDs on the 5V rail and 4 Relays on the 12V rail with the same ULN2803? (diode clamp on 12V rail)
 
If you used the driver to switch low side it might work ok, the leds will see a reverse bias when the drive is 0ff (+12v - 5v, 7v) as long as they can stand this things should work, also you might be better putting a shottkey accross the coil as the back emf would reverse bias the led, the diode in the driver might not be quick enough esp including the inductance of the pcb track, causing high enough flyback to upset the led.
 
Last edited:
or put a diode in series with the LED that has a higher rev voltage (another .7v drop, so adjust your resistor accordingly).
 
Move the LEDs to the 12v rail?

JimB
 
If you used the driver to switch low side it might work ok, the leds will see a reverse bias when the drive is 0ff (+12v - 5v, 7v) as long as they can stand this things should work, also you might be better putting a shottkey accross the coil as the back emf would reverse bias the led, the diode in the driver might not be quick enough esp including the inductance of the pcb track, causing high enough flyback to upset the led.

Why would there ever be -7 Volts across the LEDs?

If the cathodes of the clamp diodes in the ULN2803 are tied to +12V, then the clamp diodes on the 5V LED lines will always be reverse biased. The outputs of the ULN2803 feeding the LEDs will go between about +1V and +3V. They will never go to +12V, unless some external circuitry causes it.
 
Simulated... Doesn't look like you would have any problems.

*HERE* is the link to the simulation. Java must be enabled and you must NOT use IE.

ChrisP58 said:
Why would there ever be -7 Volts across the LEDs?

Yeah, pretty much exactly what I was thinking. And the simulation shows as much.
 
Last edited:
Oh my head hurts.
I made an incorrect assumption which staring at the screen and doing a schematic I realised what, I assumed that the o/p of each driver was going to a relay coil to +12 AND the same o/p from the driver to a led to +5v.
I now realise that theres 4 leds and 4 relays on their own o/p's.
I'd better shut up.
 
A ULN2804 may be a better choice if relays are used.

If the LEDs are not operated at high speeds and you're really concerned about LED safety adding a 0.1uF-0.47uF cap across each LED will help them survive any transient noise etc that might get to them.
 
My apologies Bill it was a silly mistake. I "remebered" the 2804 being rated for higher voltage when in fact it is just the input voltage that is different, not the collector voltage and clamp diodes. Please ignore my post. :)
 
The output stages of the ULN2803 and ULN2804 are the same, so they drive relays equally.

The difference between the two is the value of the input resistor. That needs to be chosen based on what the input control voltage is. The input resistor for the ULN2804 is 10.5K, while that of the ULN2803 is only 2.7K. These form part of a resistor divider that sets the input voltage threshold of turn on. Of course, the lower resistor value works with a lower input voltage.

The ULN2803 is pretty much turned on with an input of 3V, whereas the ULN2804 doesn't even start to turn on below 5V and, depending of collector current, may need as much as 8V in.

So, for 3.3V logic, the ULN2803 is the right part.
 
From the datasheet...
The ULN2803 is designed to be compatible with standard TTL families
while the ULN2804 is optimized for 6 to 15 volt high level CMOS or PMOS.

This only apply's to the input side. You can do whatever you want within reason on the open collector output. The only difference between the two is the ULN2804's have a larger input resistor, 10.5K vs 2.7K for ULN2803. So I don't know why he made that suggestion. Then again, Mr RB may (probably) know something I don't. (EDIT: Looks like I was late to the party on this one.)

I'm using 3.3V logic if that makes any difference.

Marginal (Edit: with the ULN2803). The output transistor doesn't saturate either way. (In darlington pair transistors the output transistor will never saturate.)
 
Last edited:
Status
Not open for further replies.

New Articles From Microcontroller Tips

Back
Top