Microcontrollers provide connectivity of HB-LED lighting products

The combination of HB-LED lighting with a reliable connectivity interface such as DALI or DMX512 will bring additional compelling features to household lighting.

Nov 25th, 2005
Content Dam Leds En Articles 2005 11 Microcontrollers Provide Connectivity Of Hb Led Lighting Products Leftcolumn Article Thumbnailimage File
In the October issue of LEDs Magazine Review we discussed methods to drive HB-LEDs, ranging from simple low-cost current limiting resistors to dynamic constant current utilizing PWMs and analog-to-digital converters (see Microcontroller-based LED drivers: topologies and trade-offs).

One of the more exciting challenges for lighting designers is how the end-user controls the HB-LED product. Legacy lighting products such as incandescent lights are dominated with the On/Off switch, and a dimming function. Since HB-LEDs require electronic control to dynamically control current and operate the light-source (higher current leading to overheating can half the lifetime of the HB-LED), designers can look at other features to enhance their product.

These features could include control panels with keypads and slider functions to dim/change color and thus alter the mood in a room; automatic sensing of persons in a room using PIR proximity detection; or infrared remote control of lighting. Also, the simple ON/OFF switch can be enhanced using new low voltage technologies such E-field**, which can reliably and accurately sense an object approaching and determine its mass, allowing touch-less control. All these types of features will help lighting manufacturers bring HB-LED lighting products to the home.

[** E-field – is a new technology for touch control systems by generating low frequency electric fields and measuring differences measured as objects approach electrodes. See Freescale semiconductor’s MC33975 E-field sensor.]

Figure 1
Implementing these features will generally be achieved using low cost single chip microcontrollers, which utilize on-chip features such as analog-to-digital converters, keyboard interrupts, and timers that track real-time events and tasks.

In many cases, these types of feature will not be added directly to the HB-LED product, and will be remote from the lighting source, requiring connectivity interfacing. In the lighting market today, connectivity is dominated by two protocols: DMX-512 and DALI. This article examines these two protocols and describes how they differ from each other.

DMX512

DMX512 is a standard wired communications protocol used extensively in industrial lighting applications such as theatre stage lighting and exhibition lighting. The physical interface consists of 3 to 5 wires with 1 data signal constructed using 2 differential lines (D+,D-), a common/ground (0V) and an optional second set of Data lines.

Figure 2

The DMX512 system is configured as a DMX universe, which consists of 1 DMX Control node and DMX devices up to a maximum of 512. If the system requires more than 512 lights then further DMX universe(s) will be required. The DMX Control node initiates a break followed by a 1byte command, subsequent bytes are sent in order which correspond to each DMX device within the DMX universe.

Figure 3
The DMX512 protocol is half-duplex where data for one DMX device is either being received or being transmitted, but not simultaneously. The data rate is 250 kbit/sec. The D+/D- signals are differential signals that are 180° out of phase from each other, and a logical 0 is recognized when D- > D+ for 4 µs and a logical 1 when D+ >D- for 4 µs. Transmitting on the signal lines requires physically toggling the D+/D- between +6V and 0V. A receiver of the D+/D- signals must support voltage levels between +12V and -7V.

Figure 4
The DMX digital layer utilizes bytes to form packets. Each DMX byte consists of 1 START bit, 8 DATA bits followed by 2 STOP bits as shown in figure 4. A START bit is always a logical 0 and the STOP bits are a logical 1. A BREAK consists of send 22 logical 0s.

The DMX Control node initiates a break followed by a 1byte command, subsequent bytes are sent in order which correspond to each DMX device within the DMX universe. As shown in Figure 5. The DMX Control sends a Break followed by a Null (00) command which tells all the DMX devices to expect a brightness level will be sent. Each DMX device needs to be aware of their DMX address 1 to 512 and counts the bytes being transmitted by the DMX control to ascertain which byte they should react to.

Figure 5
DMX device addresses are configured manually by the engineer. On set-up of the system (generally hardware DIP switches) the DMX control devices can interrogate DMX devices using System Information Packet (SIP) command immediately after the DMX device has received a Brightness level update. To obtain SIP from DMX device1 the DMX control must first send BREAK, NULL, "Dev1 brightness level", BREAK, SIP. The DMX device will then send back to the DMX controller 24 configuration bytes (see figure 5).

The SIP allows the DMX controller to understand the capabilities of the DMX device in the universe and provide the user the correct control features to get maximum performance.

DALI

Figure 6
DALI, Digital Appliance Lighting Interface, is a standard wired communications protocol used for Home & Building lighting applications. The interface was originally specified to support connectivity for fluorescent light ballasts, but has also been designed to support other lighting technologies. The physical interface consists of 2 wires, DALI Power and DALI Data. The DALI system consists of one DALI Control module with up to 63 DALI devices.

Figure 7
DALI Power line provides the power only for the communication protocol of a maximum 22.5V and limits the current for the system to 250mA. The DALI Data line provides the half duplex communication at a data rate of 1200 bits/second using a bi-phase (Manchester) decoding.

Bi-phase decoding is accomplished with the following: a logical zero consist of sending a physical low signal for 416 µs immediately followed with a physical high signal for 416 µs. A logical one consists of sending firstly a physical high signal for 416 µs followed by a physical low signal. A physical high signal on the DALI Data line is a voltage level between +9.5V and +22.5V. A physical low signal on the DALI Data line is a voltage level between -6.5V and +6.5V (see Figure7.)

Figure 8
The DALI digital layer consists of 2 frames, a forward frame and a backward frame. A forward frame is a frame sent from a DALI controller to a DALI ballast. It is constructed by a START bit (always logical 1), followed by 1byte Address,1byte Command and two STOP bits (a high level with no transitions). A DALI ballast communicates back to the DALI control using only a 1byte backward frame consisting of a START bit,1byte,2 STOP bits.

Figure 9
The DALI protocol allows a master controller options to address all ballasts by either broadcast to all, Groups of ballasts, and individual addressing. The most commonly used direct commands allow the controller to modify lighting brightness, scene settings for groups, fading capability and varying rates. Also including are Query command that request the ballast to send a backward frame with configuration data such as, power levels, scene levels, current address. Using “extended” Configuration command the DALI controls can modify addresses of each ballast thus eliminating manual configuration of the DALI system. The “extended” configuration command will follow immediately after a DALI controller sends an INITIALIZE ($A5) command, which informs all other DALI devices on the bus to ignore further commands until a TERMINATE command is observed or 30 s elapses in time (see figure 9.)

DALI vs DMX

When choosing between DALI or DMX512, the lighting engineer needs to address the points shown in Figure 10.

Figure 10
How reactive does the lighting have to be? In other words, do the lights have to react quickly to user inputs in real time? DMX512’s round-robin protocol and 250k baud clock rate has been designed to provide fast change to a lighting source even within a large 500-device universe, where each lighting source can be updated every 23 ms.

Having a slower data rate, DALI can update one lighting source in approximately 16 ms, resulting in a full 63-device system would take just over 1second. DALI is targeted at household applications where there is no expectation to change the mood of the lighting every few seconds, as in a stage or show environment.

In terms of the cost of the communication infrastructure, DMX512 can be implemented as a 3-wire interface: GND, D+ & D- , using a Universal Asynchronous Receiver Transmitter (UART) and a level shifter. UARTs are a common feature included with microcontrollers, and EIA 485-A level shift ICs are readily available. (Check that the UART feature can support 8bit with parity, otherwise software will need to be developed to produce the 2nd STOP bit.)

DALI is implemented as a 2-wire interface: Power and Bus. Due to the fact that DALI utilizes a Bi-phase decoding technique this consequently requires a modified UART type feature (standard UARTs work with Non Return to Zero (NRZ) formats) which are not so commonly available on microcontrollers today.

However, with DALI’s low speed of 1200 baud it can easily be implemented with software on an embedded microcontroller utilizing a timer function to ensure synchronization is kept. One cautionary note is the DALI specification as declared in IEC 60929 also requires that all DALI devices are galvanically isolated from the mains power supply which results in adding optical isolation.

Summary

With HB-LED lighting requiring the use of low-voltage electronic control, low-cost microcontrollers will help in bringing additional compelling features to household lighting.

Microcontrollers make it easier for lighting designers to incorporate a reliable connectivity interface such as DALI and DMX512 that will provide the backbone for adding remote user controls.

References

BS EN 60929:2004 A.C.-supplied electronic ballasts for tubular fluorescent – Performance Requirements

American National Standard E1/11 2004 / USITT DMX512-A Asynchronous Serial Digital Data Transmission Standard for Controlling Lighting Equipment and Accessories

Freescale Semiconductor - AN1985 Touch Panel Applications Using the MC33794 E-Field IC

More in Microcontrollers