Driving Common-Cathode RGB LEDS in PWM

Thread Starter

mcanever

Joined Apr 11, 2007
7
I'm trying to make an "analog coloured-light source", using RGB leds (4-pins - common cathode).
To control light intensity of each of the three colours I will be using PWM, via a separate ne555-based controller per color.
I'm not good in electronics, so I always try to find something ready and suitable for my application.
Most of pwm circuits out there use N-channel mosfets as switches. My problem is that my leds are Common-Cathode so the switch will need to be BEFORE the load. How should I do? Should I use P-channel mosfets? or will it work even if I simply put the n-mosfet before the load?

The original schematics, for driving motors:


My modification of it (Don't know if it works) :


I really thank anybody in advance for any help... I'm quite Noob and i have a lot to learn!
 

hgmjr

Joined Jan 28, 2005
9,027
If board space is at a premium, you may what to consider using the Dual version of the LM555 with the part number LM556.

Also keep in mind that a P-Channel mosfet will introduce an additional inversion in the path when compared to an N-Channel mosfet. The effect will be to change the direction of rotation of your intensity (or speed) control needed to increase intensity.

hgmjr
 

Thread Starter

mcanever

Joined Apr 11, 2007
7
You guys are fantastic, thank you very much!

If board space is at a premium, you may what to consider using the Dual version of the LM555 with the part number LM556.
Of course I'm gonna use 556s!
Also keep in mind that a P-Channel mosfet will introduce an additional inversion in the path when compared to an N-Channel mosfet. The effect will be to change the direction of rotation of your intensity (or speed) control needed to increase intensity.
Do you mean that when the gate of the p-mos is low the switch will be on and vice versa?

You have the drain and source reversed on the MOSFET. For the P-FET the source should be tied to the power supply
Are you talking about my own schematics or about the one posted by kender?

Another question: is the 100k resistor value critical? I'm gonna drive about 400 mA @ 6.6 V with the mosfet.

Thanks _A LOT_ to all of you!
 

kender

Joined Jan 17, 2007
264
Do you mean that when the gate of the p-mos is low the switch will be on and vice versa?
Yes. P-ch is on, when the gate is low. Since everything is powered from the same 6.6V supply rail, you don't need to worry about the actual voltage levels. You would need more hardware to drive the gate, if you had several supply rails (say, LEDs are powered from 12V and logic is powered from 3.3V).

Another question: is the 100k resistor value critical? I'm gonna drive about 400 mA @ 6.6 V with the mosfet.
If you are talking about my schematic - 100k value is not critical (anything between 10k and 1M should work). The purpose of this resistor is to bleed the parasitic gate capacitance to make sure that the P-ch is fully off, when the rest of the circuit is off. The current going through this resistor is miniscule.
 

Thread Starter

mcanever

Joined Apr 11, 2007
7
Yes. P-ch is on, when the gate is high.
Did you mean "P-ch is on, when the gate is LOW" ?
Or was it my first sentence completely wrong?

I'm trying to understand how the whole thing works, sorry for a little of confusion!

The purpose of this resistor is to bleed the parasitic gate capacitance to make sure that the P-ch is fully off, when the rest of the circuit is off. The current going through this resistor is miniscule.
thanks for the explanation!

The electronics shop here nere venice, italy has not a great assortment so the unique p-ch it has is an irf9530, rated -12A at -100 V.
Gathering all informations and corrections from this post I think that this will be the definitive schematics:

EDIT: SCHEMATIC WAS INCORRECT


Is it correct? Is the Mosfet connected in the right way? I marked pins for clarity.
Again, thank you all!
 

kender

Joined Jan 17, 2007
264
Did you mean "P-ch is on, when the gate is LOW" ?
Or was it my first sentence completely wrong?
That was a typo on my part. I have corrected it. Apologies for the slopyness.

Is it correct? Is the Mosfet connected in the right way? I marked pins for clarity.
Again, thank you all!
Look the figures 10a and 12a in the IRF9530 datasheet http://www.irf.com/product-info/datasheets/data/irf9530.pdf Notice that the negative terminal of the battery is on top (which makes these drawings a little odd).
Take a look also at this app note http://www.irf.com/technical-info/appnotes/an-940.pdf
 

Thread Starter

mcanever

Joined Apr 11, 2007
7
Top