Smart Battery Charger
Archiver
Posts: 46,084
Has anyone used a stamp to build a smart battery charger? I would like to
build a smart charger for my Motor home that could charge deep cycle
batteries at constant current of 20-30 amps and also be able to charge gel
cells with a constant voltage at 2 amps or less.
I have already worked out the voltage monitoring using a Analog to Digital
Converter and it's calibrated to measure 0 to 20 volts (8 bit accuracy).
Soon I'll add another ADC to measure the high current and another to measure
the lower current for gell cells. I'll be using a 50amp 50mv Shunt to
measure the high currents.
Originally I had hoped to use PWM to achieve the correct voltages and to
limit current. Being a novice tinkerer I'm not sure if I can make this
happen and if I did would I be generating a lot of electrical noise, EMF,
RF, etc. Any opinions on this subject would be greatly appreciated.
Bucky
build a smart charger for my Motor home that could charge deep cycle
batteries at constant current of 20-30 amps and also be able to charge gel
cells with a constant voltage at 2 amps or less.
I have already worked out the voltage monitoring using a Analog to Digital
Converter and it's calibrated to measure 0 to 20 volts (8 bit accuracy).
Soon I'll add another ADC to measure the high current and another to measure
the lower current for gell cells. I'll be using a 50amp 50mv Shunt to
measure the high currents.
Originally I had hoped to use PWM to achieve the correct voltages and to
limit current. Being a novice tinkerer I'm not sure if I can make this
happen and if I did would I be generating a lot of electrical noise, EMF,
RF, etc. Any opinions on this subject would be greatly appreciated.
Bucky
Comments
charge while the battery is charging is not a trivial thing.
Lee
Original Message
From: "bucky" <buckys@a...>
To: <basicstamps@yahoogroups.com>
Sent: Tuesday, January 21, 2003 8:07 PM
Subject: [noparse][[/noparse]basicstamps] Smart Battery Charger
> Has anyone used a stamp to build a smart battery charger? I would like to
> build a smart charger for my Motor home that could charge deep cycle
> batteries at constant current of 20-30 amps and also be able to charge gel
> cells with a constant voltage at 2 amps or less.
>
> I have already worked out the voltage monitoring using a Analog to Digital
> Converter and it's calibrated to measure 0 to 20 volts (8 bit accuracy).
> Soon I'll add another ADC to measure the high current and another to
measure
> the lower current for gell cells. I'll be using a 50amp 50mv Shunt to
> measure the high currents.
>
> Originally I had hoped to use PWM to achieve the correct voltages and to
> limit current. Being a novice tinkerer I'm not sure if I can make this
> happen and if I did would I be generating a lot of electrical noise, EMF,
> RF, etc. Any opinions on this subject would be greatly appreciated.
>
> Bucky
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
toward determining how long a battery should last. Didn't find any reference
to charging. But you make a good point and that's exactly why I would like
to be able "program" the charger to behave anyway I want. The other benefit
is I can log the charge curve to maintain a history for each battery (or
bank of batteries).
Bucky
Original Message
From: Lee Mairs (SAG) [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=UF7XTCnhX1eKWyO2rYy62gQ3faBFYft_DNUH0e6yC_g9sCcNepnoVZ3BNehrqPO08PesIkGuB1mfVjg]lmairs@s...[/url
Sent: Tuesday, January 21, 2003 10:22 PM
To: basicstamps@yahoogroups.com
Subject: Re: [noparse][[/noparse]basicstamps] Smart Battery Charger
You need to read up on Peukert's equations. Measuring the state of the
charge while the battery is charging is not a trivial thing.
Lee
<snip>
never built the real thing for my sailboat.
In my case, I didn't use PWM to control the field current - I probably
would look into it if I were doing it again. I used a linear regulator. I
did some measuring, and found that the field current was 5 amps max for my
alternator. I used a NPN power transistor (I forget which one) and a fair
sized heat sink.
I tried two approaches.
The first approach was to actually use the Stamp as the control element in
a feedback circuit - i.e. it would measure the battery voltage (or current,
depending on which state of charging I was in), then using a D/A converter,
drive the power transistor directly.
This worked, but the problem was that the Stamp isn't really fast enough to
do this properly - the response time to rapid changes in the load was poor.
But I think for charging a battery, it would be OK.
The second approach was to build a conventional linear regulator, but use
the DAC output as the reference voltage for the regulator. The Stamp was
now freed from having to act in the feedback loop - it merely provided the
reference voltage. If the load changed, the regulator handled it on its own.
The DAC reference voltage was adjusted by the Stamp to handle the various
states of charging - bulk, where you charge at a constant current of about
25% of the rated amp-hour capacity until the voltage reaches around 14.4
volts, then constant voltage at this voltage until the current drops to
around 2% of the rated capacity, then float at around 13.2 volts.
This worked like a charm. The only tricky part was the linear regulator had
to be able to look at the voltage or the current, depending on what I was
regulating. But that just a few more components.
Larry
At 08:07 PM 1/21/2003 -0500, you wrote:
>Has anyone used a stamp to build a smart battery charger? I would like to
>build a smart charger for my Motor home that could charge deep cycle
>batteries at constant current of 20-30 amps and also be able to charge gel
>cells with a constant voltage at 2 amps or less.
>
>I have already worked out the voltage monitoring using a Analog to Digital
>Converter and it's calibrated to measure 0 to 20 volts (8 bit accuracy).
>Soon I'll add another ADC to measure the high current and another to measure
>the lower current for gell cells. I'll be using a 50amp 50mv Shunt to
>measure the high currents.
>
>Originally I had hoped to use PWM to achieve the correct voltages and to
>limit current. Being a novice tinkerer I'm not sure if I can make this
>happen and if I did would I be generating a lot of electrical noise, EMF,
>RF, etc. Any opinions on this subject would be greatly appreciated.
>
>Bucky
>
>
>To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the Subject and
>Body of the message will be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Larry Bradley
Orleans (Ottawa), Ontario, CANADA
I didn't say in my message but I first need to build or buy a charger for
use when AC is available (when plugged in or when the generator is running).
Controlling the alternator will be a later project. Controlling the
alternator should be easier since like you stated the field current is not
that high.
I have also considered what would happen if I controlled the INPUT side of a
large transformer instead of controlling the OUTPUT. I got this idea from a
website where this guy was turning microwave oven transformers into ARC
welders.
I really do need to control alternator because I have already discovered if
my bank of 2 batteries has been drain low enough and I start the vehicle the
current rates are too high for the size of wire installed at the factory and
probably isn't very good for the alternator either. A thermal sensor on the
alternator would also be a good idea.
If anyone knows of some easy to understand switching power supply circuits
it may be just what I need to get started.
Thanks,
Bucky
Original Message
From: Larry Bradley [noparse]/noparse]mailto:[url=http://forums.parallaxinc.com/group/basicstamps/post?postID=TmoN9zw79HZ69bwvA11rtxCOPzK-2pl51Qkp_JubfHydd09w-0BLjU1GAlvNCSGh21vmy-mpNw]lhbradley@i...[/url
Sent: Wednesday, January 22, 2003 12:23 AM
To: basicstamps@yahoogroups.com
Subject: Re: [noparse][[/noparse]basicstamps] Smart Battery Charger
I did some work in this area a couple of years ago - just breadboarded it,
never built the real thing for my sailboat.
In my case, I didn't use PWM to control the field current - I probably
would look into it if I were doing it again. I used a linear regulator. I
did some measuring, and found that the field current was 5 amps max for my
alternator. I used a NPN power transistor (I forget which one) and a fair
sized heat sink.
I tried two approaches.
The first approach was to actually use the Stamp as the control element in
a feedback circuit - i.e. it would measure the battery voltage (or current,
depending on which state of charging I was in), then using a D/A converter,
drive the power transistor directly.
This worked, but the problem was that the Stamp isn't really fast enough to
do this properly - the response time to rapid changes in the load was poor.
But I think for charging a battery, it would be OK.
The second approach was to build a conventional linear regulator, but use
the DAC output as the reference voltage for the regulator. The Stamp was
now freed from having to act in the feedback loop - it merely provided the
reference voltage. If the load changed, the regulator handled it on its own.
The DAC reference voltage was adjusted by the Stamp to handle the various
states of charging - bulk, where you charge at a constant current of about
25% of the rated amp-hour capacity until the voltage reaches around 14.4
volts, then constant voltage at this voltage until the current drops to
around 2% of the rated capacity, then float at around 13.2 volts.
This worked like a charm. The only tricky part was the linear regulator had
to be able to look at the voltage or the current, depending on what I was
regulating. But that just a few more components.
Larry
At 08:07 PM 1/21/2003 -0500, you wrote:
>Has anyone used a stamp to build a smart battery charger? I would like to
>build a smart charger for my Motor home that could charge deep cycle
>batteries at constant current of 20-30 amps and also be able to charge gel
>cells with a constant voltage at 2 amps or less.
>
>I have already worked out the voltage monitoring using a Analog to Digital
>Converter and it's calibrated to measure 0 to 20 volts (8 bit accuracy).
>Soon I'll add another ADC to measure the high current and another to
measure
>the lower current for gell cells. I'll be using a 50amp 50mv Shunt to
>measure the high currents.
>
>Originally I had hoped to use PWM to achieve the correct voltages and to
>limit current. Being a novice tinkerer I'm not sure if I can make this
>happen and if I did would I be generating a lot of electrical noise, EMF,
>RF, etc. Any opinions on this subject would be greatly appreciated.
>
>Bucky
>
>
>To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
>from the same email address that you subscribed. Text in the Subject and
>Body of the message will be ignored.
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Larry Bradley
Orleans (Ottawa), Ontario, CANADA
To UNSUBSCRIBE, just send mail to:
basicstamps-unsubscribe@yahoogroups.com
from the same email address that you subscribed. Text in the Subject and
Body of the message will be ignored.
Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
I've built pulse chargers that were dirt simple. All that I used were a
step down transformer with a bridge rectifier (ground the negative),
large caps, one or more NFETs and thermistors to sense FET temps.
Common ground.
Sometimes simple is best.
You can build one in an afternoon.
The DC out can be 1.5 to 3 times the battery voltage. This is not real
critical.
The battery is connected between the NFET and Pos of the power supply.
Start with a PULSOUT of 1 (20,000 to 40,000 iterations) and check temps
(for whatever Stamp you are using make sure you are checking temps every
5 to 10 seconds.
If the NFET(s) are still running cool - increment the PULSOUT to 2 (and
so on).
When the NFET exceeds the temp you want it to run at - decrease the
PULSOUT
Once the Stamp begins to modulate the PULSOUT, you will note that as the
battery charges the PULSOUT will increase. You should assign some
arbitrary maximum PULSOUT.
If you want to control current use more than one NFET and turn them on
or off as needed. Should you like to do the fancy charge algorithms
employed by charger folks.
If you want to sense battery voltage use a voltage divider that insures
you do not overload a RCTIME circuit with the cap to ground. Calibrate
this circuit with an adjustable power supply to know for whatever
voltage is present what readings RCTIME returns.
From time to time check the battery voltage. When it is where you want
it reduce the PULSOUT command for an effective trickle charge. Right
offhand I don't recall but there are safe currents to continuously
charge a battery with and it will not overcharge. You'll have to do
some hunting on this to determine what is safe for the batts that you
have.
This is a crude pulse charger, but they work like a charm. You can have
it up and running shortly and then take your time to refine it with
additional hardware and program mods.
bucky wrote:
>
> Has anyone used a stamp to build a smart battery charger? I would like to
> build a smart charger for my Motor home that could charge deep cycle
> batteries at constant current of 20-30 amps and also be able to charge gel
> cells with a constant voltage at 2 amps or less.
>
> I have already worked out the voltage monitoring using a Analog to Digital
> Converter and it's calibrated to measure 0 to 20 volts (8 bit accuracy).
> Soon I'll add another ADC to measure the high current and another to measure
> the lower current for gell cells. I'll be using a 50amp 50mv Shunt to
> measure the high currents.
>
> Originally I had hoped to use PWM to achieve the correct voltages and to
> limit current. Being a novice tinkerer I'm not sure if I can make this
> happen and if I did would I be generating a lot of electrical noise, EMF,
> RF, etc. Any opinions on this subject would be greatly appreciated.
>
> Bucky
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and Body
of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
about making a regulated power supply by controlling the primary of a
transformer - I don't know exactly when.
Switching power supplies are simple in theory, but I gather are a quite
tricky in practise - I've never tried. I bought a commercial (and
expensive, unfortunately) 20 amp three stage charger for my sailboat.
Have fun.
At 06:42 PM 1/22/2003 -0500, you wrote:
>Larry,
>
>I didn't say in my message but I first need to build or buy a charger for
>use when AC is available (when plugged in or when the generator is running).
>Controlling the alternator will be a later project. Controlling the
>alternator should be easier since like you stated the field current is not
>that high.
>
>I have also considered what would happen if I controlled the INPUT side of a
>large transformer instead of controlling the OUTPUT. I got this idea from a
>website where this guy was turning microwave oven transformers into ARC
>welders.
>
>I really do need to control alternator because I have already discovered if
>my bank of 2 batteries has been drain low enough and I start the vehicle the
>current rates are too high for the size of wire installed at the factory and
>probably isn't very good for the alternator either. A thermal sensor on the
>alternator would also be a good idea.
>
>If anyone knows of some easy to understand switching power supply circuits
>it may be just what I need to get started.
>
>Thanks,
>Bucky
>
Larry Bradley
Orleans (Ottawa), Ontario, CANADA
power supply. They seem to be the Achilles heel in circuit design
anyway.
Every time the rectified DC swings over battery voltage, it will charge.
If your FET(s) are heating up too quickly introduce dummy PULSOUTS to an
unused I/O pin(s) or use a PAUSE command.
Attach a thermistor to one of FET(s) provided they are all the same type
for temperature sampling (RCTIME cap to ground). You can drive the
FET(s) to an absolute temp or if you have a thermistor to monitor
ambient air, you can drive them to so many degrees above ambient.
bucky wrote:
>
> Has anyone used a stamp to build a smart battery charger? I would like to
> build a smart charger for my Motor home that could charge deep cycle
> batteries at constant current of 20-30 amps and also be able to charge gel
> cells with a constant voltage at 2 amps or less.
>
> I have already worked out the voltage monitoring using a Analog to Digital
> Converter and it's calibrated to measure 0 to 20 volts (8 bit accuracy).
> Soon I'll add another ADC to measure the high current and another to measure
> the lower current for gell cells. I'll be using a 50amp 50mv Shunt to
> measure the high currents.
>
> Originally I had hoped to use PWM to achieve the correct voltages and to
> limit current. Being a novice tinkerer I'm not sure if I can make this
> happen and if I did would I be generating a lot of electrical noise, EMF,
> RF, etc. Any opinions on this subject would be greatly appreciated.
>
> Bucky
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed. Text in the Subject and Body
of the message will be ignored.
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/