Overestimated battery voltage readout Flexible OpenSource

acz

1 µW
Joined
Nov 2, 2019
Messages
1
Location
Canberra
Hi,

this puzzles me over last few days. I have flushed 0.20 beta version of Flexible OpenSource (I am forever in debt to Casainho and other contributors), configured it and the battery voltage shown on LCD3 is 1.15V larger than measured at the battery terminals.

I use 13S7P Samsung 30B battery pack, which when fully charged has 54.44V on battery terminals. Yet on LCD3 shows 55.59V. This then has flow-on effect on estimates of battery charge percentage. It is off (overestimated) by mild 25-28% in comparison to battery terminal installed voltage/charge meter. I've learned hard way how much electric motor helps my legs crank the bike when system shutdown on me 20km from home. :D

I could "fix" it by changing:

// ADC battery voltage measurement
#define BATTERY_VOLTAGE_PER_10_BIT_ADC_STEP_X512 44
#define BATTERY_VOLTAGE_PER_10_BIT_ADC_STEP_X1000 87 // conversion value verified with a cheap power meter

in main.h but this is kind of brute force and most likely not the way to go.

Most likely I am doing something wrong in the set-up/configuration. The only two places that will affect battery voltage readout will be number of batteries connected in series (I have 13) and internal battery resistance (I have 105m Ohm after calculations based on few measurements of voltage drop). I think I set both correctly. Other that this I don't know.

If any of you has experienced similar problem could you please share the fix.

Cheers
Adam
 
acz said:
Hi,

this puzzles me over last few days. I have flushed 0.20 beta version of Flexible OpenSource (I am forever in debt to Casainho and other contributors), configured it and the battery voltage shown on LCD3 is 1.15V larger than measured at the battery terminals.

I use 13S7P Samsung 30B battery pack, which when fully charged has 54.44V on battery terminals. Yet on LCD3 shows 55.59V. This then has flow-on effect on estimates of battery charge percentage. It is off (overestimated) by mild 25-28% in comparison to battery terminal installed voltage/charge meter. I've learned hard way how much electric motor helps my legs crank the bike when system shutdown on me 20km from home. :D

I could "fix" it by changing:

// ADC battery voltage measurement
#define BATTERY_VOLTAGE_PER_10_BIT_ADC_STEP_X512 44
#define BATTERY_VOLTAGE_PER_10_BIT_ADC_STEP_X1000 87 // conversion value verified with a cheap power meter

in main.h but this is kind of brute force and most likely not the way to go.

Most likely I am doing something wrong in the set-up/configuration. The only two places that will affect battery voltage readout will be number of batteries connected in series (I have 13) and internal battery resistance (I have 105m Ohm after calculations based on few measurements of voltage drop). I think I set both correctly. Other that this I don't know.
That is because of an relative big error on your motor controller hardware that reads the battery voltage. This is only important to the battery Low Voltage Cut value that on configure on the display, and then you can adjust for the value you want.

For battery SOC, use instead the SOC based on Coulomb counting -- it is accurate and you can also fine tune on the display, for you battery specific value (including removing that battery voltage offset).

At least on 850C display, you can choose to see SOC based on Coulomb counting in steps of 1%, and starting at 100% down to 0% or in the inverse order.
 
acz said:
Hi,

this puzzles me over last few days. I have flushed 0.20 beta version of Flexible OpenSource (I am forever in debt to Casainho and other contributors), configured it and the battery voltage shown on LCD3 is 1.15V larger than measured at the battery terminals.

I use 13S7P Samsung 30B battery pack, which when fully charged has 54.44V on battery terminals. Yet on LCD3 shows 55.59V. This then has flow-on effect on estimates of battery charge percentage. It is off (overestimated) by mild 25-28% in comparison to battery terminal installed voltage/charge meter. I've learned hard way how much electric motor helps my legs crank the bike when system shutdown on me 20km from home. :D

I could "fix" it by changing:

// ADC battery voltage measurement
#define BATTERY_VOLTAGE_PER_10_BIT_ADC_STEP_X512 44
#define BATTERY_VOLTAGE_PER_10_BIT_ADC_STEP_X1000 87 // conversion value verified with a cheap power meter

in main.h but this is kind of brute force and most likely not the way to go.

Most likely I am doing something wrong in the set-up/configuration. The only two places that will affect battery voltage readout will be number of batteries connected in series (I have 13) and internal battery resistance (I have 105m Ohm after calculations based on few measurements of voltage drop). I think I set both correctly. Other that this I don't know.

If any of you has experienced similar problem could you please share the fix.

Cheers
Adam

It is not brute force at all. Just change the value from 87 to 86 and it should be better. See it as an ADC calibration. There is a possibility that you need to go to 85 for even greater accuracy. But do not change the BATTERY_VOLTAGE_PER_10_BIT_ADC_STEP_X512.

But before changing anything I would recommend to drain the battery and see if the ADC becomes more accurate in the lower voltages. You usually need to measure between and at the maximum and minimum values to get a feel for the ADC linearity.

Also, Casainho has some good notes and advice!
 
Back
Top