Why Pixhawk shows the wrong battery voltage
If your Pixhawk shows the wrong battery voltage, first measure the difference with a multimeter, then fix it by measuring and calculating the BATT_VOLT_MULT multiplier with your own power module.
Mission Planner shows the battery at 6 volts, while the multimeter reads 12.6 volts on the same pack. Or the screen is stuck at 11 volts and doesn't move even when you swap the battery.
Measuring the multiplier with a multimeter on your own power module can close this gap. First, let's work out whether the problem is really the multiplier.
How the voltage reaches the screen
The autopilot doesn't measure the battery voltage directly. The power module divides the voltage, the divided value arrives at an analog pin, and the autopilot converts it to the real voltage with a multiplier.
The calculation works like this: an offset is subtracted from the pin voltage, and the remainder is scaled up by a multiplier. If the multiplier is wrong, the screen deviates from the real voltage by the same ratio every time. The source code does this calculation in the analog battery monitor's file.
Which one is wrong: the measurement or the reading
Connect the multimeter to the battery connector. With the motors off, compare the reading with the voltage in Mission Planner. In the chart below, see the lines you may run into in this comparison.
How the on-screen voltage deviates from the multimeter
- If the difference is under 0.2 volts, leave it alone. The official documentation recommends calibration for differences above this threshold.
- If the screen shows 0 V, or stays at the same value even when you change the battery, the problem may not be the multiplier. The dashed horizontal lines in the chart are this case. Check the monitor type, the voltage pin setting, and the signal cable.
- If the difference is in the same proportion at every voltage, the multiplier is wrong. In the chart, this is the red line that starts at zero but has a different slope. The fix is below.
- If the voltage drops only while the motors are spinning, the sensor may be correct. The battery loses voltage under load.
A forum user saw 9.2 volts in Mission Planner during flight, and after landing the same pack went back to 12 volts. The reply in the thread says the voltage sags under load and recovers when the load is removed.
The most common mistake: trusting the board's default multiplier.
The same parameter name comes with a different default from one autopilot to another. In the TBS Lucid H7 Wing source code it starts at 11.0. Two users wrote that they arrived at a value around 20.9 with their own measurements.
The second trap is in the order of steps. When BATT_MONITOR changes, the autopilot needs to restart. A user on the forum wrote that the voltage he measured kept returning to zero, and the reply asks for a restart.
Calculate the multiplier on your own hardware
You can only find the multiplier with your own power module and a multimeter. In Mission Planner, the two values in the calculation are these parameters: (pin voltage − BATT_VLT_OFFSET) × BATT_VOLT_MULT.
If the screen is at 0 V or constant, check the BATT_MONITOR type, the BATT_VOLT_PIN value, and the signal cable before moving on to the multiplier.
- Measure the battery's voltage with a multimeter.
- In Mission Planner, open Initial Setup, Optional Hardware, Battery Monitor and set the Sensor field to Other.
- Enter the multimeter value in the Measured Battery Voltage field and press Tab. The calculated divider becomes the new BATT_VOLT_MULT.
If you don't want to use Mission Planner, a small piece of Python code calculates the same ratio. The code reads the multiplier and the on-screen voltage and prints the suggested value; it doesn't change the parameter.
import sys
from pymavlink import mavutil
baglanti = sys.argv[1] # e.g. COM5, /dev/ttyACM0 or udp:127.0.0.1:14550
olculen = float(sys.argv[2]) # voltage shown by the multimeter
m = mavutil.mavlink_connection(baglanti, baud=115200)
m.wait_heartbeat()
m.mav.request_data_stream_send(m.target_system, m.target_component,
mavutil.mavlink.MAV_DATA_STREAM_ALL, 4, 1)
carpan = None
m.mav.param_request_read_send(m.target_system, m.target_component,
b"BATT_VOLT_MULT", -1)
while carpan is None:
p = m.recv_match(type="PARAM_VALUE", blocking=True, timeout=10)
if p is None:
sys.exit("Could not read BATT_VOLT_MULT")
if p.param_id == "BATT_VOLT_MULT":
carpan = p.param_value
okumalar = []
while len(okumalar) < 20:
s = m.recv_match(type="SYS_STATUS", blocking=True, timeout=10)
if s is None:
sys.exit("SYS_STATUS not arriving")
okumalar.append(s.voltage_battery / 1000.0)
ekran = sum(okumalar) / len(okumalar)
if ekran == 0:
sys.exit("Display shows 0 V, multiplier calculation is meaningless")
print("BATT_VOLT_MULT now : %.3f" % carpan)
print("displayed voltage : %.2f V" % ekran)
print("multimeter : %.2f V" % olculen)
print("fark : %.2f V" % (ekran - olculen))
print("suggested multiplier : %.3f" % (olculen * carpan / ekran))Run the code like this while connected to the autopilot:
python calc_mult.py COM5 12.6For example, if the multiplier is 5.05 and you enter 12.6 as the multimeter value, you get this:
BATT_VOLT_MULT now : 5.050
displayed voltage : 6.30 V
multimeter : 12.60 V
fark : -6.30 V
suggested multiplier : 10.100In this example, setting the multiplier to 10.1 makes the screen show 12.6 V. On your own hardware the numbers will differ.
Enter the suggested value in the BATT_VOLT_MULT field in Mission Planner. Then restart the autopilot and compare with the multimeter once more.
Example: On race morning you plug in the spare power module, and the screen reads 6.30 V while the multimeter says 12.6 V on the same pack. When you plug in a second pack, the screen again shows half of the multimeter. That is the red line in the chart. You don't need to touch the cable: set the multiplier to 10.1 and restart the autopilot, and the two values coincide. If the screen had stayed at the same number across packs, you would have checked the monitor setting and the cable first.
Error Messages
PreArm: Battery 1 low voltage failsafe
The on-screen voltage is below the BATT_LOW_VOLT threshold. The battery may really be drained, or the screen may be reading lower than the real value because the multiplier is wrong. Compare with the multimeter and, if there is a difference, fix the multiplier.
PreArm: Battery 1 unhealthy
The autopilot doesn't consider the battery monitor healthy. If you changed the BATT_MONITOR value, restart. If it still appears, check the BATT_VOLT_PIN value for your autopilot.
PreArm: Battery 1 below minimum arming voltage
BATT_ARM_VOLT is greater than zero and the voltage being read is below it. If the threshold is correct, replace the battery. If the threshold is correct and the screen is wrong, fix the multiplier.
At 0 V there is a separate risk. According to the source code, the voltage-based low battery failsafe activates only when the voltage read is greater than zero, so a monitor showing 0 V doesn't protect you with this failsafe.
More in the course
If you'd like to learn to tell these kinds of faults apart step by step, hands-on, see the Troubleshooting section of the Drone Basics: From Sensors to Flight course.
Was this article helpful?
Learn this topic from start to finish
Season plan: all six courses for 9 months, ₺790 a month. ₺390 a month for high school and university students, ₺351 the first month with your member code. You can stop in any month you like. Start the Season plan · I'm a student