Introduction: Zigbee LED Strip Dimmer (IKEA Trådfri Hack)
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.
Step 1: Bill of Material
For this project you need the following (not everything is in the picture):
- IKEA Trådfri GU10 Smart bulb. Any other trådfri bulb should due just fine but the GU10 is cheapest.
- Single color LED strip. The GU10 only has one color.
- LED Amp. These devices are intended to drive longer strips than can be supported one controller. It takes the input from one side, adds drive current and outputs power for LED strips with the same PWM pattern as the input.
- LD117 3.3v voltage regulator
- 100uF capacitor
- 10uF capacitor
- 470 ohm resistor
- 10 Kohm resistor
- BC547 transistor (or equivalent NPN)
- Prototype board or bread board
- Header pins
- Power connector of choice for 12v power supply
Step 2: Disassemble the Light
The light is really simple to disassemble
- Using a thin flat head screwdriver, pry the clear plastic top off
- Pry the aluminum cover open
- Pull the light out
- De-solder the LED from the board and take the LED and aluminum cover off
- Under the cover sits a circuit board at a 90 degree angle with a copper strip soldered to it. This is the processor and wireless circuitry that we need for the project. The copper is the antenna.
Step 3: The IKEA Zigbee Circuit
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
Step 4: The LED Amplifier
This step is not entirely necessary. However, I suggest cutting the plastic off the LED amp circuit to allow for direct solder access.
Solder wires as in picture.
Step 5: Circuit Drawing
The circuit (from left to right):
- 12v power
- 12v to 3.3v circuit using the LD117 regulator
- IKEA Zigbee circuit
- Level adjust transistor (BC547) circuit for PWM out. It converts the 3.3v output to 12v for compatibility with the LED amp.
- In addition, the transistor circuit inverts the signal. The LED amp and most LED strips light up when input is 0v. This is called common anode. The IKEA circuit is the opposite. +3.3v is on.
- The LED amp is the last part of the circuit. The three inputs are shorted since we want the same signal for all three outputs.
The pins on the LED amp are labeled BRG but in this case it is all white.
Step 6: Wire It
Follow the circuit drawing. You may want to start by wiring everything up on a breadboard and when you have that working, move it over to a prototype board. The latter requires basic soldering skills.
Step 7: (optional) Add a Case
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.
Step 8: Done!
We have a be nice policy.
Please be positive and constructive.