# Electronic – How to reduce op amp output error

measurementoperational-amplifier

I am trying to precisely measure cell voltage of a LiPo battery using a differential amplifier. The idea is to use an op amp to measure each cell voltage. I need to get a precision of about +-5mV considering that each cell differential voltage goes from 3 to 4.2V max but the input voltages in the op amp are from 25.2v (sixth cell) to 4.2v (first cell). Here is the circuit I am using with a LM324:

The output of the op amp goes to a micro-controller ADC. In this circuit the gain is 1.2 but I know resistors have tolerance so first I have a calibration step where I put a precise know voltage in the inputs of the op amp, I get the output voltage with the ADC and Vout/Vin = G so I get the real gain because of resistances variations.

But now I have a new problem, if I put 8.4V and 4.2V I calculate the gain that gives me for example 1.22. If now I put 9V and 4.2V gain is the same (1.22) but if I elevate or reduce the voltage even more let's say 15V and 10V the output doesn't responds to 1.22 gains, the total gain is now 1.29! I think this offset voltage I am getting (despite 2 to 3mV input offset of LM324) is due to bias current that are increasing as I increment input voltage is my assumption correct? If so, is there any relation between input voltage and offset voltage at the output according to the resistances in the circuit?

If my assumption is wrong, is any other way to reduce this error despite of using a precision amplifier? Because here are very rare and cost 5 times the price of an LM324 :/

Im curious why you are using aplification. In my opinion simple cell voltage measuerement could look just like this (i drawed it only for 3 cells):

This should give you acurracy probably below 0.5% + resistor tolerance, but you can compensate resistor tolerance in software.

This is how very acurrate cell measurement can be done

This is part of cell voltage measurement circuit from well designed 6 cell battery charger:

You can find full version of this schematic here

LM324 amplifiers were used in very good Turnigy Accucell 6 and some other RC battery chargers in cell balancer circuits.