aliadnani
2 min read
lllamp

Custom desk lamp. Designed the PCB in KiCad, wrote the firmware in Rust on a CH32V003, and printed the enclosure. The lamp shade was taken from an actual construction light.

The CH32V003 was <1HKD - so cheap. I wanted to use it for the RISC-V, but didn’t end up learning much as the HALs and compilers really just handle everything for you.

Two potentiometers for brightness with gamma correction and colour temperature. Toggle button. Battery monitoring too. The firmware is written to be generic, so you can mix and match whichever features you want.

Went with a 5V rail for simplicity - works with long LED strips, single colour or RGB. Turned out to be not a very good idea. I found the current limiting resistors eat about 40% of the power as heat - which is a lot given the lamp is battery powered. Makes the enclosure a bit toasty.

Next revision will use a constant current switching LED driver.