Kyrre Aalerud wrote: > For battery-voltage I was thinking of using a simple voltage divider > to get signal within 0-5v for ADC. > From my understanding I would need to "see" a voltage drop over time > of something like 10 mV for NiCD in order to correctly terminate the > fast-charge. For NiMH I should stop the charge when the voltage no > longer climbs within some set timeframe. So, I would need a > resolution of about 10 mV or better pr cell. If I simply use the 10 > bit ADC directly after scaling voltage down to 0-5v I have would give > 10.23 volts as the max cell-voltage. This would not be enough. I > need charger to work with 8 cells, but it would be cool to get it > working with 1-12 cells. A max cell-voltage of 2v should be used I > think as peak-voltage increases with charge-current. You don't want to put too many cells in series when charging. Ideally you want single cells or a single pre-manufactured pack. Even then 3 or 4 cells in series is the maximum practical. I did something like this for 400mAH NiHM 3-cell packs. The maximum voltage is just under 5V, so this was fed without scaling to the A/D input of a 16F876. I also adapted the firmware later to charge individual 1.8AH NiMH cells, although the charge time is longer since the current source was designed for the 400mAH packs. I'm working (although several layers in the background currently) on a new design specifically meant for 8 independent AA cells. Each cell has it's own switching current source controlled by the PIC. By the way, NiHM and NiCd cells both exhibit the voltage foldover just before full charge at high charging current. This is one of the criteria I used to stop the fast charge phase. I also found it very valuable to have a serial port that could dump data to a PC at regular intervals. I wrote a program to accept the serial port data and produce a comma separated values file, which can be easily plotted with a variety of software. > For the discharge current I was thinking of using a 0.01 Ohm shunt and > aopamp with only 20x gain. That would give me a range of 0-25 amps > at about 25 mA accuracy. I just used a fixed resistor enabled by a NPN transistor. The firmware then calculated the discharge current based on the known resistance, assumed C-E voltage drop, and the measured battery voltage. There isn't any need to get fancy with the discharge circuit. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics