Introduction: Wireless IKEA DIODER Mod, the Cheap Way
If you are looking for a cheap and easy way to control your lights with your smartphone or your computer this is the tutorial for you!
these are the required items for this mod:
Ingredients :)
- An ikea DIODER
- An arduino (any will do but i recommend the pro mini)
- An 433 Mhz receiver
- Kynar wire (actually a bit thicker would be fine as well)
- Prototype Paper PCB (if you are going with the pro mini)
Tools:
- Soldering iron + solder
- raspberry pi or anything else that can send 433 MHz signals (transmitter attached to your computer trough serial)
- multimeter (not required but recommended)
Disclamer:
I am not responsible for any damage (IT IS POSSIBLE TO FRY YOUR COMPUTERS MOTHERBOARD TROUGH THE USB PORTS) that you may cause following these instructions, i modded my DIODER this way and it has been running successfully for days now but my instructions may be unclear/wrong/gramaticially incorrect (i can guarantee the last one) which may cause you to think you should store a hot soldering iron in your curtains, whatever lets get to it.
This tutorial is not completely finished, and i'll improve the code shortly. However if you have any suggestions or spotted incorrect things (from instructions to grammar) please comment so i can improve this.
Step 1: Buying the Parts
I don't know if there are any good alternatives in the USA but in europe you're going to use ebay, with free shiping and ridicoulously low prices nothing can beat this.
Since Ebay links stop working after a little while i'm not linking you to a specific item but rather a search page.
- PCB DIY Prototype Paper PCB ~0,17 for a 5x7cm piece
- Arduino Pro Mini atmega328 5V 16M ~2,50 for a nice knock off
- Kynar Wire (buy 10 ft. so they can ship it in an envelope) ~1,50 for 10 ft.
- 433 Mhz receiver ~1,30 for a pair
- Arduino Pro Mini progammer, you can use an arduino UNO or a USB to Serial adapter
- Soldering iron (i used 15W and that was more than enough)
- Solder, i like solder with a flux core but you can buy it separately or not at all
- Multimeter, preferably on that can test continuity and volt (almost every multimeter)
Step 2: Opening the DIODER Up
OK, this thing outputs 12 volt but fortunatly it contains a micro chip that used 5v so we are going to use its power source and attach PWM pins of the arduino, in our case (3,5 and 6) to it's output pins. The good news? you are still able to use the DIODER the regular way if you screw up. The bad news is that it's hard to solder to SMD if you have never soldered anything before (but it's certainly doable). I added a drawing of the pin layout of the onboard chip.
Step 3: Soldering the Wires
First off all solder a wire wit a length of 17,3 cm to the 433 Mhz receiver otherwise you are going to get some strange results, this wire functions as an antenna with the length of 1/4 wavelength.
You'll need to solder:
- The signal wire (next to VCC) to pin 2 on the arduino
- VCC to the vcc output of the Arduino (or directly to the positive pin from the DIODER)
- GND to GND of the arduino (or directly to the negative pin from the DIODER)
- pin 3 to the red pin of the dioder
- pin 5 to the green pin of the dioder
- pin 6 to the blue pin of the dioder
Step 4: The Code
I tested the code first on a UNO with an RGB led from ebay attached to it, if you want to modify the code i recommend this.
How it works:
The Arduino receives a decimal code of 8 digits.
The first two:
These are used to specify which Arduino you want to control, this also adds a (very poor) way to make sure that the Arduino does not turn on your lights when it receives signals meant for other devices. In this case we are using the number 11 (can not start with a zero)
The other six:
These are used to control the brightness of the R G and B led's it has a range from 00 to 99 where 00 is off and 99 full brightness.
Example:
11000000 Turns al the LED's off
11009900 Turns only the green LED's on
11999999 Turns all the LED's on (results in white)
you will need the RC Switch library for this
Attachments
Step 5: The Transmitter
I used a raspberry pi in combination with a 433 mhz transmitter to control my lights, this is a cheap way to archive this and you can still use the pi for other stuff like NAS and XBMC.
You are going to need 433Utils and wiringpi for this:
https://github.com/ninjablocks/433Utils
it is all explained on this github page.
You are going to need a bit more powerful 433 Mhz transmitter(than the one you got with the receiver) if you want to reach lights in your entire house though.
Step 6: It Does Not Work
First take a look at the serial output, you can still use this if the Arduino gets its power from the DIODER, just connect TX to RX and RX to TX.
- Some pins are not (properly) connected,
Solution: Use a multimeter to measure continuity and volt between pins and check if everything is connected, if something is wrong correct it with you soldering iron
- The antenna is not connected or does not have the correct size (Arduino is unable to turn LED's off)
Solution: pretty obvious - Multiple colours turn on when i just turn one on .
Solution: You probably have connected the pins on the SMD chip, check this with an multimeter and correct it with your soldering iron
Step 7: Control It With Your (android) Smartphone
I recommend tasker in combination with the SSH plugin for this, if you want i can post a tutorial on how to do it with an simple web page but only apple users will need this.
If you use tasker you can do so much more than just turning the lights on and off with a button, (i am now woken up by light instead of sound)