Introduction: RGB LED Mood Light W/ ATtiny85
They call these things MOOD LIGHTS.
Don't know why. I guess the changing of colors put some people in a good mood.
Although i have observed that when people look at this MOOD light it tends to have a similar affect as staring at a camp fire or a fire place in your house.
I don't get the same reaction when people look at my 4x4x4 cube that took far more work and money to build. Somehow the MOOD effect is different. Hypnotizing / Mesmerizing.
There is a number of these here on Instructables. Mine is not much different in content, it's just in a different package.
It uses the common cathode RGB LED's wired in a parallel circuit.
The glass has some translucence. Light can be seen through the glass but the light is spread around by a diamond like pattern causing somewhat of a diffused appearance.
I was actually going for more of a diffused look but this how it turned out. I suppose i could of gotten just as good or even better using a blank sheet of white paper as a diffuser.
Most people will tell you not to connect LED's in parallel because of Thermal Runaway.
While this could be a concern, i have never experienced it and really YOU should follow the rules.
My excuse here is this project is small and if there happened to be a Thermal Runaway i doubt it would cause much if any damage beyond the light structure it self.
If it did happen i am not out much. So for the risk involved compared to the Mood Light's effect i think is worth taking the chance.
But don't follow my analogy / excuse. You should build your LED projects in the proper manner.
Step 1: Testing Operations
For this i am using an ATtiny85 AVR processor. Programmed using Arduino as an ISP.
An RGB LED's of course have 3 different colors in one package. RED, GREEN and BLUE.
Not all colors have the same forward voltage. In this case the Red has a forward voltage of 3.2v and the Green and Blue both have a forward voltage of 2.0v.
So that dictates what resistors we will use for current limiting. I used this online calculator to determine the resistor values.
The calculator say's to use a 30 ohm for the RED and 18 ohm each for the Green and Blue.
Now i did't have those exact values so i got close. I used a 39 ohm for the Red and 22 ohm each for the Green and Blue.
If you are going to substitute resistors its is safer to go up in value, not down.
When we go up in value we limit more current going to the LED, so the LED will be running lower than the stated current limit. Will last a long time.
When we go down in value the current is increased to the LED making the LED run over the stated current limit. May burn out fast.
Step 2: LED Tree.
Trying to figure out how to connect all 4 LED's is the small space i have made was a challenge. It looks easy now but at first it took a little bit of thinken.
The solution i came up with was not what is in the first picture. It is the second picture that i used. I faned out the LED legs some. Then match up its partner and solder them together. See photos to understand what i just said.
That way i could run 4 stiff wire straight up and soldier to each of the LED's leads. An LED Tree. That served as the stand and the power lines all in one.
The only wire i had on hand was a roll of magnet wire. # 23 /12. This wire is not good to use for this and i do not recommend anyone to use it for this project.
First i had to double up the wire, hence the spiraled look. That's not to look good its to give it enough strength to stand up straight to hold the LED's.
Second i had to remove the insulative coating on the magnet wire so i could soldier to it. Without doing this the soldier will not stick . Easier said than done especially after it was twisted.
After i managed to get everything soldiered up it was quite sturdy. I soldiered corresponding color wire to each lead at the bottom.
I later abandoned this also after seeing it would be better to soldier them direct to a perf board.
YouTube Link Test drive.
Step 3: Board 1
The first board. The board under the glass is pretty straight forward. Not to complicated. Each solder track goes to each LED tree wire. 4 in all.
Step 4: Board 2
I used a socket for the chip instead of soldiering direct to the board scene i wasn't going to be using an ISP header. That way i could remove the chip if needed for reprogramming.
Next i added the two 22 ohm and one 39 ohm resistors.
The on/off switch it one i salvaged from an old broken computer monitor.
I am running this from 4 AA batteries which it 6v. The voltage specs for this chip is 2.7v to 5.5v . So i added one 1N4001 diode in line with the VCC of the chip for about a .6v drop. Bringing the voltage to 5.4v. Now within specs. Albeit on the high side of the voltage range.
Step 5: Glass
The glass i used as a diffuser.
I used supper glue to stick them together.
The two sides are 4" x 4".
The two ends are 1" x 4"
The top is 1" x 4 1/4"
No bottom piece.
All are 1/8" thick.
I had them cut at a local glass shop for a cost of $2.09 USD for all 5 pieces.
Step 6: Base
I notched out the base so the glass would have a little bit of a holder to keep it from sliding around.
Also notched out for all the soldier tracks so the perf board would sit flat on the base.
This board i used for the base is from an old pallet.
Step 7: Code
This code is from TechHelpBlog.com
If you are using an ATtiny85 then change the pins in the code.
Instead of 9, 10, 11 as the original code shows, change to whatever pins you want.
I used pins 0, 1, 2.
If you aren't fluent in writing code such as i am, there is a number of examples here on Instructables with code available.
Total cost of this project was around $7 USD. Not counting solder and electricity ect which is minimal.
Thanks for looking!
We have a be nice policy.
Please be positive and constructive.