XMC Microcontrollers Enable Acute Control for High Quality Lighting

SMC-based XMC microcontrollers from Infineon allow you to create high quality LED lighting that is dimmable down to 0.1% and offers exponential dimming, smooth color mixing and no perceivable flicker.

Hi, I’m Mike Copeland, an Industrial Microcontroller Applications Manager of Infineon technologies. Let's talk about High Quality LED Lighting and how to produce it with Infineon’s XMC-based microcontrollers.

When we talk about high quality lighting, we really mean that light has to be dimmable down to 0.1% of its maximum brightness. It has to have smooth exponential dimming and smooth color mixing. While it is doing all of this, there can be no perceivable flicker. The flicker shouldn't be perceivable to your eye, to your brain, or to a camera.

First, we have to control the current through the LED and there is a number of ways to do this using external LED current controllers. There are linear controllers such as our BCR320U and BCR403. These act very much like linear voltage regulators and you can control the amount of current going through the LEDs by varying the value of these set current sense resistors or set points. There are also switch mode LED current controllers like our ILD6150  and with these, the principle's a little bit different. It’s very much like a switch mode voltage regulator. The current ripples up and down and is controlled by an external inductor, and you can control the set point through an analog input or a sense resistor.

The little circles with a cloud in the sinusoid, means that this actual schematic is simulatable on our website so you can go to Infineon.com, find this schematic and view a full analog simulation of the circuit. Now what we can also do a switch mode current control with the XMC microcontroller.

So here is an example, using the XMC 1302, using the internal analog comparator and timers. The timers and the comparators work together to do peak current control with fixed off timing. And we can adjust that off timing then to match the characteristics of the circuit, the input voltage, the inductor size, and the LED forward voltage drops. Here is some details about how this is going to work.

You could see, as the current in the LED reaches its peak, the comparator trips, the timer resets, and the MOSFET is turned off for a fixed amount of time. After that amount of time, it turns back on, and the process repeats. The frequency is really controlled in analog way, it's very smooth and easy to do and it requires absolutely no CPU load.

Now, to dim a LED, we could do analog dimming or modulation dimming. Analog dimming means just control the set point of our current controls, so we adjust the set point through an analog input on the driver IC, for example, and move it up and down, and the LED brightness will change. Or we could do modulation dimming. Modulation dimming means we turn the LED on and off very quickly. And the amount of light we perceive then is equivalent to the time average of the currents through the LED.

So which is better, analog dimming or modulation dimming, if we're going to do high quality lighting?

Analog dimming has some problems trying to get down to 0.1%. And these problems are due to tolerances in the analog components and with switch mode supplies often the ripple can become a problem, too. With modulation dimming, however, we can easily choose 0.1%, as long as these edges in the blue circles here are steep enough so that we can have very crisp on and off control of the LED.

The other advantage of modulation dimming is that the color of the LED does not change because when the LED is on, it is always at a fixed current. Whereas with analog dimming, as you dim, the current is reduced and the color of the LED can change a bit.

Now there are two types of modulation dimming, there's Pulse Width Modulation and Pulse Density Modulation. Pulse width modulation is a fixed frequency with a variable duty cycle to control the current MLD. Pulse density modulation is a little bit different. There is a fixed on timer on bit for the LED and you vary the number of these within a given frame, for example.

So which is better for controlling the current and high quality LEDs?

Pulse with modulation, because it operates at a fixed frequency, could have problems with strobing and aliasing. Pulse density modulation, however, because the frequency is always changing, is much better for producing very high quality LED light and doing dimming that is camera capable. Now there is more to dimming than just turning on and off the LED. When we’re dimming an LED over a certain amount of time, we have to dim it along an exponential curve because this is how our eye perceives the brightness of an LED.

Doing exponential dimming is something that is a little tricky when you get down into the blue area of this curve. In this spot, the small changes in the intensity of the LED are very perceivable to the human eye. So we have to make those changes very, very small, and it's even better if we can dither. So that is we are dimming down along this curve. We can jump back and forth very, very quickly from one brightness to another to smooth out that transition so your eye doesn’t detect it.

In addition to dimming for high quality lighting, we need to be able to do color mixing. So if you can control the current and dim one LED, you can do color mixing by just adding more LEDs of different colors and then controlling their brightness individually to produce the desired color that you want to see. It’s a little more complicated than that, though. We need to add a few extra features. So one feature, we need to do for high quality lighting, is to have a smooth color change and we call this a Linear Walk where we can change from one brightness on a group of LEDs to another brightness and in this example on the bottom, you can see the graph where the green LED maybe has to change just a little bit. The red LED has to change a lot in its brightness, and the blue one is maybe somewhere in between, but we want them all to change at different rates so that they end up at the desired color all at the same instant. This is a smooth color shift that is very pleasing to the eye. And doing this can take a lot of CPU load because you'd have to calculate the different changes in everything like that, real-time in the microcontroller. It'd be nice if we had a way of doing that in the hardware.

The other thing we need to do in high quality lighting is to be able to dim without changing the color. So many times you, have a particular color that you like from our LED you want to be able to dim it and not change that color. That means you have to change all the channels that are producing that color, all the colors. For example, this is red, blue, green and amber. We want to dim all four of those along the same exponential curve but they’re all of different brightness or intensities so we have to dim them all together and the way we do that is by producing what we call a brightness level which is the product of the dimming level that comes from this dimming curve and the intensities and the group of intensities is what really defines the color. If we do this multiplication of the dimming times and the intensity, we get the brightness and we can change along this exponential curve without changing the color.

The Infineon XMC 1000 family of microcontrollers is based on the ARM Cortex M0 and they are really designed for three types of applications. LED lighting motor control and switch mode power supply. It is a very nice family based on our industry-standard core and we put some very special features in it to do all of these things that we have talked about already to produce high-quality lighting. The XMC 1000 can do peak current control of the LEDs as we have already seen using the on-chip analog comparators and timers.

The other thing that it has that's very unique in the market is the brightness and color control unit that handles all of the other features that we’ve been talking about. The brightness and color control unit does pulse density modulation, it does linear walking, it does exponential dimming, and it does dithering along the exponential dimming and all of this for up to nine channels of LEDs. Here’s an example of a red, blue, and green LED lamp being controlled with the BCCU, the timer units and the analog comparators. You can see the modules, all are made to work together to do all of the features that we've been talking about.

So what is left for the CPU to do? The BCCU and the analog comparators, and timers are taking care of all of the LED functions without any CPU load. So we can do other things in the system as well. We can do communication, for example, DALI and DMX are popular in lighting. We can do other application specific tasks. Your product probably has something unique that you want to do that nobody else can do and you’ve got plenty of CPU power now to implement your application specific ideas. We can also do the AC to DC and/or DC to DC components of your lighting system.

So there is a whole another section of the lighting or the power supply for the lighting that we haven’t talked about yet and the microcontroller has plenty of other features to do these. In addition to doing the current control and lighting features that we have talked about, XMC microcontrollers can do advanced AC to DC, DC to DC power conversion topology such as Quasi-Resonant Flyback and critical conduction mode PFC. XMC microcontrollers have a great suite of development tools that make it very easy to get started on a lighting design. We have our Dave system. We have the XMC Lib or our library, at low level drivers for all of our peripherals. You can make your own Dave apps using the SDK.

We have plenty of examples on the web as well, for lighting and other applications. The nice thing about having ARM as the vendor for the CPU inside the microcontroller is that we have ton of third party support tools. So ARM as an industry standard, there are many third parties out there for compilers, debuggers, operating systems, you name it.

We also have kits to show off the XMC features for high quality lighting. You will see on our website a three channel peak current control shield for Arduino that does many of the features that we’ve been talking about. You'll also see a LED lighting application kit that uses our linear drivers. And in a few weeks we'll have a new kit coming out. It’s this XMC peak current control explorer, which produces very high quality light and I can even show you a demo about how this works.

Here we've got a demo using two of our...XMC LED current control explorer kits. This one is producing a very low level of light through a standard LED puck light. Under my eye, it looks very smooth, I don’t detect any flicker. However, when I bring my camera in and take a close look at it with my camera, you can see the horizontal lines of flicker. Now I'm going to plug in a second kit, which has been tuned to produce a very high frequency of casting current control, something that is only possible with our fast analog comparators and timers. And you can see a much better image. No flicker at all. If you’d like to know more about Infineon’s LED lighting solutions, please go to our webpage, Infineon.com.

Thank you very much.

infineon technologies ag logo

Related videos

Latest Videos

Sorry, your filter selection returned no results.

We've updated our privacy policy. Please take a moment to review these changes. By clicking I Agree to Arrow Electronics Terms Of Use  and have read and understand the Privacy Policy and Cookie Policy.

Our website places cookies on your device to improve your experience and to improve our site. Read more about the cookies we use and how to disable them here. Cookies and tracking technologies may be used for marketing purposes.
By clicking “Accept”, you are consenting to placement of cookies on your device and to our use of tracking technologies. Click “Read More” below for more information and instructions on how to disable cookies and tracking technologies. While acceptance of cookies and tracking technologies is voluntary, disabling them may result in the website not working properly, and certain advertisements may be less relevant to you.
We respect your privacy. Read our privacy policy here