Problem with ULN2003A

Thread Starter

Lloyd Atkinson

Joined Feb 10, 2013
7
Hi,

I am using a ULN2003A driver chip to power a RGB LED. I am using this chip and not transistors as I will possibly eventually be using more than one RGB LED and wish for the circuit to be able to supply the needed current.

I am using a microcontroller to create the different colours using PWM. I can get this to work correctly, if I connect the RGB LED directly to the microcontroller (obviously with resistors). The RGB LED is very bright as it should be.

To test the design I constructed a simple circuit which has the RGB LED connected to the output of the driver chip, and I then simply used wires to test each input of the driver chip and to see if it would light the LED correctly.

It does light the LED's, but unfortunately not as expected. Instead of nice bright outputs as before they are at least half the brightness (even though I'm using the same resistors, 330 Ohm) and the blue part of the LED instead is a sort of purple/violet colour.

I tried connecting the GND pin of the driver chip to ground, which resulted in the LED not lighting up at all.

Also, if I then connect the output of the microcontroller to the input of the driver chip, there's no sign of life in the LED's at all! How is that possible, even though the driver chip half lights the LED's when I directly connect the inputs to 5v?

The problem is probably because of my lack of understanding of the chip and electronics, and after looking on the internet I am even more confused as to how I should connect it.

Any help or advice would be appreciated!
Thanks,

Lloyd




Here is a picture of the circuit that I have made so far:
http://postimage.org/image/6a4vgdhxl/

And here is a picture of it while I was testing just the driver chip:
http://postimage.org/image/g5mkv1nmv/
 

thatoneguy

Joined Feb 19, 2009
6,359
On the Datasheet the voltage will be 1.2-1.5V less than the supply voltage due to Vce of the two transistors.

If the supply voltage is 5V, the output voltage will be ~3.8V when on.

This will cause a lot less current to flow, making the LEDs dimmer.
 

paulktreg

Joined Jun 2, 2008
835
The ULN2003A definitely needs the 0V connection otherwise the internal circuitry is floating with no reference.

What is your supply voltage?
 

tubeguy

Joined Nov 3, 2012
1,157
Also, the ULN2003 sinks or connects each output close to Gnd through a Darlington when 5v is applied to the respective input.

For the ULN 2003 to work the RGB LED's must be common anode type. Is that the case?
 

Thread Starter

Lloyd Atkinson

Joined Feb 10, 2013
7
I had not considered the voltage drop of 1.5v. Can I use a different value resistor or do I have to scrap the idea of using this chip?

The supply voltage is 5 volts, which is what the microcontroller runs on.

And no, I am using a common cathode type.
 

thatoneguy

Joined Feb 19, 2009
6,359
Is the 5V from a 7805 regulator? Often, the input voltage for the regulator is what is used to drive the load.

The PIC can supply or sink 25mA per I/O, with a package maximum of 250mA. If you are only powering 3 LEDs @15mA, the PIC can drive them directly.
 

Thread Starter

Lloyd Atkinson

Joined Feb 10, 2013
7
I'm actually just using a Pickit to power it while I am still writing code for the PIC.

This particular LED claims it draws 30mA.

Would using common anode LED's, with lower value resistors, work?
 

thatoneguy

Joined Feb 19, 2009
6,359
What is the Vf and current rating for each element?

Once that is known, use Ohm's Law to find the resistance. For 5V, 220Ω is generally safe, but if you want them all to be equal current, the resistance may vary. Typically, Blue needs a higher voltage and current for the same visual brightness than Green does. Red and Green are usually about the same.

It is dependent on how the LED was made, they may all be equal, but that is rare.

If you don't have the data, use a Multimeter diode check to see the Vf, and assume 15mA.

Red and Green are usually about 2V, while blue can be as high as 3.5V.

Resistance would be 5Vsupply-2Vdiode/15mA for Red/green (~220Ω standard value)
and 5Vsupply-3Vbluediode/15mA for Blue (~150Ω standard value)
 

Thread Starter

Lloyd Atkinson

Joined Feb 10, 2013
7
Thanks for the help! I've been puzzling over it for a couple of days now, at least now I know what was wrong. I plan on using maybe a couple of LED's which is why I wanted to use the driver chip.
 

Thread Starter

Lloyd Atkinson

Joined Feb 10, 2013
7
Brilliant! It's working! I'm using normal LED's to test it until the common anode LED's arrive I've just ordered. Wish I knew about this before buying common cathode.
 

thatoneguy

Joined Feb 19, 2009
6,359
If you are going to use the driver, remember to subtract another 1.2V from supply voltage when calculating which resistors to use.

That PIC can drive a few 74HC595 shift registers to run all the LEDs you'd like. It's very powerful for the size.
 
Top