Trammell Hudson Brings MicroPython to IKEA's TRÅDFRI LED Controller Range, Unlocks Fine-Grain PWM

Unhappy with the TRÅDFRI's lowest brightness and powered by healthy curiosity Hudson's hack brings the platform's first MicroPython support.

Tinkerer Trammell Hudson has written a guide to replacing the stock firmware on IKEA's TRÅDFRI smart LED lighting drivers with MicroPython — and in doing so unlocking finer-grained brightness control with the promise of more to come.

"I like to take things apart, and recently I've been disassembling IKEA TRÅDFRI/HomeSmart devices to see what is inside of them," Hudson explains in a write-up which includes amusingly IKEA-like pictographic guidance for the steps required to disassemble and modify the hardware. "The CPU board is a Silcon Labs EFR32 'Wireless Gecko.' which has a reasonable 256 KiB of program flash, 32 KiB of SRAM, a very nice 16-bit PWM for smooth dimming, and a ZigBee radio. Ikea also thoughtfully wired the debug port on the 10W LED driver, although the FLOALT requires soldering directly to the board."

Hudson's investigations weren't triggered purely by curiosity, however: "The real reason that I started on the project was that the default firmware is much too bright. At the dimmest setting it was still a 5% duty cycle, which was blindly bright at night and unsuitable for night-light applications. With the modified firmware, the brightness curve is replaced with a smooth logarithmic ramp that takes advantage of the 16-bit PWM and is imperceptible at the lowest settings. It is now more suited for my needs and perhaps other people's as well."

The modified firmware has other advantages, too. Being based on MicroPython, it's extremely open to further modification or more complex control tasks; it also offers the promise of local-only operation, protecting the user's privacy when compared to systems which constantly communicate with remote servers outside of the user's control — though, Hudson notes, "the default IKEA firmware is better than most for this."

A guide to building and using Hudson's modified firmware, which formed the basis of talks at ThingsCon 2019 and the 36th Chaos Communications Congress (36C3) this year, is available on his blog; Hudson warns, however, that the software is "still very beta" and that "the ZigBee radio support was still evolving" at the time of writing.

Gareth Halfacree
Freelance journalist, technical author, hacker, tinkerer, erstwhile sysadmin. For hire: freelance@halfacree.co.uk.
Related articles
Sponsored articles
Related articles