# Calibrating BATT_AMP_PERVLT

I’m using a CubePilot Mini Power Brick on a quad-copter I’m evaluating.

After entering the voltage so that the voltage-divider can be calculated, I started with BATT_AMP_PERVLT of 17 - as described in the parameters wiki.

This value is quite off - but it’s a place to start.

As a guess, the voltage output for the current sensor is linear - or close to it. I’d appreciate comments if this guess is wrong.

To calibrate BATT_AMP_PERVLT I did a test flight with a fully charged battery, and compared the total current recorded in the log file for the flight with current required to recharge the battery.

I then adjusted BATT_AMP_PERVLT by the percentage difference. For example, if the current total was 20% lower than the current required to recharge the battery, I increased BATT_AMP_PERVLT by 20%.

I’ve not read anywhere that this is a valid technique. If it’s problematic, I’d really appreciate comments.

No, that is exactly the recommended procedure.

1 Like

Search the forum for:
New Amps/volt = old amps/volt x charger mah ÷ logged mah
Or some version of that and you will find plenty of posts describing that procedure.
Or just searching for “ratiometric” will do it.

1 Like

This is what you did, and it’s the way many have done it and I recorded the steps:

Here’s how to adjust your Amps Per Volt

• Plug in a fresh battery and do a hover flight for 5 minutes or until you’ve used a significant amount of battery capacity
• Immediately unplug the battery and charge it, note how many mah’s it took to charge. Let’s say that was 1,500 mah
• Download your log and look at maximum CurrTot. Let’s say it was 1,300 mah
• Get your existing BATT_AMP_PERVOLT setting from Mission Planner
• NEW_AMPS_PER_VOLT = OLD_AMPS_PER_VOLT x CHARGED_MAH / LOGGED_MAH
With my example numbers, you’d get
NEW_AMPS_PER_VOLT = 17 x 1,500 / 1,300 = 19.61
• Set the new value in the BATT_AMP_PERVOLT parameter and save to your copter
• Fly to check, repeat until you’re happy the new value gives consistent readings
2 Likes

I expect one additional reason it’s important to calibrate the current sensor is if you have COMPASS_MOTCT=2 then the current flow is used to calibrate the compass.

Correct, and you can even produce the compass/motor params offline with magfit, instead of trying to kill yourself running the copter at high throttle levels with the props on.

I always use MagFit.

I can’t figure out why everyone doesn’t.