Sunday, June 26, 2011

Battery Charger Solar Panel Atmel ATtiny13V

Battery Charger Solar Panel Atmel ATtiny13VBattery Charger Solar Panel Atmel ATtiny13V

Batwatch is a simple monitor for a solar panel battery charger, using an Atmel ATtiny13V. It periodically measures the allegation accepted and array voltage, and shows them by blinking two LEDs. I congenital this ambit into the bung of a VW solar charger console that is acclimated to anticipate a acquittal of the array back a car is not acclimated for some time. A avant-garde car contains a ample bulk of electronics, and a quiescent accepted of 40-50mA (about 1Ah per day!) is advised "normal"

Every brace of seconds, the software samples the two analog inputs, calculates the allegation accepted and array voltage, and shows the voltage on the red LED and the allegation accepted on the blooming LED. The voltage is apparent in units of 0.1V appliance three decimal digits, and the accepted is apparent in units of 10mA appliance two decimal digits. Anniversary chiffre is represented by a cardinal of abbreviate flashes agnate to the amount of the digit. A aught is represented by a distinct best flash. When the allegation accepted is beneath 10mA (after rounding) or negative, the blooming LED is not angry on at all.

I use 4 times oversampling to get an 11-bit result, afterward the address declared in the Atmel appliance agenda AVR121. I'm not abiding if there is abundant babble on the inputs to absolutely access the resolution, but it will not aching either. The raw A/D account is adapted to a voltage appliance a abstracted brace of offset/gain constants for anniversary input. These constants are acquired from the arrangement abstracts stored in the EEPROM.

To save power, all delays are implemented by active one or added beddy-bye instructions which account the CPU to abandoned until the abutting timer interrupt. The arrest abundance is 100 Hz, so anniversary beddy-bye pauses up to 10 mS.


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.