This  deluxe solar-powered light  uses a battery and solar cells salvaged  from a solar lamp with a four-cell battery (4.8 V nominal terminal   voltage).
Circuit diagram :
RGB Solar Lamp Circuit Diagram
The circuit can operate from any  DC voltage  around this value and  its current consumption, at 20 mA,  is low. This  means that the battery  can give up to five days of operation. The  circuit consists of an Atmel  ATtiny microcontroller which drives  a  red, a green and a blue LED directly  from three port pins. Series  resistors are of course included to limit  the LED current. The  microcontroller  drives the LEDs in sequence to produce an  RGB running  light effect. The microcontroller  is also responsible for ensuring that  the light automatically switches on when it gets dark  and off when it  is light. The light sensor is  made from one of the solar cells from a  bro-ken solar lamp (it is more common  for the battery to fail rather  than  the solar cells). 
The power output of this cell is not   important, as the microcontroller  only measures its output voltage   using its internal A/D converter  connected to pin PB4. The project is   ideal for beginners, as a ready-programmed microcontroller is avail-able  from the Elektor Shop (order  code 100581-41). 
Source by : Streampowers
