Sealed Lead-Acid Battery Charger

goom

Senior Member
I am exploring the possibility of a Picaxe controlled 12V sealed lead-acid (SLA) battery charger, so need to provide a regulated voltage to a low impedance load. The scheme suggested in a previous thread ("Driving low impedance with PWMOUT") seems to employ the power transistor (MOSFET or bipolar) in linear mode.
Would it be possible/better to use a variable duty cycle PWM input to the MOSFET which would then avoid the power which needed to be dissipated since it would cycle between fully on (low resistance) and fully off (infinite resistance).
Clearly there would need to be some smoothing of the ADC feedback to the Picaxe, but I suppose that this could be a simple resistor between the MOSFET drain and ADC input and a capacitor from ADC input to ground.
What about the smoothing of the main power to the battery being charged? Perhaps not necessary at all with a PWM frequency of perhaps 5kHz?. I notice that an inductor is commonly used for such smoothing (Buck converter?), but wouldn't a simple capacitor to ground achieve the same?
My proposed scheme is:
1. Set PWM duty cycle to 0 initially
2. Let everything settle for a few seconds
3. Measure the output voltage (suitable divided to ensure <5V)
4. Increment duty cycle by +1 or -1 if measured voltage lower or higher than desired (14.5V?)
5. Pause for perhaps 100ms to let things settle again
6. Return to step 1

To terminate (or continue trickle charging at 13.6V) when the battery is fully charged, I propose setting and holding PWM to 0 once every minute or so to measure the battery voltage for comparison to a 14.1V threshold.

I would appreciate any opinions as to whether my thinking is basically sound or not.
 

wapo54001

Senior Member
You are following my original logic, but read wilf_nv's posts in that thread. I have not tried his ideas yet (too busy during the holidays) but I believe his approach to be superior. Look at his schematic and his code.
 

thelabwiz

Senior Member
Remember that SLA batteries (and the newer AGM type) need temperature compensation to get the end-of-charge voltage. The ballpark value is 2.4 volts/cell at room temperature, but you should look at the battery spec sheets to get the proper values.
The maximum charge current should be limited to C/10 unless the battery is specifically designed for a higher charge rate.
Here are a couple of references on SLA charging:
<A href='http://www.powerstream.com/SLA.htm' Target=_Blank>External Web Link</a> http://www.powerstream.com/SLA.htm

<A href='http://www.ibexmfg.com/appnotes/app06.htm' Target=_Blank>External Web Link</a> http://www.ibexmfg.com/appnotes/app06.htm

John
 

goom

Senior Member
wapo54001, thanks for the response.
I did read wilf_nv's post, but I believe that my idea is somewhat different.
His scheme seems to be to keep the power transistor in linear mode. In other words, it acts as resistor to ground, dropping the excess voltage across it. This excess voltage will heat up the transistor which is probably not an issue in your case since current seems to be 100mA at most. In my case, the current could be 2A, so heating could be a real issue.
My idea is to use a constant stream of variable width modulated pulses. The feed from the Picaxe would be directly to the MOSFET gate (or through a low value resistor of 330ohm for protection), and no 0.33u smoothing capacitor. Hence, the PWM pulse train will be constantly switching the MOSFET fully on and off (in theory), so no (in theory) heating.
I have used this technique with motor speed controllers drawing 1.5A through an IRF530 MOSFET which can handle up yo 14A and has an on resistance of &lt;0.16ohm. The motors can be controlled from dead stop to full speed quite smoothly by changing the PWM duty cycle from 0 to 100%. The motors do not care about the fact that the applied voltage is actually a square wave. Also, there is no feedback to the Picaxe which will be required for the charger. I'm not so sure whether a SLA battery would care about the square wave (at 5kHz), hence the possibility of a smoothing capacitor.

John, thanks for the advise and links. Since I only intend to charge at a slow rate (C/10) and indoors, I would hope that the temperature effect will not be a concern. I may need to add current detection and limiting to prevent too much initial current with a rather flat battery. I could also use it to schedule a trickle charge once the battery has reached full nearly charge (14.1V?) just to &quot;top it off&quot;.
A single supply, rail-to-rail differential op. amp (AD623?) measuring across, say, a 1ohm resistor and a 2:1 gain could provide the input to the Picaxe ADC for up to 2A.

I'm sure that I am not the first to look into a microcontrolled SLA charger, so I really need a sanity check before proceeding.
 

Dippy

Moderator
Desulfator has provided a lot of information on this forum re charging and restoring batteries. He also included info on battery types vs charging methods.
Its worth a search on Desulfator .
 

goom

Senior Member
Yes, thank you, I have read desulfator's posts. I know that I can program a suitable charging algorithm, especially since my demands are not too stringent (overnight charging at C/10, predictable ambient temperature and no major issue if I end up with perhaps only 95% capacity).
My concern is whether the idea of producing the reqired variable charging voltage via a 5kHz PWM signal directly driving a logic level MOSFET with a smoothing capacitor on the power side will be suitable at up to 2A.

Anyone with any experience of such a scheme?

Kevin
 

wilf_nv

Senior Member
The linear mosfet circuit was designed to simulate a variable resistance that drives the low impedance input of a meter.

The mosfet together with the R/C forms an integrator with analog memory build-in so that the slow refresh can be used. For fun, I mentioned that I also tested the circuit with a motor to show how robust the circuit is but I would not recommend it for that application.

On-off PWM is a more efficient method for motor speed control.

 

Dippy

Moderator
goom, can you post your proposed circuit?
It might be easier for people to follow a picture.

I seem to be under the impression you want to use an FET to switch square lumps of current directly into a fat capacitor and then on to a battery?? Are you hoping that the capacitor will smooth the pulses and behave like a variable voltage supply?
 

goom

Senior Member
Yes Dippy, your interpretation is just what I am trying to do.
I have a schematic, but it is in Visio, and I have no place to post it, and no ability to draw &quot;ASCII Art&quot;.
The area where I have questions is really quite straightforward.
The Picaxe PWM out is connected to the gate of an IRF530 logic level N-channel MOSFET (possibly through a 330 ohm protection resistor). The positive side of the battery is connected to +18V DC through a 0.5 ohm current sense resistor. The negative side of the battery is connected to the MOSFET drain which is also connected to a large capacitor. The other side of the capacitor, and the MOSFET source is commected to ground.
A differential op amp (AD623) amplifies (4x)the voltage drop across the current sense resitor and feeds it to a Picaxe ADC pin. Another ADC623 measures the voltage across the battery and, suitably divided 1/3), feeds it to another Picaxe ADC input. The program will then modulate the PWM duty based on the current and/or voltage (and possibly time).
It would certainly make life a lot easier if we could post graphics on this forum.

Kevin
 

Jeremy Leach

Senior Member
For ASCII art <A href='http://www.tech-chat.de/download.html' Target=_Blank>External Web Link</a>. It's really good once you get the hang of it, and free !
 

Dippy

Moderator
Ah, to be honest I thought the FET was going to be a high-side switch but yours is a low-sided switch.

If I've understood it correctly I cannot see what the capacitor will achieve? I really don't know what will happen in that arrangement. Apart from switching the charging current through the battery, the cap looks like it'll just charge/discharge with the pwm dumping extra current through the FET - that's if I've understood it which I probably haven't.

I think tinypic(??) is a place for posting piccies. Others can advise you better.

I must admit I thought desulfator included a link to his website to show a schematic of his pulse charger/restorer, which may save premature grey hairs.
 

goom

Senior Member
I have been assuming that the capacitor will smooth the pulsating voltage to a steady voltage (more or less). This seems to work quite well for transformer based power supplies. Admittedly the output from the rectifier is a 1/2 sine wave, but only at 50/60 Hz. At 5kHz I would have thought that the capacitor would be much more effective.
I suppose that, with a 50% duty cycle, the capacitor would charge during the 0.1ms high and discharge during the 0.1ms low.
By my calculations, assuming:
2A current
4700uF capacitor
5kHz pulses
The output voltage would ripple be +/- .043v.
Am I missing something fundamental here?
I was not planning to pulse charge. Maybe something to look into.
I could use a high side P-channel MOSFET switch (e.g. IRF9530) but the smoothing issue would be the same. It would save one differential op amp however since the negative battery terminal could be connected to ground and the (divided) positive battery voltage could feed directly to the ADC input.
I'll review desulfator's posts in more detail.
Thanks for the comments so far. This forum is just full of interesting questions and informative responses. It has taught me a lot.

Kevin

 

BeanieBots

Moderator
This sounds like a buck converter without the inductor.
If yes, what will limit the on current?
Without seeing a diagram I can't be 100% sure but I'm picturing a circuit with only the FET's Ron and your current sense resistor providing current limit.
In summary, I don't think it will work without an inductor but please post a diagram.
 

goom

Senior Member
I managed to post the schematic on tinypics. Never done it before, but was actually quite straightforward (except that it didn't like my JPEG, so had to use a bitmap). Here is the link:
http://i10.tinypic.com/2d7deoi.jpg

In my simplistic way of thinking, the current will be limited by the fact that the MOSFET is only on part of the time. When the MOSFET is off, current will flow through the battery into the capacitor. When on the capacitor discharges through the MOSFET and current sense resistor to ground. At equilibrium the in and out currents will be equal. If the current (or voltage) is too high, the Picaxe will reduce the duty cycle which reduces the discharge current, hence the voltage on the capacitor will rise. This reduces the voltage across the battery, and hence the current will fall until a new equilibrium is achieved.
Instantaneous current through the battery when the MOSFET is on will be limited by the power supply impedance, the battery internal resistance, the ESR of the capacitor(inversely)the MOSFET on resistance and the current sense resistor. With the MOSFET off, current will be limited by the power supply impedance, the battery internal resistance and the ESR of the capacitor.
When the MOSFET is off
This all makes perfect sense to me, but is there a flaw in my logic?

Kevin
 

wilf_nv

Senior Member
Hi Kevin,

Your circuit would be as lossy as a linear regulator.

Firstly, the IRF350 mosfet is unsuitable for 5V gate drive.

Even if you used a logic gate mosfet like a IRLZ14, the mosfet Rds(on) and current sensing resistor would have to dissipate most of the heat.

For example, attempting to conduct 1A through the mosfet, you would drop 1.8V across the resistor. That would leave just 3.2V between source and gate, so the mosfet is barely turned on and would operate in the linear region.

As a general principle, when switching a mosfet on and off with low duty cycle to control current, remember that Rds(on) heating is a function of I*I*R.

For example, a mosfet with Rds(on)=0.2 ohm carrying an average continuous drain current of 2A dissipates 2A*2A*0.2ohm=.8W.

That same mosfet with Rds(on)=0.2ohm, switched at 10% duty cycle, carrying the same average 2A drain current using 20A pulses, would have an internal power dissipation of 20A*20A*0.2ohm*10%=8W.

In your circuit, the battery is charged when the mosfet turns on applying 18V to the battery while simultaneously the capacitor is discharged through the mosfet. When the mosfet is turned off, the charging current tapers off exponentially as voltage across the battery drops to 13V and the capacitor charges up to 5V, the difference between the battery and the 18V source. The energy in the cap is about 60mJ.

With an average 2A input current equal to 2A output current there is no energy conversion from the 18V source to the 14V battery load in this process, which means the efficiency of the circuit is at best 14V/18V=78%.
The 8W of losses would be dissipated in the source impedance, battery, mosfet, capacitor ESR and wiring.

The problem is that capacitor is connected in parallel with the mosfet and input current continues to flow after the mosfet turns off. The energy stored in the capacitor circuit that way does not convert input to output power.


In contrast, a buck converter uses an inductor in series with the load which converts 18V at low input current to 14V at higher output current with a typical efficiency of 95%.

The buck converter output current is greater than the input current because the output current is the sum of the input current plus the current stored in the inductor which continues to flow through the load after the mosfet and input current is turned off.



Edited by - wilf_nv on 02/01/2007 07:25:20
 

BeanieBots

Moderator
Nice explanation wilf_nv.
In breif, I would NOT suggest the posted circuit for the reasons given by wilf_nv. For the sake of an inductor and a few descretes, it could be easily made into a proper buck converter.
 

moxhamj

New Member
There are so many commercial chargers out there for as low as $20Au that I'm not sure it is worth the effort of building one.
Having said that, and having played with lots of mosfets (my favourite is the BUK555), I'd probably build a charger using two relays - one turning on a high wattage bulk charge resistor, and then switching to a higher value resistor for trickle charge. No current sensing needed, and the volts can be sensed with a 200k/100k divider.
Quick tally - 78L05,0.1,33uF,08M,2x2k7, 2x547, 2x 12V relays, 2x914 back emf diodes, 100k 1% and 200k 1%, and two dropping resistors. Plus a temperature sensor for perfect control.




 

BeanieBots

Moderator
To a large degree, I agree with Dr_Acula.
However, and here's the controversial bit that keeps these battery threads going on forever, comercial lead acid battery chargers charge to voltages that are not always in the best interest of the battery.

With a home made charger, be it right or wrong, at least it is YOUR OWN charging algorythm that kills the battery.
I personally, would never use a commercial lead acid charger for float charging except in an emergency. Even then, I'd fit a diode in series to drop the 14v ish float charge down to something less harmfull if it is to be left on for any length of time.
 

goom

Senior Member
Once again, thanks for the imput.
I believe that the IRF530 will switch fully on at 5V, but the reduction due to the drop across the current sense resistor is a great observation. I could reduce the size of the resistor to, say, 0.1 ohm and then amplify the signal more or use a transistor to switch with the full supply voltage. I decided to modify to a high side switch (P-channel MOSFET) instead.
If I stick to a 12V SLA battery, the minimum charging voltage would need to be about 12V, so at 2A the voltage drop across the MOSFET would need to be (with a 0.5 ohm sense resistor):
18.5 - 12 + 0.5 x 2 = 6.2V
And the resistor power dissipation would be:
0.5 x 2 x 2 = 2W
The duty cycle would be:
12 / (18.5 - 0.5 x 2) = 0.69
Hence the on current is:
2 / 0.69 = 2.9A
The power dissipation in the MOSFET (with Rds = 0.2ohm) is given by:
2.9 x 2.9 x 0.2 x 0.69 = 1.2W
Probably OK without a heat sink ?
A linear regulator would need to dissipate about 12W.
I've redesigned using a high side switch and Buck converter. Schematic posted at:
http://i14.tinypic.com/2w5kpzr.jpg
By my calculations I need a 10.5mH (milli-Henry) inductor for 4kHz frequency. This is clearly (to me anyway) impractically large. I could increase the frequency, but then the PWM granularity would start to become an issue, and may get into problems with turning on/off the MOSFET quickly enough. This is getting way more complicated than I expected.
Could I get away with just the capacitor (no inductor) with the re-arranged circuit? Wouldn't it absorb and give up current in the same way that the inductor does?
A commercial charger certainly makes practical sense, but where's the fun in that. This is more of a learning experience than a dire need. Similarly, the resistor/relay idea is probably very practical, simple and cheap, but that's no fun either. Many thanks for the suggestions though.

Kevin
 

moxhamj

New Member
I'll let others comment on the circuit as I'm not sure the diodes are in the right place, but re capacitors absorbing and giving up energy - yes they do but they also waste energy in the process.
Consider a capacitor charging via a resistor from an ideal voltage source (ie, infinite amps ). When the capacitor is fully discharged, lots of power is being wasted in the resistor as the capacitor charges up. No problem - leave out the resistor?! But then the resistance of the wire comes into play (maybe 0.1 ohms) and so power is still being wasted.
Power is also wasted discharging capacitors. Consider connecting two identical capacitors in parallel - one charged and one uncharged. Intuitively one might expect them to both come to 1/2 volts, but the real circuit has a resistor between the two (the wire on the capacitor) which dissipates energy.
If you don't want to waste power an inductor is needed - the classic buck circuit. High frequency designs need high frequency diodes and switchers. You can buy these or salvage all the bits out of old PC power supplies. Or you can build a low frequency buck converter using the secondary of a 9V 20W transformer as the inductor and a 4001 diode which will run with pulses of 7ms or so - just right for picaxe control, and good for learning on as the waveforms are slow enough to display on a PC CRO.
 

BeanieBots

Moderator
Goom, you seem to have missed a fundamental point about how buck converters work. Without the inductor, the volt drop X current power must be dissipated somewhere. All your variations simply move that dissipation to different components rather than avoid wasting it in the first place.

Have a look at this:-
http://powerelectronics.com/mag/606PET25.pdf

It will explain things better than I can.
As suggested by Dr_Acula, your diodes are in the wrong place.
 

wilf_nv

Senior Member
The buck converter circuit you posted has a few problems:

The gate of the P-MOSFET must be driven with voltage signal swinging 0V to -10V with respect to the source ie 18.5V to 8.5V with repect to ground. This requires an additional high side switch or NPN transistor to level shift the PICAXE logic level to the high voltage gate drive level.

The current measurement should be the current that flows through the inductor.

The second diode you connected in series with the inductor that prevents reverse current from the battery to the 18V supply, should be installed in series with the drain of the mosfet as the current is lower and the losses are reduced.

The PICAXE is not fast enough to respond to load transients so the battery must not be disconnected when the circuit is operating. The PWM must be tuned to the LRC of the circuit to provide stability and reasonable efficiency. Be carefull to avoid saturation of the inductor.

Consider adding an analog feedback loop to limit the maximum output voltage and current.

wilf

 

goom

Senior Member
Thanks again for the comments.
Without a 'scope, I really don't see how I can effectively &quot;tune&quot; the Buck converter. So, to heck with efficiency, I think that I'll go the linear approach as suggested in a prior post. I'll just use a big old darlington power transistor with heat sink and use the Picaxe to modulate the base current based on current and voltage feedback. The software should be quite straightforward. Perhaps I'll re-complicate things by interfacing with an LCD display to show volts, amps, time? and status messages.

Kevin
 
Top