A primer on architecting nextgen smart LED lamp applications - Embedded.com

A primer on architecting nextgen smart LED lamp applications

Light Emitting Diodes have come a long way from simply being cheap and inexpensive indicator lights on a myriad of electronic appliances. Today they are powerful source of illumination for a wide range of room, signage, displays and decorative lighting applications.

LEDs have been gaining importance over incandescent and fluorescent lamps for their capability to provide an equivalent amount of light for a significantly reduced intake of energy. Energy is one of the biggest debates of this century and is soon expected to become one of the most important issues concerning designers across the planet.

There are many potential benefits for lamp manufacturers to use LEDs. However, there are also many vendors trying to get in early on the LED action, so there is a pressing need for product differentiation. Also, with energy conservation and human labor costs being the prime design concerns, large lighting installations are almost expected to be ‘intelligent’.

The ability of a lamp to be able to communicate with a ‘parent’ controller, to monitor its own condition, modify its mode of operation based on this monitoring, and even ensure movement to a safe state during faults are all examples of what the next generation LED lamp is expected to be. This article will explore a few of these ‘intelligent’ options suited for LED lamps and the steps involved in achieving them.

Figure 1. Input Under-Voltage Lockout

The input voltage to an LED drive system is usually DC. The supply is either produced by an AC-DC converter working off the line or from a bus. Apart from providing the power for the LED drive, this supply will also be used to power the controller in the system (after converting to 5V or 3.3V as suited to the controller).

As shown in Figure 1, above , this controller power supply will usually be designed such that it will start operating when the input supply is a little above the required output voltage. For instance, a 5V regulator will start operating when the input reaches 6-7 volts. However, the steady state level of such a supply could be 24V supplying a string of 5-6 LEDs with 1A per string.

Once the controller powers up, it assumes that power is available and turns the LED drive system on (assuming it is configured as such), which will then try to draw the full power. If the input has reached only 10V by this time, the amount of current required from the input supply would be much higher than under steady state conditions, and it could collapse due to the sudden draw. The excess current draw could also surpass the ratings of the cable, connectors, and any other components on the power supply input, potentially causing permanent damage to the system.

In order to avoid this situation, the system should implement an ‘under-voltage lockout’ feature. The hardware for this involves a resistor divider setup that steps down the input voltage to a range that is tolerable by the controller’s inputs. The input is connected to a comparator internally.

The behavior inside the controller (firmware) should be designed such that the power section is turned on only when the input voltage has crossed the threshold that is deemed reasonable for operation.

Moreover, rather than turn on the power system as soon as the comparator switches, the firmware must poll the output of the comparator to check that the condition is consistent (since the comparator is a piece of combinational logic) and then turn the power system on. Figure 2 below shows the hardware schematic (simplified) that implements this feature.

Figure 2: Load (LED) monitoring

The load here has a constant current that is regulated through the LEDs. While it is true that the current regulation system is inherently monitoring the load, the purpose is to ensure that the correct load current is flowing. LEDs are prone to damage, which often shows up as open circuits or short circuits.

These kinds of faults can also be caused by loose wires, connectors, assembly issues on PCBs, and so forth. A short circuit on the channel could also be caused due to damage to the MOSFET (which plays the role of the switch).

Given the power involved in these systems, there can be a large amount of heat dissipated during these fault conditions due to large amounts of currents flowing. In order to protect the system and its surroundings from catastrophic effects of failures, it is important for the controller to monitor the conditions of the load in real time.

Consider the case of an open circuit where the path for current flow is now absent. If the current regulation system were left to its own, it would try and keep the switch (MOSFET) permanently on in an effort to get the current up to the point where it needs to be.

But this does not solve the problem. Similarly, if a short circuit is considered wherein there is an uncontrolled rise in current, the feedback system would attempt to keep the switch off but if the MOSFET itself were damaged, it would not respond to these control signals and the problem would not get solved.

A smart LED lamp should be able to detect these conditions and put the system in a state where the consequences of the fault are avoided safely. One way to do this is to forcibly cause a fuse to be activated, thereby cutting power to the entire system.

An additional method could be to activate a signal or, alternatively, stop the presence of a signal to a parent controller to indicate fault conditions. In order to this, the system must first monitor the load current or voltage value. To measure the current, the voltage across the current sense resistor in a LED circuit is presented to the input of an ADC (after amplification).

The ADC’s digital output is monitored by the processor and the appropriate action is taken depending on the value of the current measured. For instance, if the current through the LEDs is supposed to be 500mA, but the ADC only measures 10mA, it is considered a fault condition. The controller then activates signals to communicate this to a parent controller and activates a ‘Fuse Blow Out’ circuit which forcibly blows the fuse.

In circuits such as the boost where there is a large value bulk capacitor, it is very important to constantly monitor the load voltage. During normal operation in a boost system, the bulk capacitor is charged during the OFF cycle of the switch and discharged by the load during the ON cycle of the switch. If there is an open circuit at the load, the discharge does not occur while the charge cycle occurs.

If this is left unchecked, the voltage on the capacitor could rapidly reach very large magnitudes, potentially causing damage to components such as the MOSFET. In the case of a loose connection, sudden closure of the circuit after the capacitor has been overcharged can lead to very large currents flowing through the load for short periods, carrying the potential to permanently damage the LEDs.

A resistor divider network at the bulk capacitor terminals will step the output voltage down to a range which the microcontroller can handle. This signal can be directed to a comparator whose output can be connected to the current regulation system with the ability to shut it off. When the voltage goes over a pre-defined limit, this comparator will switch and shut the system down.

Figure 3. Ambient Condition Monitoring

LED lamps are placed in a variety of environments. In an office environment, it would be very energy efficient for a lamp to monitor the presence of people in a room and turn the lamp off or reduce intensity based on the absence of people. This will lead to savings in energy, which reduces the energy bill of the establishment. This will also lead to efficient use of the LEDs, thereby extending their life in the fixture.

A simple ambient light sensor (photo-diode or transistor) can be a part of the system to perform this function. The output of this sensor is usually a current (depending on the amount of light falling on it) which can be converted to a voltage signal using a resistor. This signal is provided to the controller through one of its pins which then is converted a digital value using an ADC. The controller determines the appropriate action (reduce intensity, shut off or turn on) based on this value.

LEDs themselves generate a lot of heat which is emitted through their terminals as opposed to incandescent lamps that heat in the direction of light. In addition to this, lamps are often fitted in closed spaces providing little outlet for the heat. In the event of an abnormally large rise in temperature, there could be varied consequences. These could range from degradation in life of components and LEDs, to permanent damage, or a fire in the extreme case.

There are broadly two ways of monitoring system temperature. The more expensive way is to have an I2C based temperature sensor which reports temperature in digital form to a controller. When a controller has a built-in I2C interface, as the PowerPSoC family of LED driver-controllers, this method involves very little processor overhead since temperature values are directly reported.

An alternative, less expensive option is to use a thermistor with another resistor to form a voltage divider network. The voltage divided signal is provided to the input of the controller which uses an ADC to convert it to a digital value and performs the appropriate action based on the temperature.

The processor would have to perform additional work to convert the digital value to one proportional to temperature. Going another step further, the thermistor voltage could be given directly to a comparator’s input (similar to the trip function for load voltage monitoring). The comparator’s output will shut the LED drive system OFF or ON based on a pre-defined threshold.

Figure 4. Real time load current control

So far we have discussed monitoring the load current, voltage, and ambient conditions. In addition, a desirable feature of a smart lamp would be one that could change its behavior based on what it is monitoring.

For example, the lamp could modify the intensity by changing drive current or the digital intensity (PWM) of its output. This could be done on the basis of the state of the ambient conditions, load conditions, or external inputs such as buttons or a communication interface. Behavior could also be based on multiple factors with a priority assigned to each.

For example, the controller could respond to a communication interface such as I2C or UART and change its intensity according to the data received. However, if the input voltage dropped below the lock-out threshold or if the temperature rose above a safe value, it could progressively reduce the intensity (irrespective of the communication interface) and shut it off at a set point. There can be many such defined behaviors.

Traditionally, LED drivers have to have the drive current defined by hardware (a resistor value) and so changing it in real time is usually not possible. In a software configurable LED drive system, such as the PowerPSoC, changing the LED drive current is a matter of rewriting a few DAC registers. Moreover, having a software configurable system allows the design of different products with different feature lists using a single hardware platform.

Fault Logging and Diagnostics
When lamps are deployed in commercial installations such as large buildings, parking lots, streets and so on, servicing and replacement impacts cost and efficiency of maintenance. The same controller that implements a communication interface to a parent controller for plan servicing and replacement can also be used to log and communicate failures.

For example, a lamp could have failed (or had its fuse activated on purpose) for any of the following reasons:

* An open circuit on the load
* A short circuit on the load
* The system temperature crossed a threshold more than a pre-determined number of times
* There was an over-voltage at the load terminals
* The LEDs reached its end of life or experienced pre-mature failure
* The input voltage never went over the lock-out point for a pre-determined amount of time.

These conditions require the monitoring of the number of hours of operation of the lamp. This function only requires a timer that is accurate enough to keep track of the number of hours of operation (with a resolution of a second). Most internally generated clocks in controllers have a certain tolerance that will decide the final accuracy of the timing system. A more accurate timer will usually require an external oscillator or clock source.

In order to log the cause of failure, the conditions of the system just before the system is shut down or has its fuse activated must be stored in a non-volatile medium. A controller with flash memory can store these conditions in the Flash. An alternative method is to have a serial EEPROM device that is interfaced to the controller with an I2C interface. The operating and ambient conditions of the system are stored on the EEPROM device from time to time, as well as just before a purposeful fuse activation/shut down.

When a failed lamp is removed from the installation, the non-volatile memory device can be read by a PC or other controller to determine the conditions just before failure. This information can be used to ascertain component failure rates, unknown or unexpected environmental conditions, and generally help in guiding the engineers in finding the original cause of failure.

The New Design Paradigm
Traditionally, power management circuits have been completely implemented in hardware with the only configurability also provided through hardware. As a result, creating multiple variants of a product or new products requires unique combinations of hardware components. If the design cycle time and time to market needs to be reduced, this design paradigm has to be re-visited.

For example, if the design procedure instead comprised configuring modules in software, design cycle times could be reduced significantly. Secondly, differentiating a product from a competitor’s or from a previous version involves changing a configuration in software and using the same hardware platform with different options.

Software configurability also eliminates tolerance issues usually associated with hardware components that are used for configuration. If a whole family of products can be released to production at almost the same time or following on each other’s heels, the ability for competition to differentiate will be adversely affected.

Mukund Krishna currently works in the lighting solutions group at Cypress Semiconductor as an applications engineer, where he is responsible for aiding customer designs, designing collateral, and product definitions. Currently, these include LED based lamps that work off AC and DC supplies with a varying range of features in them. Mukund has a graduate degree in Electrical Engineering from the University of Southern California.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.