Colourful RGB Mason Jar Night Lamp

458

19

2

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!

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Remove Adhesive

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.

Step 2: Frost Glass

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.

Step 3: Solder

* Solder a 100Ω resistor to all the pins apart from the longest pin -- that is the ground pin.

Step 4: Connections

Follow the table below for the connections between the RGB LED and the Arduino.

RGB LED Description Arduino Pin
1Red4
2GNDGND
3Green5
4Blue6

Step 5: Code

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); } } } }

Step 6: Enjoy!

Enjoy!

Makerspace Contest 2017

Participated in the
Makerspace Contest 2017

Be the First to Share

    Recommendations

    • Book Character Costume Challenge

      Book Character Costume Challenge
    • Made with Math Contest

      Made with Math Contest
    • Cardboard Speed Challenge

      Cardboard Speed Challenge

    2 Discussions

    None
    garym57

    2 years ago

    It looks like you are using a Arduino 101. Would this also work with a Uno?

    1 reply
    None
    TechMartiangarym57

    Reply 2 years ago

    Yes. i just use Arduino 101 because it has built in ble so I can control it by phone