Go Down

Topic: ULN2803 Question (Read 5788 times) previous topic - next topic


Hi all,

I am trying to use an ULN2803, but I can't get output (the led doesn't blink). Attached is my schema. I connected a shift register to my Arduino Uno and I connected the outputs of the shift register to ULN2803. I know that shift register works because when I connect the green wire going to the led to the output of the shift register (from orange dot to the green dot) the led blinks.

I connected the ground of ULN2803 to the breadboard ground and Vcc of ULN2803 to +5v of Arduino Uno. Am I doing something wrong?

Also if I will be able to make this work next step is to connect a 12v DC adapter to ULN2803 (and a resistor to the led). Is it ok if I connect + wire of DC adapter to Vcc of ULN2803 and - wire of DC adapter to breadboard ground? How can I understand + and - wires of the DC adapter (I just cut the cable of a 12v DC adapter)?

Thank you...


It looks like you have the output of the 2803 wired incorrectly, and I don't see a current limiting resistor in series with your LED.

The 2803 doesn't "provide" power to the LED.  It's essentially a switch.    Typically, you wire the + side of the LED (and resistor in series) to your power supply (+5V, etc.).   The -side of the LED goes to the 2803.   

So, the current flows from the power supply into the LED/resistor, then out of the LED/resistor to the 2803, and from there to ground to complete the circuit.   


should go like this: ULN2803 pin -> resistor(~220-330ohm) -> LED neg (bigger piece of metal inside the LED). then LED pos to +5v

ULN essentially switches the GND connection on and off. you have an LED going from gnd to gnd ;)
http://dduino.blogspot.com all my Arduino/electronic projects!!!

{NEW} Getting Started, Learning, Reference + FAQ PDF!!:


I had exactly the same issue..

Take your LED flip it round, + into the + breadboard
                                      - pin to the - on your breadboard.

problem solved.

Oh, just before you try that, stick a 300 ohm resistor in series please, don't want you accusing me of blowing up your LED (which it more than likely will...)


Hi again,

Thanks all as you said when I switched places the led blinked. When I connect the +5v from arduino the led blinks properly there are 500ms between blinks.

Now I have another problem, when I connect a 12V, 1000ma ac/dc adapter with a 1K resistor as shown in the picture, the led is always on (no blink), even when arduino is detached from the computer. Another thing is even if I plug off the adapter the led is still on, it slowly fades away. Please bare with if this is too trivial :)

Thank you..


Sep 28, 2012, 10:09 pm Last Edit: Sep 28, 2012, 10:11 pm by tmd3 Reason: 1
Pin 10, called "COM," of the ULN2803 is still connected to the Arduino's VCC.  That means that the cathodes of the ULN2803's internal freewheel diodes are all connected to +5V.  But, the collector of your active Darlington driver is connected through the LED and resistor to +12V.  So, when the input is low, the internal diode connected to pin 11 is forward-biased.  Current flows from +12V, through the LED and the resistor to pin 11, and then through the internal diode to pin 10 at 5V.  The LED stays on all the time.  I'd expect it to dim and brighten a little bit as the input to the ULN2803 goes high and low.

For driving LEDs, the COM pin can be left unconnected, and that might be the best solution if you want to use different voltage sources to power the LEDs; otherwise, you'll always need to verify that COM is connected to the right voltage source.  The purpose of the COM pin, and of the internal diodes that connect to it, is to provide a safe path for the energy stored in inductive loads, like relay coils or motor coils.  Since you have none of those in the circuit, it's not necessary to connect COM to anything.

As for why the LED fades when you unplug the 12V power supply, it's likely that it's just energy stored in the capacitors of the supply.  They discharge through the circuit, their voltage falls over time, and you see the LED fade to darkness.  If you want to see the LED go dark quickly, try removing the +12V from the breadboard.

Edit:  Here's a datasheet for the ULN2803:  http://www.arduino-direct.com/Photos/uln2803a.pdf.


Thanks for the nice explanation, as you told when I removed the COM port everything worked smoothly.

Go Up