LED Constant Current Source Scheme

Advert

LED Constant Current Source Scheme

Home Forums Electronics in the Workshop LED Constant Current Source Scheme

Viewing 25 posts - 1 through 25 (of 39 total)
  • Author
    Posts
  • #504210
    Michael Gilligan
    Participant
      @michaelgilligan61133

      I managed to tidy-up some of my mis-filed documents today, and rediscovered this : **LINK**

      https://www.onsemi.com/pub/Collateral/AND8109-D.PDF

      It’s a clearly written page and a half , describing the optimised use of the LM317L as an LED driver.

      … What’s not to like ?

      MichaelG.

      Advert
      #32147
      Michael Gilligan
      Participant
        @michaelgilligan61133

        Theory of Operation …

        #504215
        Georgineer
        Participant
          @georgineer

          That's a clever bit of kit! I've saved myself a copy. Thanks, Michael.

          George B.

          #504217
          duncan webster 1
          Participant
            @duncanwebster1

            Simpler to use a fixed voltage regulator and 3 dropper resistors to control current down each leg? If you want say 2v across each diode and 50ma per leg then 8v regulator and 40 ohm resistor

            #504223
            Joseph Noci 1
            Participant
              @josephnoci1

              Whats not to like is the time, ink and paper 'engineers' waste in thinking up this stuff…

              Duncan has it for simplicity, and if you have a deep desire to use a constant current mechanism, the circuit of figure 2, sans LEDS, costs 11 US cents. The MPS2222 or similar, and three resistors costs 22 US cents, so just use three figure 2 circuits – less assembly, fuss, cost…So many of these 'neat' app notes by 'application engineers' 'is' just so much intellectual masturbation…My rant for the day…

              Bring back the likes of Bob Pease, et al..

              Joe

              #504226
              John Haine
              Participant
                @johnhaine32865

                Now I was expecting something that controlled the current more efficiently, like using a series inductor as a "dropper" in a buck converter arrangement. If you had say a 12V supply and wanted to run a bright LED without making either a resistor or an LM317 rather hot, this would be useful.

                #504227
                Michael Gilligan
                Participant
                  @michaelgilligan61133

                  I will get back under my stone sad

                  Glad to see that George appreciated it though.

                  MichaelG.

                  #504229
                  Mike Poole
                  Participant
                    @mikepoole82104

                    Working for a German car manufacturer I became convinced they have a department of complication, should anyone come up with a simple solution to a problem it would be referred to the department to add complication so no simple person could quickly work out what was happening. Forty years ago spotwelding robots did two things, they either moved or moved and welded. You wouldn’t believe how complicated the programs have become, they still move and weld but the amount of baggage they carry to try and report helpful messages just burys the core task program. The same has happened with PLC programs, In 1980 a Modicon 384 PLC with 4K of memory was running a few paint shop conveyor systems with useful diagnostics, some programmers were fantastic at getting a quart into a pint pot.

                    Mike

                    #504232
                    Joseph Noci 1
                    Participant
                      @josephnoci1
                      Posted by Michael Gilligan on 30/10/2020 07:06:48:

                      I will get back under my stone sad

                      MichaelG.

                      On the contrary Michael!!!

                      I applaud anything that promotes thought and intellectual dissent!

                      Don't you dare hide away..!

                      John..

                      depends what you are trying to do – If its save pennies in production, the LM317 is by far cheaper. If its to increase the general EMI noise levels in the world, the switch mode converter is an excellent solution. And reduces the MTBF, can be sold at greater prices 'cause its now a 'digital LED controller', etc, etc…KISS!!

                      The LM3127 @ 12V Vc, a 5mA hi-bright led, will dissipate 50mW – hardly heat. Add 4 leds in the string and you have 9 times the brightness for 3 times less heat in the LM317…

                      How many here have even considered any of these routes when you wanted a LED on/off indicator on your lathe/mill/clock/whatever??? Just stuck in a led, a resistor and found some source of non-lethal voltage, ignored the heat soaked resistor, and got on with it!

                      Now where's my stone..

                      Joe

                       

                      Edited By Joseph Noci 1 on 30/10/2020 07:31:29

                      #504242
                      Michael Gilligan
                      Participant
                        @michaelgilligan61133

                        I could probably contrive a tenuous link to this story, Joe … but I won’t bother

                        Suffice it to say that I think you might find this of interest : **LINK**

                        https://inews.co.uk/news/technology/secret-habits-england-rare-bats-revealed-ai-project-conservation-741304

                        **LINK** : https://www.openacousticdevices.info

                        MichaelG.

                        #506252
                        Gene Pavlovsky
                        Participant
                          @genepavlovsky

                          LM317 is quite a versatile device, you can make constant voltage or constant current regulators with it, among other things.

                          The application notes unfortunately don't tell you what is the maximum operating voltage and wattage this setup can handle. Datasheet suggests max Vout of 37V and current Iout of 1.5A. I am thinking that with a 36V supply, you could operate up to 11 (assuming Vf=3V) high-power white LEDs in series, <= 50W max. The datasheet suggests max dropout voltage is 3V (highest at the max current), so at worst it would dissipate 3V*1.5A=4.5W, and is going to need a heatsink. But not too bad.

                          To people suggesting dropper resistors – for low power stuff, resistors are fine. If we're talking about high-power LEDs (CREE XM-L etc, high-power COB LEDs), you need a constant current source. With my previous example, 36V supply, 11 LEDs in series (Vf=3V), we have 33V Vf on the LED chain, if we want 1A current, we can calculate that a 3Ohm 33W current limit resistor is needed. It will be huge, expensive, and dump 33W of energy as heat.

                          I am not sure I would go with LM317, as there are more efficient and modern devices specifically made for the purpose, and more importantly for me (not an expert in electronics), I would be able to find in their datasheets some info regarding how many volts/watts it would handle.

                          I'm currently playing with making a high-power ring lamp using an AMC7140 constant current chip and some CREE XT-E LEDs. AMC7140 can handle up to 50V at 700 mA, and has a low drop-out voltage. Current is set via a resistor, there is also an ENABLE input pin. This allows to use either a variable resistor (pot) or PWM for dimming. My plan is 8 XT-E LEDs and a 24V supply.

                          Regards

                          Gene

                          #506274
                          Robert Atkinson 2
                          Participant
                            @robertatkinson2

                            For a linear regulator the LM317 is hard to beat. Two components for a constant current source. Unlike a series resistor the current is constant regardless of the supply voltage. This would allow for instance a single design for 12 or 24 Volt systems. It also stops the light intensity varying with supply voltage e.g. in a car where voltage varies with engine off or running.

                            The LM317 circuit is floating and only sees the input /output differential which can be up to 40V for the standard device. This means you could run it on voltages higher than 40V if the difference between the supply and LED forward voltage is less than 40V.

                            Using a fixed Voltage regulator like a 7805 just increases the power dissipation in the current setting resistor an increases the voltage ovehead required.

                            Joseph Noci 1 I'm not sure what figure 2you are referring to, only Figure 4 has MPS2222 in it and they are not setting the current, just protecting from the failure of one string of LEDs. Pretty much any single transistor current source will need individual selection of components to set a specfic current as the current will deoend in the transistor gain, Vbe etc. With the LM 317 the tolerance is pretty tight.

                            Robert G8RPI.

                            #506354
                            Anthony Kendall
                            Participant
                              @anthonykendall53479

                              I'm surprised there isn't a willie-waver suggesting an Arduino controlled LEDwink

                              #506362
                              Howi
                              Participant
                                @howi
                                Posted by Anthony Kendall on 10/11/2020 09:12:12:

                                I'm surprised there isn't a willie-waver suggesting an Arduino controlled LEDwink

                                my willie is waving to all and sundrey, what a marvelous suggestion, unfortunately I dont think it has enough ports or processing power for the job in hand (there;s a pun in there somewhere……)

                                perhaps a RasPi4 might be better. I love reinventing the wheel, as I have so much time on my hands.

                                Why over simplify things just because you can?

                                #506423
                                Gene Pavlovsky
                                Participant
                                  @genepavlovsky

                                  I don't see anything wrong with using an Arduino for LED control? Depending on what you want to achieve, it might be overkill or a cheap and easy solution.

                                  Each Arduino (I'm assuming we're talking about 5V ATmega based ones; since they also have some models based on different MCUs, some of them 3.3V) output has an absolute max power rating of 40 mA, with 20 mA being the recommended continuous current (if I remember correctly). You can directly drive just the typical 3mm/5mm LEDs at 20mA. For anything more powerful, e.g. a 12/24V LED strip, one would use a power MOSFET with it's gate driven directly by Arduino's pin, or by an extra BJT or even a gate driver if really fast switching (high PWM frequency) is needed.

                                  One could also hook up an Arduino output pin to switch on/off the constant current LM317 regulator that this post started with. The way to do it would be via a signal MOSFET which would ground the LM317's ADJUST terminal to ground (reducing the Vout to 1.2V and effectively switching off the LEDs). The Arduino can be used to PWM the LEDs for dimming and/or fading.

                                  One benefit of LM317, compared to a large number of more modern regulators and LED drivers, is that it can be used for high-side driving (regulator is between Vcc and the LEDs), e.g. in an automotive situation the LED's negative pole can be grounded directly to the chassis ground. Most constant-current LED drivers (like the AMC7140 I mentioned) are designed as low-side drivers, so that LED's negative can't go to the common ground but must go to the driver.

                                  Considering that Chinese Arduino clones are ridiculously cheap (2-3 euros per piece), it makes sense to use them in all sorts of projects even if it's a complete overkill. Some models are really quite small (Nano, Pro Mini). For many projects, a standalone MCU such as an 8-pin ATtiny25/45/85 is enough and can make for an even smaller board especially if using a SOIC-8 SMD chip. You won't save much money versus using a Nano or a Pro Mini, though. Most of the stuff on an Arduino board is just support circuitry – voltage regulator, USB-to-serial converter and associated caps and resistors. You don't really need that in the final project, it's just useful for fast prototyping, programming and debugging. One example – if you want a PWM controller for LEDs or a motor, you can use a simple NE555 timer-based circuit, or an ATtiny MCU. Circuits for both options are easy to find online. Compare how many more parts (diodes, resistors, capacitors) the NE555 circuit has, compared to ATtiny. At Mouser, ATTINY25-20PU is 0.915 €, NE555P is 0.39 €, so you're saving 50 cents on the IC, but pay a bit extra for all the extra parts, and extra time and board space for soldering it all together. With an MCU you can make adjustments (change the PWM frequency, add fade-in/fade-out for LEDs or soft start for a motor) with just a reprogramming, while with discrete components you have to rework the circuit. Note: I am not advocating to use an MCU in each and every case, for many projects it can also be fun and educational to implement things in the hardware. But with their low prices, reasonable capabilities and ease of prototyping, cheap MCUs are a very attractive choice. There are also nice and cheap boards with 32-bit micros – STM32 and ESP32 for example. With the latter you can even control your lamp with WiFi/Bluetooth, or maybe monitor power consumption and log it to the cloud. The possibilities are crazy and endless, no wonder people are putting these micros in every little thing.

                                  #506424
                                  Gene Pavlovsky
                                  Participant
                                    @genepavlovsky

                                    By the way, Texas Instruments have an improved replacement for LM317 – LM1086. It's low dropout voltage (1.5V max) means the regulator wastes less power as heat. Note: 1.5V is not that low of a dropout, e.g. a small low-current reg MCP1700 drops just 178 mV at 250 mA. LM1086 is a drop-in 1.5A replacement for LM317, while LM1085/1084 are similar units rated for 3A/5A respectively.

                                    I don't quite understand the criticisms here, guys. Perhaps it comes because Michael posted the application note without mentioning a particular task to be solved.

                                    For simple lights that turn on and off, you don't need advanced circuitry. LED strips, including high-powered ones, are widely used with constant voltage sources (current limiting resistors are built in). A more advanced circuitry won't help you drive them (and since the resistors are already there, they will still generate waste heat even with a CC driver). LED strips are dimmed with PWM, a pulse generator (e.g. a simple timer like NE555, or an MCU such as Arduino) switching a power MOSFET to turn the LEDs on and off faster than the eye can see (too low PWM frequencies may still be noticeable as flickering by especially sensitive people or video cameras).

                                    Constant current sources are useful for driving high power LEDs, or where stable voltage is not available, e.g. in a car you may have 12-15V, a typical LED+resistor arrangement should have the resistor selected for the worst-case scenario (highest voltage), which means they would be more dim when the voltage is low. This may or may not matter in your particular application. If it doesn't matter, just use the resistor. I once made a custom motorbike taillight with Piranha Superflux LEDs and current limiting resistors on a perfboard, and it worked quite nicely for a few years until I sold the bike and moved out from Thailand.

                                    But if you are making a custom flashlight, machine lamp or a desk lamp, using 1 or a few high-power (few hundreds milliamps or even more than an amp current) LEDs, I think a constant current supply of some sort is the only reasonable options, even if you don't plan any dimming/fading. Also if making a battery-powered LED flashlight/lamp, a CC supply should be able to achieve higher efficiency and so give longer runtime. Good flashlights have such cool features as PID thermal regulation, allowing to run the flashlight as hard (bright) as possible but then reducing the current once a set temperature is reached, to maintain the LED temperature at high but safe levels. This squeezes out max possible lumens from a LED while preserving it's rated lifetime. Good luck implementing this feature with a constant voltage supply + current limiting resistor.

                                    To summarize: you should pick the simplest and most reliable design which achieves your particular goals. What it's going to be depends on the goals, and a more complicated designs might be required in some cases.

                                    –Gene

                                    #506432
                                    Martin Kyte
                                    Participant
                                      @martinkyte99762

                                      For low current leds (up to 120mA) the simplest option has to be a contant current diode such as

                                      **LINK**

                                      anything in the high current range I use switching regulators.

                                      regards Martin

                                      #506450
                                      simondavies3
                                      Participant
                                        @simondavies3
                                        Posted by Joseph Noci 1 on 30/10/2020 07:31:08:

                                        How many here have even considered any of these routes when you wanted a LED on/off indicator on your lathe/mill/clock/whatever??? Just stuck in a led, a resistor and found some source of non-lethal voltage, ignored the heat soaked resistor, and got on with it!

                                        Joe

                                        my solution every time….!

                                        #506472
                                        modeng2000
                                        Participant
                                          @modeng2000

                                          Didn't know about the AL5808, thanks.

                                          John

                                          #506479
                                          Gene Pavlovsky
                                          Participant
                                            @genepavlovsky

                                            For a simple indicator / pilot light, assuming Vf=2.0 (green LED) that we want to run at 20 mA, you'd need a >=500 Ohm 1/4W resistor on 12V and >=1100 Ohm 1/2W resistor. This can be reasonable.

                                            It wouldn't work as easily with 220V. Calculation suggests a 5W resistor and I guess the AC would need to be rectified? I wonder what's inside one of these 220V (or even 380V) 22mm panel mount LED pilot lights. Surely not a big-ass resistor? For Schneider Electric XB4, the info page says: light block supply Via transformer 1.2 VA 24 V

                                            I wonder what kind of transformer/rectifier they fit in such a small space.

                                            Martin, the diodes you proposed look interesting (for <= 150 mA) but neither Mouser nor DigiKey sell them, they only sell evaluation boards (non stocked) for 60 EUR a pop. I think this is geared to auto makers and other OEMs. What use is it to us hobbyists if we can't buy it anywhere?

                                            As for switching regulators. There are plenty of CC CV buck converters on eBay, many based on LM2596. The ones with 2 or 3 pots allow to set up either constant voltage or constant current. However, I think for nice user experience, every lamp ideally should be dimmable. How does one achieve dimming with such a supply (besides replacing the onboard pot with an externally mounted pot that the user can adjust, or using a digital pot)? LM2596 IC has a shutdown input (pull low to enable, pull high to disable), on these Chinese regulator modules it's grounded to permanently enable the regulator. The datasheet doesn't say anything about how long it takes the regulator to start-up, so it's not clear if this shutdown input can be used to control the regulator with PWM. What sort of switching regulators do you use, and is there a way to dim them?

                                            #506497
                                            Martin Kyte
                                            Participant
                                              @martinkyte99762

                                              I have always Pulse width modulated my switching regulators for Biogenetics work for the basic reason that the wavelenth doesn't change if you use the same driver current. They are perfectly happy pulsing at 2 or 3 kHz.

                                              The current limiting diodes I linked to was an illustration of principle really. There are other devices at least some of which are going to be purchaseable. That was an RS data sheet and they sell to joe public.

                                              regards Martin

                                              #506503
                                              Gene Pavlovsky
                                              Participant
                                                @genepavlovsky

                                                Martin,

                                                I think I will at some point try to experiment with PWMing an LM2596 regulator and some others I have. At various times I've bought different buck converters from eBay in quantities of 2 or 5. Do you buy modules off the shelf or design your own regulators? If so, what's your go-to chip/design?

                                                I think those special diodes, if purchasable, can be very useful for constant current (not adjustable) applications. I remember I read about them before, but haven't spotted them, they must be a relatively niche item (perhaps expensive?). Dimming them would require power MOSFETs, I suppose, which would have to carry the whole current?

                                                #506563
                                                Martin Kyte
                                                Participant
                                                  @martinkyte99762

                                                  LM3404 is a good simple chip for a first design. 1 Amp

                                                  I was building little regulators initially, I tend to go for modules now as they have become more available. No point in reinventing the wheel when you don't have to. The scientists just want anything that works. The other issue is we have depreciated our PCB wet etch since we got the CNC PCB machine so I can't do Aluminium substrate board at the moment unless I send it out.

                                                  regards Martin

                                                  #506579
                                                  Gene Pavlovsky
                                                  Participant
                                                    @genepavlovsky

                                                    Thanks Martin, I've read the datasheet and it looks quite nice indeed! I will try it for some next project.

                                                    #506585
                                                    Robert Atkinson 2
                                                    Participant
                                                      @robertatkinson2
                                                      Posted by Martin Kyte on 10/11/2020 13:20:11:

                                                      For low current leds (up to 120mA) the simplest option has to be a contant current diode such as

                                                      **LINK**

                                                      anything in the high current range I use switching regulators.

                                                      regards Martin

                                                      Hmm, seems to be MOQ of 3000 at 15p each or 1 on a development "kit" at £47

                                                      EDIT: Just noticed RS will sell you 20 MOQ at around 30 so about same price as a LM317 in that Qty, Still need a different part number for each current though.

                                                      Robert G8RPI.

                                                      Edited By Robert Atkinson 2 on 10/11/2020 21:43:58

                                                    Viewing 25 posts - 1 through 25 (of 39 total)
                                                    • Please log in to reply to this topic. Registering is free and easy using the links on the menu at the top of this page.

                                                    Advert

                                                    Latest Replies

                                                    Viewing 25 topics - 1 through 25 (of 25 total)
                                                    Viewing 25 topics - 1 through 25 (of 25 total)

                                                    View full reply list.

                                                    Advert

                                                    Newsletter Sign-up