Smart lighting control with DALI 2.0 software stack for XMC1000 microcontrollers

This article introduces a DALI 2.0 slave software stack for XMC 1000 microcontrollers. This stack was developed by Infineon in close cooperation with Xenerqi and accelerates design of LED lighting applications.


By Marcelo Williams Silva and Georg Huba, Infineon Technologies         Download PDF version of this article


Amongst other things, the XMC 1000 microcontroller family with ARM-Cortex-M0 offers optimised peripherals and functionalities for smart lighting control. This makes it possible to address a host of different applications both indoors and in commercial buildings. It is within this environment that DALI (Digital Addressable Lighting Interface) has established itself as a standardised interface for controlling lighting control gear. With DALI 2.0, interoperability between components from different manufacturers has been further improved, whilst the integration of sensors significantly extends the possibilities for smart lighting applications. Infineon has partnered with Xenerqi to develop a DALI 2.0 certified slave software stack for its XMC 1000 microcontrollers. This significantly reduces development time and costs.

Figure 2. Block diagram of the XMC 1000 microcontroller unit

Smart lighting solutions extend conventional LED lighting with new functionalities such as wired and wireless connectivity, programmability, sensors, improved lighting quality and intelligent colour mixing. With special peripherals and functionalities, XMC microcontrollers are predestined for numerous modern LED lighting systems. For instance, automatic dimming and colour control for multi-channel LEDs is supported. In addition to the LED control, the MCUs of the 1200, 1300 and 1400 series can also handle DALI or DMX communication. Furthermore, the XMC microcontrollers can be used to implement the power supply for the LED driver, supporting all standard two-stage switched-mode power supply topologies.

Figure 3. The BCCU (Brightness and Colour Control Unit) facilitates flicker-free dimming and colour control of LEDs with virtually no processor load.

The key features of the XMC 1000 family for smart lighting systems are: automatic brightness control (based on high-frequency pulse modulation), flicker-free dimming via 9 output channels, automatic exponential dimming and linear intensity changes for natural, eye-friendly brightness and colour changes, high-speed integrated analog comparators for current control, and closely coupled peripheral functions for various digital power conversions.

The introduction of the LED into all areas of lighting technology has led to extensive changes in the control of lights. What was once controlled in the past with phase dimmers or an analog 1…10V interface is now digitally connected. The most popular standardised interface DALI – originally designed for dimming fluorescent lamps – has established itself as the standard for lighting design, driven by the success of LED lights. With DALI 2.0, interoperability has been further enhanced, whilst the integration of sensors opens up new possibilities for smart lighting applications.

The XMC1000 family with the ARM Cortex M0 core is available in the XMC1100, XMC1200, XMC1300 and XMC1400 series with flash versions up to 200 KB and enclosures with up to 64 pins. Even the entry-level XMC1100 series, with its basic feature set, provides many industrial applications with cost-effective access to the 32-bit world with 12-bit AD converters and powerful 16-bit timers of Capture/Compare Unit 4 (CCU4). The XMC1200 series includes additional application-specific features such as a peripheral unit for capacitive touch applications and for the control of LED displays (LEDTS), high-speed analog comparators and an innovative Brightness and Colour Control Unit (BCCU). The BCCU permits flicker-free dimming and colour control of LEDs with virtually no processor load. What is more, versions are available for the extended temperature range from -40 °C up to 105 °C. Last but not least, the XMC1300 series is specifically designed for motor control and digital power conversion applications. In addition to a particularly powerful Capture/Compare Unit 8 (CCU8) with two compare channels and asymmetric PWM functionality and a position interface (POSIF) for precise detection of the motor position, it also offers a mathematical coprocessor. The latter permits efficient sensorless FOC (field-oriented control) solutions for electric motors. The XMC1300 series also offers variants for the temperature range up to 105 °C. In addition to the features of the XMC1200/1300 series, the XMC1400 derivatives offer up to four serial channels (control of 4-channel LEDs), significantly increased processing power (more than 70 percent) and enhanced connectivity (e.g. CAN).

The XMC1200, XMC1300 and XMC1400 series feature the innovative BCCU unit mentioned already. The basic function of the BCCU consists in automatically providing dimming signals at the port connections for external LED drivers. The BCCU is designed for automatically controlling the dimming and the colours of multi-channel LED lamps with minimal code input. One development goal was the flicker-free display. However, not every change in luminance is perceived by the observer as flicker. The corresponding threshold of perceptibility is frequency-dependent and has been determined empirically. These findings have gone into the design of the BCCU. A key feature is the automatic high-frequency brightness modulation (PDM with 12-bit resolution). This generates an individual bitstream for each of the nine channels in total. The high frequency produces a high resolution for the brightness value and/or the colour value in RGB applications. This permits a flicker-free display, whilst supporting a wide range of different LED drivers and/or high-performance LEDs.

The BCCU integrates three dimming engines. These facilitate the exponential change in brightness. The exponential dimming and linear change in intensity make the dimming steps and colour changes appear totally natural to the human eye. The three dimming engines can be assigned to any of the nine channels. This means it is possible, for example, to control three RGB lights or one street light with up to nine LED strings. The BCCU also provides trigger signals for the A/D converter. This in turn permits synchronised measurement of currents in multiple LED strings, for example.

The linear walker plays an important role in the colour change of RGB lamps. This adjusts the frequency of the bitstream for each channel so that, starting from colour X, the target point of colour Y in the colour space for each of the three channels (red, green, blue) is reached at the same time within a predetermined time. The colour transition is considerably more pleasant and natural to the human eye with this method. In addition, no complex software algorithms are required.

Figure 4. DALI 2.0 extends the IEC 62386 with Part 103 (control devices). New device types from the field of sensors, such as buttons, light sensors, motion sensors and remote-control interfaces, are now defined in the standard.

DALI is probably the most common interface for lighting control with regard to the light. Products for numerous applications (multi-function lights, multi-channel lights, emergency lights, etc) are available today from a wide range of manufacturers. All these devices are standardised and classified in the DALI standard IEC 62386.102. The different device types (device types 0-8) are defined in the standard parts 201 to 209. For example, device type 6 specifically describes LED control gear, and device type 1 the characteristics of DALI emergency lighting devices. Data communication, parameter sets and topology are also defined in IEC62386.

DALI 2 is designed to close gaps in the original standard and allow for better interoperability. Originally describing only control gear and general communication, DALI 2 opens the world of sensor technology to manufacturers and users. IEC 62386 has therefore been extended with Part 103 (control devices). New device types from the field of sensors, such as buttons, light sensors, motion sensors and remote control interfaces, are now defined in the standard.

In its first version, DALI works according to the pure master-slave principle, which limits extensive sensor functions. DALI 2 makes it possible to communicate control commands and operating data for light operating devices as well as sensor functions across manufacturers. With DALI 2, 64 light operating devices and 64 sensor control devices can be operated together in one line. Building automation systems can also process the sensor information and optimise it with other data, such as heating/ventilation/air conditioning. Central maintenance functions can monitor lamp status, power consumption, or switching cycles, and depict these functions visually in the form of statistics.

DALI 2 also laid the foundation for far-reaching interoperability. For the first time, a standardised operating device is not only controlled according to the master-slave principle, but also event-controlled communication between the application controller and the control device is possible. Backward compatibility with DALI 1 installations is also ensured. To ensure full compatibility, it is necessary to test against the standard.

Figure 5. DALI 2.0 software stack for the XMC1000 family

The DALI 2 standard (IEC 62386 Part 101/102 – Edition 2.0 2014-11) improves the predictability of gear control. With this in mind, Xenerqi and Infineon have developed a DALI 2 software stack for the XMC1000 family, and the software has been certified for Xenerqi LED drivers and Infineon XMC LED current control explorer kit. With the certified stack and the XMC single-chip solution for DALI 2.0 users can almost halve the development time and also save costs. The DALI 2.0 control gear stack is designed for integration into a host application that provides a solution for DALI 2.0 control gear with one or more DALI controls. The corresponding instances are defined in accordance with IEC 62386-101: 2014 (Ed2.0), Section 3.16. as devices that are connected to the bus and receive commands to drive at least one output directly or indirectly. The stack implements all DALI 2.0 protocols for gear control. This includes the following functions: processing of all DALI commands from the DALI bus, monitoring for all corresponding error conditions on the DALI bus, processing of the corresponding light output for gear control with timing and sequence fade conditions, processing of configuration changes requested by the DALI controllers via the bus interface, DALI short address assignment, including assignment of random addresses in coordination with the DALI controllers, and management of delays and other timing conditions in relation to DALI operations.

The DALI 2.0 slave stack is not a stand-alone solution. The stack and its associated library provide the core functionality and software components needed to develop a DALI 2.0 control. Application developers must therefore configure the stack and its components according to their specific control solution. The stack supports all functions as specified in the general requirements for DALI 2.0 control gear. However, the stack only implements the functionalities that apply across all control devices. Application-specific DALI functionality for control gear, especially the hardware-dependent functions, must be implemented via the host application. This also applies to optional DALI 2.0 control functions. In addition, the stack defines callback functions that it uses for the interface and management of the application-specific functions.

Figure 6. The DALI 2.0 software stack has been certified for the XMC LED current control board.

Software development for the XMC microcontrollers can be performed in two ways – either via the standard peripheral library (XMC Lib) or via DAVE apps. Although using the XMC Lib means working on a low level of abstraction, the full functionality of the peripherals can be used flexibly. However, some hardware know-how is required. In addition, compilers from third-party providers can be used. With the DAVE apps, you develop on a higher level of abstraction and use specific application examples. Consequently, no detailed hardware knowledge is necessary. The use of DAVE Version 4 is the requirement here. The free development platform includes all necessary tools like GNU compiler, debugger and data visualisation. In addition, DAVE apps are available for a variety of applications as well as LED lamp control. Infineon also offers several LED evaluation boards for the XMC1000 family. The already-mentioned XMC LED current control board features a 15W DC/DC buck controller, a DALI PHY and extensive documentation. The DALI 2.0 stack is certified for this board. DALI 2.0 design examples are in preparation. In addition, other RGB/LED kits (with DALI and DMX Phy) are available with a standard LED driver as well as an RGB / LED Arduino lighting shield.


Related


Ultra-Low Voltage 8Mb Serial NOR Flash Memory

Winbond’s ultra-low voltage serial NOR Flash memory can work between 1.14V to 1.60V, which covers most of the single AA battery operation voltage range.  The lower Vcc can reduce the power ...

Is the Universal Translator Finally Here?

This webinar from NXP will provide a detailed insight on why these advanced, extremely-low power translators from NXP Logic are the solution for your mixed voltage applications! Today's modern,...

Driving lower power for MCU products even lower

The MSP430 microcontroller family from Texas Instruments prides itself on extremely low power consumption. However, their flagship power consumption is contingent upon various properties like supply...


Wireless networking and security for IoT devices

David Brook, marketing director with HCC Embedded, shares an update on two of the company's main focus areas: wireless networking for IoT devices and security for those networked IoT devices. ...

 


Dialog Semi walks through their latest IC solutions for battery chargers

In this video an engineer from Dialog Semiconductor walks us through their latest ICs for battery chargers at APEC 2018. Dialog's Qualcomm Quick Charge adapter solutions offer high efficiency to e...


Steve Allen of pSemi explains their latest LED driver solution

Steve Allen of pSemi explains their latest LED boost product based on Arctic Sand's two-stage architecture. Their PE23300 has a charge-pump, switched-capacitor architecture that offloads most of t...


Teledyne describes their latest 12-bit Wavepro HD oscilloscope

In this video Teledyne LeCroy describes their latest Wavepro HD oscilloscope to Alix Paultre of Power Electronics News at the company's launch event. The WavePro HD high-definition oscilloscope de...


Dialog Semi walks through their latest IC solutions for battery chargers

In this video an engineer from Dialog Semiconductor walks us through their latest ICs for battery chargers at APEC 2018. Dialog's Qualcomm Quick Charge adapter solutions offer high efficiency to e...


ROHM explains their latest wireless battery charger solution kit

In this video an engineer from ROHM goes over their latest wireless power development kit, co-developed with Würth for embedded development. The kit provides a complete wireless power transfer sy...


Tektronix describes their latest mixed-signal oscilloscope

In this video Tektronix explains the features in their latest 5 Series MSO Mixed Signal Oscilloscope. Features include an innovative pinch-swipe-zoom touchscreen user interface, a large high-definitio...


AVX shows a supercapacitor demonstrator at APEC

In this video Eric from AVX explains their supercapacitor demonstrator box at APEC 2018 in San Antonio, Texas. The box shows how a 5V 2.5-farad supercapacitor can quickly charge up using harvested ene...


OnSemi explains their latest passive smart wireless sensor for industrial applications

In this video On Semiconductor explains their latest wireless sensor for hazardous environments at APEC in San Antonio, Texas. Intended for applications like high-voltage power cabinets and other plac...


TI demonstrates an improved gaming power system at Embedded World

In this video Texas Instruments' explains Significant reduction in ripple, which results in improved reliability and increased design margins, among other advantages. Another benefit that improve...


Infineon explains their latest motor drive technology at APEC 2018

In this video Infineon demonstrates new gate drivers using their LS-SOI technology at APEC 2018. In the demo Victorus, an Infineon application engineer, shows in real time how much better thermal the ...


STMicro goes over their latest wireless-enabled microcontroller for the IoT

In this video STMicroelectronics goes over their latest wireless-enabled STM32WB microcontroller for the IoT and intelligent devices in several live connectivity demonstrations at Embedded World 2018....


Infineon explains their latest wireless charging solution at Embedded World

In this video Infineon goes over their latest wireless charging solutions at the Embedded World show in Nuremberg, Germany. The spokesperson explains the difference between their Qi-compatible solutio...


Grammatech talks about the importance of software in engineering

In this video Mark Hermeling of Grammatech talks to Alix Paultre after the Embedded World show in Nuremberg about the importance of software verification for security and safety in electronic design. ...


Lattice Semi walks through their booth demos at Embedded World

In this video Lattice Semiconductor walks us through their booth demonstrations at Embedded World 2018. The live demonstrations include an operating IoT remote vehicle, a low-power network used for vi...


Maxim describes their latest security solution at Embedded World 2018

In this video Scott from Maxim Integrated describes their latest security solution at Embedded World 2018. In the live demo he shows the DS28E38 DeepCover Secure ECDSA Authenticator, an ECDSA public k...


Garz & Fricke at Embedded World 2018 - Embedded HMIs and SBCs “Made in Germany”

You are looking for a HMI-system or single components as touches, displays and ARM-based SBCs? Welcome at Garz & Fricke – the Embedded HMI Company! Our offering ranges from typical single co...


ECRIN Systems myOPALE: Remote Embedded Modular Computers

myOPALE™ offers disruptive technology to multiply capabilities of your next Embedded Computers in a smaller foot print thanks to PCI Express® over Cable interconnect, standard 5.25’&rs...


TechNexion rolls out embedded systems, modules, Android Things kits at Embedded World 2018

In this video John Weber of TechNexion talks to Alix Paultre about how the company helps its customers getting products to market faster. By choosing to work with TechNexion, developers can take advan...


Mike Barr talks cybersecurity

In this video Mike Barr, CEO of the Barr Group, talks to Alix Paultre about cybersecurity at the Embedded World conference in Nuremberg, Germany. Too many designers, even in critical spaces like milit...