loading

I love mood light , so I decided to build a motion controlled mood light.

If you like this instructable, Please vote for me.

Step 1: The Electronic Circuit



Hardware

The circuit is simple. It consists of the Microcontroller, Accelerometer and 6 LEDs.
Components:
1 Microchip PIC 16F917 (or any Microcontroller of your choice) from Amazon or eBay
1 Analog Devices ADXL206 (or any Accelerometer of your choice) from Amazon or eBay

3 Red LEDs from Amazon or eBay

3 Blue LEDs from Amazon or eBay

1 40 PIN Socket from Amazon or eBay

1 8 PIN Socket from Amazon or eBay

1 9 Volt Battery from Amazon or eBay

1 9 Volt Battery Connector from Amazon or eBay

1 Holed board from Amazon or eBay


Schematic

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 16F917programmer you can find it in my blog here. PicProm

You can find the programmer in the following instructable:

https://www.instructables.com/id/PIC-16F917-Microcontroller-Programmer/

Step 2: Software


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:

https://www.instructables.com/id/PIC-16F917-Microcontroller-Programmer/

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

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 .




If you like this instructable you can support us by many ways:

1. Leave comments stating your point of view about this article.

2. Buy our book on Amazon Learn By Making.

3. Click on links of our sponsors without adding any extra cost on you if you make purchase from them. Actually, many of these offers are totally free. This means that you can enjoy something for free and still support our blog to keep posting useful stuff.

Amazon.com - Read eBooks using the FREE Kindle Reading App on Most Devices

This is the well-know Amazon Kindle platform. If you sign up for the free reader from Amazon to read any book, we get commission. There are many useful book for free on Amazon Kindle. Even you can find best sellers offered for free on Kindle format. The best part is you can have the application on any platform. You can even read any book without installing any application by using Amazon Cloud-Reader on your browser.

Join Amazon Kindle Unlimited 30-Day Free Trial

You can join Amazon Kindle for 30 days free to have access to many paid book for free. You can cancel you subscription anytime.

Try Amazon Prime 30-Day Free Trial

The Amazon Prime is a special paid service from Amazon that offers good promotions and one-day free shipment for Amazon Shoppers. You can try this service for 30 days. You can cancel you subscription anytime.

Shop Amazon - Give the Gift of Amazon Prime

Try Audible and Get Two Free Audiobooks

Audible is the audio books website from Amazon. Many Kindle books are sold on Audible. You can try this service for free and get 2 free book. You can cancel you subscription anytime.

Shop Amazon - Create an Amazon Baby Registry

If you have a new baby borne or expecting one, you can create your free baby registry to easily save products and get offers and promotions on baby requirements.

4. Visit our new website outatime.tech.

Thank you for visiting our instructable.

amazing, i like mood light and what it makes
Thank you. I'm glad you like it.

About This Instructable

2,286views

14favorites

License:

Bio: Embedded Systems Engineer. Love to travel , run , design useful stuff and grow green plants. I joined instructables.com on 2008 and my first instructable was ... More »
More by ahmedebeed555:5 Minutes Solar Mobile Phone Charger Easy DIY Parachute Toy for Kids 5 Minutes Simple Wind Turbine for Everybody 
Add instructable to: