Spanish Italian
17436 Users    

How to use a digital signal controller (DSC) to drive a high-brightness RGB LED for a pixel board

  Download PDF version of the Article

High-brightness RGB LED popularity for lighting applications is increasing as the cost of these devices becomes more attractive. However, this type of component brings different design complexities when compared to regular LEDs. To efficiently drive high-brightness LEDs, a switched power supply is required and a color mixing algorithm must be implemented. This article describes a simple application in which a digital signal controller (DSC) is used to drive a high-brightness RGB LED for a pixel board, several of which are connected on a network to create an RGB matrix.

How to use a digital signal controller (DSC) to drive a high-brightness RGB LED for a pixel board - Introduction
From small applications to large projects, efficient LED lighting-based systems are replacing traditional illumination systems everyday. Applications, such as architectural lighting, where LEDs provide color change and other effects are rapidly evolving. Switching from inefficient lighting to high-brightness, energy efficient LED lighting is not as complicated as you might imagine. A low-cost control system provides increased functionality and flexibility for today’s lighting needs, with LED luminosity and color effects controlled by algorithms running on the microcontroller.

This article describes the implementation of a modular high-power RGB LED matrix using a low-cost DSC. It serves as a base to develop more complex and higher-performance applications. The design is easily expandable, since the DSC’s performance surpasses that offered by regular 8-bit microcontrollers. Yet it is still not as expensive as higher-end 32-bit solutions, making it an excellent match for high-performance lighting. A working demo and additional explanation can be viewed:


The High-Brightness LED Matrix Overview
The system consists of a high-brightness RGB LED network and a gateway board that sends commands to control this matrix. The LED RGB network consists of a set of pixel boards, each with a DSC and a high-brightness RGB LED. This expandable matrix of pixels can operate in standalone mode or connected mode. In standalone mode, each pixel displays a set of pre-programmed color patterns and effects.

In connected mode, the gateway board receives information from a computer or a network and addresses each pixel board independently to update the color it is displaying. Sequences can be designed to provide complex lighting effects. The gateway board can also receive feedback from the different pixel boards. Each pixel board has an assigned address, and it receives information from the network master on the gateway board.

USB or Ethernet can be used to connect the gateway board and a computer. Industrial or specific lighting protocols can be used for the LED network.
Figure 1 illustrates the connections between the different system elements.

dsc_rgb-led-system-overview
Figure 1 – System overview

The Pixel Board Requirements
The number and capabilities of microcontroller peripherals and the algorithm used to drive the LEDs are the main differentiators in an LED lighting application. The high-brightness RGB LED and the controller are the primary components on the pixel board. Using a pixel board approach allows the application to be easily expanded. Each independent board can be connected to four other pixel boards, allowing a bigger matrix to be built if desired.

The controller drives the LED according to either the data received from the network or preset values stored on its internal flash memory. The color mixing algorithm relies on the PWM and analog-to-digital converters (ADCs) to display the desired color.

Design restrictions and requirements may vary considerably, according to the end application. A generic list of important pixel-board requirements and some suggestions on how to achieve them is listed below:

 pixel board implementation
Figure 2 – Pixel board components

Hardware Implementation
The pixel board hardware can be broken down into four different functional parts:

Controller
Based on the requirements list shown in Figure 2, the controller selected should have a high-speed serial peripheral interface to ensure fast communication between the network nodes. It also needs accurate ADC and PWM module to manage the color matching control algorithm.

The MC56F8006 DSC from Freescale was chosen for the main controller. It is a cost-effective solution that uses the 56800E core, based on a dual Harvard architecture, and has a peripheral set that meets the application requirements and allows future expansion.

The MC56F8006 DSC is powered by a 3.3 V supply. It has an 8 MHz internal relaxation oscillator that can feed the PLL module to generate higher frequencies used by the SCI module. Therefore the use of an external clock reference is optional.

To generate the SCI clock, the internal oscillator works as an input to the PLL module that outputs a 192 MHz clock. It then is divided by two to achieve the 96 MHz high-speed peripheral clock. The baud-rate generator on the SCI then uses this 96 MHz clock to communicate up to 6 Mbps.

The circuit around the controller is composed of the following:
JTAG interface used to program the controller internal flash memory and to debug software applications. Four controller pins are used on the JTAG interface: TDI, TDO, TMS and TCK. Three PWM channels connected to field-effect transistors control the buck switch for the LED current supply.

Eight I/O’s are used for address and system setup configuration. Three analog-to-digital inputs read the current flowing on the LEDs. The SCI is connected to an RS-485 transceiver, using three pins: Tx, Rx and a GPIO for data enable.

LED driver circuitry
A buck circuit is used to drive the high-brightness LED. It works as a step down DC-DC converter, and its purpose is to reduce the 5 V input voltage, using the controller’s PWM module, to a lower level appropriate for each LED forward voltage.

To control the LED color, the ADC module input is connected to a current sensing resistor in series with the LED. The controller samples the ADC and calculates the current across the LED. It then determines if the PWM duty cycle needs adjustment.

PWM adjustment
Figure 3 – PWM adjustment

Pixel address
As previously mentioned, each pixel board may be accessed independently. There are different ways to implement the pixel board addressing scheme, and each of them has its advantages and disadvantages.

A simple method is to use a hardware dip switch connected to the controller I/Os. The controller reads these pins to determine its address on the pixel network at software start up. Other approaches include using hardcoded addresses on the DSC internal flash or using an algorithm on the network master to dynamically provide addresses to each board. It is important to ensure that the addressing method supports all the pixels boards on the matrix.

Network interface
Several factors must be taken into account when designing the communication protocol between the pixel boards, such as the distance between the boards and the communication channel data rate. Specific lighting protocol standards or proprietary solutions could be adopted for this task. In this implementation example, RS-485 is used as the physical connection for a proprietary message protocol.

RS-485 is an industrial protocol that can be used at up to 20 MHz in both simplex and half-duplex modes. The signal is transmitted using only two wires, A and B, and when in differential mode, RS-485 avoids noise interference.

By Renato Frias

CONTACT REQUEST
If you want to know more about this Freescale product, please submit your request to Arrow Italy using this form.

NOTE: this form is valid ONLY for Companies or Customers based in Italy and working in the Italian area.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
1 + 3 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.

Who's new

  • pulper
  • mauriss
  • jbares
  • christiank79
  • agabor
  • fabriziopd
  • irenix
  • pepershoe
  • raghun14
  • andreaspousette

Who's online

There are currently 0 users and 60 guests online.