View This Issue - October 2011

Driving alternate banks of LEDs improves efficacy (MAGAZINE)


This article has an appendix containing further details and software routines - download the appendix.


When a set of LEDs is controlled for a lighting application, LED luminous output versus electrical power is a key specification in determining the quality of visible light. In low-power applications, illuminating an entire set of LEDs simultaneously to achieve the maximum luminous level may not be possible, due to limitations in current source. The control electronics must efficiently manage the power dissipation per LED to produce optimum luminous output from the low-power source. This requires a power-management technique where, in a set of LEDs, only one bank of LEDs is powered for a given time. The design must manage this time interval to achieve the required luminous intensity.

The drive circuit discussed here depends on the fact that the human visual system will discern constant light when an LED is switched on and off above a certain frequency. Generally, a system that lights the LEDs at least 60 times per second (60 Hz) will not exhibit flicker.

In order to determine the number of LEDs in a system, and the number in a bank that must be lit for each given time interval, the circuit designer must first consider the available power and the luminous intensity required for the application. The circuit designer must carefully review the LED datasheet for luminous intensity versus forward-current characteristics, to select LEDs that meet the required intensity level. Once the number of LEDs needed to achieve the required level of luminous output from the application is determined, then the number of LEDs that can be powered at a given time interval is determined by taking the ratio of the total current required for the LEDs and available current, as follows:

Number of LEDs in a bank = total required current for LEDs / total available source current

As discussed above, the circuit designer must consider the frequency at which the bank of LEDs is turned on and off and the specific on- and off-time characteristics. The on time must, at a minimum, be long enough for full illumination of a bank. The off time is limited by the time it takes before the bank of LEDs start to visibly dim. Essentially, the off time limits the number of banks that can be controlled via time-interval management because excessive off times would create flicker.

Flip-flop-based driver

A low-cost implementation of this technique requires a clock source, digital flip-flops to control banks of LEDs, and an OR gate to detect a start condition with a simple on/off switch. Fig. 1 shows a block diagram of a D flip-flop configuration that can control four banks of LEDs.

FIG. 1. LED lighting time-interval driven by a flip-flop circuit.
FIG. 1.
Initially, the flip-flop is in a no-change state and requires a start pulse. The duration of the start pulse must be at least one clock cycle, so that it can be detected by the first flip-flop at the rising edge of the clock. Also, the duration of the start signal must be momentary. It cannot be longer than one clock cycle, otherwise the first two flip-flop outputs will be set at the same time; and, since the source current is limited, the lighting application will not function properly. Therefore, with this configuration at the rising edge of every clock, one bank of LEDs is fully illuminated. However, to the human eye it appears as though all LEDs are fully turned on, simultaneously.

The limitation of this implementation is that it is monotonic, and does not provide design flexibility. It only has an on or off state. For some applications, such as LCD backlights, this circuit may be adequate. However, if dimming or pattern generation is needed, a microcontroller (MCU)-based circuit provides the greatest flexibility with minimum impact to the total cost of the solution. The circuit is also simpler to build, with fewer components. The MCU controls each bank of LEDs, and it can also detect user inputs for dimming control and pattern selection.

One example of a cost-effective implementation is to use a low-cost and low-pin-count, 8-bit MCU, such as Microchip’s PIC10F or PIC12F family, with an I/O-port expander such as Microchip’s MCP23018. I/O expanders can also be useful for driving LEDs, when the lighting circuit is remotely located with respect to the MCU.

MCU and I/O expansion

I/O-port expanders are devices that are used to expand the number of I/O signals to which an MCU has access. In this application, the MCU controls the I/O-expander ports via the I2C protocol, to drive the LEDs on or off. And the MCU’s integrated I/O pins can be used to detect user inputs via a push-button switch, or by utilizing the built-in A/D converter (analog-to-digital converter) to detect a potentiometer level for dimming control.

FIG. 2. Low-cost, microcontroller-based lighting solution using an I/O-port expander.
FIG. 2.
I/O expanders are available with open-drain- or push-pull-output configurations. With today’s MCUs operating at 3.3V or lower, an open-drain-output I/O expander lends itself well to this application. The advantage of using an open-drain-output design is that it permits the LEDs to operate at 5V or higher while the MCU and the I/O expander are powered at a lower voltage. Fig. 2 shows a circuit diagram for an open-drain-output I/O expander pulled up to 5V.

In this case, when the I/O port is set as a logical low or zero, then the voltage at the I/O-expander port is 0V and current flows, which forward biases and turns on the LED. The LED-biasing resistor, which also functions as a pull-up resistor for the open-drain output, limits the current to the LED for the required luminous intensity.

When the I/O-expander output port is set as logical high or 1, the open-drain output is off or high impedance and the voltage at the I/O-expander port is pulled up to 5V by the pull-up resistor. This is an off state for the LED, because current will not flow.

The open-drain-output configuration offers another advantage when the port is configured as high impedance or in the LED off state. The LED does not turn off immediately due to parasitic capacitance. Therefore the effective on time for each bank is extended for a slightly longer duration than the circuit-design calculations would indicate because the next bank of LEDs will turn on prior to the former bank extinguishing. You don’t realize that benefit with a push-pull output.

Sharing current

The MCP23018’s 16 I/O ports can drive up to 16 LEDs. The I/O expander’s output drive capability also limits the amount of current that can be sunk into the I/O port when the LED is fully turned on. The I/O port’s low-level voltage is specified for 0.6V maximum at 8.5 mA of current. If the current is higher than 8.5 mA, then the low-level voltage will increase slightly although the impact is negligible so long as maximum current is kept to the specified limit of 25 mA.

Let’s consider an example where the total source current is limited to 50 mA at 5V. If you budget approximately 2 mA for the microcontroller, the I/O expander and the resistors for user-input detection, then the rest of the available current can be dedicated for LED lighting. If the luminous intensity of the LEDs at approximately 10 mA is adequate, then 4 LEDs can be controlled per bank. And, the current-limiting resistor value will be approximately 440Ω.

The timing shown in Fig. 1 can be replicated using a relatively short MCU program. The appendix to this article provides details of such an implementation with pseudo C Code that would be used to control the MCU. We will present a simpler description here.

The main segment of the program would consist of an infinite loop. A timer integrated on the MCU generates a periodic interrupt based on the required timing that has been determined in the hardware design stage. Each interrupt would result in the next bank of LEDs being refreshed. With such an implementation, the circuit outputs the required luminous intensity, and to a person it appears that all LEDs are turned on simultaneously from the available power source.

Patterns and dimming

You can easily extend the MCU-based design to add support for light patterns or dimming. The web addendum includes sample code for these concepts as well.

FIG. 3. Timing diagram for PMW control of intensity.
FIG. 3.
Patterns simply require that the program define a pattern of 1s and 0s for each of the 16 LEDs and that pattern would typically be stored in two bytes of memory. You could easily control a changing pattern by having the MCU monitor a push-button connected to one of the MCU input signals. The example code changes the pattern each time the button is depressed. A predefined look-up table contains various patterns of 1s and 0s for each bank.

Dimming control requires the addition of pulse width modulation (PWM) to control the duration for the on-time interval of each bank. Fig. 3 shows a timing diagram for such an application. The width of the tPWM_High pulse determines the intensity of the LEDs in each bank. The online example uses a thumb-wheel potentiometer with the center tab connected to the MCU’s A/D-converter input. At one end of the potentiometer range, the LEDs are set to the lowest dim level and by adjusting the potentiometer the brightness can be increased over 16 steps.

You can further extend the concept and methodology described here to generate chasing and other complex patterns where a single, or small group, of on or off LEDs is varied in a dynamic pattern. Such a design might require a more capable MCU such as Microchip’s PIC16F family that has sufficient on-chip memory to handle the program required for sophisticated lighting patterns, such as chasing lights.

While there are many methods to efficiently drive the banks of LEDs used in LCD backlights or lighting-pattern applications, designers are always looking for novel ways to cut costs without compromising performance. In low-power applications, LEDs can be controlled by managing the time interval for each bank of LEDs, for efficient illumination. In addition, low-pin-count MCUs and I/O-port expanders provide a low-cost alternative for lighting solutions with great design flexibility.


SIL keynotes chart course of LED technology and supply, explore expanding applications (MAGAZINE)

Outdoor lighting: Connected cities, new LED fixtures, and surveillance services

Acuity acquires indoor-location-services specialist ByteLight

Tunable lighting comes to LED-based linear fixtures from Architectural Lighting Works

Tridonic announces LED-centric connectivity and power-distribution technologies

Philips Lighting will supply network technology for Los Angeles LED street lights

Deco Lighting offers ZigBee-based LED driver for its troffer fixtures

LG Innotek announces networked LED drivers developed with Daintree Networks

SSL industry waits for the right IoT standards and wireless protocols (MAGAZINE)

LED technology serves rapidly growing horticultural market (MAGAZINE)

Acuity and Sensity partner on networks and Acuity expands controls portfolio

STMicroelectronics announces line-powered, high-PF LED driver IC

Gooee and ams drive sensor-based connected lighting technology (UPDATED)

LEDs Magazine recognizes the SSL industry’s best at Las Vegas Sapphire Gala (MAGAZINE)

LEDs to fixtures nab finalist positions in LEDs Magazine Sapphire Awards (MAGAZINE)

Protect an LED driver against output shorts to ground (MAGAZINE)

Integrating the Internet of Awareness into our smart SSL systems (MAGAZINE)

Denmark heads for the bright lights, smart city (MAGAZINE)

SSL benefits from practical and virtual labs (MAGAZINE)

Cree adds color tunability to LED fixtures equipped with SmartCast controls


Zierick Manufacturing Corp

Offers innovative solutions for interconnect applications. Specializes in wire-to-board and board-to-board applications. Provides surface mount and thru-hole products while further reduci...

Cree Inc

Leads the LED industry in performance, brightness and reliability with its XLamp LED family, enabling the lighting industry with efficient, environmentally-friendly LEDs that produce beau...

InnoLight sp zoo

EU located lighting manufacturer for LED GU10 5W 600lm CRI>80 reflector, great performance, and LED E27 5W 380lm classic traditional appearance.

CSA Group

A global solutions provider of product testing and certification services for electrical, mechanical, plumbing, gas, medical and a variety of other products.

Energy Efficient Lighting

Energy Efficient Lighting offers total solutions to both conventional and more advanced LED lighting fixtures and LED retrofit kits for commercial and industrial applications.


48 companies worldwide, passionate about light and innovation, experts in developing LED lighting solutions for safe and comfortable environments with significant energy and cost savings,...

Guardian Industries

Guardian Industries Corp. is a leader in float glass, fabricated glass and high performance coated glass products. Guardian lighting solutions deliver optimal performance, flexibility and...

ELMA Electronic Inc

Provides standard and customized LED solutions. Elma's LED family offers consistent, reliable, and durable illuminating and indicating solutions.

LEDSAmerica Inc

LedsAmerica is a full line LED line company and has manufacturing in Iowa where T8 LED-O tubes and street lights are made together with PL, PARs, High Bay lights. MAx

Lumentra Inc

Provides NVLAP accredited optical (photometry, colorimetry, Lumen maintenance), thermal (mapping and transient analysis), electrical characterization services, product development, supply...


The LED, DC-DC and AC-DC power supplies from 1W - 1600W. Cincon’s lighting controllers, interfaces and devices incorporating DALI protocol. LED drivers from 25W - 150W with international ...


LTF, LLC is a U.S based solid-state lighting product development and manufacturing company with facilities located in both USA and China.

Marian Inc

Marian is a global company who supplies die cut and converted parts to the LED market. Materials include thermal pads, reflective, venting, gaskets, insulators, diffusers and more.

Colorimetry Research

Specializes in the field of optics, manufacturing, electronics and software enables us engineer products with the right balance of hardware and software.

eldoLED America Inc

Designs and manufactures drive solutions for LED based lighting systems. Our technologies empower our customers to deliver the promise of LED lighting.

Cirrus Logic Inc

Cirrus Logic develops high-precision, analog and mixed-signal integrated circuits for a broad range of innovative customers across a variety of energy-related applications, including the ...


Established in 2002 as an ecommerce store for all your LED product needs.


Designer and manufacturer of custom and industry standard LED, DC-DC and AC-DC power supplies from 1W to 1600W. Cincon also designs and manufacturers lighting controllers, interfaces...

Illumination Machines

Illumination Machines designs custom optics, heat sinks, and remote phosphor systems for LED luminaires and lamps.

eldoLED BV

eldoLED is a world leader in the design and manufacture of intelligent drive solutions for LED based lighting systems. Our technologies empower our customers to deliver the promise of LED...

Cree CXA LED Array Family

Cree’s CXA LED Arrays are optimized to simplify design and lower system cost, delivering high lumen output and efficacy with a family of single, easy-to-use arrays.

Cree LED Modules

Cree LED modules deliver beautiful, consistent light, backed by a 5-year warranty. They offer a choice of dimming options, while reducing the lighting power load by 80%.

Cree XLamp® XP-L LEDs-the industry’s highest efficacy single-die LED.

Cree® XP-L LED is the first commercially available single-die LED to achieve up to 200LPW at 350mA. The XP-L enables 50% or more performance increase as a drop-in upgrade.

Surface Mount Wire Gripper - Part Number 1301

The Zierick 1301 is designed to allow customers to easier terminate a stripped wire to a PCB. Wire sizes to 24 AWG. Terminal is UL Recognized.

Surface Mount Wire Gripper - Part Number 1262

The Zierick 1262 is designed to allow customers to easier terminate a stripped wire to a PCB. Wire sizes from 0.025" to 0.095". Terminal is UL Recognized.

Unlock new LED lighting solutions with Cree High Density LEDs

Cree® High Density LEDs deliver the industry’s highest optical control factor enabling lighting manufacturers to improve performance, cost and size of LED lighting—enabling never before p...

Cree XLamp® XM-L2 EasyWhite® LED

The first 5mmx5mm LED to enable color-consistent 50W halogen performance; the XM-L2 EasyWhite delivers 1,100 lumens and is optimized to replace halogen technology.

Surface Mount Insulation Piercing Terminals

Surface Mount Wire-to-Board terminals available for wire gauges ranging from 24 to 14 AWG. Parts can be terminated to allow daisy-chain applications. Eliminates difficulty with direct...

LED flexible strip and aluminum LED bar

Full range of LED strip and bar including the unique high lumen strip. Protection degree up to IP68.Epistar 3528/5050 SMD LED.Compliant with CE & RoHS.2-year warranty.3528: 60LED/m,120LED...

P3 Indoor Full Color LED Display Video screen

High-density pixel pitch,high resolution,high refresh rate,magnificent and high-definition image and video effect.P3,P5,P6,P7.62 to P10 available.Epistar SMD LED,wide viewing angle.High r...

LED Panel Light

Designed to replace T8 fluorescent tube or Phillip Grille light.Epistar 3528/3014 SMD LED.Aluminum alloy body.Even and Soft light beam.Various mounting means.50,000 hours lifetime.Environ...

Rotatable LED Down Light, beam angle adjustable 10-60°

Beam angle adjustable 10-60 degree.Shell can rotate 360°,vertical 0-40°.High power CREE LED,even and uniform light output,Die casting aluminum alloy housing,good heat sinking.Widely used ...

Solar LED Paver Light

100% solor powered.No wires, no electricians.Super capacitors instead of battery,maintenance-free.Absorb sunlight in daytime and illuminate 8-12 hours during night. Epistar LED.Activation...

T8 LED tube light

Epistar Super bright 3528/2835 SMD LED.Aluminum alloy body with plastic cover.Consist with traditional fluorescent tubes.Easy mounting.PF>0.90,CRI>72,Over 60% energy-saving,Low degradatio...

LED light Bulb – LED spotlight

The AR111,GU10,MR16,PAR30,PAR38 LED bulbs are ideal replacement of 10-75W halogen or CFL bulbs.Cree/Everlight LEDs.PMMA lens.Aluminum housing.Good heat dissipation.Surface temperature les...

Super bright Injection LED modules

Housed by ABS material,covered by epoxy resin on surface with good insulation.Beautiful appearance.Waterproof.Anti-fire.Super bright 5050/3528 LED.12V voltage.Ideal light source for backl...

Flexible LED screen - Rental and Stage LED billboard

Special design,flexible use,light weight,super slim,transparent,SMD technology,easy to install.Can realize any curved and creative installation horizontally and vertically.IP65 protection...

iVAR COB LED Downlight

iVAR COB LED Downlight use die-casting magnesium alloy to make the main body,has Excellent heat dissipation performance,and Unique and delicate looking design.

LIMS - Liquid Injection Molding System

Silicone LIMS can be used to injection mold silicone components such as lenses or gaskets in an automated process. The two-component, thermoset material ranges in Shore A hardness from 5-80.

360 degree 10W led bulb

360 degree 10W led bulb has high efficiency, high power factor,environmental friendly, unique heat-dissipating design and perfect thermal management.







Have a press release or other announcement you'd like to share?

Submit Announcement

Miss a webcast? Watch it in the archives


LEDs Magazine Newsletter

Our weekly flagship news source

Product Focus

Monthly newsletter

Illumination in Focus

Bi-monthly newsletter

Copyright © 2007-2014. PennWell Corporation, Tulsa, OK. All Rights Reserved.