Lipo 3S Voltage Measurement - Incorrect Results

Hi,

I am trying to measure the voltage of each cell in a 3 cell Li-Po battery using voltage dividers but the readings I am getting seem to be too high.

I am going this in order to a) cut power when cells are drained below ~3.5v and b) create a power regulator that will increase the duty cycle of the pwm signal going to an h-bridged motor as battery voltage drops.

The design is simple - a few voltage dividers on the balanced plug of the lipo to bring the voltage going into the ADC of the Arduino to below 5V. Ohm’s law calculations and a couple of subtractions should give the voltage across each cell. The ground of the lipo is connected to the ground pin of the Arduino and the Arduino is currently powered over USB. This is illustrated in the following (badly drawn) diagram:

The following measurements were made at the analogue pins (5 analogue reads averaged for each pin): A0=653, A1=431, A2=217. This results in the following measurements for each cell: Cell1=222, Cell2=214, Cell3=217 (simply subtract).

Given that Vpin = Vcell *(R6/(R5+R6)) and taking R5 + R6 = RTotal:
Vcell=(RTotal/R6)*Vpin (1)

Using cell 3 for simplicity, RTotal (from battery output to ground) was measured to be 16.36k and R6 (from Arduino input was measured to be 3.96k. The voltage seen at the pin is calculated as 1.06V. (From (5V * (A2 Value/1023)). Substituting this back into eqn (1), this gives a value of Vcell of 4.38V.

To my understanding, a lipo cell should have a maximum voltage of 4.2V thus making this measurement illogical from the start. I verified this with 2 separate multimeters which gave readings of 3.87V and 3.79V for this cell, putting the measurement out by roughly 0.6V. I also verified the resistance measurements with the second multimeter.

From google the only possible explanation that I could find was that the Arduino ADC refers values to the 5V input, not the ground. I don’t really see how this could affect it as I linked the grounds. Should it affect it, I am unsure how to fix it.

I would appreciate any advice you can give to this inaccuracy.

Many thanks in advance,

Jonathan

Have you measured the analog reference voltage at the Vref pin? If it's not 5.0V your calculations will be off.

If the max cell voltage is 4.2 you don't need a voltage divider for the first cell and the voltage divider for the second cell can be /2 instead of /4. Those changes would give you more precision at the expense of slightly more complicated math.

John,

Thanks very much for your reply. I like your suggestions for the circuit - I will build it exactly like that in the final model. I measured the 5V pin and it read 5.01V so that wasn’t the issue. I then decided to measure the resistances again with the multimeter which I have changed the battery in. I got a different reading for the resistance which I thought was really strange given that I had measured it 6 times each with 2 different multimeters.

My measurements are now only out by 0.1V which i will compensate for in code and I suppose i’ve learned the lesson that my multimeter(s) can never be trusted 100%.

Thanks again,

Jonathan

I hope you are measuring the battery voltage while the voltage divider is also in place.
Batteries have an internal resistance. Because of that the voltage as measured on a battery can depend on what is attached.
Many DVMs have a battery check mode which inserts a small load. The older needle-type voltmeters also have lower input resistance.
A "ideal" battery has 0 ohms internal resistance and the ideal voltage measurement meter has infinite resistance.
Also, you might scale up your resistor values. Why constantly waste 1+ milliamps. The arduino has much higher input impedance.

Tech,

I agree on the voltage measuring but given that it is a LiPo the internal resistance is very low. I think that the short circuit current is 80A so that would give 11.1V/80A = 0.14 Ohms.

It's a good point about the resistor values. However, I calculated that I would drop only 0.7mA ((3.7V/16000Ohms) * 3) which I termed as acceptable as the entire system will be drawing about 10A, thus making this negligible. However, my original design for the voltage dividers was in the region of about 500k but scaled this down after reading on these forums that you don't actually want to exceed much more than 20kish. Presumably the reason is that the arduino input impedance isn't high enough to support such values.

Thanks for your input - it's much appreciated.

Thanks,

Jonathan