Charging current is displayed incorrectly.


Well-known member
In the PFOD-App is displayed 0,5A and my multimeter shows 1A. The Voltage is correct. Where can i change this?


Well-known member
Staff member
What kind of platform do you use ?

in the code the bat charge current is read here.
  if (powerboard_I2c_line_Ok) {
      chgvolt = ChargeIna226.readBusVoltage() ;
      curramp = ChargeIna226.readBusPower(); //  ?? sense don't work
      batvolt = MotRightIna226.readBusVoltage() ;
      batvolt = batvolt + D5VoltageDrop;
      readingDuration = millis() - nextTimeBattery + 500;
      if (readingDuration > 30 ) {  //leave 30 ms to I2C reading
        ShowMessage("Error in INA226 Bat Voltage Timeout reading I2C : ");
    if (chgvolt != 0) {
      curramp = curramp / chgvolt;
      curramp = 0;
    double accel = 0.05;  //filter percent
    if (abs(batVoltage - batvolt) > 8)   batVoltage = batvolt; else batVoltage = (1.0 - accel) * batVoltage + accel * batvolt;
    if (abs(chgVoltage - chgvolt) > 8)   chgVoltage = chgvolt; else chgVoltage = (1.0 - accel) * chgVoltage + accel * chgvolt;
    if (abs(chgCurrent - curramp) > 0.4) chgCurrent = curramp; else chgCurrent = (1.0 - accel) * chgCurrent + accel * curramp; //Deaktiviert für Ladestromsensor berechnung
    //bber30 tracking not ok because reduce the speed loop with this but can check the chgvoltage

if you really want to have a perfect value you need to add an offset to chgCurrent

replace the line for a 0.5A offset
if (abs(chgCurrent - curramp) > 0.4) chgCurrent = 0.5 + curramp; else chgCurrent = 0.5 + ((1.0 - accel) * chgCurrent + accel * curramp);

it's better to have a BMS on your battery and use a true 29.4V battery Li-Ion charger and not a simple 24V power simply to power the charging station.

The sense you see in the INA226 battery is the total sense of the PCB + the battery charging process and don't need to have a kind of precision but only a reference for software to stop charging cycle when you don't use a li-ion charger.

So the process i use to set the battery optimum charge cycle .
Always use a BMS on the battery and a li-ion charger with a green/red led.
Use mower until the battery is 24.00V
Remove mower battery and charge it directly with the charger and no PCB connected.
Try to find the duration for the charger led to change from red to green. (certainly 3 or 4 hours according your size battery and charger).

if the duration is 3.5 Hours.
you need to repeat the cycle with the mower fully build.
Use mower until 24.00V
Put mower in the charging station and wait 3.5Hours , now read the chgCurrent into arduremote and adjust the value :
Battery is fully charged if current is below to this new sense to stop charging after correct duration.

You can also set
Battery is fully charged if current is below to 0.05 to leave the charger manage the full charging process alone,