Shop OBEX P1 Docs P2 Docs Learn Events
Monitoring (+) & (-) Current — Parallax Forums

Monitoring (+) & (-) Current

ArchiverArchiver Posts: 46,084
edited 2003-02-22 23:22 in General Discussion
I would like to monitor/log the charge and discharge current
from a 36-volt battery bank using the Stamp. I am planning
on sensing the current using a 150 amp/50 mv shunt [noparse][[/noparse]which
I have] as the expected range is roughly from (+) 150 amps
[noparse][[/noparse]discharge] to (-) 25 amps [noparse][[/noparse]charge]. I also thought of using
a AD623 instrumentation amplifier [noparse][[/noparse]which I also have]
because it has provision for a reference voltage input. I
assume that this could be used to offset the +/- input and
hence convert the (-)8 mv to (+)50 mv signal to a 0 to 5
volt input to an a/d converter and the Stamp. My limited
electronic engineering skills however draws a blank as to
the details of the circuitry involved. The shunt can be
placed anywhere between the 6-6 volt batteries in the bank
and it would be convenient if the battery bank could also
supply the power for the amplifier/a-d converter/Stamp. A
separate supply is not out of the question however. Any
help would be appreciated.

Cheers, David R. Erskine

Ps. Note that this is the second query from me pertaining to
monitoring voltage and current from a bank of batteries. I
felt that keeping the queries separate would help with any
subsequent discussion and future reference.

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-02-21 19:23
    Take a look at Dallas DS2760 1-wire device. It can measure your current.
    Chuck
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-22 18:35
    I'm using an AD620 for measuring shunt current (100 amp/50 mv shunt) from a
    12 battery. I have the shunt in the -ve lead, with the sensing wires going
    to the inputs of the AD620. Works like a charm. Although I am now using a
    MAX 186 A/D converter, which handles bipolar signals, I did play with the
    reference input to the AD620 to convert the signal to unipolar - it worked.
    You have to calibrate things, of course, to determine what A/D reading the
    Stamp has to use as zero.

    Powering the A/D and Stamp from the battery bank via a 5 V regulator should
    be no problem - just make sure you get one that can handle the battery
    voltage when under charge - probably 14.4 volts *3.

    Now as to your previous question - monitoring the voltage of each of the 6v
    batteries independently.

    You will want to use another instrument amp (or a good op amp in a
    differential configuration with carefully matched resistors - this is what
    I am using). It will have a gain of less than one (to convert the 6 v max
    battery voltage down to the range the A/D can handle), ot you can use a
    gain of one and follow the amp with a voltage divider to achieve the same
    effect.

    Suppose you are only monitoring the 1st 6v battery - you will want to
    connect the differential amp across the battery terminals (NOT one to the
    +ve terminal and one to ground) to eliminate the voltage drops associated
    with both the shunt and the rest of the wiring in the -ve lead of the
    battery bank.

    Now to monitor the 2nd battery, you would connect (via some switching
    arrangement - we'll talk about this later) the differential amp inputs to
    that battery. And so on, up to the 6th battery.

    Looks easy - you could use relays or a rotary switch. However, there is one
    problem - the "common mode" voltage.

    Take the case of measuring the last battery. The differential amp will see
    +36 volts on one input, and 30 volts on the other. The differential voltage
    is 6 volts, but the common mode voltage is 30 volts.

    Not only do you need to use an op amp that can handle those voltages on the
    input (the AD623 won't), but you need to have an op amp configuration that
    can handle a large common mode signal. If you used an instrumentation amp
    such as the AD623, it will have a common-mode rejection ratio specified -
    for example 80db. Thus a common mode signal will be reduced by a factor of
    10,000 - your 30 volt common mode signal will be reduced to 3 mv, which
    will appear as if your real input was 3 mv too high (or two low). Thus your
    6 volt measurement could be out by 3 mv.

    Now if you don't use an instrumentation amp, then you need to use an op amp
    in a differential configuration with four carefully matched resistors -
    either by using high precision resistors, or matching (for example) 1%
    metal film resistors. I doubt if it is possible to match them to the degree
    required.

    Now as to the switching - there are analog multiplexors available that can
    do this - for example, select from 4 different pairs of inputs. The problem
    again is going to be the high voltages - I don't know if there are any
    around the will work at 36 volts or so. You can also build analog switches
    using FETs, but you'll need quite a few.

    You have chosen a non-trivial project, with a few hurdle to overcome.

    Spend some time browsing the web sites of the IC companies such as Analog
    Devices, National, Maxim, Linear Technology, etc to see what they have and
    what the limitations of the devices are.

    I suggest you check your public library for a copy of "The Art of
    Electronics" by Horowitz and Hill. It is an excellent book that covers all
    of the topics involved here, plus a pile more.

    Have fun

    Larry


    At 02:10 PM 2/21/2003 -0500, you wrote:

    >I would like to monitor/log the charge and discharge current
    >from a 36-volt battery bank using the Stamp. I am planning
    >on sensing the current using a 150 amp/50 mv shunt [noparse][[/noparse]which
    >I have] as the expected range is roughly from (+) 150 amps
    >[noparse][[/noparse]discharge] to (-) 25 amps [noparse][[/noparse]charge]. I also thought of using
    >a AD623 instrumentation amplifier [noparse][[/noparse]which I also have]
    >because it has provision for a reference voltage input. I
    >assume that this could be used to offset the +/- input and
    >hence convert the (-)8 mv to (+)50 mv signal to a 0 to 5
    >volt input to an a/d converter and the Stamp. My limited
    >electronic engineering skills however draws a blank as to
    >the details of the circuitry involved. The shunt can be
    >placed anywhere between the 6-6 volt batteries in the bank
    >and it would be convenient if the battery bank could also
    >supply the power for the amplifier/a-d converter/Stamp. A
    >separate supply is not out of the question however. Any
    >help would be appreciated.
    >
    >Cheers, David R. Erskine
    >
    >Ps. Note that this is the second query from me pertaining to
    >monitoring voltage and current from a bank of batteries. I
    >felt that keeping the queries separate would help with any
    >subsequent discussion and future reference.
    >
    >
    >
    >
    >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
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-22 19:18
    >I would like to monitor/log the charge and discharge current
    >from a 36-volt battery bank using the Stamp. I am planning
    >on sensing the current using a 150 amp/50 mv shunt [noparse][[/noparse]which
    >I have] as the expected range is roughly from (+) 150 amps
    >[noparse][[/noparse]discharge] to (-) 25 amps [noparse][[/noparse]charge]. I also thought of using
    >a AD623 instrumentation amplifier [noparse][[/noparse]which I also have]
    >because it has provision for a reference voltage input. I
    >assume that this could be used to offset the +/- input and
    >hence convert the (-)8 mv to (+)50 mv signal to a 0 to 5
    >volt input to an a/d converter and the Stamp. My limited
    >electronic engineering skills however draws a blank as to
    >the details of the circuitry involved. The shunt can be
    >placed anywhere between the 6-6 volt batteries in the bank
    >and it would be convenient if the battery bank could also
    >supply the power for the amplifier/a-d converter/Stamp. A
    >separate supply is not out of the question however. Any
    >help would be appreciated.
    >
    >Cheers, David R. Erskine

    Hi David,

    Part 2. One way to do this would be to put the shunt in the ground
    side of the battery stack, and then monitor its voltage directly with
    your ADC. This would give only about 2% full scale resolution.

    ground ---/\/\---o---6V+--o---6V+-- ....
    shunt | |
    |
    `--- to ADC input

    Better resolution would require an amplifier between the shunt and
    the ADC. It would get complicated, because you want to measure both
    charge and discharge current.

    There are chips meant for charge/discharge monitoring, that have the
    amplifier built in, for example, the MAX471/MAX472 (the '471 has the
    shunt built in, while the '472 uses an external shunt) To use those
    with the Stamp, you would have to place the shunt between the first
    two batteries, so it would operate at ~6 volts. One nice thing
    "sign" output that indicates which direction the current is flowing,
    which you would connect to a Stamp input so you know if the battery
    is charging or discharging. I have a short writeup on using the
    MAXxxx at this URL. http://www.emesystems.com/BS2rct.htm#B_current.
    It talks about using RCtime as the analog to digital converter with
    the chip, but it works fine with a resistor into a standard ADC.


    Another chip to look at is the new ZXCT1009 from Zetex. (Digikey).
    It is a three-terminal current monitor for resistive shunts. You
    would need two of them, one for charging, one for discharging.

    -- regards,
    Tracy Allen
    electronically monitored ecosystems
    mailto:tracy@e...
    http://www.emesystems.com
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-22 23:22
    Could the Amploc Hall Effect Current sensor work for this? It can be fed into a
    ADC and it has an offset where 0 amps ouputs 1/2 the supply voltage.

    http://www.ampsense.com/AMP200.html

    Hank Hagquist
Sign In or Register to comment.