Picture of Purple Mood Light Cube
I love mood light , so I decided to build a motion controlled mood light.

If you like this instructable, Please vote for me.

Remove these adsRemove these ads by Signing Up

Step 1: The Electronic Circuit

Picture of The Electronic Circuit


The circuit is simple. It consists of the Microcontroller, Accelerometer and 6 LEDs.
1 Microchip PIC  16F917  (or any Microcontroller of your choice)
1 Analog Devices  ADXL206 (or any Accelerometer of your choice)
3 Red LEDs
3 Blue LEDs
1 40 PIN Socket
1 8 PIN Socket
1 9 Volt Battery
1 9 Volt Battery Connector
1 Holed board


As shown in the diagram.

First, you need to assemble the circuit, solder the parts then program the software that does all functions.
The programmer is a circuit I built myself before . The 16F917 programmer you can find it in my blog here. PicProm

You can find the programmer in the following instructable:


Step 2: Software

Picture of Software
piCProm simple.png

I wrote the software for this project in C language. Compiled it with HiTechPIC compiler and used Proteus 7 simulation environment.

You can find the source code, HEX file and simulation model inside the zip file of the project. I assembled the code and generated the HEX file that must be downloaded to the microcontroller.

The software that loads the program into the microcontroller chip is called “loader” can be downloaded from here.
Once you are finished loading the software into the microcontroller, install the Microcontroller chip into its socket in the circuit.

You can find the programmer in the following instructable:


Step 3: Cube body

I built the body from old CD-ROMs I don’t need any more. I cut them into 6 squares by an architects saw in such a way that when put beside their each other have the maximum structure strength. I glued them together by a wax gun.

I scratched the surface of the CD-ROMs with Sand Paper for good light diffusion.

I made a hole for the switch of the circuit so it can be accessed from outside of the cube.
The board is installed on the bottom side of the cube by wax and thin wires. After you finish installing the cube, make sure to arrange the LEDs in near spherical shape to get the best illumination. And get them as far as possible from sides of the cube that will make them look better.

Step 4: Beads cover

Picture of beads cover
In order to make this beads case just bring 2 colors of beads, crystal string, and scissors

using 4 beads create a circle then for each one attach 3 beads from the other color to form a circle and when you finish the original four you will get a square.

measure the length of the square to determine the no. you need in each face of the cube, in my case i found that i need 16 square in each face: 8 with purple center and 8 with the reverse with considering that the bottom will have less squares by 1 for the electrical button, so i made them and attached them together.

bring your cube and fix faces together to cover the cube and in the bottom face i attached only one side to make it like a door to be able to open it and replace battery.

in order to make that door close firmly to not harm the circuit when you shake it, i used the Velcro for the door and also to close the beads above the door as shown in the picture.

Shake and  enjoy .


sara m.2 years ago
amazing, i like mood light and what it makes