Electrical – DALI Communication: Is DALI protocol a byte transfer mechanism or packet layer mechanism

dalilightingserialuart

As per the DALI light-control standard protocol, DALI bus communication uses Asynchronous half-duplex(two-wire) serial communication. It uses Manchester coding at 1200 bits per second(baud). A DALI bus can have up to 64 slave devices in the network.

I am trying to implement DALI protocol on STM32E407 (as Master) and STM32F3Discovery board (as Slave). I am looking for some practical advice on implementing DALI communication.

I have a few basic questions about DALI communication:

Is DALI protocol itself is a byte transfer mechanism or is it a software level packet layer (like CAN)?

If DALI is a packet layer mechanism, which byte-level transfer mechanism will better suits for it?

If it is the popular asynchronous communication protocol UART(or USART), how good is UART(or USART) for multi-processor communication (for around 64 slave devices)?? and at micro-controller level, how much faster the serial interface (UART or USART) should be to "DALI 1200 baud rate" for efficient execution Manchester coding?

Thanks in advance!

Best Answer

DALI describes the physical layer, the protocol and the command set.

It is not really a UART type protocol (unless you had external manchester coding), and the usual way to implement is couple of opto isolators and a transistor plus some passives for the the physical layer (Which must be isolated) a timer or two generating interrupts plus a couple of pins with interrupt on change for the IO.

For transmit you set up a 2400Hz interrupt and generate the biphase in software in the ISR.

For receive you use the interrupt on change and a timer to write a simple state machine to extract the 24 bit (IIRC) messages).

The gotcha with DALI is the need for a random number generator for the auto discovery stuff, finding sufficient entropy in a device with no user IO can be a bit of a pain.

Note also that to be DALI compliant you need to hit the dimming curve for your luminare type fairly closely, and DALI uses a log curve (Unlike DMX).