embedded software boot camp

Lowering power consumption tip #2 – modulate LEDs

Tuesday, September 22nd, 2009 by Nigel Jones

This is the second in a series of tips on lowering power consumption in embedded systems.

LEDs are found on a huge percentage of embedded systems. Furthermore their current consumption can often be a very large percentage of the overall power budget for a system. As such reducing the power consumption of LEDs can have a dramatic impact on the overall system power consumption. So how can this be done you ask? Well, it turns out that LEDs are highly amenable to high power strobing. That is, pulsing an LED at say 100 mA with a 10% on time (average current 10 mA) will cause it to appear as bright as an LED that is being statically powered at 20mA. However, like most things, this tradeoff does not come for free, as to take advantage of it, you have to be aware of the following:

  • LEDs are very prone to over heating failures. Thus putting a constant 100 mA through a 20 mA LED will rapidly lead to its failure. Thus any system that that intentionally puts 100 mA through a 20 mA LED needs to be designed such that it can never allow 100 mA to flow for more than a few milliseconds at a time. Be aware that this limit can easily be exceeded when breaking a debugger – so design the circuit accordingly!
  • The eye is very sensitive to flicker, and so the modulation frequency needs to be high enough that it is imperceptible.
  • You can’t sink these large currents into a typical microcontroller port pin. Thus an external driver is essential.
  • If the LED current is indeed a large portion of the overall power budget then you have to be aware that the pulsed 100 mA current can put tremendous strain on the power supply

Clearly then, this technique needs to be used with care. However, if you plan to do this from the start, then the hardware details are not typically that onerous and the firmware implementation details are normally straight forward. What I do is drive the LED off a spare PWM output. I typically set the frequency at about 1 kHz, and then set the PWM depth to obtain the desired current flow. Doing it this way imposes no overhead on the firmware and requires just a few setup instructions to get working. Furthermore a software crash is unlikely to freeze the PWM output in the on condition. Incidentally, as well as lowering your overall power consumption, this technique has two other benefits:

  • You get brightness control for free. Indeed by modulating the PWM depth you can achieve all sorts of neat effects. I have actually used this to convey multiple state information on a single LED. My experience is that it’s quite easy to differentiate between four states (off, dim, on, bright). Thus next time you need to get more mileage
    out of the ubiquitous debug LED, consider adding brightness control to it.
  • It can allow you to run LEDs off unregulated power. Thus as the supply voltage changes, you can simply adjust the PWM depth to compensate, thus maintaining quasi constant brightness. This actually gives a you further power savings because you are no longer having to accept the efficiency losses of the power supply

Anyway, give it a try on your next project. I think you’ll like it.
Next Tip
Previous Tip.
Home

Tags: ,

5 Responses to “Lowering power consumption tip #2 – modulate LEDs”

  1. GregK says:

    Auto-magic brightness control (depend on brightness come up on screen) can be achieved by add some kind light sensitive element next to screen. Of course if you have spare pin with ADC.

  2. Nigel Jones says:

    Agreed. I use devices from Taos for this. They work well.

  3. Tom Evans says:

    If you want to do ramp-fading of LEDs or one of those cool ramp-on-ramp-off activity lights, 8-bit PWM doesn't cut it at low illumination levels. You need 16-bit PWM to avoid a stair-step effect.

  4. Tom Evans says:

    LEDs that are turned off can consume power too.I remember a story about a board with LEDs connected to pins that were tri-stated when the LEDs were meant to be off. When light shone onto the LEDs they pushed the pins into their input threshold levels, resulting in a major (milliamp or two) increase in power supply current.

  5. shg says:

    There’s also another method of reducing power consumption. Use high efficiency (often marked with HE suffix) and reduce the current below 1 mA, or even less with low beam angle LED. I really have no idea, why designers are pushing maximal current through LED, are they want me to go blind?

Leave a Reply to Tom Evans

You must be logged in to post a comment.