MASON JAR MOOD LAMP

by opengreenenergy in Circuits > Arduino

25395 Views, 452 Favorites, 0 Comments

MASON JAR MOOD LAMP

collage_20141227211516804.jpg
IMG_20141227_201001.jpg
IMG_20141227_200957.jpg
IMG_20141227_200947.jpg
IMG_20141227_204229.jpg
mood lamp
BUILDING OF MASON JAR MOOD LAMP

[ Play Video ]

I wanted to create something for upcoming New Year gift to present my parent.At the same time I saw a competition on MASON JAR is going on in instructructables. So it only made sense that I would use mason jars to make simple DIY lamp.Making mason jar lights is really, really easy!.After all this is what I came up with.It is the perfect blend of rustic and tech, don’t you think?

This is a dark activated color changing mood lamp. Its brains is a ATtiny85, but you could also use an Arduino.It has a light sensor which sense the light condition and decide when the room light is turned off.This then will light a RGB LED and slowly fade through different colors.

Parts and Tools Required :

54a01d59182470c723000001.jpeg

PARTS :

1. Mason Jar (Amazon)

2. Attiny85 (eBay)

3. 8pin DIP socket (eBay)

4.Coin Cell (eBay)

5.Coin Cell Holder (eBay)

6.Resistors (1x10k and 1x 50ohm)

7.LDR (eBay)

8.Common anode RGB Led (eBay)

9.Sliding Switch (eBay)

10.Wires

11.Perforated Board

12.Tracing Paper

13.Duct Tape

14. Arduino and Jumper Wires

15. 10uF electrolytic Capacitor

TOOLS:

1.Soldering Iron

2.Hobby Knife

3.Glue Gun

Schematic and Working :

temp_578819971.jpg
54a01d98182470af56000001.jpeg
The brain of the lamp is Attiny85. The LDR and 10K resitor makes the light sensor.The sensor output is connected to the attiny analog pin-3.The sensor detect when the room is dark and tell attiny to give varying pwm signals to the RGB led.According to the different values of PWM signal the color of the RGB led changes.For power switch I used a sliding switch.

Working

The ATtiny85 only has 2 PWM pins.But to change the color of a RGB led we need 3 PWM pins.This limitation is overcome by using software PWM.This means that you can fade in and out of all 3 colors using any of the pins on the ATtiny.The software PWM works by setting the pin HIGH and then LOW at different rates so that the LED looks like it's dimming. This is called Persistence of Vision or POV. The LED blinks so rapidly that the human eye can't detect that it is flashing at all, and it sees instead that the LED appears to be dimming.

Preapare the Perforated Board

54a01dd01824707d09000001.jpeg
IMG_20141227_140552.jpg

The lid of the jar is circular.So I first cut a rectangular board by using plywood cutter.Then I trimmed the edges with a tin cutter.Hit and try until the board fix in to the lid.

Solder the Cell Holder and DIP Socket

IMG_20141227_142523.jpg
54a01e26182470ef06000001.jpeg

First place the Coin Cell holder and DIP socket as shown in figure.

Then solder it.

Install the Switch

54a01e9418247072ae000002.jpeg
54a01ecf1824707959000001.jpeg
IMG_20141227_161338.jpg
Screenshot 2014-12-28 15.31.06.png

Drill a hole for installing the sliding switch.I used 6mm drill bit for making the hole.use a drill bit according to your switch size.Then install the switch by applying hot glue.

Note : I forgot this stage,so make the hole after placing the cell holder.When you will make this project, drill the hole before soldering any components on to the board.

Solder Everything As Per Schematic

54a01f521824708d23000002.jpeg
54a01f7a1824700517000001.jpeg
IMG_20141227_155901.jpg
54a01fa11824704328000001.jpeg

After soldering the components, join the soldering points by wires.Refer schematic during this stage.

Add a current limiting resistor to the anode.In my case it is around 50ohm.

Note : Instead of using single resistor you may use 3 resistors with three cathodes.Both works fine.

If you want to power it with 5V then you should change the resistors value.

For calculating the current limiting resistors click here

Program the Attiny85

54a0202818247047f8000001.jpeg
54a02057182470c102000001.jpeg
54a0208f18247047f8000002.jpeg

There are many great sites and other instructables that give step by step instructions on how to program a ATtiny85 with a Arduino. The reason I used the ATtiny85 was because it is a cheap chip and the size is very small .

I program it on a bread board.If you have a shield then it is very easy.

The details of program an attiny is explained here

The code is attached bellow.Change Light threshold value from 0 to 1023. Lower number means activation at lower light level.

If you are using a Common cathode RGB led then Change HIGH to LOW and LOW to HIGH in the code.

Frosting the Jar

54a0ade5182470abd9000001.jpeg
54a020e3182470c102000002.jpeg
IMG_20141227_200123.jpg
IMG_20141227_200153.jpg

You can use your imagination to find a way to diffuse colors uniformly. Color diffusion is necessary to achieve best results.So frosting of jar is needed.The best way to frost the mason jar is by using frosting spray paint.

For frosting a glass jar you can see here.

You can buy the frosting spray paint from eBay or Amazon

In my country I did not find it ,So choose a short cut method.I used a tracing paper to diffuse the light.

Cut the tracing paper with width equal to the height of the jar.Roll the paper and insert in to the jar.If you have a frosting spray then you can use it.

I satisfied with my cheap solution.

Mount the Board

IMG_20141228_130821.jpg
IMG_20141228_130716.jpg
IMG_20141228_130932.jpg
54a0214b1824707e03000003.jpeg

Stick duct tape to the board.I used scotch tap.Then place it inside the lid and stick the tap to the lid inner edges.

Make sure that the LDR is bend toward the top, in such a way that it exposed to light.

For better response of LDR use jar with transparent lid.

Then close the lid.

Test the Lamp :

IMG_20141227_200947.jpg
IMG_20141227_201001.jpg
IMG_20141227_200957.jpg

To test the lamp slide the switch to ON position and switch off your room light.You will get a surprising gift.

I have a lot of fun while making my own jar mood lamp.If you are thinking to make this, I am sure that you are probably the new proud owner of an adorable little mason jar mood lamp.

If you enjoyed this article, don’t forget to pass it along!

Follow me for more DIY projects and ideas.

Thank you !!!