2
\$\begingroup\$

I'm using an LM324 quad op-amp as a differential amplifier for measuring the voltages of a 19-cell battery pack in series which happens to be 1.5 V for each and the differential amplifier gain ratio is 1:1.

Then all 19 op-amp outputs are fed into 3 multiplexers 744051 and with some sort of looping I got the measurements through an STM32's 3 ADC channels.

The point is: the amplifier output measurement has an error of around 200 mV. How could I improve the accuracy?

Another point is: in my prototype I have an option to connect the battery ground to the op-amp ground. When I connect it everything is fine, but when I disconnect it, the lowest cells' op-amp measurements are too high, around 5 V. I don't understand why that happens.

As far as I know, a differential amplifier doesn't need to be connected to the ground of the measured potential.

Note: I'm using a 20 V single supply for the op-amps.

EDIT

This is a simple illustration for the 19 cells schematic.

I'm using an ADC multiplexer, so I switch over each channel to get 8 cells' measurement over a single ADC channel.

When disconnecting the batteries' ground, my reference is the op-amp power supply reference as I measure a differential potential of the battery cell.

enter image description here

\$\endgroup\$
3
  • 2
    \$\begingroup\$ Show some schematics. How exactly you have connected the amplifers will tell us why they have accuracy of 200mV. And op-amps can measure differential voltage, but only if both op-amp inputs are withing the allowed common-mode range, so the schematic also tells us why measurement fails when battery negative is disconnected. \$\endgroup\$
    – Justme
    Jul 13, 2021 at 22:03
  • \$\begingroup\$ What is the tolerance of your test instrument and is it in calibration? What is "with some sort of looping"? If you disconnect ground what is your reference point? The LM324 will not swing to rail, it needs some help. Supply the Schematics as Justme asked, not a frizzy thing. \$\endgroup\$
    – Gil
    Jul 14, 2021 at 3:14
  • \$\begingroup\$ The connections of the differential amplifiers to the cells are reversed. \$\endgroup\$
    – PStechPaul
    Aug 12, 2022 at 5:27

2 Answers 2

1
\$\begingroup\$

If you are trying to measure the output voltage of an amplifier with an ADC, then the ground of the amplifier, multiplexer, and ADC must be connected together.

While it is not strictly necessary that the amplifier ground and the battery ground are connected together, you must ensure that you do not violate the amplifier's input common mode range. With nineteen 1.5 V cells in series and a 20 V supply to the op amps this will not be possible. It appears to me that you have a fundamental problem with this design.

I suggest you try making separate measurements of the voltage at the positive terminal of each cell. Tie all of the grounds together and use voltage dividers for node voltages that are expected to exceed the input range of the multiplexer. Use the microcontroller to perform the necessary calculations to obtain the individual cell voltages.

\$\endgroup\$
1
  • 2
    \$\begingroup\$ Common mode voltage at the upmost OpAmp is around 14 V here, so there is no fundamental problem with the 20 V supply as long as BAT GND is close to OpAmp GND. \$\endgroup\$
    – Jens
    Aug 12, 2022 at 2:13
0
\$\begingroup\$

LM324 are not paragons of accuracy, and I would not bother with difference amplifiers either, since those only add to the errors. Instead, I'd convert battery voltages to currents, and multiplex each current between two load resistors - one of them a dummy, another fed to a buffer feeding the ADC.

The battery (+) voltages up to about 13V relative to BATT_GND would work with the following circuit:

schematic

simulate this circuit – Schematic created using CircuitLab

V3 represents the measured cell, V2 are the cells below it, V4 are the cells above it.

Each battery channel has its own R4. R5 and OA3 is common to all channels.

Two op-amps are needed per battery cell, but they are cheap. The only per-cell "precision" part is R1, which should be equal to R5. 0.5% resistors would reduce the gain error to be on par with op-amp offset errors, and certainly a couple times smaller than the errors you had before. Op-amps with tighter offset specs, like LM324B or LM2904B, would further improve matters in that regard.

Settling after channel changes would be limited mostly by op amp slew, since no op-amps would be running open-loop at any point.

R10-D1 shifts the battery ground up relative to op-amp ground by about 5V.

For higher (+) terminal cell voltages, the OA1-OA2 circuit would be still used with each cell, but it would be supplied from supply rails shifted about 14V higher. The switched capacitor circuit below could do it.

schematic

simulate this circuit

R2 should be adjusted to be about 10% lower than the value needed just so that VSS won't be dipping below 14V. It likely will be higher than shown, since neither C1 nor C3 charging current flows out of C2.

When 555's OUTPUT is low, C1 charges to above 19V through D1 and U1's low-side output transistor.

When the OUTPUT is high, C1 is connected parallel to C3 via the diode D1 and U1's high-side output transistor.

D3 carries the return supply current of the op-amps supplied from VDD-VSS.

Finally, assuming that the 20V supply is not derived from the battery, the solution given here presents rather high impedance to the cell stack. The series resistors R2 and R3, in series with OA1 and OA2 non-inverting inputs, respectively, should give plenty of protection to the op-amps when fault conditions arise, such as an open cell, etc.

M1 could use a 10-15V Zener diode from gate to source, to prevent exceeding the rated gate-source voltage of M1.


There are much better ways of doing all this with modern parts, but if you want to limit yourself to cheap parts that will be available almost anywhere in the world - this would be one way to do it. M1 can be most any small signal PMOS device, by the way. It's not super-critical. It could even be an NPN transistor rated for high beta at 100uA - it would increase the error to 1-2%, not more.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.