Driving RGB LEDs from GPIO pins is simple. However, high compute loads can make achieving real-time performance interesting. With the LP581x family, Texas Instruments provides an array of simple-to-deploy I2C-based LED drivers that support both constant-current operation and advanced animation.

Achieving real-time or near-real-time responsiveness is a holistic task: optimal performance is achieved only if all parts are optimized. Offloading repetitive, low-value tasks to dedicated semiconductors is a surefire way to ensure time-critical events are handled within the expected timing.

Constant-Current Sinking for Accuracy

Light-emitting diodes perform best when driven in constant-current mode. The Texas Instruments LP5814 achieves this by acting as a current sink. As shown in the figure below, the four individual color components are connected to the power supply, with grounding controlled by the integrated circuit's drive transistors.

Depending on the configuration, the maximum LED current can reach 51mA. The actual adjustment is an eight-bit value; the datasheet claims step values of 0.1 or 0.2 mA.

As for dimming, the TI LP5814 can act as both an analog and a PWM LED controller. In PWM mode, a frequency above 20 kHz can be achieved, ensuring that no audible noise is generated by vibrations within the LEDs or the printed circuit board.

An interesting aspect involves the PWM dimming curves used. Texas Instruments provides exponential dimming, resulting in a brightness characteristic closely aligned with the human eye. Further information on the correlation between PWM value and PWM duty cycle can be found in the diagram below.

Automated Animation for Fade-Like Effects

The above-mentioned animation engine, which can flexibly be programmed via I2C, works via a multi-step process with a sloper for smooth transitions. Not dissimilar to a key-frame animation, the figure below shows how a breathing effect could be realized.

In particular, a total of 5 PWM-support waveform points are visible. The animation engine toggles between these five automatically, with a pause time being added for additional programming flexibility. The sloper ensures that the transitions between the individual modes are as smooth as possible.

With four animation engines, each color component of the RGB LED can be modified individually. This way, multicolor animations, such as the attract mode commonly found on arcade or slot cabinets, can be easily realized. The host microcontroller sets the correct registers via the I2C interface and is then relieved of any further I2C duties.

I2C LCD Controllers en Masse

Texas Instruments provides engineers with an array of LED controllers. The LP5814 family, embodied by SKUs such as LP5814DRLR and LP5814YCHR, is intended for scenarios where four LEDs - usually red, green, blue, and white - are to be driven. If a system can make do with only three LEDs, SKUs such as LP5815DRLR and LP5815YCHR perform at a lower cost. Furthermore, a variety of SKUs, such as LP5816YCHR, just provide the constant-current function and omit the animation feature for additional cost savings. The table below provides an overview of the various versions.

Conclusion

If a constant-current LED driver is needed, deploy the LP5814. Thanks to the simple-to-use I2C interface and comfortable LED integration, this component is clearly deserving of space on your next application PCB.