RGB LED colour and brightness control

Thread Starter

kimdenton

Joined Feb 1, 2024
3
I am a mechanical engineering student so only have a basic knowledge of electronics. I am using some RGB LEDs and I want to control their colour temperature and brightness. I am controlling the colour temperature with PWM but want to control the brightness with another method so the colour is the same as the brightness varies. I have been looking into variable resistors and constant current reduction as a way to control the brightness but I am struggling to find a way to control the colour and brightness separately.

Is there some way to do this, or any suggestions as to where to find good information on how to do this. Thanks!
 

Tonyr1084

Joined Sep 24, 2015
9,744
Welcome to AAC.

I would approach this with using a single resistor for each color. Since each different color will have a different Vf (forward voltage) using the correct resistor for each color should work nicely. I'd opt for having the resistor after the LED's and use PWM voltage input to drive the current into the LED's. Give me a min and I'll bang out a drawing.
 

Dodgydave

Joined Jun 22, 2012
11,395
Pwm will give the Voltage amount of each led, so you could also lower the height of the waveform as well which will alter the led current vua the series resistance., if you can post a circuit diagram of how you're doing it then we can modify the circuit.
 
Last edited:

ApacheKid

Joined Jan 12, 2015
1,762
I am a mechanical engineering student so only have a basic knowledge of electronics. I am using some RGB LEDs and I want to control their colour temperature and brightness. I am controlling the colour temperature with PWM but want to control the brightness with another method so the colour is the same as the brightness varies. I have been looking into variable resistors and constant current reduction as a way to control the brightness but I am struggling to find a way to control the colour and brightness separately.

Is there some way to do this, or any suggestions as to where to find good information on how to do this. Thanks!
The current through a single LED will determine its intensity and the relative intensities of the three LEDs determines the color.

Can you explain what you mean by "controlling"? what is the source of the control signals you are using?
 

crutschow

Joined Mar 14, 2008
38,316
Another way is to use a constant-current driver for each color LED.
You can have an individual control to each driver to set the color, and a summed control to each driver for the overall brightness.

How much LED current are you controlling?
 
Last edited:

Tonyr1084

Joined Sep 24, 2015
9,744
Finished a schematic. Looking at it I realized I did not give you individual control for each color. How involved do you want this to be?

This is my first thought. I'm certain others have different approaches. Probably better than mine. This circuit allows for individual control. I still don't know exactly what you want. If you want to set each at a specific control and then adjust the brightness of the overall circuit, I'm just not sure of your goal. Each chip is a 555 timer chip. Values of components are to be determined by you, the engineer, who knows what it is you're after.
1706812885624.png
 
Last edited:

crutschow

Joined Mar 14, 2008
38,316
Adding a common PWM control for the three LEDs would require a PWM circuit that is voltage controlled, which cannot be readily done with a 555 circuit.
Linear control, as I proposed, makes separate and common control of the LED currents simpler.
It likely can be done with one or two LM324 quad op-amp IC packages, and three transistors, depending upon how you want to vary those currents.
 
Last edited:

MisterBill2

Joined Jan 23, 2018
27,164
To clarify a few details that seem to be incorrect: PWM control provides an adjustment of the AVERAGE POWER, not the voltage or the current. So the average (apparent) brightness of an LED varies, while the actual brightness is not changed.
So with a white led PWM CAN CHANGE THE EFFECTIVE BRIGHTNESS without changing the color temperature. Color temperature of SOME WHITE LEDs is affected by the current.
The other detail is that colored LEDs usually do not change their color aseither voltage or current are changed.
 

MaxHeadRoom

Joined Jul 18, 2013
30,557
I am a mechanical engineering student so only have a basic knowledge of electronics. I am using some RGB LEDs and I want to control their colour temperature and brightness. I am controlling the colour temperature with PWM but want to control the brightness with another method so the colour is the same as the brightness varies. I have been looking into variable resistors and constant current reduction as a way to control the brightness but I am struggling to find a way to control the colour and brightness separately.

Is there some way to do this, or any suggestions as to where to find good information on how to do this. Thanks!
I did this for a member here that wanted LED colour bank to Fade in fade out each bank every 10sec or so, I did this with simple driver Mosfet and PWM, using a 8 pin Picmicro.
 

Reloadron

Joined Jan 15, 2015
7,855
This would go better if we all knew what you were currently using? Choosing color is simple enough, The RGB LED intensity is commonly referred to as fade in (increase intensity) or fade out (decrease intensity). Both color and brightness or intensity are easily controlled. It's a matter of what you are currently doing and what is available to you to get the effects you want. You could be using a uC or discreet components which some circuit examples have been provided. :)

Ron
 

ElectricSpidey

Joined Dec 2, 2017
3,312
There is a possibility that both controls can be PWM.

For example, with a common anode RGB LED you would use PWM on the low side for the color and PWM on the high side for the brightness.

I think the trick would be to use 2 different frequencies such as 6khz to 10khz for the low side and 500hz to 1khz for the high side.

This is something I have thought about many times but never tried, and I believe a micro would be best.

The problem with linear brightness is the fact that the green and blue LEDs will dim before the red so low brightness levels become predominantly red.

Placing a diode in series with the red LED can help to solve this, but that is not a perfect solution because the forward voltage difference between red and blue/green is usually about 1 volt.
 
Last edited:

crutschow

Joined Mar 14, 2008
38,316
The problem with linear brightness is the fact that the green and blue LEDs will dim before the red
Why do you say that?
For all LEDs the brightness should vary approximately the same for a given percentage change in current.
The red LEDs are indeed more sensitive, but I don't think that affects the change in brightness, if all their currents are all set to give the desired color.
 
Last edited:

ElectricSpidey

Joined Dec 2, 2017
3,312
Why do you say that?
For all LEDs the brightness should vary approximately the same for a given percentage change in current.
The red LEDs are indeed more sensitive, but I don't think that affects the change in brightness, if all their currents are all set to give the desired color.
You are correct in terms of constant current drivers.

I was thinking more in the terms described in post #3 or using linear on the high side in the example I gave. (linear variable voltage)

Your concept should work fine, but I never really thought about the details of such a system.
 

ElectricSpidey

Joined Dec 2, 2017
3,312
Yes, but as I stated in my post it becomes a problem at the lowest brightness levels.

Believe me I have seen this in real life...I have only been building lighted displays for decades.
 
Top