Shop OBEX P1 Docs P2 Docs Learn Events
How do you reduce LEDs power consumption? — Parallax Forums

How do you reduce LEDs power consumption?

John BondJohn Bond Posts: 369
edited 2006-03-22 08:26 in General Discussion
Hi Guys

I've built some of Jon's·LED candles (using the SX28 IC). The 5 LEDs in the "Flame"·are randomly·pulsed on and off and large electrolytic caps·soften the switch on so that the LEDs·don't have a digital look.·Each LED goes from dim to bright in each cycle rather than switching·ON/OFF.· Looks great!

Just one problem,·each candle consume 80mA which gives the 4 penlight AA batteries·a life of·about·30 hrs. I'm told I·could pulse the LEDs with a duty cycle of say 5% and get the consumption down to under 5mA or a battery life of about·three week.

The question is how to I change the intensity of the LED and pulse it at the same time?

Kind Regards from Kwa Dukuza

John Bond


Post Edited (John Bond) : 3/16/2006 11:29:43 AM GMT

Comments

  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-03-16 07:59
    You can do a lot of things to conserve energy, but I suspect that more conservation, less light.
    I believe the relationship is purely linear.

    So before you get into actually pulsing via writing a lot of code, you might reconsider your power source. Lithium batteries are more energy dense and also can recharge much quicker tha NiMh. Alternatively, can you use a wall wart?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • John BondJohn Bond Posts: 369
    edited 2006-03-16 11:06
    Hey Kramer, thats what I thought but seems I was wrong.

    The guy who suggested I pulse the the LEDs sells the electronic Cat's Eyes used on the roads. He tells me these are pulsed at more than 100ma and less than a 1% duty cycle. This is why they use so little power and are also so bright. Apparently, the human eye/brain sees the light at·its brightest and disregards the black period in between. I have subsequently confirmed this by looking·it up under·Micro power in "The Art of Electronics".

    So it seems that to get the maximum "concieved" light per Watt, you need to pulse the LED with a very short duty cycle. They say that faster than 1 KHz is OK.

    Regards from the small town of Kwa Dukuza - built on the site of the Kraal of the great King Chaka Zulu.

    John Bond
  • NateNate Posts: 154
    edited 2006-03-16 11:45
    John,

    You are correct in that you can pulse an LED and have a human eye percieve the LED as 'on'.· In my experience it does seem a little dimmer when pulsed, but you can make that up by increasing the current (smaller resistor in serial with LED).· The only issue that I have always had is how to figure out how much pulsed current it is safe to run through the LED.· Most LED spec sheets that I have seen only publish·a Imax(DC)·rating, not a graph showing duty cycle vs current rating.· You can do emperical testing, but that does not guarantee that todays batch of LEDs will perfrom as tomorrows will (with no rating by the manuf.).

    In answer to your question, you simply need to replace your code the turns on the LEDs with code that sends out a pulse train when the LEDs are supposed to be on.· Also, you can take out the caps you used for softening the LED turn-on, and simply have the SX change the duty cycle of the pulse train driving the LEDs to ramp the intensity of the LEDs.

    Nate
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-03-16 16:04
    John,
    I am not always right and your are certainly welcome to try. The eye can be fooled. Otherwise we would never have developed movies or T.V.

    Let's look at this another way.
    Maybe you can or cannot save much power consumption at the actual LEDs, but you are using 4mhz to clock them.
    That is pretty low power, but you can go down to 32khz and really gain a reduction in the SXes power consumption.

    I haven't looked at the programing code because my Nuts and Volts subscription for Nov, Dec, Jan, Feb, and March haven't arrived.
    [noparse][[/noparse]Being in Taiwan has its quirks - we exchange lot of email, but no magazines].

    The SXes are limited to about 25ma continuous output, so I really am unsure what to say when you want 100ma of pulsed.

    So, you need to evaluate on two parameters. Pulsed LEDS at the usual 4Mhz and Adjusted timing code for a slower oscillator. Together they will provide an optimum design. It is a bit of work, but if you are enjoying the challange -- you will get your answer.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • John BondJohn Bond Posts: 369
    edited 2006-03-17 07:29
    I see plenty of artificial candles on the net with quite long battery life. I'm keen to find out how to do it. My work last night seemed to confirm Kramer's original statement but, if so many others have done it I want to know how.

    My workshop instruments are very primative but it appears that I can get one LED to run at somewhere about 50mA at 2% duty cycl, those stupid laws of phisics seem to kick in after this. The LED (as Kramer said) is still quite dim. Stray capacitance seems to be a problem as well. Oscilloscope probes make it light up a little better.

    A rough power budget indicates that the LEDs, even when pulsed, are still the big user of current so I think this is the best place to focus.

    I've got to use the sort of battery you can buy locally. I'll order ICs and other specialized components but I'm not going to complicate my life by ordering some exotic NiHi battery and fancy controlled voltage, controlled current controlled temperature charger.

    Hey guys - How do these other people do it with such low power consumption.

    John Bond
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-03-17 07:49
    Some people have said that the SX-28 is a new millenium replacement for the good old 555 timer.

    While it certainly can replicate a lot of what the 555 does [noparse][[/noparse]and this may be one of those functions], there are extremely low power versions of the 555 out there.

    It is a wild guess,
    but that may very well be your low power competition - a 555, a 556, or 558.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • BongoBongo Posts: 65
    edited 2006-03-17 08:55
    The problem is not so much with the SX (maybe this question should be elsewhere, not that I really care).

    An LED will draw whatever you feed it.· Very common is 20mA.· You will probably find not much difference in brightness between 10 and 20mA, depending on the led.· So there is potential there for a 50% saving.· How you achieve that current drop is something else.· A linier current regulator will waste it in heat, an SX programmed for a 50% duty cycle must consume half the power by way of being on for only half the time.· But at the end of the day, less current must equel less light.

    Another factor so far not covered is your AA cells.· Check the everready website for specs.· You will see that an alkaline cell will deliver current from 1.5 volts(new) to 0.8 volts end of life.· The cell voltage drop is fairly linear over the cell life.· This is an important point, as what is means is that a cell delivering it's current at a voltage of 1.15 volts is half exhausted.

    Given the fixed forward voltage drop of an LED, my guess is that your batteries voltage sags a little, the LED's stop working and the assumption is the batteries are flat.· The reality of the situation is usually the design does not allow for the full use of the batteries.· For this to happen, the design must be able to run on 0.8 to 1.5 volts per cell.

    This is why the rechargables can come out looking much better than what they are.· They have much less voltage drop over a discharge than the alkalines



    bongo

    Art is making something for nothing, and then selling it. - Frank Zappa
  • John BondJohn Bond Posts: 369
    edited 2006-03-17 11:23
    Hi Bongo & Herzog

    The SX and the LEDs work from 5.1V (4 AAs @ 6.5 & 2 diode used as a 1.5 volt drop) right down to about 3.5 volts.

    Yes, I'm using the SX as a glorified Variable time, Variable pulse width bistable (like a bunch of super intelegent 555s) but the way I see it, this is not about the 5mA the SX is using, its about the 20mA each of the 5 LED uses.

    The battery issue is this. I am making an electronic device, not a battery holder. Therefore I use the most common, easiest battery that fits with my circuit requirements. If an AA (or C or D) will do as well, but with much less effort, I use it. I can then focus on what I think is important in my design. If the increased energy density comes at such a high price (not just money but especially effort) but gives me so little gain (less than 50% improvement), I need to focus elsewhere. I would like an improvement of at least 200% in the same overall product size so...

    How do I get more "percieved" light out of LEDs per gross Watt Hour consumed?
    or alternatively
    How do I reduce the Overall mA per hour an LED uses for the same "percieved" light output?

    Obviously, lower battery voltage and slower clock speeds will give me some small savings but I'm greedy. Im looking for much more than this. How do the other people do it???

    Kind Regards
    John Bond



    John Bond
  • BeanBean Posts: 8,129
    edited 2006-03-17 12:19
    John,
    A couple thoughts:

    1) High effeciency LEDs. Some LEDs are quite bright at only 2mA. Others can just barely be seen.

    2) Run at a lower voltage. The SX power consumption is greatly affected my supply voltage. Also you will lose less power in the LED dropping resistor, because it will be a much lower value. The SX running at 3V uses about 1/3 the power that it would at 5V.

    3) Run the SX at a slower clock speed. The SX power consumption is linearly affected by frequency. Running at 1Mhz should use 1/4 the power of running at 4Mhz. Internally you can choose from 4Mhz, 1Mhz, 128Khz, or 32KHz.

    4) Better batteries. Lithium or polapulse batteries.

    Of course you will probably get to the point where the SX power consumption is negligable compared to the LEDs.


    [noparse][[/noparse]edit] Opps, didn't see the last couple posts. You guys already covered most of this...

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "SX-Video·Module" Now available from Parallax for only $28.95

    http://www.parallax.com/detail.asp?product_id=30012

    "SX-Video OSD module" Now available from Parallax for only·$49.95
    http://www.parallax.com/detail.asp?product_id=30015

    Product web site: www.sxvm.com

    "Wise men know when they're right. The wisest also·know when they're wrong."


    Post Edited (Bean (Hitt Consulting)) : 3/17/2006 12:22:56 PM GMT
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-03-17 12:58
    pjv posted a trick a while back (about a year ago) employing an inductor and short pulses to drive LEDs, if I remember correctly they were capable of achieving equivalent brightness using reduced average current.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-03-17 15:27
    Yes, PWM should allow you to maintain relative brightness while consuming less power.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • StarManStarMan Posts: 306
    edited 2006-03-17 17:08
    I believe this is the thread that Paul is referring to: http://forums.parallax.com/showthread.php?p=518766

    I started the discussion but Peter's solution was way over my head at the time.... and it still is.· But I would be interested in seeing someone pursue it and break it down for the rest of us.· Right now I'm just learning about the SX and assembler.· I don't think I'll be at the level to attack this for quite some time.

    Chris I.
  • NateNate Posts: 154
    edited 2006-03-17 17:41
    Some power saving ideas:

    As Bean mentioned, you are wasting whatever power is being dissapated by any resistor that is in serial with the LEDs.· If you are·powering a LED w/ voltage drop of 1.2 volts·from a 5.1V source, you are disapatiing way more power over the resistor than the LED.· Look to power the LED with minimal voltage no matter what the battery condition (ie 5.1V or 3.6V).· I believe this, coupled with PWM to drive the LEDs, is the key to dramatically decrease power consumption.

    Also, may want to look into letting the SX sleep between operations - not sure there is any 'down time' to be scavenged there, but you might be surprised.· A mS here and there can add up.

    Nate
  • pjvpjv Posts: 1,903
    edited 2006-03-17 22:21
    Hi John Bond;

    I'm certain we can help you squeeze the longest operation from your batteries to light your LEDs.

    To make sure I'm not wasting my time by making assumptions, please post EXACTLY what you are trying to accomplish... numbers of LEDs, separate flashing patterns, brightness requirements, battery voltage and size etc. I hate spending time on something not well defined, and then needs to be reworked because of that.

    My time is very precious right now as I'm real busy experimenting with that new propeller.

    There are many ways to skin this cat, and I'm sure we can help you optimize this.

    Cheers,

    Peter (pjv)
  • John BondJohn Bond Posts: 369
    edited 2006-03-20 08:05
    Hi Guys

    Thanks for your responses

    Peter
    I want to make an electronic Kerosene Lamp that runs for a reasonable period on regular batteries while giving off a good light. This is based on Jon’s candle but run on an SX28. The problem is that Jon’s circuit draws about 60ma for 4 LEDs which gives a theoretical battery life of only 40Hrs (AA batteries @ 2400mAHr). I would really like to get this below 20mA

    The flame of this lamp consists of 4 LEDs. These LEDs fade in and fade out randomly to give the effect of a moving flame – Random selection of LEDs for a random time.

    My current (Ver. 3) circuit works by switching the 4 pins between Output Low to light the LED and charge the capacitor and High Z Input to allow the capacitor to discharge through the LED when the pin is off. The visual effect is good.

    My reading and discussions show that I can do much better by pulsing each LED. The eye perceives the greater light… etc. etc... But the way I understand it, this means that I’ll have to control the brightness using PWM and then also pulse LED to save power.

    I’ve spent many hours playing round with pulsing LEDs but Hey, I’m missing something. The results are disappointing.

    I would prefer AA (Pen light) batteries. Lower voltages reduce consumption so as low as practical.

    I guess that the existing Capacitor through LED decay time is about 500ms. I haven’t measured it.

    Where to from here?

    Kind Regards from Darkest Africa.

    John Bond
  • LoopyBytelooseLoopyByteloose Posts: 12,537
    edited 2006-03-20 10:20
    I feel like one of those guys that slashes a construction project's budget.

    The AA battery or larger is a good power source.
    As mentioned above, you can eliminate the voltage regulation and go to a lower supply voltage.
    This will eliminate the 20-30% wasted at the regulators and allow you to eliminate or reduce the current limiting resistos of the LEDs.

    Take a look at your oscillator. A lower frequency may save some power too.

    Consider using only 2 or 3 LEDs to do the same task.

    And the most likely solution. . .
    Use a tuned coil in line with the LED to create a peak voltage that will emit brightlight rather than duration.

    If the coil really works, then it means that you have to go back into your code and try to get the timing optimal.
    I am sorry, I don't have a schematic for it but I do see how it might work in theory.

    The capacitors smoothes and collaspes voltage slowly; The coil accumulates voltage and collapses quickly.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    "When all think alike, no one is thinking very much.' - Walter Lippmann (1889-1974)

    ······································································ Warm regards,····· G. Herzog [noparse][[/noparse]·黃鶴 ]·in Taiwan
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-03-20 14:38
    Rather than eliminate the voltage regulator, I would replace it with a switching regulator, they are much more efficient at regulation than the standard regulators. Also Id try to run it at 32kHz to minimize power consumption within the SX. But Peter (pjv) and Tracey Allen are much more skilled at low power consumption techniques than I am.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • pjvpjv Posts: 1,903
    edited 2006-03-21 03:45
    Hello John;

    A couple of points...

    1. Contrary to some of the chat in this thread, my experience is that pulsing an LED with some duty cycle reduces its apparent brightness. The eye is a non-linear sensor (probably logarithmic?), but so is an LED's light output with current. Hence there appears to some proportionalism of peceived brightness versus duty cycle.

    2. Your assumption that lower voltage means lower current and hence longer battery life, is only true if one accepts the lower light output resulting from the lower current. If one wanted to maintain brightness, then the current needs to be maintained. It is the wasted power in simple drive circuitry (such as resistor limiting) that is the main culprit in decreasing battery life.

    3. To get the most out of your batteries I believe you need to run a form of switcher, along the lines of what Paul indicated. But not a conventional switcher. What I'm proposing is a simple "back-emf" switcher; in fact one per LED as you desire each LED to be lit independently of the others.

    4. If keeping the cicuitry simple is important, then I would drive each of the four "back-emf" switchers straight off an SX port pin.... the pin actually being the switch. This requires rather low operational voltages, perhaps 3 to 4 volts.

    5. Some better performance might be gained by driving each "back-emf" circuit with a transistor or FET, thereby permitting higher voltages such as 9 or 12 Volts, hence more efficient switching. But without trial, it's difficult to estimate what the gain might be, so I suggest trying the direct port output first.

    6. To simulate the "flickering" you are wanting, I suggest doing that in software by making four (or possibly one with multiple taps) pseudo random sequence generator.

    7. As mentioned earlier, I would run the SX as slow as possible to reduce its current consumption. Perhaps 32 KHz may be fast enough.... too early to tell.

    8. Please let us know how familiar you are with assembly programming of the SX, and whether or not you have an SX-Key. I need to know how much assistance you will require, and whether or not you want to have a go at this approach. I'm happy to do it via this forum so others can also learn how to drive LEDs efficiently, ableit somewhat more costly.

    Cheers,

    Peter (pjv)
  • Paul BakerPaul Baker Posts: 6,351
    edited 2006-03-21 14:30
    pjv said...
    Hello John;

    A couple of points...

    ·The eye is a non-linear sensor (probably logarithmic?), but so is an LED's light output with current. Hence there appears to some proportionalism of peceived brightness versus duty cycle.
    You are correct Peter, pretty much all biological sensory systems·are logarithmic in thier response, its so that minute signals can be detected without·being damaged in the presence of "naturally occuring" large signals. My graduate group did extensive work on modelling this response and exploiting it for various reasons. Basically applying the theory behind mp3 to all sorts of areas, such as encoding information into video and audio while remaining undetectable, because the·"sideband" information is biologically masked by the much stronger·main signal.·

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    ·1+1=10
  • John BondJohn Bond Posts: 369
    edited 2006-03-22 08:26
    Thanks Peter & Paul

    My level of experience is:
    I am a hobbyist. I have read quite a bit but there are big holes in my knowledge. At this stage, I have only programmed the SX in SX/B (Basic) but I'm hoping to use this project to get to grips with assembler. I have the SXKey. Hey, the simulation and debugging features are the best things since bubblegum. I wouldn't even get started using the old "burn and crash" programming techniques.

    In response to Peters offer of assistance. (using the same numbers he did)

    1. My experiments pulsing LEDs confirm what everyone on this thread has been telling me. There appears to be no gain in perceived brightness when you pulse the LEDs for a short duty cycle at higher current. (Don't believe everything you're told!)

    2, 3, 4 + 5. You're suggesting I run the circuit off say a 3 volt battery pack and boost the voltage thereby reducing the resistors on the LEDs or alternatively use a buck regulator and say 12 volts. I'm going to try both but I prefer the first.

    Please can someone direct me to a rough schematic of a switching regulator using the SX to power it?

    Isn't there a trick using a FET as a current limiter when using an LED? You then get almost constant brightness as the voltage drops (can’t find where I read this?). The trick would then be to use 3 AA batteries. The flat battery voltage of 2.4V (0.8V X 3) is almost the same as the forward voltage of the LEDs, 1.7V plus the voltage drop through the SX pin, I’m guessing this is 0.7V.

    6. I want to try doing all the LED intensity control using software.

    7. I will run the SX as slow as possible. Is there an advantage in using the R/C option to run the SX even slower than 32K? (Probably the law of diminishing returns kicks in – the gain is not worth the effort)

    8. It may appear that I know more than I do; I’m able to talk the lingo (without knowing what most of it means).

    Both Paul Baker and Peter have made the point that the eye does not percieve light linearly. This would seem to indicate that a large drop in LED power consumption may only give a small drop in what the eye percieves light output is. Sorry guys, I missed the implications. Big drop in power, small drop in light intensity.

    Thanks for all your help and kind regards from Kwa Dukuza

    John Bond
Sign In or Register to comment.