A “real” Ikea Dioder hack
The other day I was walking around Ikea for some reason or another and I noticed this cool LED thing called the Dioder. It consists of 4 strips of 9 bright RGB LEDs (a.k.a. pretty color changing lights) with a control box and a bunch of cabling allowing you to arrange the LED strips in many different configurations. The Dioder has three modes. The first lets you cycle through some preset colors with the button. The second will automatically cycle through these colors. The third fades colors. The lights are not individually addressable so they are all the same color at any given time. The modes are selected by holding down a single button for different lengths of time while a buzzer beeps to let you know what mode you are in. At $50 its a little expensive but I immediately thought it looked hackable so I bought one.
It sat around the house for several days as I debated what to do with it and waited for a bit of leisure time. I knew I couldn’t just install it as intended. That wouldn’t justify the $50. So like any good hacker I did some googling to see what others had done. I did find some “hacks” but they consisted of “hey look I put these lights on my TV” or “here they are in a box, isn’t this cool.” I’m sorry, I may be a geek snob but using something pretty much the way it was intended is not a very cool hack.
So the debate went on. I cracked the control module open by removing the four screws and found a fairly simple circuit. It consists of three transistor pairs which drive the red, green and blue LED lines, a piezo buzzer, a button, a 5v regulator and a 12F629 PIC microcontroller. The circuit has only the three LED driver channels and that is why the LEDs are always the same color. I thought about building separate RGB drivers for each of the for LED strips so I could get four colors at once but in the end I decided that building new drivers circuits from scratch would take much more time than I wanted to invest in this project. Finally, I decided the simplest thing I could do, that was still “cool”, was to interface the controller with my computer to control the LEDs. Anything is cool when it’s connect to your computer right?
Unfortunately the PIC 12F629 does not have a serial port so I decided to piggy back one of my favorite little microcontrollers on top of the PIC, the ATTiny2313. This chip has plenty of IO lines, PWM, a serial port, is pretty easy to use and I happened to have some lying around and some prototyping boards already made up for them. Here is a picture of the prototyping boards I use:

The picture shows a populated proto board from the top on the left and an unpopulated board from the bottom on the right. You may notice that the picture shows an AT90S2313. This is the predecessor to the ATTiny2313 and is pin compatible. I did end up going with the ATTiny2313 for this project. Here is the schematic in Eagle CAD format and images so you can make your own proto boards:
These images should be printed at 600 DPI for correct sizing. I used a laser printer press and peel type method to get the pattern on to copper clad boards and then etched them. Google it and you will find plenty of information on this.
Something like this could also work instead: AVR ATMEL PROTOTYPE BOARD.
The proto board is populated with the following:
- 1 x 10Mhz crystal clock
- 2 x 22pF capacitors
- 1 x 1uF capacitor
- 1 x 6 pin dual row .1″ pitch ISP for in circuit programming
- 1 x 4 pin right angle header for logic level serial port connection
- 1 x small jumper wire connecting the two extra holes from the microcontroller to the 6-pin ISP
- 1 x ATTiny2313 Micro controller. I recommend you also socket it in a 20-pin socket.
In this project, I also added a single row right angle 8-pin .1″ pitch header to connect to the Dioder and a matching female header socket.
Here is a picture of the soldered proto board from the bottom.

You will notice the serial send and receive wires and a ground wire connected to the 8-pin single row header. I also had to cut the trace connecting that ground pin to the microcontroller.
After soldering and testing the proto board I soldered 7 small wires on to the pins of the PIC12F629. The wires were connected to all but pin 3 of the microcontroller. The diagram below shows how the PIC’s pins are used in the Dioder:

Pin 3 is not used and is just pulled to ground.
Below is a picture of the Dioder’s circuit with wires attached. In this picture there is one wire too many (pin 3).

Here is a close up:

The glossy stuff is solder flux. You might also notice that I scraped off the green coating from the trace coming from the +5v input to the microcontroller. This trace was later cut and another wire was attached to the end not on the microcontroller’s side. This makes it possible to enable or disable the PIC from the AVR making all the functionality of the PIC still available.
Here is the final wiring with hot-glue to hold everything in place:

The wires were connected as follows:
| Signal | PIC pin | AVR pin | AVR function |
|---|---|---|---|
| +5v | NA | 20 | Vcc |
| PIC +5v | 1 | 11 | PD5 |
| Buzzer | 2 | 13 | PB1 |
| Button | 4 | 12 | PB0 |
| Green | 5 | 15 | PB3 |
| Blue | 6 | 14 | PB2 |
| Red | 7 | 16 | PB4 |
| Ground | 8 | 10 | GND |
Then to allow the wires to come out of the Dioder control box I cut a small hole in the upper part of the plastic shell with a box cutter.
Here is the cut shell:

After trimming and connecting the wires to the 8-pin female .1″ pitch header here is the finished hardware:

Trust me I really did end up using an ATTiny2313. The chip pictured above ended up being bad and had to be desoldered. That’s one reason it is a good idea to use a chip socket.
Once the hardware was completed all that remained was the software. There are two parts. One the code that goes on the ATTiny2313 and two the PC side software.
The ATTiny2313 firmware is fairly simple. It listens on the serial port at 38400 baud with no parity 1 stop bit and 8-bit data. When it receives a command it recognizes it sets values for the red, green and blue PWM pulses. The firmware uses the ATTiny2313’s built in hardware PWM in 8-bit mode. The PWM is very fast an produces lighting which is much less jittery then the original Dioder.
You can check out the source from my subversion repository like this:
svn co https://cauldrondevelopment.com/svn/dioder-hack/
I built the software in Ubuntu Linux. First install the following packages:
sudo apt-get install gcc-avr avrdude build-essential
Then in the trunk directory run:
makeThis will build dioder.hex and set_color as well as some other files.
You can also find the binaries here: dioder.hex, set_color
To program dioder.hex in to the AVR microcontroller I used Atmel’s AVR ISP mkII. There are many AVR programmers out there and you can even build your own but the mkII is cheap and effective. With the mkII plugged into the USB hole and the other end connected to the 6-pin ISP programming port on the proto board, oriented so that the little tab points down towards the 4 pin serial header, run the following to program the chip:
make programThis will run avrdude to program the AVR. If you use a different programmer you may need to change the Makefile. This can also be done in Windows but you are on your own there.
The 4-pin port on the proto board is a logic-level (i.e. 5v) serial port. This can be connected to a Brainstem USB to serial converter from Acroname. There are other ways to do this. For example, you could wire in your own MAX232 serial level converter and a 9-pin serial port but many computers don’t have actual serial ports these days.
Once everything is connected you can open the USB serial port in a terminal program, set the parameters to 38400 baud N81 and start playing with the pretty lights. Here are the keyboard commands:
| r | Toggle red |
|---|---|
| g | Toggle green |
| b | Toggle blue |
| o | Turn everything off. |
| 0 | Disable the PIC. (default) |
| 1 | Enable the PIC (The Dioder will support all its normal functions). |
This is fun for a few minutes but then you’ll want to set other colors. This is where the set_color program comes in. It is not very smart. It just opens /dev/ttyUSB0 and sends color commands. If your serial port is on another device then you will have to change the code and rebuild. set_color also does not even try to configure the serial port. You will have to make sure it is configured correctly first. If you configure the port in a terminal program, such as minicom, and then exit it should leave the serial port in the correct state.
set_color can be run as follows:
./set_color 255 100 0
The above command should make the lights a yellowish orange. The numbers are color values from 0 to 255. The order is red, green, blue.
With a little shell script you can fade the colors like this:
while true; do for i in $(seq 1 255) $(seq 254 -1 2); do ./set_color $i 4 64; done; done
This will fade the lights back and forth between light blue and light pink. You can stop it with CTRL-C.
Here is another cool one that is very hacky:
cat /dev/urandom >/dev/ttyUSB0
This one might leave the Dioder PIC enabled.
So where do we go from here? Here are some ideas I have about improving this:
- Write a nice python program for controlling the hacked Dioder with a pretty GUI interface for selecting colors and choosing color change patterns.
- Use the hacked Dioder to indicate events such as email arriving, twitter tweets or certain tags in news feeds.
- Change colors based on the weather outside or somewhere else.
- Build the four channel Dioder hack I decided I didn’t have time for.
So in the end I was quite happy with the hack. It was entertaining and now I have computer controlled color LED lighting to show off. If you found this article useful, built this hack for yourself or have other ideas for the Dioder or other Ikea LED products for that matter, I’d love to hear about it.

December 30th, 2009 at 12:51 am
I could add a single resister to the original PIC12F629-based device to add a receive-only serial port, and reprogram the PIC to do what I want.
Here’s how:
Programming connections are on pins 4 (Vpp), 6 (ICSPCLK), and 7 (ICSPDAT). A programmer would be required (ICD2 for instance). These same connections also allow debugging of the code using the same programmer.
The resister (about 10k) would connect to the computer TxD (“0″=>5V, “1″=<0V), and would limit current to GP2 (pin5) (internal clamp diodes would limit the voltage swing to (Vdd+0.3V) to (Vss-0.3V)). Dioder Vss would connect to the serial port ground.
GP2 (pin 5) can generate an interrupt that is used to start bit timing when the start bit is received. The GREEN output currently uses Pin 5 – move this to Pin 2 (currently unused and pulled down to Vss). Remove the pin2 pull-down resister, and either of
1) cutting the existing trace at pin5, add a jumper from the trace to pin 2, or
2) lift pin 5 from the board, and add a jumper from pad 5 to pin 2.
Then connect the 10K resister between Pin 5 and the PC's TxD.
The rest is just firmware:
The receive function would have to be performed in firmware, but there are apnotes that show how. Bit timing would be based on one of the two timers and an interrupt. The data sense of the GPx pin is inverted in firmware.
LED brightness would be bit-banged PWM based on timer ticks generated from the other timer also using interrupts. The timer tick interrupt would output the next state of the LEDs and set a flag to indicate the timer tick had occurred. Main loop code would poll this flag, and if set, compute the next LED states and clear the flag. A suggestion – use 4-bit brightness values for each color, and timer ticks in the range of 1-4ms.
This would be an excellent hacker project, or high school class project! This uses almost all the existing parts, there are minimal additional hardware requirements, and it allows you to completely take over the Dioder for your own purposes (limited by your imagination and coding skills).
December 30th, 2009 at 2:32 am
I thought that might be possible. Thanks for the details.
I did notice that you could reprogram the PIC but lack of a hardware serial port got me.
I think the biggest problem would be that the PIC doesn’t have a lot of power or program space. I tried doing my own PWM off a hardware timer in the AVR and it made enough difference in speed that you could see flickering in the LEDS. That prompted me to rearrange the wiring so that the LED drivers were on the AVR’s PWM lines and use both clocks for full hardware PWM. If you are bit banging both the LED lines and the serial port you would likely have serious performance issues.
Also, I’m much more familiar with the AVRs and had parts laying around.
If you or someone else can get your hack working I’d love to see it!
December 30th, 2009 at 10:06 pm
I could use a simple holiday hack to work. Actually, I’ve already got two or three, but I’ve not been motivated.
The PIC has enough power and more than enough ram, but I’m not so certain of the program space.
The trick is to have everything ready for the next interrupt. Timing in hardware and interrupts are the keys.
December 31st, 2009 at 2:53 pm
I could add support for this in boblight if you want.
December 31st, 2009 at 2:53 pm
Forgot the link to boblight: http://code.google.com/p/boblight/
January 1st, 2010 at 2:45 pm
That would be awesome! The protocol is pretty simple. It takes three byte commands of this format:
255, ‘r|g|b’, 0-255
That is the byte 255, an ‘r’, ‘g’ or ‘b’ character then an 8-bit color value.
January 2nd, 2010 at 12:12 am
And done: http://code.google.com/p/boblight/source/detail?r=311
January 5th, 2010 at 12:15 pm
Hi,
Love what you did with this thing! I would like to interface the Dioder with a GHI Embedded Master. It has PWM capable I/O’s, perfect for this purpose, however… I will be powering the LED-strips from my Embedded Master so I’m going to build my own drivers. Could you give me some more details on the PWM? What frequencies/duty cycles do you use for the intensity variation of a single base color?
regards,
S.
August 2nd, 2010 at 5:16 am
This is quite similar to the Arduino RGB Mixer: http://opendmx.net/index.php/Arduino_RGB_Mixer
August 2nd, 2010 at 7:54 pm
Yeah, you are right. Although, that page was created on February 7th, 2010 so it wasn’t around when I did this project.
August 7th, 2010 at 10:35 pm
Joseph,
I managed to make my own hack of the IKEA DIODER. You can find the details of how I did it with a GHI Electronics Embedded Master and .NEY Micro Framework on my page: http://www.meirsman.eu/dioder
I reference this page from my page, because your page inspired me to be creative and look for my own solution.
Thanks and keep up the good work!
Sven
December 20th, 2010 at 7:40 am
Hello
I’m thinking of doing a similar ‘hack’ with an arduino. I was wondering when I just connect my arduino with pin 5,6,7 of the PIC, would this work? I would be able to use the normal dioder functionality and when I turn it off I can choose the color with my arduino.
I’m afraid that when the chip is connected(the 5V trace not cut) but in off-mode, that pin 5,6,7 would be connected to ground. Is this correct ?
Kind regards
December 20th, 2010 at 10:31 am
Koen,
You could try it, but if you don’t cut the 5V trace the PIC will also drive the LED lines. In the worst case, this could cause a short and let the magic blue smoke out of your PIC or AVR and as you know electronics don’t work with out blue smoke. That probably wont happen but I recommend you cut the trace and use another pin on your Arduino to turn the PIC on and off.
Alternatively, if you are willing to give up the PIC modes of operation, which you could easily reimplement in the AVR, you could just cut the PIC power trace or power pin and only control the LEDs via the AVR. A simple snip with a good pair of small diagonal pliers is all it would take to cut the pin.
Joseph
December 22nd, 2010 at 12:33 am
Koen,
A little more info. I’m not sure what the PIC does when in off mode. It could pull the lines low or there could be an external pull-down. It is unlikely that they are left floating as that would allow the LEDs to come on. You may be able to override a weak pull-down with the AVR but if the PIC is actually still on driving the lines low then you will have a problem. Try it out and let us know.
Joseph
January 10th, 2011 at 9:50 am
Joseph
I want to thank you for the info you gave me. I’m a beginner with electronics, after your advice and the hack at http://www.meirsman.eu/dioder I decided to just get it on with.
I kind of did the same as Sven Meirsman and solderd 3 connectors on each circuit (like you did on the PIC itself). I first tried -with the help of an extra pair of hands) if it would work like I wanted( just holding a wire from my Arduino Uno to the circuit). Nothing happend sadly enough. I then also connected the ground from the arduino with the ground on the IKEA circuit board. This was a success. I soldered everything together and I had a working hack.
After a few days I must have short-circuited something which fucked up my dioder-PIC. It won’t output any red anymore, the buzzer is also connected to the blue I suppose as the blue flashes a bit when I operate the button.
But everything is well now, my arduino does the job very well and I’m pleased with it. I had this nice Idea of making my own ambilight (altough with only 1 color/area).
Here’s a video of that: http://www.youtube.com/watch?v=o0EqkGPcwdg
I’m looking into making my own circuit so that I can ditch the ikea circuit and have to seperate channels (for better ambilight). Altough that will have to wait a few weeks as I should be studying for my exams at the moment.
Koen
January 10th, 2011 at 8:55 pm
Awesome! I always like to see people trying their hand at electronics. I was a CS major so I got into it in much the same way. You have to get your feet wet to learn.
Regarding the soldering of small pins. It helps a lot to have the right equipment. A RatShack $15 iron just isn’t going to cut it for fine work. I know a lot of people swear by Weller irons but I really like MetCal. MetCal uses RF technology to automatically adjust the power input to the iron to keep it at the Curie temperature. This means that if you put your tip on a little SMT lead or on a block of iron you’ll always have the right temperature. The cartridge tips are easy to change too. Yes, MetCal irons are expensive but you can get older models and tips on EBay for not too much. The MX-500 goes for as little as $70. That’s a lot more than $15 but it’s well worth it and if you take care of it it will last you a life time of fine soldering.
The other important things are flux and desolder braid. These are cheap and with them you can even do fine work with a $15 RatShack iron if you are careful. Without them you will just burn holes and get yourself all worked up.
Finally, a magnifying lamp is also very helpful.
With these things and some practice you will be soldering like a pro in no time.
September 27th, 2011 at 1:18 pm
So far these hacks are the most impressive I’ve seen…and I have been searching for days now…
I have a newbie question (being in construction, I don’t know enough about electronics, but have seen the blue smoke….and pretty handy with a $15 Weller) – I have three Ikea Dioder RGB kits (each has: 4x 12″LED wands, RGB controller and a PSU, which has enough juice to comfortably run the 4 wands) and would like to run all 12 wands from one RGB controller, using the 3 PSU’s. I could just go out and buy a controller and PSU big enough to power all the LEDs, but then that would be easy. Can anyone suggest how (if?) I could wire one controller to run the three separate sets of LED wands (4/group). Could the RGB controller go up in blue smoke if set up this way?
Background info: I am planning to use the three kits in a kitchen I am building for my wife and “WE” really liked the “pretty” colors the Doider creates….well, looking for something else to tinker with and probably looking to make trouble, I bought the three doider kits – each will be used in a logistically separate area in the kitchen. As mentioned above, “we” would like to control the lighting from a single location.
Any suggestions would be very welcome.
September 27th, 2011 at 7:58 pm
You might be able to just gang a few segments together using the provided connectors but as you suspected at some point you’re going to overload the driver or the power supply. I don’t know what this point is. It could be calculated if you know 1) how many amps an LED can draw, 2) how many amps the driver can handle with out burning up and the 3) amperage of the supply.
So you could experiment with how many you can connect together on one controller before either the magic blue smoke comes out or it stops working. However, you’re here because you want to do some real hacking and “let’s just see what happens” works well when writing software but not in electronics which leads me to:
Here is what you should really do:
Now the controller for which you didn’t cut the power trace will send control signals to the other two. The drive circuitry will not be overloaded because the drivers on each board are still being used with in their limits. The logic signals are being shared not the drive signals. For the same reason the load is balanced across all 3 power supplies.
I recommend you keep the signal wires between the modules as short as possible. However, it will probably work fine up to a few feet.
One warning, I wouldn’t leave just one or two of the devices on and not the others. The devices that are off might draw power off the others over the signal lines. You could also disassemble the power supply modules and connect the AC sides altogether and attach a single two prong plug. Then you could plug the whole thing into one outlet and they all come one at once.
If you get this working post some pictures.
November 19th, 2011 at 11:22 pm
Hey,
I’m realy impressed what you did with the dioders. I know a little bit about electronics but actually I am a programmer so like said befor my way of doing is trying and most times it won’t end up good.
I bought the German version of the dioder with three buttons (one for on/off, one for fading the colors and one for jumping through the colors) and a color wheel. I would like to be able to control the dioder with a Remote controlled power plug (I hope that’s what you call it, I’m from Germany). My problem is that every time you disconnect and reconnect the dioder from the powersupply, it is turned off and you need to push the button to turn it on. So my question is how to put it that the dioder is allways on or that it is on by default. I would have no problem if I couldn’t turn it of anymore. I would have the remote control to cut the power.
Do you think there is a way of solving this problem?
Thanks
Flo
November 21st, 2011 at 8:38 pm
@Flo, gute Frage. This could be kind of tricky. The problem is that the Dioder probably needs to be sent a pulse some time after it is turned on. However, you could try a simple experiment to see if there is an easier way. Try unplugging your Dioder. Then while holding down the power button plug it in. If it turns on before you let go of the button then you just need to jumper that control line and your problem is solved. My guess is that that wont work.
Otherwise, the Dioder will need a short pulse either from high to low or from low to high, depending on the power control pin’s configuration. This pulse must also come some time after the microcontroller has had a chance to start up. Probably a millisecond or two after power is applied to the circuit. One way to do this would be to mount the AVR circuit as described in this blog entry and program the AVR microcontroller to send this pulse. That’s a bit of overkill though. There are simpler circuits maybe using a 555 timer but the AVR is pretty easy conceptually especially from a programmer’s perspective.
Another option would be to see if your power controller has the capability of sending this pulse. Is it an X10 system?