# RGB strip and ULN2003

On the forums here I found the following scheme:

I have a RGB led strip, LED type SMD5050, 12VDC, 1.5A per 5 meter.
I want to control about 2.5 meters of this strip with an Arduino.

The scheme above shows how to connect it to a 12V power source and a ULN2003 transistor.
But how would I be able to mix multiple colors, like RED(0-255), GREEN(0-255), BLUE (0-255).

I guess the RGB pins of the strip need some kind of voltage, to produce multiple colors instead of just mixing RED, GREEN and BLUE.

I guess the RGB pins of the strip need some kind of voltage, to produce multiple colors instead of just mixing RED, GREEN and BLUE.

No just mixing the R, G B colours at different brightnesses will give you all the colours.

That schematic is no good for what you want because that chip can only switch about 650mA of current in total at any one time with each individual buffer being restricted to a maximum of 500mA.

Grumpy_Mike:

I guess the RGB pins of the strip need some kind of voltage, to produce multiple colors instead of just mixing RED, GREEN and BLUE.

No just mixing the R, G B colours at different brightnesses will give you all the colours.

That schematic is no good for what you want because that chip can only switch about 650mA of current in total at any one time with each individual buffer being restricted to a maximum of 500mA.

What should I be using instead? In the store they told me I could use this chip, even though it only provides 500mA for each channel. The strip I'm using uses 1.5A, but only half of the strip will be used, so 0.75A, seperated over 3 channels = 0.25A.

so 0.75A, seperated over 3 channels = 0.25A.

But added together will give 0.75A, which is too much for the chip due to power dissipation. See:-
http://www.thebox.myzen.co.uk/Tutorial/Power_Examples.html

You could use one chip per colour or a bigger darlington like a BD679 or a logic level FET.

Grumpy_Mike:

so 0.75A, seperated over 3 channels = 0.25A.

But added together will give 0.75A, which is too much for the chip due to power dissipation. See:-
Power Examples

You could use one chip per colour or a bigger darlington like a BD679 or a logic level FET.

So, the following setup should work?

Also, do I have to connect each of the 2-8 PINs on the ULN2003 to GND, or can I just leave them like this?

do I have to connect each of the 2-8 PINs on the ULN2003 to GND

Yes otherwise there is no path to ground for the current, nor common reference for the transistors.

That circuit will work, providing your strip works by grounding the R, G & B signals. But it is a bit of a waste using three arrays only to use one transistor per array.

Grumpy_Mike:

do I have to connect each of the 2-8 PINs on the ULN2003 to GND

Yes otherwise there is no path to ground for the current, nor common reference for the transistors.

That circuit will work, providing your strip works by grounding the R, G & B signals. But it is a bit of a waste using three arrays only to use one transistor per array.

Might be a waste, but if it works it works These transistors aren't that expensive so I'm all fine with that.

I updated the scheme, you say it should work using the following?

What would happen if I put an analogWrite of 60 on the GREEN-PIN and 160 on the BLUE-PIN, would this create nice blue-ish color a bright Aqua-blue color (Asuming that the transistor doesn't work as a resistor)

If you are going to do that then you might as well parallel those unused outputs to spread the load. That is wire pins 10 to 16 on each chip together. The data sheet says it is fine to do this.

would this create nice blue-ish color a bright Aqua-blue color

Yes.

Grumpy_Mike:
If you are going to do that then you might as well parallel those unused outputs to spread the load. That is wire pins 10 to 16 on each chip together. The data sheet says it is fine to do this.

would this create nice blue-ish color a bright Aqua-blue color

Yes.

I see I missed a word there, what I meant was: "would this create nice blue-ish color or a bright Aqua-blue color?"

And what do you mean by paralleling the unused outputs on each chip together, 16 is the output I'm using to PWM each color, right? Or do you mean 9-15?

No I mean on each chip connect 15 to 10 together, and also the inputs 1 to 7 together. This makes the current flow through all the transistors for each colour, and so puts less load on the chip.

would this create nice blue-ish color a bright Aqua-blue color
Hey I am a bloke, only girls use names like that for colours, I don't know what you would call it, try it and see.

Grumpy_Mike:
would this create nice blue-ish color a bright Aqua-blue color
Hey I am a bloke, only girls use names like that for colours, I don't know what you would call it, try it and see.

Haha, what I basicly meant is if I will be able to mix different levels of blue by using an analogWrite or if it will always be the same blue, no matter what value I put in there.

Grumpy_Mike:
No I mean on each chip connect 15 to 10 together, and also the inputs 1 to 7 together. This makes the current flow through all the transistors for each colour, and so puts less load on the chip.

Can you give me an example of that, because I got really confused now. Do you mean something like this?

will be able to mix different levels of blue by using an analogWrite

Yes the intensity of the colour will change with the PWM value you feed it. By mixing different values you will get different colours.
For an example of this see the last half of the video in my project:-
http://www.thebox.myzen.co.uk/Hardware/Hexome.html

Take that last circuit. Remove all the black wires that go to ground.
Connect pins 1 to 7 together. Do this for all three chips.
Connect pins 16 to 10 together. Do this for all three chips.

Then wire pin 8 of all chips to ground. Do not connect pin 7 to anything.

Grumpy_Mike:

will be able to mix different levels of blue by using an analogWrite

Yes the intensity of the colour will change with the PWM value you feed it. By mixing different values you will get different colours.
For an example of this see the last half of the video in my project:-
Hexome

Take that last circuit. Remove all the black wires that go to ground.
Connect pins 1 to 7 together. Do this for all three chips.
Connect pins 16 to 10 together. Do this for all three chips.

Then wire pin 8 of all chips to ground. Do not connect pin 7 to anything.

Ok, so 1-7 are all connected to the Arduino PIN, the 8th goes to GND, 10-16 to the RGB-PIN, but what happens to PIN 9?

but what happens to PIN 9?

Nothing leave it disconnected.

This pin is designed to be used with motors that generate a back EMF, by connecting this to the +ve supply will put a reverse diode across the load. You do not have to connect it to anything.

This is what i have build, and all is working great.
You can control the ledstrips with the shiftpwm library to control brightness and colors with PWM

ledstrip-2.pdf (39.4 KB)

Grumpy_Mike:

but what happens to PIN 9?

Nothing leave it disconnected.

This pin is designed to be used with motors that generate a back EMF, by connecting this to the +ve supply will put a reverse diode across the load. You do not have to connect it to anything.

I think I understand it now, just a quick check to make sure I'll be doing it right:

Now when I look at this scheme, I find it a bit useless indeed to use there transistors to controll one single channel. What is your advice, replacing them with 3 BD679?

Well you still have pin 9 connected.
Yes a single power Darlington would be good, but a logic level FET would be better as you will loose less voltage across it. See what your local supplier has in terms of logic level FETs.

I made some RGB+white LED eyes for the house for halloween.. I would recommend using discrete transistors rather than the ULN arrays because you are going to be able to sink a lot more current with discrete power transistors. I would suggest TIP120, they are Darlington NPN and can handle quite a lot of current. For an LED project I am working on at the moment, I am using home made darlington pairs, using 2n2222 for the control transistor and TIP41c for the power transistor. Only draws a couple milliamps for switching and can sink up to 6A.

Is there current limiting built into the strips you bought?

Grumpy_Mike:
Well you still have pin 9 connected.

I did solder it all up and it works perfectly fine to control the LED strip using Arduino, thanks!
What would I need to adjust the brightness of this strip?

Do things like a PWM powered resitor exist, or would another ULN2003 on the 12V do the job?