Ed explores heat transfer and shows how a simple linear equation can predict an LED’s operating temperature. He presents the thermal effects that arose in some of his most recent LED projects.
After you’ve provided an LED with the proper voltage and current, as I described in my March 2016 Circuit Cellar 308 column, you must also deal with the power it didn’t convert into light. Although low-power LEDs may survive on their own, white LEDs used for area illumination can reach hazardous and perhaps destructive temperatures without adequate thermal control.
The extremely high power density of cutting-edge white LEDs calls for correspondingly complex thermal design that often requires heat transfer models based on 3D computational fluid dynamics. Most of us, however, don’t need that level of specialized mathematics and domain expertise to make our projects work properly: simple approximations and linear equations can be surprisingly effective and help avoid making bad choices.
In this column I’ll explore thermal effects that arose in some of my recent LED projects. Although most ended well, the Hard Drive Mood Light I mentioned in March provides a cautionary tale.
WHITE NEEDLE LIGHTING
While converting the motor in Mary’s classic Kenmore 158 sewing machine to pulse-controlled drive, as described in my columns starting from November 2014, I also updated its lighting. The original 120 VAC, 15 W incandescent bulb produced an inadequate yellow glow around the needle and heated the cast-aluminum endcap at the left of Photo 1 to an uncomfortably warm 50°C.
The finned heatsink in Photo 1 supports a pair of 2.5 W white LED emitters in 5050 SMD packages, aligned in the endcap’s bottom opening, that bathe the needle and presser foot with light. The rows of dots reflected in the machine’s platform come from four white LED strip lights along the front and back of the arm. She’s delighted with the bright work area and several of her friends in the local quilting guild threaten to abduct her machine.
Because the LEDs over the needle could dissipate up to 5 W into an enclosed space with no air circulation, I decided to overbuild the heatsink, discover how it performed, then, if possible, make the next version less imposing. With that “design goal,” the finned section of the heatsink completely fills the space originally occupied by the incandescent bulb and mounts to the sewing machine using the lamp socket’s original 6-40 screw at the top, with ad-hoc milled notches and shaped fins clearing the existing parts.
Photo 2 shows the two 5050 LED packages epoxied to the horizontal tab shaped to fit the endcap opening. Under normal conditions, of course, you’d mount the LEDs on a PCB with large copper pours bonded to the supporting heatsink. In this case, I hand-soldered the LEDs in parallel to a wire frame positioning them 30° from the aluminum tab to aim their light cone directly at the needle. Kapton tape insulated the wire frame from the tab and held everything in place during construction.
J-B Weld steel-filled epoxy bonds the LEDs to the tab in a thermally conductive and electrically insulating solid mass, with fast-curing J-B KwikWeld over the electrical connections and wire frame at each end. While this worked for my purposes, it’s obviously not a mass-production technique!
Each LED package contains six white LED chips in series, for a nominal operating voltage around 21 V and a maximum current of 115 mA each; because they’re in parallel, the total current will be 230 mA. Operating from a current-limiting bench supply, they were dazzlingly bright at only 19 V and 100 mA. The heatsink became just warm to the touch in open air, so I mounted it in the sewing machine and connected a boost converter to the 12 V supply. Adjusting the supply to 16.8 V drove the LEDs at 30 mA, 13% of their rated current, and produced ample light without dazzle.
Two LEDs dissipating 1 W barely warm that huge heatsink, even without airflow in the endcap. The next version of that lamp will have a rectangular chip-on-board emitter thermally bonded to a much smaller heatsink.
NORTHBRIDGE DESK LAMP
Despite their non-glare coating, the two 27″ monitors sitting on my desktop reflected the light from the swing-arm lamp I used when working with my scrawled shop notes, no matter where I positioned it. After putting up with the glare for too long, I combined a defunct gooseneck lamp, a Northbridge heatsink salvaged from an obsolete x86 PC, a white 3 W chip-on-board LED emitter, and a 3D printed head to produce the tiny desk lamp shown in Photo 3. Because the LED spreads a broad beam across the desk and sits below the monitor screens, it lights my papers without glare.
Intel’s Thermal Design Power spec for various Northbridge chips suggests that they dissipate about 25 W and the chip surface temperature should not exceed 100°C. Because the air temperature inside a PC might reach 60°C, the heatsink must have a relatively low thermal coefficient to ambient air:
Wringing that thermal coefficient from a small heatsink requires forced-air cooling, which explains why Northbridge chips generally sit in the CPU cooler’s exhaust air stream. In my desk lamp, the 3 W COB LED assembly dissipates only 10% of the Northbridge chip’s power and the heatsink could surely handle that without a fan.
Photo 4 shows the COB LED epoxied to the flat bottom of the heatsink. As with the 5050 SMD emitters in the sewing machine, steel-filled epoxy eliminates the need for mechanical fasteners and provides an excellent thermal bond, at the cost of creating a permanent assembly. I bought these LEDs on eBay, direct from China at $0.60 each: I could afford to gamble that the heatsink would work.
In common with many products listed on eBay, the LED specifications provided only the bare details: 9 to 12 V DC, 300 to 350 mA, 3 W, and 280 to 300 lm. The yellow silicone fill diffuses the light from six LED chips into a 180° “beam,” with a hotspot directly under the lamp due to the geometry of a flat desk illuminated by a uniform source.
The desk lamp’s previous incarnation used a 12 VDC wall wart with a 300 mA current rating. I used a bench power supply to verify the LED specs, then connected it directly to the wall wart, with the results shown in Photo 5. The upper trace shows the wall wart can supply a ripply 10.5 V at 260 mA (lower trace: 100 mA/div), suggesting a certain optimism in the wart’s specifications.
Under those conditions, the LED operates well within its rated power:
The current reaches 320 mA at the top of the ripple and the usual exponential relation between diode current and forward voltage suggests that the current might exceed the 350 mA maximum under high-line conditions. In an actual application, you’d design an LED driver with tighter output controls, but I think the wall wart simply can’t overdrive the LED by enough to matter.
Photo 3 shows the heatsink fins extending vertically above the plastic lamp head in the worst possible orientation for convective air flow. Warm air rises from the heatsink and draws cool air in from the sides, but a proper thermal design would position the fins horizontally to allow vertical air flow from bottom to top. Even with that limitation, however, the heatsink reaches 41°C, just over body temperature, in a 20°C room, because it dissipates only 10% of its original power.
In its new mount, the heatsink’s thermal coefficient works out to:
Although I don’t have the facilities to measure the temperature difference between the aluminum LED baseplate and the Northbridge heatsink, the yellow silicone diffuser runs at 46°C, just 5°C above the heatsink. That suggests the epoxy bond works very well, because most of the heat transfer must occur through the back of the chip-on-board assembly.
The heatsink’s thermal coefficient will improve slightly as its temperature increases, because higher temperatures will produce more convective air flow. Even without a computational fluid dynamics model, however, you can surely see why a 10 W LED would be inappropriate in a simple desk lamp with a similarly exposed heatsink.
Pop Quiz: Assuming the same thermal coefficient, compute the heatsink’s temperature rise as a function of power.
Overly hot heatsinks face an additional problem in this age of rapid prototyping: the plastics commonly used in desktop 3D printers have relatively low glass transition temperatures (abbreviated Tg). The plastics we think of as hard and mechanically stable become soft and easily deformed as their temperature rises above their Tg, even though they don’t become molten blobs. The cyan PETG plastic I used for the lamp head has Tg = 70 to 80°C, so a 10 W LED at 8°C/W would raise the Northbridge heatsink in its plastic mount well above that temperature.
Now you know why early “incandescent replacement” LED bulbs sported such huge heatsinks: proper thermal management poses a real challenge.
NEOPIXEL LED BULB ILLUMINATOR
As you’ve seen, two factors determine the temperature of an electronic part: how much power it dissipates and how efficiently its enclosure or heatsink conducts the resulting heat away. Photo 6 shows a relatively low power device placed in a poor thermal environment: a single knockoff Neopixel mounted on a circular 10 mm PCB inside a 3D printed plastic cap glued to a defunct halogen bulb, controlled by an Arduino Pro Mini in the housing below the ceramic fixture. The inert bulb now serves as a complex glass decoration, not an illuminator!
With the internal WS2812B controller driving all three RGB LEDs at PWM 255, the package dissipates 270 mW:
That’s an order of magnitude less than the COB white LED, but the plastic cap and glass bulb don’t conduct heat very well at all. I inserted a thermocouple into the cap and found it stabilized at 35°C, 13°C above room temperature. I couldn’t directly measure the LED package temperature, but I think it’s reasonable to assume the copper pours on the PCB distribute the heat evenly and, because the 5050 SMD LED package doesn’t touch the glass, the PCB must dissipate its heat into still air on both sides. There will also be thermal conduction into the wires, but their plastic insulation, plus a mesh braid, reduce that heat loss.
Under those assumptions, thermal coefficient from the cap’s internal air to the external air shows how effectively the plastic insulates the LEDs:
As you’ll see later, the knockoff Neopixels I’m using begin failing as their temperature approaches 40°C. The insubstantial WS2812B datasheet gives a 80°C junction temperature limit, without providing the junction-to-PCB thermal coefficient, so there’s no way to compute the internal temperature from external measurements.
Fortunately, the LEDs don’t run at full power, because the Arduino Pro Mini drives them with slowly changing raised sine waves using the statement in Listing 1. The equation may be more readable in its mathematical form:
Listing 1 Driving an LED with a raised sine wave reduces its average power dissipation to half the maximum value. The thermal mass around the LED must be large enough to integrate its power output, which means the LED can still overheat due to slowly changing PWM values near the maximum. PWMValue = (Pixels[Color].MaxPWM / 2.0) * (1.0 + sin(Pixels[Color].Step * Pixels[Color].StepSize + Phi));
Adding 1 to the sin function raises its minimum value to 0, its maximum to 2, and its average to 1. The PWM output then ranges from 0 to MaxPWM, with an average of MaxPWM/2. As long as the thermal mass of the enclosure around the LEDs integrates the fluctuating power, the average dissipation will be half the maximum.
The Arduino program running the bulb decoration drives the RGB LEDs with sine wave periods of 7.5 s, 12.5 s, and 17.5 s, producing a slowly changing color wash and uniform air temperature inside the cap. After a few minutes, the cap stabilized at 27°C, quite close to the predicted value:
Avoiding a thermal problem with software seems entirely appropriate for this simple application, but a commercial product would require a thermally conductive cap around the LEDs. Perhaps I must machine caps from aluminum rods on the Sherline mill?
HARD DRIVE MOOD LIGHT: THERMAL FAILURE
Photo 7 shows the interior of the Mood Light I mentioned in my March 2016 column, with a dozen knockoff Neopixels mounted on a 3D printed pillar surrounded by platters harvested from obsolete hard drives. An Arduino Pro Mini in the lamp base drives the LEDs with raised-sine patterns similar to the halogen bulb shown above, but with a phase delay between the layers that moves colors smoothly up the column.
The LEDs were very bright with the maximum PWM set to 255 and a 3 W peak power dissipation:
As discussed above, the raised-sine function halves the average power dissipation to 1.7 W, but after operating for a week, one of the WS2812B controllers failed. The LEDs in that package would stall at a fixed color and all downstream packages stopped changing colors, suggesting that the controller had failed. Spraying that package with circuit cooler restored normal operation until it warmed up.
I dismantled the lamp and replaced that entire strip, whereupon it operated normally for another week, until a blue LED failed in a different strip. Once again, a squirt of circuit cooler provided a temporary fix, but I decided to measure the LED operating temperature.
I drilled a hole through the cap into the pillar just behind one strip, deep enough to put a thermocouple at the top LED. I tweaked the Arduino code to display fixed “grayscale” values with all three LEDs at the same PWM, deployed a second thermocouple to read the ambient air temperature, and collected temperature vs. PWM values.
The same blue LED failed again at 38.3°C with PWM 85 and all three LEDs in another package failed at 60.1°C at PWM 255. Both packages returned to normal operation at lower temperatures, although the WS2812B controllers don’t seem to have thermal protection and I can’t vouch for their long-term reliability after that abuse.
I converted absolute temperatures into the rise above ambient, converted PWM values into power dissipation, adjusted the nominal power to compensate for the failed LEDs, and plotted the results in Figure 1. The small kink at 1 W indicates that the power adjustment for the blue LED isn’t quite right, but the overall straight-line fit looks good: the Y axis intercept is 0.7°C, rather than 0°C.
Assuming that the temperature inside the plastic pillar equals the LED package temperature, the slope of that line shows the case-to-ambient thermal coefficient is just under 14°C/W. That’s twice the COB LED heatsink’s 7°C value and, frankly, I was surprised it came out so low.
Obviously, it’s not low enough to keep the WS2812B controllers cool. I modified the Mood Lamp program for a maximum PWM value of 64 in the raised-sine calculation, which corresponds to a total average power dissipation around 400 mW, and the pillar temperature now runs just over room temperature.
In this situation, a simple linear equation can predict the operating temperature with the power dissipation varying by an order of magnitude. I wouldn’t trust that equation extrapolated another factor of 10 to 30 W, but you can see how a straightforward measurements can inform your design decisions.
Conversely, running the LEDs at a lower average power should suffice until the dog days of summer. I could add a thermistor circuit so the Arduino can monitor the pillar temperature and adjust the PWM accordingly, which certainly sounds like a whole ‘nother project.
I have been using knockoff WS2812B RGB LEDs obtained from eBay, rather than Genuine Adafruit Neopixels: I’d rather not destroy good parts while exploring designs, collecting data, and illustrating problems. I recommend starting with known-good parts and taking thermal design precautions in your own projects, because the same thermal design principles apply to all parts, regardless of their source.
E. Nisley, “The Analog Side of PWM LEDs,” Circuit Cellar 308, 2016.
———, “Chip-on-board LED Desk Lamp Retrofit,” 2016, http://softsolder.com/2016/01/06/chip-on-board-led-desk-lamp-retrofit/.
———, “Kenmore 158 Neele LEDs: First Light,” 2015, http://softsolder.com/2015/01/30/kenmore-158-needle-leds-first-light/.
———, “Neopixel Knockoff: Early Failure,” 2015, http://softsolder.com/2015/12/03/neopixel-knockoff-early-failure/.
———, “Vacuum Tube LEDS: Neopixel Plate Cap,” 2016, http://softsolder.com/2016/01/27/vacuum-tube-leds-neopixel-plate-cap/.
Adafruit Neopixel 144 RGB LED Strip
Adafruit Industries | www.adafruit.com/products/1507
Adafruit Industries | www.adafruit.com/products/1558
JB Weld Epoxy |www.jbweld.com/collections/epoxy-adhesives
WS2812B LED Controller
Worldsemi Co. | www.world-semi.com
Adafruit Industries | www.adafruit.com/datasheets/WS2812B.pdf
PUBLISHED IN CIRCUIT CELLAR MAGAZINE • MAY 2016 #310 – Get a PDF of the issue