bat charger atmega8
This is the schematic for the charger (PIC16F628A / osc int 4MHZ).If needed , one could add at pin RB7 a simple serial intreface to PC.This way you could watch the voltage of Acc. , time , and state of charger using a program like RealTem or Hyperterm .
**broken link removed**
The charger perform a self test (if batt not inserted) , then checks the number of acc. connected (1-4) and display this number for 2 seconds .Then starts the discharging process till 1V/element .When discharging has finished , it pauses for 35sec(cool down) then enter into
Slow charge mode (display indicates
S ) for 450sec . After that it triggers
High charge mode (display indicates
H ) . The algoritm of charging is somehow similar with Eric's Brouwer
http://myweb.absa.co.za/eric.brouwer/electronics.htm .
This charger performs a so called "reflex charging" or "Burp charging" , and it is the most advanced charger I had buid (so far) .I must say , I am very pleased of it.
It is simple , cheap ,robust and works quite well , even with old accumulators .It is suitable for
NiCd and Nimh batteries.
This is the latest hex file for PIC16F628A :
http://depositfiles.com/files/2651036 <- tested OK
For burning must use this settings :
IntOsc/ IO WDT=off
PWRT=off
MCLR=OFF
BODEN=ON CPD=Off
CP=off
**broken link removed**
The 7 segment digit display works like this:
- 0 for discharging
- I for battery
In
- S for
Slow Charging
- H for
High (Normal) charging
- P for Fail to detect
Peak
- F for
Finish charging , or Trickle reflex charging
- E -for
Error
- E A - for
Error on
Acc (battery removed while charging)
This is the schematic used for the 7segment display( I had 2 digits glued together so I made a separate PCB for this 2 digit display but only one connected to PIC )
**broken link removed**
The the switch (Ra5 to GND) could be omitted .It's function is not implemented yet.
The diode is a cheap 3A (n
ot a Schotky diode becouse you need at least 0.6V on it .)When Lm317 is turned off it still outputs 1.25V-1.3V .So :
1.25V-0.65V= 0.6V on out when Lm317 is turned off.In practice I obtained 0.75V (the Delta Sigma ADC has some influence ).
This voltage is used to detect if at least one element is attached .After you build the circuit , with PIC removed , you must check this voltage to be soure that everything working fine.The software need at least 0.92V to detect one element , so this voltage must be in range of 0.6V-0.92V .