Matt Meerian's LED Desk Lamp Upgrade Offers Smart Lighting Control From an Arduino-Compatible PCB

Having found the built-in controller inadequate for his workbench, Meerian set about designing something smarter.

Gareth Halfacree
5 years ago β€’ HW101
With a rotary encoder and OLED, Meerian's controller significantly upgrades his desk lamps. (πŸ“·: Matt Meerian)

Maker Matt Meerian found the built-in controllers in his LED desk lamps inadequate for his needs β€” and came up with an Arduino-compatible solution featuring an OLED display and setting recall after power-off.

"Tenergy desk lamps have a capacitive touch interface. This allows the intensity and color temperature to be controlled," Meerian writes of the core issue he sought to solve. "But, there is one feature they are missing: If you cut power to [the] lamp, they always come up in the off state. (there is not any EEPROM storage of variables). This does not work well for the workbenches, since power is applied to the bench through a mains power switches."

"The main goals were: To allow the user to control the behavior of the LEDs easily; set the behavior of the LEDs at power up; control the dim level; to turn off the LED's after a set amount of time. For the MCU [microcontroller unit], a linear 5V regulator was used to step the 12VDC down to 5VDC. (Rev A of the board used a switching regulator, But, since the current was low, the less expensive/complicated linear regulator was used on Rev B.)"

"The MCU is an ATmega328PB from Microchip," Meerian continues. "The controller uses a 128x32 pixel OLED display. (To initialise correctly, some of the displays require a wait time after power up, up to 2 seconds! Grr.) The header pins for the OLED go through the board to connect on the bottom side to a connector. The connector did not have a four pin version. So, a 5 pin version had one of the pins cut off."

The custom circuit board designed by Meerian is housed in an off-the-shelf enclosure with a custom polycarbonate cover, designed to protect the PCB and the display while also providing access to a rotary encoder used to switch between menu entries and settings. The software, meanwhile, was written in the Arduino IDE.

Meerian has released the source code and schematics on his project page, but has not yet released Gerber files.

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