IKEA have successfully introduced their line of Trådfri smart lighting all over the world. One thing I am missing from their lineup is a simple LED strip dimmer. Why not strip the brains from a light and make one? LED dimmers are all about PWM (Pulse Width Modulation). The width of the pulse determines the brightness of the light. The trick to re-purposing a dimmer would be to extract the chip and find the PWM pin.
How hard could it be? Not very as it turns out! Read on to find out more.
For this project you need the following (not everything is in the picture):
The light is really simple to disassemble
We now have the brains of the smart light. Others have done deeper analysis and determined that under the steel case there is a general purpose 32bit processor which could be used much in the same was as Arduinos and ESP8266 units. However, for the purpse of this project we are only interested in three pins. Plus, GND and PWM output. See the drawing for the pinout. The circuit runs on 3.3v. The pin PB13 is PWM out.
To make it breadboard friendly, I suggest soldering a 3-pin header onto the board. Bend the pins a bit to compensate for lower lead spacing of the circuit board.
There is more info here: https://github.com/basilfx/TRADFRI-Hacking
The circuit (from left to right):
The pins on the LED amp are labeled BRG but in this case it is all white.
Put the project in a case. If you have a 3D-printer (and organized your components as I did) you can download the STL files here and print the case seen in the pictures.