Published:2012/10/25 21:16:00 Author:muriel | Keyword: Atmel , Solar Panel, Battery Charger | From:SeekIC
Batwatch is a simple monitor for a solar panel battery charger, using an Atmel ATtiny13V. It periodically measures the charge current and battery voltage, and shows them by blinking two LEDs. I built this circuit into the plug of a VW solar charger panel that is used to prevent a discharge of the battery when a car is not used for some time. A modern car contains a large amount of electronics, and a quiescent current of 40-50mA (about 1Ah per day!) is considered normal .
Every couple of seconds, the software samples the two analog inputs, calculates the charge current and battery voltage, and shows the voltage on the red LED and the charge current on the green LED. The voltage is shown in units of 0.1V using three decimal digits, and the current is shown in units of 10mA using two decimal digits. Each digit is represented by a number of short flashes corresponding to the value of the digit. A zero is represented by a single longer flash. When the charge current is below 10mA (after rounding) or negative, the green LED is not turned on at all. I use 4 times oversampling to get an 11-bit result, following the technique described in the Atmel application note AVR121. I'm not sure if there is enough noise on the inputs to actually increase the resolution, but it will not hurt either. The raw A/D reading is converted to a voltage using a separate pair of offset/gain constants for each input. These constants are derived from the calibration data stored in the EEPROM. To save power, all delays are implemented by executing one or more sleep instructions which cause the CPU to idle until the next timer interrupt. The interrupt frequency is 100 Hz, so each sleep pauses up to 10 mS.
Reprinted Url Of This Article:
http://www.seekic.com/circuit_diagram/Power_Supply_Circuit/Atmel_Solar_Panel_Battery_Charger.html
Print this Page | Comments | Reading(3)
Code: