----- Original Message ----- From: "Olin Lathrop" To: Sent: Thursday, November 20, 2003 12:09 AM Subject: Re: [EE:] Sampling battery voltage with PIC ADC. > 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. Yes I do. Theese cells are in soldered pack for model airplanes. Dsiassembling is not an option. I have made a quickcharger that works marvelously but only for charging. The point here is to make a "better" one. > 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 have to charge the packs whole, that is why I need somewhat reliable scaling. > 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 know, but the NiMh's have a much smaller dropoff and should be charged on a flatline type termination as they would otherwise get a rather nasty overcharge during fastcharge. I am charging at 3C so this is a major issue. > 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. Yep. Serial dump will be there. It will be one of the firts parts of the software I paste in from one of my other projects. > > 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. The actual discharge resistor will be supplied externally by the user. Some need/want to test their 10 cell packs at 25 amps and that would mean dissapating a whopping 300 watts! My tiny shunt of 10 mOhm would actually need to be a 7watts resistor to handle that! Maby I should use a smaller one :) I will be integrating the current-measurements over time to calculate the mAh put into and drawn out of the pack. Kyrre Aalerud -- 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