Introduction: Turn Me On, an ATtiny RGB Mood Lamp
In this Instructable I will show you how to make a mood lamp that you can turn on by flipping it around, how cool is that!? This project is an exelent beginner project for people that want to get familiar with the ATtiny chip.
The project is entered in theLamp Contest and the Led Contest. Please vot for me, I would love to win the 4 in 1 soldering station!
Step 1: Materials and Tools
You need the following materials:
- Spice jar
- RGB led with 4 pins
- ATtiny85 IC
- 8 pin IC socket
- Tilt switch
- 3V coin battery
- 3V coin battery holder
You need the following tools:
- Solder iron with solder
- ATTINY85 arduino programming shield (optional)
You can make an attiny programming shield for the arduino yourself like I did but it is also possible to program the ATtiny chip with an broadboard. Randofo made an exelent tutorial for doing this.
Step 2: Prepare the Spice Jar
In order to use a spice jar you have to remove some of the plastic material in order to place the electronics. Please follow the following steps and take a look at the pictures above.
- Spice your food to the max to empty a nice spice jar! :)
- Remove the grinding mechanism in the lid with the fretsaw (photo 1)
- Widen a bid of the lid in order to fit the battery holder (photo 2)
- Remove plastic at the top of the spice jar (photo 3)
Step 3: Electronics
The electronics are rather easy. Please follow the four steps:
- Cut a piece of five by five from the perfboard with the fretsaw
- Start with soldering the large components first and finish with the smaller components. Make sure to solder the ATtiny dip socket without ATtiny on the board to prevent thermal shocks.
- When all the components are on the board connect the components on the other side of the board with soldering according to the provided Fritzing scheme.
- Solder the perfboard to the bottom of the battery holder. Make sure to insert the battery after you finish the soldering.
Step 4: The Software
The ATtiny chip is a small arduino with only 5 digital pins that you can use. Before you can use the attiny ship you have to program the ATtiny. There are various ways for doing this. You can use a broadboard and some wires or make your own ATtiny programming shield like I did.
There are tons of projects on instructables that provide sketches for fading an RGB led. The best effect you get when the colours smoothly fade. In order to get this result you have to make use of a technique called Pulse Width Modulation. I made use of the following sketch:
Step 5: Turn It On!
Put a nice sticker on top of the jar to inidcate how the unit can be turned on and test it!
Have fun building and learning! Please let me know what you think of this instructable.
I would love to make some improvements if necesarry.
We have a be nice policy.
Please be positive and constructive.