RGB LED array with Potentiometers Please Help!

Thread Starter

Coxenjoxen

Joined Aug 15, 2012
6
Hello,

I'm a beginner to Electronics and I'm trying to build a simple circuit with RGB LEDs and Potentiometers. The idea is I can mix different levels of Red Green or Blue light to achieve other colours an then alter the overall brightness of that mixed colour.

I have 4 RGB LEDs which I'd like to control the brigtness of in pairs and with in each RGB package I'd like to be able to control the level of R, G or B.

Please find attached a diagram of my circuit. My question is: will this circuit work and if so have i worked out the resistors correctly for a 9V battery?

1 & 4=120 Ohms and 2,3,5 & 6= 47 Ohms.

I will be using 1k Linear Porentiometers at A and B

Thanks for your help!
 

Attachments

Last edited:

#12

Joined Nov 30, 2010
18,224
A 9 volt battery will not provide 1/4 amp.
Get a better power supply or you will be constantly adjusting as the battery fails.
 
Last edited:

WBahn

Joined Mar 31, 2012
29,979
For the most part, this will work somewhat like you want, but probably not as well as you would like (and that is assuming that you are using a 9V source that can supply all the current you want).

First off, as you adjust one of your B pots, you will change the total current in the corresponding A pot, which will affect the voltage drop across it, which will affect the current in the other two strings on that same A pot.
 

WBahn

Joined Mar 31, 2012
29,979
Now let's consider the range of adjustment you have given yourself. Take the blue LEDs. You have 2 of them at 3.75V each, so 7.5V right there. Then a 47Ω resistor. Even if the pots are all shorted and you maintain 9V from the supply, that only give you a current of 32mA.
 

Sensacell

Joined Jun 19, 2012
3,432
Generally speaking, pots are crappy for adjusting LED brightness.
I would ditch this approach in favor of:

1) PWM (pulse width modulation) complex, but the industry standard.

2) An adjustable current source circuit- good for low power, simple applications.
 

Thread Starter

Coxenjoxen

Joined Aug 15, 2012
6
Thank your for your replies,

Now let's consider the range of adjustment you have given yourself. Take the blue LEDs. You have 2 of them at 3.75V each, so 7.5V right there. Then a 47Ω resistor. Even if the pots are all shorted and you maintain 9V from the supply, that only give you a current of 32mA.
WBahn, would you suggest simply a higher input voltage, and then adjusting the corresponding 'A pot' once the desired colour is achieved?

Thank You
 

Thread Starter

Coxenjoxen

Joined Aug 15, 2012
6
Generally speaking, pots are crappy for adjusting LED brightness.
I would ditch this approach in favor of:

1) PWM (pulse width modulation) complex, but the industry standard.

2) An adjustable current source circuit- good for low power, simple applications.
Sensacell, I need this to be small and portable so would you suggest using PWM? I've had a quick look at some 555 chips are these what you mean? Could you point me in the direction of a simple circuit which uses this please?

Thank you again
 

WBahn

Joined Mar 31, 2012
29,979
Thank your for your replies,



WBahn, would you suggest simply a higher input voltage, and then adjusting the corresponding 'A pot' once the desired colour is achieved?

Thank You
Adjusting the 'A' pot will almost certainly affect the color, possibly by quite a bit.

How best to go about this depends on what your requirements are and what your resources are. If you can throw a small, cheap microcontroller at the problem then you can keep a pretty small footprint and put the complexity into the code (and it wouldn't be that complex, either).
 

Thread Starter

Coxenjoxen

Joined Aug 15, 2012
6
Hi guys, thanks for your input again.

Adjusting the 'A' pot will almost certainly affect the color, possibly by quite a bit.

How best to go about this depends on what your requirements are and what your resources are. If you can throw a small, cheap microcontroller at the problem then you can keep a pretty small footprint and put the complexity into the code (and it wouldn't be that complex, either).
Here's a little more detail on my requirements. I'm making a character whose eyes light up (model making is my strong point electronics less so!). I want to be able to control the colour and brightness of each eye independently - that's the first 2 RGB LEDs. I'd like to be able to control the eyes with R, G, B, and Brightness dials with an additional RGB LED along side the dials to mirror that of the corresponding eye.

Here are the LEDs I've bought:

http://uk.farnell.com/jsp/search/productdetail.jsp?sku=8738661

The colour mixing works nicely with 3 pots on one LED but you're right things get all messed up with 2 eyes and brightness pots.

I've just realized that my original sketch wouldn't work due to the LED's common Cathode; I'd have to put all 12 LED's in parallel.

Thank you #12 for the PWM controller circuit but I'm not quite sure IO understand how to connect it to all of my different LEDs to have independent control of each. Do i need one of these circuits for each LED?

WBahn, I'm able to get my hands on more kit, and am a capable model maker/ solderer etc. I have access to an Arduino but wouldn't know where to start with coding. Is there something I could download and plug and play? It's time that I'm struggling with now.

Thank you again for your suggestions!
 

#12

Joined Nov 30, 2010
18,224
the PWM controller circuit but I'm not quite sure I understand how to connect it to all of my different LEDs to have independent control of each. Do i need one of these circuits for each LED?
That PWM circuit is a one adjustment controller. You would need one for each series string of LEDs. The series string is represented by D3, and it is drawn backwards! It's also missing some labels, like, "What voltage was this designed for?".

I think the point here is that building PWM controllers is NOT a tiny job that will fit in your ear. Better to use constant current circuits. They are smaller.
 

Thread Starter

Coxenjoxen

Joined Aug 15, 2012
6
Thanks #12 for your further input. It looks like I'm going to have to give up on being able to control brightness once a colour is mixed, it just seems too difficult. I guess the problem is that reducing each colour by equal proportions of current doesn't necessarily mean they will reduce equally in brightness, and thus they will create new colours. From my test it seems that the red LED is dominant, reducing the master Pot just makes everything more red.

Electronics is fascinating, I wish I had more time to get involved with it. Thanks again.
 

WBahn

Joined Mar 31, 2012
29,979
That is because the red LED has the lowest forward voltage drop, so reducing the master pot reduces the voltage across the other LED's current limiting resistors by a greater fractional amount.

You might try putting a couple of normal diodes in series with the red LEDs.

Presently you have the following nominal LED drops:

R: 2x2V = 4V
G: 2x3.7V = 7.4V
B: 2x3.75V = 7.5V

So you need to increase the voltage drop in the red string by about 3.5V. You might try putting five or perhaps six silicon diodes in series, which should get you somewhere in the vicinity. You could use a 3.3V or 3.6V zener diode in series, or use a little Vbe multiplier circuit, which would also you to adjust the voltage drop.
 

Thread Starter

Coxenjoxen

Joined Aug 15, 2012
6
Thanks WBahn, that makes sense! I'll try the test with some normal diodes. Although with the LEDs common cathode I can't put the RGBs in series. I'll put them all in parallel or have a switch diverting power to either the eyes or the controller. So I should try and find a diode with a forward voltage of 1.75.

I had a look on line for arduino sketches, and there are quite a few for 3 Pots RGB colour changers. I'd just have to work out how to have a master control over them all. Also I'd need to check if the arduino would remember the positions of the Pots when I turned it off.
 

WBahn

Joined Mar 31, 2012
29,979
Thanks WBahn, that makes sense! I'll try the test with some normal diodes. Although with the LEDs common cathode I can't put the RGBs in series. I'll put them all in parallel or have a switch diverting power to either the eyes or the controller. So I should try and find a diode with a forward voltage of 1.75.

I had a look on line for arduino sketches, and there are quite a few for 3 Pots RGB colour changers. I'd just have to work out how to have a master control over them all. Also I'd need to check if the arduino would remember the positions of the Pots when I turned it off.
The forward voltage drop of a silicon diode is going to be in the 0.6V to 0.7V range. So you would use two or three of them in series. Here a Vbe multiplier might be a better choice -- especially for experimenting to see if overall brightness controll is practical in the first place.
 

anhnha

Joined Apr 19, 2012
905
Have you looked at any battery datasheets yet? If not, go do so and then let's discuss.
Here is a datasheet of Eveready Silver 9V (6F22).
http://data.energizer.com/PDFs/6F22SIL_EU.pdf
Specifications
Classification: "Carbon Zinc" (Zinc Chloride)
Chemical System: Zinc-Manganese Dioxide (Zn/MnO2)
No Added Mercury or Cadmium
Designation: IEC-6F22
Nominal Voltage: 9.0 volts
Typical Capacity: 400 mAh* (to 4.8 volts)
Capacity Test: 5 mA continuous drain (21°C)
Operating Temp: -5°C to 55°C
Typical Weight: 37 grams
Typical Volume: 20.3 cubic centimeters
Jacket: Metal

I understand capacity mAh stands for milli ampere hour and it is a measurement of how many milli amps of current a battery is capable of producing in one hour.
A battery with a capacity of 1 amp-hour should be able to continuously supply a current of 1 amp to a load for exactly 1 hour, or 2 amps for 1/2 hour, or 1/3 amp for 3 hours, etc., but that does not mean maximum current capacity is 1A.
What spec I need to look at to know its maximum current?
 

#12

Joined Nov 30, 2010
18,224
Measure it.

A new alkaline 9V battery has 9.3 volts. Connected to a 39 ohm resistor, the voltage drops to 8.8 volts. math...math...math 2.2 ohms internal resistance and the voltage is dropping by a tenth of a volt per second (10% per second) so the internal resistance is going up by .44 ohms per second.

This is not going to hold the current stable for an hour.
 

WBahn

Joined Mar 31, 2012
29,979
Here is a datasheet of Eveready Silver 9V (6F22).
http://data.energizer.com/PDFs/6F22SIL_EU.pdf
Specifications
Classification: "Carbon Zinc" (Zinc Chloride)
Chemical System: Zinc-Manganese Dioxide (Zn/MnO2)
No Added Mercury or Cadmium
Designation: IEC-6F22
Nominal Voltage: 9.0 volts
Typical Capacity: 400 mAh* (to 4.8 volts)
Capacity Test: 5 mA continuous drain (21°C)
Operating Temp: -5°C to 55°C
Typical Weight: 37 grams
Typical Volume: 20.3 cubic centimeters
Jacket: Metal

I understand capacity mAh stands for milli ampere hour and it is a measurement of how many milli amps of current a battery is capable of producing in one hour.
That's like saying how many mph a car can go in one day. It's nonsensical, though a common misconception. But what you say next shows that you do understand the concept, just not how to express it well.

A battery with a capacity of 1 amp-hour should be able to continuously supply a current of 1 amp to a load for exactly 1 hour, or 2 amps for 1/2 hour, or 1/3 amp for 3 hours, etc., but that does not mean maximum current capacity is 1A.
What spec I need to look at to know its maximum current?
There's nothing exact about it. In reality, the capacity is strongly influenced by the current draw. In this case, the capacity was measured at a continuous current output of 5mA.

The draw at which the test is made is one indication. Frustratingly, battery manufacturer's rarely give good data regarding battery current draw limits, especially for primary cells. I don't know why -- probably marketing considerations.

But even if we use the capacity numbers given here and assume that current level has no effect, a draw of 200mA would drain the battery down to 4.8V in just two hours. And the LEDs would stop working long before that.
 
Top