loading

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

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.

  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)

Step 3: Electronics

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.

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

<p>Hey, that's a nice tutorial! :) Keep it up.</p><p>Just a suggestion. You can replace your coin cell to make it long lasting by using an adapter and then limit the current flowing through the circuit by using 7805 to first drop down the voltage to steady 5V and then use the appropriate resistors based on their respective maximum operating voltage. I guess it will work.</p>
<p>Hi Tamoghna. Why using a adapter? I`m using the 3V coin now for several owers and the light is still very bright.</p>
<p>On second thought, you can also use 3.3V LDO voltage regulator to drop down the voltage from 5 to 3.3</p>
Omg, this is so cool! ;)
<p>This looks great. Good luck in the lamp and lighting contest.</p>
<p>Thanx!</p>
<p>Great Work !</p>

About This Instructable

2,716views

58favorites

License:

Bio: The term, engineering originates from the Latin word Ingenerare, which means "to create". My name is Vincent and I am a graduating student in the ... More »
More by Ingenerare:Turn me on, an ATtiny RGB mood lamp Easy IoT weather station with multiple sensors  Multiple analog inputs using one analoge pin   
Add instructable to: