I wanted to create something for my wife as a present and this is what I came up with. This is a dark activated color changing night light. It has a sensor that can tell when the room light is turned off. This then will light a RGB LED and slowly fade through different colors. Its brains is a ATtiny85, but you could also use an Arduino.  We have little boys that would appreciate this on at night.


Step 1: Parts

Parts for the Circuit:

  • 22uf capacitor
  • 10nf 103capacitor
  • 7805 voltage regulator
  • LDR  (Light Dependent Resistor)
  • 2 – 10K resistor
  • 2 – 100ohm resistor
  • 220ohm resistor
  • RGBLED(TheoneIgotfromRadioShackhasa  commonanode.)
  • ATtiny85 (can be bought at www.sparkfun.com)
  • 8 pin socket
  • Wire
  • Perfboard
  • WallWortPlug about 7-18V (test this with a voltmeter, don't trust the label)

Everything can bought at RadioShack but the ATtiny85.

Don't buy the Wall Wort Plug. You or someone you know probably has one they don't use, like the plug to charge a cell phone... When possible, recycle.

Parts for the Light:

  • Hobby Glass Block
  • Hot Glue Gun
  • Glass Block Stand
  • Glass Frosting Spray Paint
  • Paint Pen/Sharpie
Other Items:
  • Computer
  • Arduino
  • Breadboard
  • Jumper Wire
  • Wire Stripper
  • Voltmeter
  • Soldering Iron
  • Solder
  • Razer Blade
  • That you at least have a little experience programing an Arduino and know how to solder on a perfboard.  If you are an absolute beginner you may need some help.


I programed the attiny85 with your code and folowed all steps, but i use 5V from USB and not use LDR . I burned 4 RGB led's and I don't know where it's my bad!
I definitely want to breadboard this ! I like what you have done with the ATtiny and an RGB LED . Thank you for sharing ! <br>Build_it_Bob
I'm new at this. This is going to be my first project. I was looking online for the 22uf cap. And there is different voltages for them. Does it mater witch one I get for this project? <br>
The voltage on the cap is the max it can take. So just make sure it more than the highest voltage power supply you are using. <br>
Why do you need capacitors with the 7085?
On a 7805 or a 78xx, they are required to regulate the output voltage and to prevent disturbances on the residual program ATtiny. 100&mu;f enough input and output is well suited 1&mu;.

About This Instructable




Bio: I'm a youth pastor in Minnesota. I went to Cornerstone University and studied Bible, Youth Ministry, and Psychology. I'm a Maker hobbyist for ... More »
More by matt.e.jenkins:Color Changing Night Light with ATtiny Build a Simple Circuit from a Pizza Box (No Soldering) Facebook Costume 
Add instructable to: