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

Picture of Parts

Parts for the Circuit:

  • 22uf capacitor
  • 10nf 103capacitor
  • 7805 voltage regulator
  • LDR  (Light Dependent Resistor)
  • 2 – 10K resistor
  • 2 – 100ohm resistor
  • 220ohm resistor
  • RGB LED (The one I got from RadioShack has a   common anode.)
  • ATtiny85 (can be bought at www.sparkfun.com)
  • 8 pin socket
  • Wire
  • Perfboard
  • Wall Wort Plug 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.
funjordan1 year ago
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 !
Subnormal3 years ago
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?
matt.e.jenkins (author)  Subnormal3 years ago
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.
quatch3 years ago
Why do you need capacitors with the 7085?
bricmic quatch3 years ago
On a 7805 or a 78xx, they are required to regulate the output voltage and to prevent disturbances on the residual program ATtiny. 100μf enough input and output is well suited 1μ.
Sans titre.jpg