Pages: [1] 2   Go Down
Author Topic: RGB strip and ULN2003  (Read 5591 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 238
Posts: 24321
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

analogWrite
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 508
Posts: 31394
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 508
Posts: 31394
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
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?
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 508
Posts: 31394
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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 smiley-wink 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)
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 508
Posts: 31394
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Quote
would this create nice blue-ish color a bright Aqua-blue color
Yes.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Quote
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?" smiley-wink

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?
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 508
Posts: 31394
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.  smiley-wink
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.  smiley-wink
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.


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?
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 508
Posts: 31394
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 17
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
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?
Logged

Manchester (England England)
Online Online
Brattain Member
*****
Karma: 508
Posts: 31394
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
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.
Logged

Pages: [1] 2   Go Up
Jump to: