Maker Pro
Maker Pro

Op amp for car battery charge indicator?

D

Dave

Jan 1, 1970
0
I'd like to build a circuit to indicate that a car battery is charging (or not),
by the following means...

There is a small volt drop across the large conductor (about 8" long) that
connects the -ve battery to chassis, when current flows. This voltage is +/-
depending on direction of current flow in the cable. I've measured it with a dvm
and it goes from 2-3 to 15mV (lights off/on etc). The change of sign is clearly
seen when the engine starts and the battery begins charging.

Would it be a feasable thing to use this voltage as the differential input to
say a 741 op amp with the output driving a two colour LED? So I could see one
colour for charge and the other for discharge. If this -is- feasible I'd like to
drive the circuit from the battery itself (don't want a separate pp9 supply of
anything). As this would be the same single ended supply, but diff input, would
the idea still work?


Maybe there's an even easier way to do this - if so please enlighten!

Please no flames if this is stupid idea - it's been years since I built anything
electronic and I'd like to start a new project...

Thanks.

ps I don't want to use an ammeter!
 
J

Jim Thompson

Jan 1, 1970
0
I'd like to build a circuit to indicate that a car battery is charging (or not),
by the following means...

There is a small volt drop across the large conductor (about 8" long) that
connects the -ve battery to chassis, when current flows. This voltage is +/-
depending on direction of current flow in the cable. I've measured it with a dvm
and it goes from 2-3 to 15mV (lights off/on etc). The change of sign is clearly
seen when the engine starts and the battery begins charging.

Would it be a feasable thing to use this voltage as the differential input to
say a 741 op amp with the output driving a two colour LED? So I could see one
colour for charge and the other for discharge. If this -is- feasible I'd like to
drive the circuit from the battery itself (don't want a separate pp9 supply of
anything). As this would be the same single ended supply, but diff input, would
the idea still work?


Maybe there's an even easier way to do this - if so please enlighten!

Please no flames if this is stupid idea - it's been years since I built anything
electronic and I'd like to start a new project...

Thanks.

ps I don't want to use an ammeter!

It's called an ammeter, but you're using the cable for a shunt.

Your problems are the need for an OpAmp with positive rail common-mode
range AND how to protect the circuit from automotive surges.

I'll ponder my navel and post something.

...Jim Thompson
 
B

Ben Bradley

Jan 1, 1970
0
It's called an ammeter, but you're using the cable for a shunt.

Your problems are the need for an OpAmp with positive rail common-mode
range AND how to protect the circuit from automotive surges.

I'll ponder my navel and post something.

I was just reading recent Bob Pease columns. This will do it, you
can just replace the opto's with LED's. Of course, it still needs
separate + and - 2.5V supplies, so it doesn't fit the OP's
requirements. Maybe there's a low-power way to detect the first ampere
or so of current in either direction, which would then switch on a
small oscillator/transformer/diodes/caps to power the thing.

http://elecdesign.com/Articles/Index.cfm?ArticleID=5952

Or how about a center-zero mechanical meter across the shunt, with
a metal post on either side of the needle, each connected to a LED...
 
F

Frank Bemelman

Jan 1, 1970
0
Jim Thompson said:
It's called an ammeter, but you're using the cable for a shunt.

Your problems are the need for an OpAmp with positive rail common-mode
range AND how to protect the circuit from automotive surges.

I'll ponder my navel and post something.

Wouldn't two simple voltage dividers be enough? To bring
the 12V signal down to 6V? The 15mV change would be divided
too, but 7 mV is still a lot. One of the dividers should
have a pot to adjust it.

But not that I want to spoil your fun, I'll see what come
up with ;)
 
J

Jim Thompson

Jan 1, 1970
0
I'd like to build a circuit to indicate that a car battery is charging (or not),
by the following means...

There is a small volt drop across the large conductor (about 8" long) that
connects the -ve battery to chassis, when current flows. This voltage is +/-
depending on direction of current flow in the cable. I've measured it with a dvm
and it goes from 2-3 to 15mV (lights off/on etc). The change of sign is clearly
seen when the engine starts and the battery begins charging.

Would it be a feasable thing to use this voltage as the differential input to
say a 741 op amp with the output driving a two colour LED? So I could see one
colour for charge and the other for discharge. If this -is- feasible I'd like to
drive the circuit from the battery itself (don't want a separate pp9 supply of
anything). As this would be the same single ended supply, but diff input, would
the idea still work?


Maybe there's an even easier way to do this - if so please enlighten!

Please no flames if this is stupid idea - it's been years since I built anything
electronic and I'd like to start a new project...

Thanks.

ps I don't want to use an ammeter!

What kind of Zero accuracy do you need? Looks like OpAmps that
include positive rail in their common-mode range don't have
particularly wonderful offset specs.

...Jim Thompson
 
F

Frank Bemelman

Jan 1, 1970
0
Jim Thompson said:
What kind of Zero accuracy do you need? Looks like OpAmps that
include positive rail in their common-mode range don't have
particularly wonderful offset specs.

Why don't you use 2 voltage dividers, and check at easier
levels of 6V ?
 
J

Jim Thompson

Jan 1, 1970
0
I'd like to build a circuit to indicate that a car battery is charging (or not),
by the following means...

There is a small volt drop across the large conductor (about 8" long) that
connects the -ve battery to chassis, when current flows. This voltage is +/-
depending on direction of current flow in the cable. I've measured it with a dvm
and it goes from 2-3 to 15mV (lights off/on etc). The change of sign is clearly
seen when the engine starts and the battery begins charging.
[snip]

See "CurrentDirectionIndicator.pdf" on the S.E.D/Schematics page of my
website.

...Jim Thompson
 
J

Jeff

Jan 1, 1970
0
Jim Thompson said:
It's called an ammeter, but you're using the cable for a shunt.

Your problems are the need for an OpAmp with positive rail common-mode
range AND how to protect the circuit from automotive surges.

I'll ponder my navel and post something.

How about one of those self oscillating switched capacitor devices (Linear
Tech IIRC) used to get the voltage (and to reference it to a virtual
ground), then amplified and dumped into comparators used to turn on the
LED's. I'll draw up a circuit later if I get time.

A current sense IC might work well also.
 
M

mikem

Jan 1, 1970
0
Using the battery ground strap as a shunt will work, but the "sense"
wires should be soldered to the ends of the strap near their respective
ring terminals! Do not unbolt the ground strap ring terminals and add
new ring terminals connected to the sense wires under the same bolts...
Based on your measurements below, your "shunt" is about 1mv per amp.

You have to consider that the peak current in the battery ground strap
is the "cold cranking" current drawn by the starter motor, which could
be hundreds of amps.

A garden variety LM358 op amp has the interesting property that it can
sense mV differences riding on a common mode voltage 0.5V more negative
than its negative supply pin, meaning that you can amplify the drop
across the ground strap even though the amp itself is "grounded"

Here is a rough cut drawn in LTSPICE:
It uses the two sections of an LM358 as separate Charge and Discharge
detectors, with Red and Green leds, respectively.
It has a suitable amount of "dead band" in the middle. It has a modicum
of protection for the opamp inputs...

Run the simulation in LTSPICE. Plot the current through the leds, D1 and
D2 as a function of {V}. The independant variable V causes +-30A to flow
through the ground strap, modelled as R1 (1mOhm).

MikeM

save the following into a text file ChgDisChg.asc and open it with LTSpice:

__________________________________________________________________________
Version 4
SHEET 1 880 680
WIRE -128 48 -128 16
WIRE -128 16 240 16
WIRE 240 160 240 16
WIRE 240 16 592 16
WIRE -128 368 160 368
WIRE 208 208 160 208
WIRE 208 176 192 176
WIRE 160 176 160 160
WIRE 368 80 368 144
WIRE 368 192 320 192
WIRE 192 176 160 176
WIRE 320 192 272 192
WIRE -128 128 -128 160
WIRE 48 160 -32 160
WIRE 128 160 160 160
WIRE 160 160 160 80
WIRE 240 368 240 224
WIRE 592 224 592 272
WIRE 592 352 592 384
WIRE -128 160 -128 224
WIRE -128 304 -128 368
WIRE -128 368 -128 400
WIRE 592 16 592 144
WIRE 336 80 368 80
WIRE 256 80 160 80
WIRE 160 208 160 240
WIRE 160 320 160 368
WIRE 160 368 240 368
WIRE 432 368 240 368
WIRE -128 368 -384 368
WIRE -416 96 -496 96
WIRE -464 144 -464 16
WIRE -464 16 -128 16
WIRE -416 160 -416 96
WIRE -384 336 -384 368
WIRE -384 368 -464 368
WIRE -464 208 -464 368
WIRE -464 368 -672 368
WIRE -672 368 -672 352
WIRE -672 288 -672 272
WIRE -672 144 -592 144
WIRE -592 144 -592 96
WIRE -592 96 -576 96
WIRE -672 144 -672 192
WIRE -432 160 -416 160
WIRE -496 176 -592 176
WIRE -592 176 -592 144
WIRE 432 272 432 256
WIRE 432 336 432 368
WIRE 432 144 368 144
WIRE 368 144 368 192
WIRE 432 176 432 144
WIRE -384 256 -384 160
WIRE -384 160 -416 160
WIRE -432 192 -336 192
WIRE -256 192 -32 192
WIRE -32 192 -32 160
WIRE -32 160 -128 160
FLAG 592 384 0
FLAG 160 208 P
FLAG 192 176 M
FLAG 320 192 O
FLAG -128 400 0
SYMBOL res -112 320 R180
WINDOW 0 36 76 Left 0
WINDOW 3 36 40 Left 0
SYMATTR InstName R1
SYMATTR Value 0.001
SYMBOL Opamps\\1pole 240 192 R0
SYMATTR InstName U1
SYMBOL Misc\\battery -128 32 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V1
SYMATTR Value 12.6
SYMBOL res 576 128 R0
SYMATTR InstName R2
SYMATTR Value 0.05
SYMBOL res 144 224 R0
SYMATTR InstName R5
SYMATTR Value 2.2k
SYMBOL res 240 96 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R8
SYMATTR Value 1meg
SYMBOL res 32 176 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R3
SYMATTR Value 2.2k
SYMBOL Misc\\battery 592 256 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V3
SYMATTR Value {V}
SYMBOL LED 416 272 R0
WINDOW 3 -133 34 Left 0
SYMATTR InstName D1
SYMATTR Value QTLP690C
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL res 416 160 R0
SYMATTR InstName R4
SYMATTR Value 390
SYMBOL Opamps\\1pole -464 176 M0
SYMATTR InstName U2
SYMBOL res -400 240 R0
SYMATTR InstName R6
SYMATTR Value 2.2k
SYMBOL res -592 112 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R7
SYMATTR Value 1meg
SYMBOL res -352 208 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R9
SYMATTR Value 2.2k
SYMBOL LED -688 288 R0
WINDOW 3 82 43 Left 0
SYMATTR InstName D2
SYMATTR Value QTLP690C
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL res -688 176 R0
WINDOW 3 35 70 Left 0
SYMATTR InstName R10
SYMATTR Value 390
TEXT -64 408 Left 0 !.include opamp.sub
TEXT 288 440 Left 0 !.op
TEXT -64 440 Left 0 !.STEP param V 10.6 14.6 0.1
TEXT 192 408 Left 0 !.option ITL1=250
TEXT 680 360 VLeft 0 ;Alternator and Loads\n(for simulation)
TEXT -336 72 Left 0 ;Vehicle Battery
TEXT -104 280 Left 0 ;Ground strap
TEXT -608 296 Left 0 ;RED
TEXT 336 272 Left 0 ;GREEN
TEXT 24 56 Left 0 ;CHARGE indicator
TEXT -720 40 Left 0 ;DISCHARGE indicator
TEXT -464 424 Left 0 ;OpAmp is LM358 dual

__________________________________________________________________________
 
M

mikem

Jan 1, 1970
0
Slightly improved.

Drives bi-color Red-Green 2-lead LED

Requires three wires to connect to car.
Frame Ground,
Battery minus,
Battery plus

Current draw (with both Leds off) is so low you dont
even have to switch it...

MikeM

_________________________________________________________________
Version 4
SHEET 1 880 712
WIRE -128 48 -128 16
WIRE 240 160 240 -112
WIRE 208 208 160 208
WIRE 208 176 192 176
WIRE 160 176 160 160
WIRE 368 80 368 144
WIRE 368 192 320 192
WIRE 192 176 160 176
WIRE 320 192 272 192
WIRE -128 128 -128 160
WIRE 48 160 16 160
WIRE 128 160 160 160
WIRE 160 160 160 80
WIRE 240 368 240 224
WIRE 592 224 592 272
WIRE 592 352 592 384
WIRE -128 160 -128 224
WIRE -128 304 -128 336
WIRE -128 336 -128 448
WIRE 592 16 592 144
WIRE 336 80 368 80
WIRE 256 80 160 80
WIRE 160 208 160 240
WIRE 160 320 160 368
WIRE 160 368 240 368
WIRE -416 96 -496 96
WIRE -464 144 -464 -112
WIRE -416 160 -416 96
WIRE -384 336 -384 368
WIRE -384 368 -464 368
WIRE -464 208 -464 368
WIRE -624 96 -576 96
WIRE -432 160 -416 160
WIRE -496 176 -624 176
WIRE 432 592 432 144
WIRE 432 144 368 144
WIRE 368 144 368 192
WIRE -384 256 -384 160
WIRE -384 160 -416 160
WIRE -432 192 -336 192
WIRE -256 192 16 192
WIRE -48 160 -128 160
WIRE -96 544 -160 544
WIRE -160 544 -160 592
WIRE -160 624 -96 624
WIRE -32 544 32 544
WIRE 32 544 32 592
WIRE 32 624 -32 624
WIRE 32 592 432 592
WIRE 32 592 32 624
WIRE -160 592 -624 592
WIRE -160 592 -160 624
WIRE -624 176 -624 336
WIRE 16 192 16 160
WIRE 16 160 -48 160
WIRE -128 336 16 336
WIRE 16 336 16 368
WIRE 16 368 160 368
WIRE 16 368 -384 368
WIRE 240 -112 -128 -112
WIRE -128 -112 -464 -112
WIRE 592 16 -128 16
WIRE -128 16 -128 -112
WIRE -624 176 -624 96
WIRE -624 592 -624 416
FLAG 592 384 0
FLAG 160 208 P
FLAG 192 176 M
FLAG 320 192 O
FLAG -128 448 0
FLAG -48 160 SenseWire
FLAG -128 -112 Downstream_from_IGN_sw
SYMBOL res -112 320 R180
WINDOW 0 36 76 Left 0
WINDOW 3 36 40 Left 0
SYMATTR InstName R1
SYMATTR Value 0.001
SYMBOL Opamps\\1pole 240 192 R0
SYMATTR InstName U1
SYMBOL Misc\\battery -128 32 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
WINDOW 3 43 54 Left 0
SYMATTR InstName V1
SYMATTR Value 12.6
SYMBOL res 576 128 R0
SYMATTR InstName R2
SYMATTR Value 0.05
SYMBOL res 144 224 R0
SYMATTR InstName R5
SYMATTR Value 2.2k
SYMBOL res 240 96 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R8
SYMATTR Value 1meg
SYMBOL res 32 176 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R3
SYMATTR Value 2.2k
SYMBOL Misc\\battery 592 256 R0
WINDOW 123 0 0 Left 0
WINDOW 39 0 0 Left 0
SYMATTR InstName V3
SYMATTR Value {V}
SYMBOL LED -32 608 R90
WINDOW 3 72 32 VTop 0
WINDOW 0 0 32 VBottom 0
SYMATTR Value QTLP690C
SYMATTR InstName D1
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL Opamps\\1pole -464 176 M0
SYMATTR InstName U2
SYMBOL res -400 240 R0
SYMATTR InstName R6
SYMATTR Value 2.2k
SYMBOL res -592 112 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R7
SYMATTR Value 1meg
SYMBOL res -352 208 R270
WINDOW 0 32 56 VTop 0
WINDOW 3 0 56 VBottom 0
SYMATTR InstName R9
SYMATTR Value 2.2k
SYMBOL LED -96 560 R270
WINDOW 3 0 32 VBottom 0
WINDOW 0 72 32 VTop 0
SYMATTR Value QTLP690C
SYMATTR InstName D2
SYMATTR Description Diode
SYMATTR Type diode
SYMBOL res -640 320 R0
WINDOW 3 35 70 Left 0
SYMATTR Value 390
SYMATTR InstName R10
TEXT 480 440 Left 0 !.include opamp.sub
TEXT 568 536 Left 0 !.op
TEXT 432 504 Left 0 !.STEP param V 10.6 14.6 0.1
TEXT 496 472 Left 0 !.option ITL1=250
TEXT 680 360 VLeft 0 ;Alternator and Loads\n(for simulation)
TEXT -336 72 Left 0 ;Vehicle Battery
TEXT -96 304 VLeft 0 ;Ground\n strap
TEXT -144 520 Left 0 ;RED
TEXT -168 648 Left 0 ;GREEN
TEXT 256 240 Left 0 ;CHARGE side
TEXT -608 216 Left 0 ;DISCHARGE\n side
TEXT -464 424 Left 0 ;OpAmp is LM358 dual
 
J

Jeff

Jan 1, 1970
0
A garden variety LM358 op amp has the interesting property that it can
sense mV differences riding on a common mode voltage 0.5V more negative
than its negative supply pin, meaning that you can amplify the drop
across the ground strap even though the amp itself is "grounded"

That is a very useful property that I did not know about! I'm off to the
LM358 data sheet to look into this more. THANKS.
 
C

Cornholio

Jan 1, 1970
0
Use a voltage divider with two equal high-value resistors to keep
current to a minimum. Then hook an op-amp in a voltage-follower
configuration to the center of the divider. Make sure the op-amp can
run on a single supply. The output of the amp is now your ground
reference. You now have a dual supply.

Most decent op-amps will easily supply enough ground current to
operate another op-amp. Just don't use too large of decompensating
caps. You might even want to power the divider with a 78xx regulator
of 9 or 5 volts to keep noise and voltage swings to a minimum. This
will give a nice +/- 4.5 or 2.5V supply.

Also, you might want to use a better amp than a 741 for measuring the
differential signal so you aren't fighting offset voltage.
 
D

Dave

Jan 1, 1970
0
Slightly improved.

Drives bi-color Red-Green 2-lead LED

Requires three wires to connect to car.
Frame Ground,
Battery minus,
Battery plus

Current draw (with both Leds off) is so low you dont
even have to switch it...

[...]
Mike,
Phew - I'm impressed! This stuff is new to me but I installed SPICE ok and the
sim. analysis from your data is running - now I have to go do some more
learning... :)
Thanks
 
J

Jim Thompson

Jan 1, 1970
0
Slightly improved.

Drives bi-color Red-Green 2-lead LED

Requires three wires to connect to car.
Frame Ground,
Battery minus,
Battery plus

Current draw (with both Leds off) is so low you dont
even have to switch it...

[...]
Mike,
Phew - I'm impressed! This stuff is new to me but I installed SPICE ok and the
sim. analysis from your data is running - now I have to go do some more
learning... :)
Thanks

You didn't like my minimal-component version? My feelings are hurt
:-(

...Jim Thompson
 
B

Ben Bradley

Jan 1, 1970
0
[...]
Mike,
Phew - I'm impressed! This stuff is new to me but I installed SPICE ok and the
sim. analysis from your data is running - now I have to go do some more
learning... :)
Thanks

You didn't like my minimal-component version? My feelings are hurt
:-(

I'm gonna have to get LTspice or whatever and look at the other
schematic... but yours pulls a constant 10 mA (5mA through each LED,
so they're BOTH visibly on to some extent) even when NO current is
flowing into or out of the battery from the alternator/current source.
Can you make a similar minimal-parts circuit that pulls less than a
milliamp in a zero-current situation?
 
J

Jim Thompson

Jan 1, 1970
0
[...]
Mike,
Phew - I'm impressed! This stuff is new to me but I installed SPICE ok and the
sim. analysis from your data is running - now I have to go do some more
learning... :)
Thanks

You didn't like my minimal-component version? My feelings are hurt
:-(

I'm gonna have to get LTspice or whatever and look at the other
schematic... but yours pulls a constant 10 mA (5mA through each LED,
so they're BOTH visibly on to some extent) even when NO current is
flowing into or out of the battery from the alternator/current source.
Can you make a similar minimal-parts circuit that pulls less than a
milliamp in a zero-current situation?
...Jim Thompson

The self-discharge rate of a car battery is about 25mA, not counting
any always-on accessories like clocks, etc.

...Jim Thompson
 
D

Dave

Jan 1, 1970
0
Slightly improved.

Drives bi-color Red-Green 2-lead LED

Requires three wires to connect to car.
Frame Ground,
Battery minus,
Battery plus

Current draw (with both Leds off) is so low you dont
even have to switch it...

[...]
Mike,
Phew - I'm impressed! This stuff is new to me but I installed SPICE ok and the
sim. analysis from your data is running - now I have to go do some more
learning... :)
Thanks

You didn't like my minimal-component version? My feelings are hurt
:-(

Yes yes a thousand times yes - that's the one I meant :)
It much better than my idea of wiring the DVM up into the instruments cluster :)
Actually I don't understand how the led's come on at all - where is the current
path from either opamp o/p via led via R10 390 to... (not saying it won't work -
just I can't see that bit).
 
M

mikem

Jan 1, 1970
0
Dave said:
Actually I don't understand how the led's come on at all - where is the current
path from either opamp o/p via led via R10 390 to... (not saying it won't work -
just I can't see that bit).

When the CHARGE amp is seeing a discharge, its output is at 0V.
Meanwhile, the DISCHARGE amp's output voltage is propotional to the
discharge current. Current flows out of the DISCHARGE amp's output pin
through the 390 Ohm resistor through the LED to the CHARGE amp's output
pin (which is at ground). During charging, the situation is reversed.


Use LTSpice to plot the current through the 390 Ohm resistor vs {V}.
You can also plot the voltages at the output pins of the two amplifiers
vs {V}. That will illustrate what I'm saying above.

Brightness of the respective LEDs is somewhat proportional to the rate
ofcharge or discharge. The direction of the current selects Red or
Green. There is deadband near the middle where neither LED lights.


MikeM
 
Top