I would like to drive with 3 PWM channels a COMMON CATHODE RGB LED in constant current

Thread Starter

Joël Huser

Joined Jun 30, 2019
42
Hi everyone,

Does someone have an idea if there is something equal to the Microchip CL320 3 channels led driver BUT FOR A COMMON CATHODE RGB LED ?

Mouser: https://www.mouser.ch/ProductDetail/Microchip-Technology/CL320SG-G?qs=sGAEpiMZZMvyjua%2BiESkiqsgsWfz0nJj

Datasheet of the CL320: http://ww1.microchip.com/downloads/en/DeviceDoc/20005599A.pdf

I want to drive a single RGB LED inside a push-button.

Otherwise I will drive it not in CC mode and with resistors directly in series with the 3 leds and from a pin of a PIC microcontroller.

Would you choose CC mode or not ?

Thanks for your help!

Joël
 

Attachments

Marley

Joined Apr 4, 2016
279
Why does the drive need to be constant current?
A simple resistor will give a fixed current provided the supply voltage is constant.
 

Marley

Joined Apr 4, 2016
279
Your circuit is basically correct. With a 5V supply and 10mA LED current, your resistor values are wrong.
Also, you will be driving this 10mA from each output. This is probably OK for a PIC.
Otherwise, you can insert some transistors to drive the current. The drive signal will need to be inverted.
See my circuits for the correct resistor values. Use 330R instead of 320R. Will make very little difference.
 

Attachments

Thread Starter

Joël Huser

Joined Jun 30, 2019
42
It's from 3.3 [V] and not 5 [V] excuses-me! All PIC's pins can source and sink 25 [mA]. Joël
 

crutschow

Joined Mar 14, 2008
23,347
It's from 3.3 [V] and not 5 [V] excuses-me! All PIC's pins can source and sink 25 [mA]. Joël
3.3V may be marginal to drive the blue LED and also reliably limit the current with a resistor.
What is the maximum spec voltage for that LED in your RGB LED?
Do you have a reference to the data sheet?

Is this for a single device or do you plan on building many?
 
Last edited:

TeeKay6

Joined Apr 20, 2019
382
It's from 3.3 [V] and not 5 [V] excuses-me! All PIC's pins can source and sink 25 [mA]. Joël
@Joël Huser
(Many) PICs can sink/source 25mA. However, they cannot do so without voltage loss internal to the PIC. That is, if an output pin is set high (e.g. =5V) but the pin is shunted to ground via 1Ω resistor, ≥25mA will flow...but there will be only 0.025V output. With a 10mA load, most I/O pins will lose about 0.5-1.0V. So, an I/O pin of a "3.3V" PIC when set high and sourcing 10mA, will produce 2.3V-2.8V at the pin. Check the datasheet for whichever PIC you intend to use (data is in the "DC Characteristics" section).
 

Thread Starter

Joël Huser

Joined Jun 30, 2019
42
@TeeKay6 @crutschow @Marley

Ok, thank you everyone for your valuable comments!

Then, I prefer not to have voltage losses inside the PIC, so I decided not pulling current from the PIC.

I have only 3.3V and 24V power supplies for digital needs on my circuit.

Please look at my new schematic attached and post your comments.

Here attached, you find the datasheet of my illuminated common cathode RGB push-button.

See you,

Joël

TripleRGBPWMCommonCathodeLEDDriver_Joel Huser.jpg
 

Attachments

crutschow

Joined Mar 14, 2008
23,347
That should work, but there is no reason for the Zener from the gate-source of the P-MOSFET as the two 12k resistors will keep the gate-source voltage to a maximum of 1/2 the supply voltage or 12V.
I also see no purpose for the 22k resistor from the output to ground, or the diode from the P-MOSFET drain to source as that's just paralleling the internal MOSFET substrate diode.

What's the purpose of the Zener in series with the LEDs?
Just eliminate that and select a value for the resistor in series to give the current you want.
 

Thread Starter

Joël Huser

Joined Jun 30, 2019
42
I have less losses and faster 0 to 1 and 1 to 0 transitions at 5 [V] and high frequency.

With PWM signals, you are switching currents at a high frequency, so it begins to happen capacitive and inductive effets, which means uncontrolled negative voltages or transcients, especially if you have long cables. Even a 30 [cm] wire or track is already a "long cable" at a high frequency..... so I always protect with fast diodes the power supply and the transistors from them; it's not superfluous.
 

Attachments

Last edited:

crutschow

Joined Mar 14, 2008
23,347
I have less losses and faster 0 to 1 and 1 to 0 transitions at 5 [V] and high frequency.
LED PWM is usually done at a low frequency (1kHz or less) where high frequency effects are not normally a problem.
What do you call "high frequency"?

If you are really concerned about transition times then you would use a smaller value for the 12k resistors at the MOSFET gate, since it's charging and discharging the gate capacitance that largely determines the switching speed of the circuit.

And the components I mentioned for removal do not significantly affect the high frequency operation of the circuit.
 
Last edited:
Top