Simple constant current driver for a high power LED

dsc00021

Elmars Ositis has been working on a simple constant current driver:

In my previous post, I slapped together a quick LED lighting solution for my workbench… but it is truly a hack. What I really want to do is make a simple constant current driver, so the power LEDs can be used in other projects. One of those projects is an LED swimming pool light. It needs to be running at maximum brightness and low cost.

After much digging and testing, I found a simple circuit using a power FET, an OP Amp and 0.5 ohm resistor.
This simple circuit accepts a VCC up to 32v (limited by the Op-Amp). The 78L05 regulator provides a stable 5v reference and R1 is a potentiometer serving as a voltage divider, with the output on pin 2 serving as a reference voltage for the basic LM358 Op-Amp.

Join the Conversation

28 Comments

  1. I have doubts about the sealing method. It that silicone? Looks like white silicone maybe the type used for kitchen fixtures. Would it work with plastics and under pressure and with a heat source? Good luck to him…

  2. I would wire R1-R3 differently. However, there are worse things.
    Pretty sure the opamp circuit is wrong. IRF510 is an N-FET, the feedback should go to the inverting input for regulation. From his schematic, I(R2) increases, V(R2) increases, and it goes to the non-inverting input, output goes higher, R(Q1) decreases, oops. No negative feedback loop that I can see.
    Interestingly, he did not put actual numbers to Vcc, did not describe the LED, did not quote current and power levels. No data — always makes me suspicious. So how much of it did actually work, how much of it was the LED self-regulation? One wonders.
    Fellas, if he is talking about this project in the forums, perhaps some of you guys can educate him on opamp basics. Basic power and heat calculations too. Good luck, don’t burn the house down.

    1. surprised this made it on dangerous prototypes… but I guess the project fits. I will double check the schematic against the actual prototype – quite possible I have made a mistake. The LED I am using is an unmarked 10W-12V unit so I don’t know the exact model – ebay special. I have tested this circuit at up to 25V. In testing, it was possible to continuously vary voltage above 12V without a visible brightness change once the max set current was reached. Circuit current measured using a bench powersupply.

      In the pictures, that is regular silicone bathroom sealant. The leak was not due to the sealant, but was coming in via the screw holes for the LED and FET. The screws were the notched self tapping kind and I had not properly sealed them. As regards heat, the heat sink (about 9 sq. inches) had no problems dissipating the heat when submerged. The heat sink was cool to the touch while testing. When testing in open air, the heatsink quickly gets VERY hot – it does not have sufficient surface area to dissipate the applied power in air, but is more than sufficient when submerged in water.

      Please note this is well and truly a hack to see if it will work. One 10W LED is not enough to light a pool at night. I need at least 3 more and a more robust power source (it is a big pool). In addition, the wire guage from the battery pack to the light unit was too small, introducing too much resistance in the circuit to get full light output.

      Finally, this hack also tested the mounting mechanism – a suction cup, to confirm whether it will be sufficient to hold the light against the pool liner. During the winter months, I will be building a more durable and higher power version for long term submersion.

      As a proof of concept, this hack worked, but it is insufficient for long term use. The circuit is simple, requires few parts (cost) and produces stable light output.

      1. Confirmation… The input pins on the op-amp are reversed in the schematic. The prototype connects pin 2 to the 0.5 ohm resistor via the current limiting resistor. Pin 3 is connected to the pot. I will update the schematic tonight.

      2. Okay, I accept you know what you are doing, I think. I hope you can verify the circuit and not leave a dangerous schematic on the loose. ;-)
        With 3×3 LED die chips (I suspect), I don’t see any real need for voltage to go much higher than ~12V. Any significant margin will turn into extra heat…
        It would be interesting to see how reliable there units are in your eventual setup. I do know them cheap corn-cob type LED bulbs can be really, really lousy. Good luck.

  3. Does the op amp really need to be connected to 32V? If the current through the LED is low, then the forward voltage might be low and the MOSFET might have to drop a lot of voltage, but it’s the gate-source voltage that turns it on, so the drain could be high voltage.

    Or am I thinking of something wrong?

    The silicone looks cool. I wonder what it does to the typical heat problems?

    1. Nah, that’s just the figure based on max ratings of the LM358. With an oldie LM358, there is no need for a separate low voltage supply. Efficiency and heating are more serious issues. IRF510 is specified at 10V gate voltage, so the target voltage range of 12-24V is fine if you are okay with the efficiency. The gate voltage will actually be quite low. It’s simple though. With the heat sink apparently fastened to the LED and FET, silicone is not a heat issue, it’s just potting for water proofing.

      1. Oh I see. Yeah it looks like that wouldn’t work too good. The source voltage can be even 5V (really? Do my eyes deceive me?) and the gate source voltage goes up to 10V at high current.

        The simplicity is nice but it looks hazardous to turn the pot all the way up because of that source resistor voltage. The sense resistor is rated for 3W but it might see 5V/0.5 ohms = 10A -> 50W across it unless the pot has significant internal wiper resistance. And it looks like the LED would only take ~1A anyway. May I strongly recommend using at least 100kOhm between IC2 and the R1 pot? Your reference doesn’t supply power to the sense resistor so it should be good to divide it before the op amp. Side benefit you could get rid of R3.

        Or do you actually turn the thing all the way up?

      2. Very simple, you don’t need to be a Ph.D. to see it. Op amp takes reference voltage and compares it to feedback voltage. Want lower power? Divide reference voltage to set lower feedback voltage.

        Changing that 5V to 2.5V or 2V would be very nifty for safety and to give your pot more usable range.

      3. @Depot: Oh, okay, right, I didn’t get the part where you were saying “Your reference doesn’t supply power to the sense resistor”. Huh? :-) Still I’d rather full scale be limited to under 1.5A. Other things I didn’t understand: How did you arrive at the Vgs goes up to 10V thing? Also, the wiper resistance thingy, can you put numbers on that?

      4. I hear extra wiper resistance can be added to prevent the wiper from welding (low voltage, high current?) on the pot if turned all the way. Depends on manufacturer of the part, might be esoteric useless advice. I’d expect it to not matter compared to 100kOhms.

        Vgs is given as 4V max in the datasheet but that’s at some low drain current whereas a graph indicates it might go up to 10V with very high (10A?) current. Semiconductor physics isn’t my main thing but I’ve had some problems in the past with those parameters being tricky, like higher Vgs than reported. Might still work with a 5V or less gate voltage in some circumstances or with a circuit change, though.

      5. @Depot: Input to the opamp is high impedance, 45nA typical from LM358A DS, wiper will be fine. I agree the voltage divider needs tweaking.
        Vgs can be anything you wish to drive it at, the device limits can always found in the datasheet. IRF510 has a limit of +/- 20V.
        The datasheet gives Vgs=5V typical for 1A of Ids. But we need to account for 2 transistor drops for LM358, or at least 1.5V. So the opamp supply needs >7V thereabouts. Can’t do much about that other than add another voltage regulator, but I don’t think it’s necessary.
        But he’s running 12-24V anyway, so whatever the hazards, all parts of the system must be considered.

      6. To answer some voltage questions that have come up, I pulled out the prototype and measured the opamp output voltage. In this circuit, when set for a 900mA load, the opamp output voltage will follow vcc as it rises from zero, until 900mA current is reached. Once the set threshold is reached, the opamp voltage quickly drops to 7 volts and remains stable up to the max 25v I tested.

        When current is reduced to 500mA, the circuit behaves in a similar manner, with opamp output voltage rising with vcc until the 500mA threshold has been reached, then quickly drops to about 6v and remains stable at that voltage even if vcc is pushed to 25v.

        In both cases, once the threshold current has been reached, it remains stable, with no fluctuations noted.

        Therefore, operating the opamp from the 5v regulator will not be sufficient to drive _this_ FET in _this_ circuit. I believe the observed voltages will be different (lower) if I use a larger gauge cable between the control module and the light module, or if I place the control module adjacent to the FET as the resistance in the current setup is significant.

        An FET with a lower gate voltage will also affect the test results.

        I thank you all for your excellent feedback on this post. It will be taken in consideration this winter as I build the production version.

  4. :) know what I am doing?!?!?! right… let me check my garbage can again…

    With these 10W chips, at less than 11 volts, the control circuit is not really needed, as the current is self limiting (mostly). The eventual setup will be a solar charged battery pack, most likely at 14.4V – 18V, depending on the batt and solar panel I get. This current limiting circuit will ensure stable light output (current) over a long period of time, allowing the pool (or whatever else) to be at a constant light level, even as the batt voltage decreases.

    This same circuit (with a bridge rectifier added) can also be used to tap power from standard outdoor 24v power systems…

    1. My bad, sometimes it’s hard to conduct a discussion without trying to look like attacking. Gotta say I’m too used to switching circuits to feel comfortable with the efficiency of a shunt regulator. Nothing wrong with your scheme, I’m mostly curious about reliability etc under the heating conditions (e.g. 10W extra heating at 24V) because I wonder about QC of Chinese manufacturers and LED die/chip matching. Hard to find reliability data, but I’ve killed some middling quality 5mm white LEDs in ~2 years intermittent usage (torch, boosted switching supply) at ~24mA over the usual 20mA but still under max ratings.

  5. Depot-32v is the max the 741 can handle, but you can run anthing lower than that. I guess it could be run at 5v if the FET opens fully with 5v on the gate. Worth testing. Will try it.

    KH- cheap and simple and self regulating was the goal, efficiency was secondary. Second, the LED can be run at less than full power, i.e. 700ma to increase longevity, etc. But… since you bring up switching circuits, do you have a suggestion for a cheap and simple one to handle the 24v source?

  6. Higher voltage buck switching is not trivial to make with discretes (especially driving P-FETs), so it’s never gonna win on the cheap and simple criteria. ;-) Can’t beat a shunt regulator on those criteria, but then I’m not too terribly focused on cheap and simple designs nowadays, preferring efficiency for power stuff.
    See: http://uk.farnell.com/led-drivers
    There are some that are rated at 30V/1A thereabouts and are SMD chips that are reasonably solderable. Diodes Inc have some nice-looking high voltage parts that are not DFN; they also have high voltage buck power ICs that can also be used with minor modifications. Efficient buck or boost parts usually use the PCB to spread out the lower heat load of the power switching circuitry.

    1. just to nitpick, it is not a shunt regulator, a shunt regulator is in parallel with the load.

      and it is trivial to turn a buck converter upside-down so you can use an nfet on the low side instead of a pfet on the high side.

      basically the same schematic as the one shown with plus an inductor, a diode and a comparator instead of an opamp

      1. My bad, brain is leaky, leaking leaking all the time. Good thinking there, I will file it up in my leaking brain. I also compartmentalized myself because I did not want to recommend a discrete circuit but suggested ICs where many have some kind of protection scheme(s).

      2. @langwadt: N-FET low side means a hot Vcc and a higher GND(LED), right? Any issues w.r.t. that for 12-24V circuits? I wonder if the LED module heat sink tabs are tied to GND(LED). If Vcc=24V then GND(LED) will be pretty high up given V(LED)=~11V, would that show up on the external heat sink? Hmmm.

  7. The base or heatsink interface for the LED is NC – neither ground nor vcc. First thing I checked, as I did not want a separate uncontrolled path to ground for the LED through the heatsink and surrounding water.

    1. Thanks for the info. In retrospect, maybe NC is the only way when there is a string of LED chips. I see that you’ve insulated the FET too. Still am interested to hear the opinions of langwadt…

      1. if you put the switch (or linear regulator) on the low side of the LED both of the connections will be “hot” but if the supply isn’t grounded it doesn’t have any relation to “the world”, if the heat sink is isolated is anyway I don’t see that it matters much

        as for getting it water tight that is really hard, because when it gets hot and cold the air expands and contracts basically pumping water in if there’s is even the tiniest leak

      2. Thanks man. I mostly wonder if the materials can handle a few months of use. Air pressure won’t change that much, it’s more water pressure I think. Once it leaks, would they feel say 24V if they complete a circuit somewhere, e.g. poolside?

  8. If anybody is interesed, I have posed a follow up to this original post with a simple PWM LED driver, adding an ATtiny85 mCU. The post includes schematic, board layout and code for the ATtiny85. I hav tested the circuit up to 22 volts without a current limiting resistor. The FET only needs a small heat sink. Efficiency can be further improved by replacing the LM358 with an RC/LM741. The LM741 has a much sharper rise and fall time than the LM358 when run at 2KHz, resulting in the FET spending less time as a resistor. (during the slow ramp/fall the FET acts as a resistor, generating heat)

    https://eositis.wordpress.com/2014/11/28/pwm-based-led-driver/

    Happy Holidays!

    Elmars

    1. Well, this is a bit off the usual expectations of what a PWM driver would do. Most PWM LED drivers that are step-down uses a buck DC conversion, that means an inductor somewhere. However, this circuit does not appear to have an inductor, runs at 2KHz — sounds like a squarish wave (well, as square as the opamp can make it) and that means pulsed voltage.
      Have you looked at the waveform at the LED module? Of course the battery and the opamp will smooth the waveform some but I think it will still look like a pulsed thingy, and probably pulsing at over-voltage with respect to the LED’s specs. The LED should survive a degree of over-spec if power is pulsed (depends on materials and thermals etc), but again, no commercial PWM LED driver would do this.
      What do others think?

Leave a comment

Your email address will not be published. Required fields are marked *

Notify me of followup comments via e-mail. You can also subscribe without commenting.