PWM LED Circuit LTspice Problems

Discussion in 'Programmer's Corner' started by knowtankyou, Mar 5, 2016.

  1. knowtankyou

    Thread Starter Member

    Feb 29, 2016
    32
    0
    I am trying to find a PWM LED driver circuit that can go from 15% to 99% and doesn't use a 555 timer. Lower pwm range is great but I want to be practical.
    I have attached a picture of a circuit I found from the internet and the LTspice file I created to simulate it.
    I created models for the UF4007 diode, the sample circuit calls for UF4004 but Vishay had the UF4007 but I don't think that is the problem.
    My problem is that the POT simulation is only working from zero ohms to about 50 ohms of a 2K pot.
    I want to ask if there is any suggestions for a circuit that I am trying to build, and if the attached picture should work then what might be wrong with my LTspice simulation?
    Also the PNP transistor is simulated as expending 2-3 Watts, more than the LED, and that would seem inefficient.

    Eventually I hope to expand the LED string to be multiple 1W or 3W diodes in series. I have a fishing boat that I hope to eliminate the gas generator and use a few deep cycle marine batteries in series for the voltage output I need.
    I was going to use the first 12V battery to power the 555 timer and use the higher voltage to run the LED string, but I found and simulated a circuit that could only go down to 50% duty cycle on the PWM. most of the time I will keep the lights on low, and when a fish is caught turn up the brightness. 50% just didn't seem dim enough.
    I am also open to suggestions on the white LEDs to use.
    Thank you all for your time and have a good day.

    LED Driver Circuit.gif
     
  2. wayneh

    Expert

    Sep 9, 2010
    12,100
    3,034
    It's no problem to get a full range of duty cycle from a 555-based PWM driver. You just need the right circuit. I know it's here somewhere.

    Found it. Go here and scroll down to Chapter 5.

    Note that you can scale up to whatever power level you need by driving a MOSFET with one of those low-power circuits.
     
  3. knowtankyou

    Thread Starter Member

    Feb 29, 2016
    32
    0
    Wayneh, thank you very much for your help.
    have a great weekend.
     
  4. knowtankyou

    Thread Starter Member

    Feb 29, 2016
    32
    0
    any suggestions on white LEDs, Directional output is preferred over flood distribution.
    thank you
     
  5. eetech00

    Active Member

    Jun 8, 2013
    649
    112
    Hi

    Try the attached simulation
    I didn't check the design, just focused on the sim working.
    I substituted MMBT100 for BC547A

    The VCPot is a voltage controlled potentiometer. Percent rotation is applied using a B voltage source. 1v = 1%
     
  6. SLK001

    Well-Known Member

    Nov 29, 2011
    812
    225
    Here's a circuit that I use to control a 12V incandescent light using PWM. It can go from 0 to 100% (and can be modified for other swings).
    PWM.jpg
     
  7. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    The c,e of pnp in asc file should be reverse.
     
  8. knowtankyou

    Thread Starter Member

    Feb 29, 2016
    32
    0
    ScottWang, thank you very much for catching that.
    and thank you to the others who responded. I appreciate all your help.
    eetech00 thanks for posting the spice file that was a lot of effort and i appreciate putting for that much work
    SLK001, do you prefer op-amps over discrete transistors? I was leaning to transistors
    have a great weekend everyone..
     
  9. knowtankyou

    Thread Starter Member

    Feb 29, 2016
    32
    0
    OK so I flipped the PNP transistor and I still get a huge power dissipation across that transistor.
    Is that still right or am I missing something else?
     
  10. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    Assuming that the I_Led = W/V= 1W/3V = 333 mA
    Ic_pnp = I_Led = 333 mA
    Ib_pnp = I_Led/10 = 333 mA/10 = 33 mA
    Rb_pnp = (12V- Vbe_pnp - Vce_npn) /Ib_pnp
    = (12V-0.7V-0.2V)/33 mA
    = 336 Ω
    So choose a 330 Ω to try Rb_pnp, the original was used 100 Ω.

    If the Led current is different as calculation then you could adjust the value of Rb_pnp.
     
  11. knowtankyou

    Thread Starter Member

    Feb 29, 2016
    32
    0
    ScottWang, again thank you for the help.
    I am giving up on this circuit, it still seems to be far too sensitive on the pot, and after changing the resistor value, I still have more power across the pnp transistor than the LED.
    I appreciate the 555 suggestions, but is there anyone who can suggest a different transistor based LED PWM driver that can allow me to stack multiple LEDS in series?
    thank you
     
  12. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,779
    1,103
    Why are you set on a discrete transistor-based solution, rather than using a 555 or opamps (as per post #6) or other ICs?
     
  13. SLK001

    Well-Known Member

    Nov 29, 2011
    812
    225
    I prefer the op-amp solution. It is simple, easy to set up and virtually fool proof. I used a MOSFET as my switching transistor, but an NPN transistor like a 2N3055 would work just as well. My circuit will also give you 0% to 100% duty cycle, if that is what you need (when I designed this, I needed the full range).
     
  14. dannyf

    Well-Known Member

    Sep 13, 2015
    1,779
    360
    it should, though it could be made better to regulate current rather than voltage.
     
  15. dannyf

    Well-Known Member

    Sep 13, 2015
    1,779
    360
    here is a quick demo to show how a constant current led driver might work here.

    In this case, R6/R7/R9 and Q3's Vbe sets the desired current levels.
     
  16. wayneh

    Expert

    Sep 9, 2010
    12,100
    3,034
    You can use other ICs than a 555, but I would recommend against the discrete transistor approach. Op-amps and such were invented for a reason - to free us from all the design issues of using discrete components. Yes, they need a power supply but once that's done, they're SO much easier to use.
     
  17. ScottWang

    Moderator

    Aug 23, 2012
    4,853
    767
    Because you didn't provide the Led current, and the resistor must be limiting the current to the LED can afford it.

    If you want to using 555 ic then you may using the mosfet and that is more easier to solve the power dissipation issue.

    [​IMG]

    The mosfet will be as below and you can take the diode, relay and motor away.:
    [​IMG]


    ScottWang's blog
     
  18. knowtankyou

    Thread Starter Member

    Feb 29, 2016
    32
    0
    I think my attraction to the transistor solution is that its not a black box. The 555 or the op amps, take care of the heavy lifting and I hope to understand how to make an oscillator and then use feedback for current control and hopfully high efficiency.
    one think I did notice when re-reading the the original GIF from 200 transistor circuits webpage is that its not a 10mh inductor, its 70 turns on a 10 mh core.
    not sure how that impacts this, I would think more inductance would mean a smoother current to the LED but I might be wrong.
     
  19. SLK001

    Well-Known Member

    Nov 29, 2011
    812
    225
    I would say that the inductor is not letting the PWM circuit operate efficiently, but is preventing the PNP transistor from turning off sharply. Remove the inductor and your transistor should only dissipate minimal power. If you can see pulsing from the LED during operation, then up the oscillating frequency - 70 to 100Hz should be enough.
     
  20. knowtankyou

    Thread Starter Member

    Feb 29, 2016
    32
    0
    so the inductor is possibly the problem? I was hoping that the inductor was going to be an efficiency boost.
    I have a 555 time simulation complete and thanks to everyone who helped.
    If anyone knows of a source for an explanation of how the circuit works I would appreciate it.
    Also, thanks dannyf for your revision. the pot and current sense resistors are in parallel, would it be better to just have the pot and eliminate the parallel combination?
    is there a reason FETS are preferred over BJTs in the 555 circuits?
     
Loading...