Setting up PX4
Tested PX4 versions
- v1.17.0 on Karu
Battery monitoring
PX4 on Karu finds the INA228 on POWER1 and POWER2 at address 0x45 and starts its driver without a parameter. It reports the Paw on POWER1 as battery 1 and the Paw on POWER2 as battery 2.
- Set
INA228_SHUNTto 0.0003. At the PX4 default of 0.0005 the reported current is 60 % of the actual current. - Set
INA228_CURRENTto the highest current PX4 should read, then reboot. At 136 or below PX4 uses the ±40.96 mV input range, which resolves smaller currents. Above 136, up to the default and maximum of 327.68, it uses the ±163.84 mV range. The current reading stops atINA228_CURRENT. - Set
BAT1_N_CELLSto the number of cells in the battery. - Set
BAT1_V_EMPTYandBAT1_V_CHARGEDto the empty and full voltage of one cell. The PX4 defaults are 3.6 V and 4.05 V. - Check the voltage QGroundControl shows against a meter on the battery.
A second Paw on POWER2
Set BAT2_SOURCE to 0 (Power Module) and reboot, then set BAT2_N_CELLS, BAT2_V_EMPTY and
BAT2_V_CHARGED as for battery 1. Both modules use the same INA228_SHUNT and INA228_CURRENT.