Driving Common-Cathode RGB LEDS in PWM

Discussion in 'The Projects Forum' started by mcanever, Apr 11, 2007.

  1. mcanever

    Thread Starter New Member

    Apr 11, 2007
    7
    0
    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:
    [​IMG]

    My modification of it (Don't know if it works) :
    [​IMG]

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

    Senior Member

    Jan 17, 2007
    263
    0
    I would use a P-channel MOSFET as a high-side switch. See attached schematic.
     
  3. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    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
     
  4. John Luciani

    Active Member

    Apr 3, 2007
    477
    0
    You have the drain and source reversed on the MOSFET. For the P-FET the
    source should be tied to the power supply

    (* jcl *)

    ---
    www.luciani.org
     
  5. mcanever

    Thread Starter New Member

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

    Of course I'm gonna use 556s!
    Do you mean that when the gate of the p-mos is low the switch will be on and vice versa?

    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!
     
  6. kender

    Senior Member

    Jan 17, 2007
    263
    0
    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).

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

    Thread Starter New Member

    Apr 11, 2007
    7
    0
    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!

    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
    [​IMG]

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

    Senior Member

    Jan 17, 2007
    263
    0
    That was a typo on my part. I have corrected it. Apologies for the slopyness.

    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
     
  9. mcanever

    Thread Starter New Member

    Apr 11, 2007
    7
    0
    Amazing! That was exactly what I was looking for!
    Thank you again and again for your kindness and patience!
    I'll make you know when the project will be done!
     
Loading...