ST AN1900 APPLICATION NOTE

AN1900
Slave Board
DALI Master Board
Ballast
DALI S
Software
s
Slave Board
Ballast
DALI
Master
Application note
Hardware implementation for ST7DALI-EVAL
Introduction
This application note describes how to implement a DALI (Digital Addressable Lighting Interface) in an existing high-frequency dimmable tube-lamp ballast application.
Figure 1. Hardware overview with MCU handling only DALI communication
Figure 2. ST7DALI-EVAL principle
lave
1-10 V
DALI
1-10 V
DALI
Up to 64 slave
DALI Evaluation Kit
Please refer to the ST7DALI-EVAL Evaluation Kit user manual.
March 2009 Rev 2 1/11
www.st.com
Contents AN1900

Contents

1 Hardware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.1 ST7DALIF2 features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Interface between microcontroller and analog half-bridge controller . . . . . 3
1.3 Handling DALI reception and transmission with DCM peripheral . . . . . . . . 4
1.4 Power consumption considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2 Schematics and PCB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.1 Schematics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 PCB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3 Bill of material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2/11
AN1900 Hardware

1 Hardware

1.1 ST7DALIF2 features

Table 1. List of requirements for the microcontroller
Minimum requirements ST7DALIF2 features
26 bytes of EEPROM, to save non­volatile parameters
3 Kbytes program memory 8 Kbytes Flash program memory
A timer with Input Capture/Output Compare capabilities to receive and transmit DALI signals.
Low-consumption mode, to save energy between commands.
I/Os and PWM outputs to perform the interface with the ballast controller.
A clock source Internal 1% RC oscillator,
256 bytes data internal EEPROM
DALI communication module (DCM).
Halt power saving mode
Up to 15 multi-functional I/Os, one 12-bit Auto-reload Timer with 4 PWM outputs, input capture and output compare functions
In addition to DALI protocol handling, but without fully controlling the ballast, the microcontroller can also monitor or customize some ballast parameters, for example for easy calibration of various power levels in the factory, and/or act as a supervisor of the complete ballast parameters.

1.2 Interface between microcontroller and analog half-bridge controller

A potential hardware problem is the interface between the microcontroller and the analog half-bridge controller. One possibility is to use PWM outputs and to filter them to create analog setpoints for the half-bridge controller. The 4 PWM outputs of the Autoreload timer enable ST7DALIF2 to act on up to 4 different “external parameter” pins of the half-bridge controller, for example L6574, without computation load (Please refer to AN993: L6574 & Microcontroller in ballast applications). The designer is then in total control of the lamp.
Another easier solution is to keep the 1-10 V input widely used for dimming level control, and use the microcontroller as a “gateway” or interface between the DALI bus and the analog input of a conventional analog dimmable ballast. The microcontroller is then no longer in direct connection with the analog ballast controller.
Based on this topology, a DALI master board based on the ST72F334J4 has been built and a DALI slave board based on the ST7DALIF2 has been developed and can be seen in
Figure 3.
3/11
Hardware AN1900
Figure 3. ST7DALI-EVAL DALI slave evaluation board

1.3 Handling DALI reception and transmission with DCM peripheral

The major embedded feature of the ST7DALIF2 microcontroller is the DALI Communication Module (DCM). It allows decoding of the DALI forward frame and sending of the backward frame, without any CPU overhead, or need for a timer with Input Capture or Output Compare capabilities. It simplifies the software, saves processing time, and eases interrupt management. The DCM drivers can be found in the ST7 Software Library or in the AN1601 Software Implementation for ST7DALI-EVAL.

1.4 Power consumption considerations

One of the biggest issues when designing a DALI ballast is the power supply of the microcontroller when the lamp is off. When the lamp is on, supplying all devices can be quite easily done via a charge pump taken from the middle point of the half-bridge. But in stand­by, the microcontroller should always be powered-on and ready to receive a DALI command. This energy can only come from the mains. The current taken should then be as low as possible to avoid constant dissipation. ST7DALIF2 has a power saving mode called “halt”, using the smallest power consumption, since everything inside the MCU (core, peripherals and clock source) is “frozen”. After entering this mode, only a reset or an external interrupt can wake up the microcontroller. The interrupt can be triggered by the first (falling) edge of the DALI frame. When this happens, Run mode is not immediately operational, mainly because of the stabilization time of the clock source. This time has to be short enough to be able to detect the second (rising) edge of a DALI frame. The first (falling) edge is not significant but helps to wake up from Halt mode. Figure 4 shows, on channel 1, the DALI frame on the DALI IN pin of the microcontroller, a pulse on channel 3 shows the beginning of the run mode, and a high level on channel 4 shows that a proper DALI frame has been received, and that the data is ready to be handled by the software.
4/11
Loading...
+ 7 hidden pages