Turn Me On, an ATtiny RGB Mood Lamp

by Ingenerare in Circuits > LEDs

5033 Views, 67 Favorites, 0 Comments

Turn Me On, an ATtiny RGB Mood Lamp

1.3.jpg
IMG_3600.2.jpg
IMG_3606.2.jpg

Hi!

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 the Lamp Contest and the Led Contest. Please vot for me, I would love to win the 4 in 1 soldering station!

Materials and Tools

389 met namen.jpg
397.2.jpg
392.2.jpg

You need the following materials:

  • Spice jar
  • RGB led with 4 pins
  • ATtiny85 IC
  • 8 pin IC socket
  • Perfboard
  • Tilt switch
  • 3V coin battery
  • 3V coin battery holder

You need the following tools:

  • Fretsaw
  • 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.

Prepare the Spice Jar

IMG_3586.2.jpg
IMG_3595.2.jpg

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.

  1. Spice your food to the max to empty a nice spice jar! :)
  2. Remove the grinding mechanism in the lid with the fretsaw (photo 1)
  3. Widen a bid of the lid in order to fit the battery holder (photo 2)
  4. Remove plastic at the top of the spice jar (photo 3)

Electronics

IMG_3607.2.jpg
Knipsel2.JPG
IMG_3582.2.jpg

The electronics are rather easy. Please follow the four steps:

  1. Cut a piece of five by five from the perfboard with the fretsaw
  2. 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.
  3. 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.
  4. Solder the perfboard to the bottom of the battery holder. Make sure to insert the battery after you finish the soldering.

The Software

output_FAnJWP222.gif

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:

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.
Regards, Vincent