The circuit is pretty simple. Attiny85 Microcontroller, Super Capacitor, a few LEDs. At first I just had a zenner diode protecting the super capacitor from over charging (past 2.5Volts) but the zenner bleeds! Next I used the attiny85 to control charging and turn on one or more LEDs as the charge approaches 2.5 volts.
In the next couple of steps you can see how I etched the board. You may choose to order a printed circuit board OSHpark or you may draw your own circuit board as shown in the next steps.
Circuit Board from OSHPark
. ~$8 per board
or make your own board using:
- copper clad board from Radio Shack
- PCB etchant solution from Radio Shack
Here are the electronic parts. I made a BOM through Mouser
. The total cost is $6.88
- qty(1) Super Capacitor 2.5V, 10F. mouser
- qty(1) Attiny85, DIP. mouser
- qty(1) 8pin dip socket. mouser or Radio Shack
- qty(2) TO-92 NPN transistors. mouser
- qty(1) 1K resistors 0805. mouser
- qty(1) 10K resistors 0805. mouser
- qty(2) 100K resistors 0805. mouser
- qty(1) 22pF capacitor 0805. mouser
- qty(2) n-channel mosfets SMD. mouser
- qty(1) zenner diode 2.4v smd. mouser
- qty(1) diode smd. mouser
Next you may need these parts: Adafruit Round Solar Panel
, $2.95 Epoxy Mold
, from TAP plastics, $11.95 Other Schematic Notes
RESET 1| |5 VCC
A3 PB3 2| |6 PB2 A1 (SCK)
A2 PB4 3| |7 PB1 (MISO) PWM
GND 4| |8 PB0 (MOSI) PWM
The capVoltage (PB2) is sensing the voltage between the zener diode and 100K resistor. I manually measured the voltage across the super capacitor and across the 100K resistor and calculated the ADC (@ pin PB2, capVoltage)
****this is required for testing as the attiny85 does not have a Serial Monitor to tell you what it is reading*****
Here is an abbreviated table of measurements:
Capacitor(V) 100k(V) estimated ADC
1.1v 0.26v 0.26/1.1 * 1023 => 242
2.03v 1.01v 1.01/2.03 * 1023 => 509
2.49v 1.42v 1.42/2.49 * 1023 => 583
this works because the zenner voltage leaks current depending on the super capacitor voltage where as the 100k resistor draws current at a more predictable rate. In lieu of using the traditional breakdown voltage of the zenner (2.4V specified) I'm using the fact that the diode drains a lot of current (even below 2.4V!)... this happens in somewhat a predictable manner (per the table above).
You must meditate on this for awhile.
Digital input PB3 drains to ground when the daylight is not strong enough to open the mosfet gate (Q2). This works really well as solar cells will maintain relatively high voltage with no current and little daylight. It has to be pitch black for the mosfet to drain PB3!