# Problems with uln2803 darlington transistor array

I am using a few ULN2803's to control LED's. The pin connections and circuit that I am using are shown in the figures below.

When a HIGH signal is sent to any of the inputs of the transistor array, all of the LED's switch on, whereas only the one receiving the 5V signal is supposed to be switching to ground.

When there is no HIGH signal to any of the inputs, all LED's are off.

Is there something obvious that I am missing? What would the solution be?

simulate this circuit – Schematic created using CircuitLab

ULN2803 Datasheet

• Why have you got a 300 ohm resistor in the ground connection? – Andy aka Sep 23 '16 at 13:53
• To limit the current through the LED(s). – Lkz Sep 23 '16 at 13:59
• Have you thought about why that doesn't work when different numbers of LED's are lit? – John U Sep 23 '16 at 14:47

O1, O2, ... On outputs are open collectors. So, cathode of each LED should be connected to each output. Don't forget to connect the anode of each LED to positive supply line with a series current limiter resistor (First answer shows how to calculate its value). GND should go the negative supply line (i.e. (-) terminal of battery) - If you want to measure total load current, you can place a small resistor (say, 1 Ohm) between this pin and negative supply line. COMMON terminal is for protecting the collectors, so you can connect this pin directly to the positive supply line:

simulate this circuit – Schematic created using CircuitLab

Also, if you want to drive a single LED for each output, I personally recommend you to use 5V or 9V instead. Because 12V seems to be a bit high.

• So, the question asked was why his circuit does what it does. Sure, making a recommendation is nice but it doesn't answer the question. – Andy aka Sep 23 '16 at 15:32

The positive side of your supply has to go to anode of the leds with a resistor in series. The negative side of your supply to the ground. The common again to the positive side of your supply. Is only for protection against flyback. See the example in the datasheet.

You are raising the common emitter voltage with R1 so that they all turn on.

• To use it properly, ground pin 9 to Vbat- and supply series Current limiting R to each LED { chose on either side}.

• Normally the supply voltage is only <2V greater than the LED string

• You calculate the V drop on R to limit the current and subtract the Vout(sat) voltage from Vbat @ estimated current.

• If you use a single LED, then choose 5V
• and (5-1.2-Vf{led}) / If{led} = R
• How does raising the emitter voltage turn on an NPN transistor? – Andy aka Sep 23 '16 at 14:08
• good question. ... maybe...thru the parasitic output diodes not intended as conductors. All LEDs on dim. – Tony Stewart Sunnyskyguy EE75 Sep 23 '16 at 14:23
• I think I will try this. Any specific reason to use separate resistors for each LED besides having a constant current flow that does not depend on the number of active LED's? Asking since space is very limited so adding individual resistors could be quite difficult. I don't mind some fluctuations in brightness. – Lkz Sep 23 '16 at 14:39
• What LEd pn and current? – Tony Stewart Sunnyskyguy EE75 Sep 23 '16 at 14:41
• Also, you are correct that the LED's not intended to switch on are on dim. – Lkz Sep 23 '16 at 14:41

Here is how I would do this.

First, I would select a LED (for example this one Datasheet). From this particular datasheet we can see that the typical forward voltage is 3.2 V @ IF 20 mA. (Substitute in your own values as needed.)

Now we need to select a resistor to drop the 12 V supply down to about 3.2V. $$V = IR$$ $$(12 - 3.2)V = 20mA * R$$ $$R = 440 Ohms$$

Now as a check we should ask how much power will be dissipated in the resistor. $$P = VI$$ $$P = 8.8V * 20mA$$ $$P = 0.176 watts.$$ So a 440 Ohm 1/4 watt resistor for each LED is required. (440 Ohms is not a standard value so you can use two 220 in series) On a side note, if this is for a home project that shouldn't be a problem, if not you may want to consider lowering the voltage of the Power Supply (Battery) to waste less power.

Putting it all together...

simulate this circuit – Schematic created using CircuitLab