On Thu, Mar 04, 2004 at 11:54:35AM -0500, Larry Bradley wrote: > Byron, I've made two 3-stage battery charges. One from discrete components, > and one microprocessor controlled. The first one I used on may sailboat for > a while, the second was just a test on the bench > > The easiest way to measure current is to put a sense resistor in the ground > return lead of the battery, and measure the voltage across that. > Depending > on how much current, you can make your own or buy a commercial one. I did > the latter, as the current involved is up to 100 amps. The current sense is > a 0.005 ohm resistor, giving 50 millivolts for a 100 amp current flow. > Since there is a measurable voltage drop across the rest of the -ve wiring > (from the series resistor to ground), I used an operational amplifier in > differential amplifier mode to get ride of this "common-mode" voltage. Well since nothing I have so far carries this much current I should do fine with my 1 ohm I already have. > > Measuring battery voltage was also done with a differential amp, measuring > directly across the battery terminals. > > These two signals (current and voltage) were sent to the A/D ports on a > micro. That's my game plan too. > > The charging voltage and current were controlled by using a > standard adjustable voltage regulator circuit driving the battery > (actually driving the field of the alternator, but the principle is the > same). The reference voltage for the regulator came from a D/A converter > driven by the micro. So you were charging from a engine with an alternator? Interesting. Of course Byron, it's on a boat! > > Initially, the system went into bulk mode. Since a normal lead-acid cell > should not be charged at a current more than 25% of it's amp-hour rating > (e.g. a 100 AH battery should be limited to 25 amps), the system monitored > the charging current, and adjusted the output of the DAC (and thus the > regulator) to hold the charging current constant. At the same time it > monitored the battery voltage, and when it reached the desired voltage > (14.4 volts), the output of the DAC was set to hold the voltage at this > value. The system remained in this absorption phase, monitoring the current > until > it got to C/50 (is what I used), when it switched to float mode. That's very similar to my game plan. I'm glad to see I'm on the right track. I didn't think to control current by adjusting the regulator. That can collapse both the current and voltage regulation into a single unit. But in my circuit I don't have to actively monitor and adjust regulation for either voltage or current. It's just set and forget, only monitoring when to switch to the next mode. I even got the linear regulator down to a simple switch for 13.8 or 14.4 by adding a set of diodes in the ground leg of a 12V regulator. 3 diodes gives 13.8 and 4 diodes gives 14.4. > > If I were doing this again (and I may build one next winter. I have a > commercial unit on my boat now), I'd use a PIC and use PWM rather than a > linear regulator. And build a switcher so as to add to the efficiency. Any low level PIC with PWM and a comparator should be able to easily drive a buck regulator simply by setting the duty cycle on the PWM, low pass filtering the pwm output, and then feeding that to the comparator along with the input signal (current or terminal voltage) of interest. Set the comparator to drive an output with the results. Tie that output to the switch on the switcher. The circuit should turn on while the voltage is to low, then self oscillate once the voltage reaches the regulation voltage. It should also be set and forget by picking which comparator, and setting the PWM voltage to the desired value. It's certainly worth bench testing the concept. This is a project that the 16F88 would be perfect for. It has the A/D, 2 comparators, PWM, and the nanowatt oscillator. If I could only get Mchip to send my samples... BAJ [Snipping the rest of my previous post] -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.