Colourful RGB Mason Jar Night Lamp
by TechMartian in Craft > Mason Jars
1425 Views, 26 Favorites, 0 Comments
Colourful RGB Mason Jar Night Lamp
![IMG_2501.jpg](/proxy/?url=https://content.instructables.com/FL3/3X7X/J6WGEIXG/FL33X7XJ6WGEIXG.jpg&filename=IMG_2501.jpg)
![IMG_2505.jpg](/proxy/?url=https://content.instructables.com/FSP/BNFH/J6WGEM9V/FSPBNFHJ6WGEM9V.jpg&filename=IMG_2505.jpg)
![IMG_2503.jpg](/proxy/?url=https://content.instructables.com/FNW/R4I5/J6WGEKAU/FNWR4I5J6WGEKAU.jpg&filename=IMG_2503.jpg)
This is a beautiful and elegant looking night lamp made with a frosted mason jar. It also uses an RGB LED so it can produce multiple colours. In fact, it can cycle through all the colours in the visual spectrum.
Although it can function as a standalone battery powered LED night shade, I decided to give it an added functionality of programming an Arduino to make the RGB LED cycle through all 255 values of colour for each LED producing beautiful visual effects!
Remove Adhesive
![IMG_20170827_132701.jpg](/proxy/?url=https://content.instructables.com/FRG/TBAW/J6WGEP7G/FRGTBAWJ6WGEP7G.jpg&filename=IMG_20170827_132701.jpg)
![IMG_20170827_133201.jpg](/proxy/?url=https://content.instructables.com/FSX/0UA1/J6WGEPCD/FSX0UA1J6WGEPCD.jpg&filename=IMG_20170827_133201.jpg)
![IMG_20170827_133212.jpg](/proxy/?url=https://content.instructables.com/FQH/MA47/J6WGEPDE/FQHMA47J6WGEPDE.jpg&filename=IMG_20170827_133212.jpg)
Leave it on a tub of hot water for about 5 minutes then scrub off the adhesive with a kitchen scrubber. Then, leave it to air dry before frosting.
Frost Glass
![IMG_2406.jpg](/proxy/?url=https://content.instructables.com/FQM/9HT2/J6WGEIM1/FQM9HT2J6WGEIM1.jpg&filename=IMG_2406.jpg)
Apply 2 generous but even coats of semi-transparent frosting pain around the surface. Make sure to hold the can at 90 degrees at all times to get the best results.
Solder
![IMG_2551.jpg](/proxy/?url=https://content.instructables.com/F9N/6MG4/J6WGFCLB/F9N6MG4J6WGFCLB.jpg&filename=IMG_2551.jpg)
![IMG_2553.jpg](/proxy/?url=https://content.instructables.com/FD1/WGKH/J6WGFCRV/FD1WGKHJ6WGFCRV.jpg&filename=IMG_2553.jpg)
* Solder a 100Ω resistor to all the pins apart from the longest pin -- that is the ground pin.
Connections
![IMG_2507.jpg](/proxy/?url=https://content.instructables.com/FK7/EAFB/J6WGEN64/FK7EAFBJ6WGEN64.jpg&filename=IMG_2507.jpg)
![IMG_2510.jpg](/proxy/?url=https://content.instructables.com/F5M/A01C/J6WGENJ3/F5MA01CJ6WGENJ3.jpg&filename=IMG_2510.jpg)
![IMG_2509.jpg](/proxy/?url=https://content.instructables.com/F1F/6EDR/J6WGENFB/F1F6EDRJ6WGENFB.jpg&filename=IMG_2509.jpg)
Follow the table below for the connections between the RGB LED and the Arduino.
RGB LED | Description | Arduino Pin |
---|---|---|
1 | Red | 4 |
2 | GND | GND |
3 | Green | 5 |
4 | Blue | 6 |
Code
![Screen Shot 2017-08-28 at 11.05.20 PM.png](/proxy/?url=https://content.instructables.com/FW8/L088/J6WGEXYD/FW8L088J6WGEXYD.png&filename=Screen Shot 2017-08-28 at 11.05.20 PM.png)
This code will make the RGB LED cycle through all the different colours possible in the visual spectrum.
const int red = 5;
const int green = 6; const int blue = 9;void setup() { pinMode (red, OUTPUT); pinMode (green, OUTPUT); pinMode (blue, OUTPUT); }void loop() { for (int i = 0; i < 255; i++){ for (int j = 0; j<255; j++){ for (int k = 0; k<255; k++){ analogWrite (red, i); analogWrite (blue, j); analogWrite (green, k); } } } }
Enjoy!
![IMG_2504.jpg](/proxy/?url=https://content.instructables.com/FG8/3SQG/J6WGEL8L/FG83SQGJ6WGEL8L.jpg&filename=IMG_2504.jpg)
![IMG_2506.jpg](/proxy/?url=https://content.instructables.com/F0N/IXQN/J6WGEN37/F0NIXQNJ6WGEN37.jpg&filename=IMG_2506.jpg)
![IMG_2502.jpg](/proxy/?url=https://content.instructables.com/FSF/6488/J6WGEJKA/FSF6488J6WGEJKA.jpg&filename=IMG_2502.jpg)
Enjoy!