voltage subtractor

Thread Starter

mr_rishu

Joined Feb 6, 2021
2
i'm working on a arduino based BMS which have to measure voltage from a multicell battery which is connected in series. i can measure the voltage of the cells by individually grounding them. But what i want to achieve is to measure single cell battery voltage when they are connected in series. I have tried using op-amp to try a voltage subtractor circuit in order to monitor the voltage difference between the cells. the op-amp which i'm using is LM324N. When connecting the cell in respective pins of the LM324N i'm getting a value greater than the voltage difference between the cells. Can any experts please guide me through this. this is the circuit i'm using.


Differential-Amplifier-Circuit-Diagram.png
 
Last edited by a moderator:

crutschow

Joined Mar 14, 2008
34,281
Not enough info.
Show us the circuit with resistor and Vcc values as well as the battery voltages you are trying to measure.
 

MisterBill2

Joined Jan 23, 2018
18,167
To accurately measure the voltage across an individual cell the entire monitor circuit must be isolated from the string of cells circuit. If your arrangement does not have complete isolation that will not be possible.
Since we have no additional information everything else will be a guess.
 

crutschow

Joined Mar 14, 2008
34,281
That circuit will have a common-mode offset as determined by the resistor match and the the value of the voltage above ground.
Also the common-mode voltage at the LM324 inputs can be no greater than 1.5V below Vcc.

Better is an instrumentation or difference amp that has a high common-mode voltage rejection.
 

Thread Starter

mr_rishu

Joined Feb 6, 2021
2
Not enough info.
Show us the circuit with resistor and Vcc values as well as the battery voltages you are trying to measure.
i'm using 1k resistor values for unity and the whole series output voltage is 13.25v and each cell contributes a 3.3v .
 

crutschow

Joined Mar 14, 2008
34,281
So are you using the 13.25V for the Vcc op amp power?

The LM324 does not have a good current sink capability near 0V output with a single supply, so will give an error in readings below a volt.
You need to use a better single-supply op amp for that, such as the LMC6484, and use at least 10kΩ resistors.
Also you need to adjust the common-mode offset when measuring the high common-mode voltage from the top battery, so you should add a pot in series with one of the resistors for that adjustment (say 2kΩ pot in series with a 9kΩ resistor).
To adjust the offset, connect both inputs to 13V and adjust the pot for an output of a few mV above zero.

See the LTspice simulation below for the output of the two op amps with a common-mode input voltage going from 0V to 13V.
Notice the large offset from the LM324.
Ideally the outputs should stay at 0V as the input common-mode signal varies.

1612766545342.png
 
Last edited:

MisterBill2

Joined Jan 23, 2018
18,167
Like I said in post #3, the amplifier IC MUST be isolated from that battery string. One way to do that is to use one of the IO types made for that application, if you intend to read across each cell.
There is an alternative approach but it is not an arduino-class of application.
I suggest researching how yjr individual cells are monitored in electric vehicles and similar applications.
 

BobTPH

Joined Jun 5, 2013
8,809
There are plenty of opamps, i.e. rail-to-rail ones, that include the supply voltage and ground in their common mode range. These would have no problem measuring the voltages of the individual cells if powered by the full battery voltage. It would also allow you measure all of the cells by switching only the top lead, instead of two leads for an isolated one by simply measuring each junction and subtracting the ones below (in software)

Bob
 
Top