Instructables

Arduino Lantern Light

Picture of Arduino Lantern Light
I thought it would be fun to build one of those RGB based lights for the room.  'Mood lighting' with Arduino. That is an interesting and fun way to learn Arduino.  Now remember, these are RGB LEDS. There is RED, BLUE and GREEN inside each bulb! I am controlling them ( aka color mixing them ) with the 3 knobs. One controls the RED brightness, one the GREEN and one the BLUE.  I use 3 LEDS to get a brighter output. All the REDS dim and Brighten together with a turn of the knob. Same for Green and Blue. Got the idea? Here we go!
 
Remove these adsRemove these ads by Signing Up

Step 1: Breadboarding

image3.jpeg
image6.jpeg
RGB Flashlight_bb.jpg
The first step was to setup just the RGB's on a breadboard and connect it to the Arduino Uno. I don't have a pic of that breadboard. Sorry.  Then I changed out the 10k ohm bread board mount pots for real knobs for the final build. I bought a circuit board and cut it small with snips and soldered up the RGB's and the resistors. It took me 2 or 3 times to get the layout correct and no shorts but that's the patience aspect of building. It takes practice! Also a Breadboard takes up space, wires tend to fall out etc.   There is a Fritzing drawing of the breadboard showing just  the LED wiring. Basically the RED leads connect together, the GREEN leads connect together and the BLUE leads connect together. Each color connects to a seperate Arduino PIN as an output.  The GROUND of each of the 3 LEDS need to be connected to a resistor and then to GROUND individually! not tied together. Check the diag.  I found code I could use at http://owenmundy.com/blog/2010/05/fading-an-led-with-pwm-and-a-potentiometer/ and then tripled the code to control each of the 3 colors. I will post that later.
ThePuzzler7 months ago
Awesome instructable. I like the idea of being able to adjust the colors however you want. Can you get me a list of parts? Most of them I probably have, but I need to make sure.
kevin1ab (author)  ThePuzzler7 months ago
see my latest post. thank you.
awawawaw7 months ago
Nice instructable! I could see this spawning other projects using the same concept for simple RGB projects. Here's an idea; Add a button for a "random" mode where the Arduino ignores the pots and instead cycles the colors individually, but at different rates, so the resulting color would be all over the spectrum.
kevin1ab (author)  awawawaw7 months ago
one way I'm thinking is to when all colors are on maximum, then just fire a function to do what you said. great idea! it can also be done with a switch but you could fool friends with this easter egg. also have the screen blank ;)
kevin1ab (author) 7 months ago
Thanks everyone. Here is a parts list as best I can.
The lantern is a typical one. You can choose your own.
the resistors for the LEDS are 200 ohm red-black-black-black-brown.
The LEDS are from Amazon "Amico 50 Pcs 5mm Round Head Common Cathode RGB Light LED Emitting Diodes" Under $10. no resistors included. I had them from somewhere[??]. The pots and knobs are from Amazon: "10K Ohm potentiometer potential+black control Knob "about $7 each [ouch!]. The LCD is from Ebay, for about $5 "16x2 HD44780 Character LCD Display Module LCM blue blacklight "
So It's a few bucks to put this together but that's part of it :)
Let me know if I can be of any help.

carlos66ba7 months ago
Nice. Suggestion: instead of 9V batteries, use 3 AA batteries in series. The UNO will work fine with 4.5V and the AA's will last a lot longer and be cheaper than the 9V. You may want to feed the 4.5 directly to the 5V pin, not to Vin to avoid the voltage drop in the regulator or diode.
kevin1ab (author) 7 months ago
Just repaired a connector that fell out. need a new hot glue gun :)
Raphango7 months ago
Pretty cool! =D
coda8767 months ago
How did you power the uno?
kevin1ab (author)  coda8767 months ago
You can use the standard Uno 9v battery with the barrel connector. I put 2 9v batteries together in parallel to get more hours of light.
Litchifirst7 months ago
good
Litchifirst7 months ago
hai
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!