Sunday, December 18, 2011

IKEA Mood-light Conversion


This little project was one of my first projects with microcontrollers. First, I made the circuit then, for years, I was wondering what I could do with it, until one day I came across this IKEA plastic bag dispenser. I knew immediately, it would make a perfect “housing” for my mood light.
The finished "cloud" in front of some more IKEA furniture


I had a few LED strips leftover from previous projects in different colours. They can be operated directly from 12V DC with no extra components. For this reason, I chose to use a standard 12V / 1A wall wart as the power supply. A 7805 provides stable 5V for the PIC.
Full schematics: When using LED strips the current limiting resistros must be replaced by shorts.

At the heart of the circuit is one of the smallest PICs, a PIC12F683, which has only 8 pins. It only has one PWM channel but I needed 3 channels for the three colours, so I had to implement 3 channels of PWM in software. Since when I made this circuit I was a complete beginner with PICs I mostly “harvested” the code from various web sites, trying to understand some basic programming techniques. In the process I tailored the code found to my specific circuit.
Front of the bare PCB

Back of the bare PCB

There is an ICSP header also included on the board for easy development.The components are all TTH components, very easy to solder.

Mechanical construction

The plastic bag dispenser from IKEA is a perfect fit for this purpose: it has a solid frame that is easy enough to customize using some not too powerfull power tools, white in colour, it already has mounting points on the back for easy hanging on the wall and the frame has large holes on it so that cables and the white fabric I got for it to cover can pass through them easily.
View from above: you can see the 3 LED strips attached to the back of the plastic bag holder. The PCB is mounted on a couple of standoff, usually found in computer cases.


The operation is very simple – in the program memory of the PIC there are several “programs”. This means that different kinds of (pre-programmed) sequences can be played back. Pressing the Mode button rotates the selected program. I tend to leave it on a particular program that is slowly changing the colours in a quasi-random manner.

Some more pictures

Here are a few more pictures in different stages. Note that in real life it looks better, since I only use it after dark when you can't see the definition of the IKEA frame or the furniture around it, only the slow changing colors.