3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Arduino controlled RGB LED Nightlight

Arduino controlled RGB LED Nightlight
Needed a nightlight for my boys and wanted something more than the normal plug in. They wanted one they could pick the color of and one that wold change color.

Easy - An Arduino, RGB LED and some PWM!

Picking the color was the issue. I decided on the one button solution - a rotary encoder with push button switch.

It also needed to be rugged. I went with a die-cast enclosure and a wrinkle black finish. I love the look of wrinkle black and satin chrome - reminds me of my favorite vintage Starrett tools.

I decided against batteries in favor of a plug in. A bright LED and an Arduino would drain batteries faster than I wanted to buy or charge them.

Looking at some of the very cool LiPo tech on the market today I might go with that option. I'd need a slightly larger enclosure or make a custom board but charge in the day/glow in the night would be cool...
 
Remove these adsRemove these ads by Signing Up
 

Step 1The Hardware

The Hardware
«
  • RBBB.jpeg
  • LED-w-resistor.jpeg
  • LED Shrink Wrap.jpeg
  • led wires.jpeg
  • rotary wires.jpeg
I didn't want to use a Duemillenove or Uno due to the larger PCB size so I went with the fantastic Adruino compatible RBBB from Modern Device. I love the die cast enclosures from Bud Industries. I went with one of the smaller ones - part # CN-5701. Just big enough to shoehorn a RBBB with a bit of room to spare for the other components.
I had a wall wart, power jack and common cathode RGB LED in my parts bin so the only additional component needed was a rotary encoder.

After assembling the RBBB (instructions are easy to follow) there are only 3 parts to connect.

First - the LED. I soldered the appropriate resistor for a 5V supply to the the RGB anodes. Check the data sheet for your RGB LED. If you don't want to do the math there are dozens of online calculators that will tell you what size and wattage resistor to use for a given forward voltage, drop and current. After clipping the leads as short as I could and soldering them up I put heat shrink tubing over each resistor and lead. I was lucky and found some red, green and blue wire in my scrap bin. 2" of each is plenty.


Finally - power. and with the plug I had that had to wait for final assembly.
« Previous StepDownload PDFView All StepsNext Step »
1 comment
Jul 6, 2011. 7:26 AMvishalapr says:
Fantastic!Rated 5*
Have a look at my ibles!

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
5
Followers
2
Author:lepton