FoxyRick
Advanced Member level 4
- Joined
- Jan 8, 2004
- Messages
- 1,249
- Helped
- 321
- Reputation
- 640
- Reaction score
- 277
- Trophy points
- 1,373
- Location
- England, UK
- Activity points
- 12,979
The ULN2803 has open-collector Darlington transistors as the outputs. The emitters are tied to ground. So, it can only sink current to ground, not source it.
The circuit you show is functionally correct, but you do not need the Zener diode in yours. It is there to protect against back-EMF if you switch relay or motor coils. LED's don't cause back-EMF. Just leave it out and leave pin 10 unconnected.
Also, you will need to adjust the resistor value. You can connect the LED anodes to your 5V supply, you don't need 9V. The output Darlington transistors in the ULN2803 drop about 1.2V themselves.
So, if you use 5V, there will be 3.8V remaining across the LED/resistor. If the LED drops, say, 2V at 20mA, then we need a resistor to drop the remaining 3.8V-2V = 1.8V at 20mA.
Resistor = 1.8/0.02 = 90 ohms.
Check your data sheet for your LED's. If the characteristics are different from 2.0V at 20mA then change the above accordingly.
The circuit you show is functionally correct, but you do not need the Zener diode in yours. It is there to protect against back-EMF if you switch relay or motor coils. LED's don't cause back-EMF. Just leave it out and leave pin 10 unconnected.
Also, you will need to adjust the resistor value. You can connect the LED anodes to your 5V supply, you don't need 9V. The output Darlington transistors in the ULN2803 drop about 1.2V themselves.
So, if you use 5V, there will be 3.8V remaining across the LED/resistor. If the LED drops, say, 2V at 20mA, then we need a resistor to drop the remaining 3.8V-2V = 1.8V at 20mA.
Resistor = 1.8/0.02 = 90 ohms.
Check your data sheet for your LED's. If the characteristics are different from 2.0V at 20mA then change the above accordingly.