Voltage sensor calibration???

Im stuck!, I cannot setup the Voltage sensor calibration option in the latest APM Planner 1.0.79

Voltage sensor calibration:

1. Measure APM input voltage and enter it to the box below

2. Measure battery voltage and enter it to the box below

3. From current sensor datasheet, enter amperes per volt value to the box below


I cannot change or input anything in the boxes, I have the AttoPilot 90A/50V Voltage/Current Sensor and it reads 17v+ on my 4S back


Any Ideas?

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –


  • Hello all,  I know this is an old thread put having the same problem on  APM 1.4  .. with current code.

    What ever value I enter into the "Measure Battery Voltage"  that's what shows... no matter what..

    With no sensor connect or with different voltages .. never changes.

    any help would be great.

  • Since I don't like to be sitting around with nothing to do, I started trying to figure out the numbers, and I did the following : I was using VOLT_DIV_RATIO 50, since that was the total ammount the current sensor is prepared to get, and scales the input voltage to a 3.3V scale, so 3.3/50, would give a 0.066V per Volt (0.06369 by the datasheet), if you multiply 12.6 * 0.066 = 0,831V approx.

    With the 50, I was getting a closer value to what it would be expected, but still not right, that's when I remembered the APM would be expecting values up to 4.2 (value per cell on a lipo - fully charged 3cell = 12.6), and not values up to 3.3V, so I made 4.2V / 3.3V = 1.272727273 approx. and with that in mind, 50 * 1.272727273 would be the ratio to use (63.63636363). I tryied it and I'm getting correct values (comparing to multimeter readings), so I believe my thinking was right. If you can verify and confirm or correct it, I would appreciate. I will be doing some more readings to make sure.

  • Hello. I've been trying to calibrate my current sensor reading to have a battery alert. Since I'm using the 180A version, I've changed the CURR_AMP_PER_VOLT to 54.54 (180V / 3.3V), but I'm stuck with the Voltage... If I do a 50 / 3.3 it gives-me a 15.15 ratio wich is the value I enter at VOLT_DIV_RATIO, however, that shows in the APM 2.95V +/- So I think the sensor has it's voltage dividers active. I don't know what components should I remove, I post a photo to see if anyone can help me. Also, if I'm not thinking right please correct me, I'm not an electronics genius :)  3692295128?profile=originalIf I enter 50 at the VOLT_DIV_RATIO, I have a value of about 9.95 with a reading of 12.4 with a multimeter in the battery.

  • On this video, the resistors on the sparkfun current sensor are removed, I wonder if that will help with all the calculations...in other words make if more simple, it does read http://code.google.com/p/ardupilot-mega/wiki/Voltage to "DO NOT use the voltage divider on this sensor board" does removing the resistors disable it? Im not 100% sure how "NOT" to use voltage divider on the sensor board?


    Any ideas?

  • I experience exactly the same problem!

    Though I am currently using Mission Planner 1.0.82 and APM fw 2.0.49.

    I cannot enter anything here:



    And I must admit that I am confused about the wiki instructions related to the AttoPilot sensor:


    Is that instruction really complete and updated for latest versions hardware, software and firmware?


    My setup:

    3S LiPo, using APM onboard voltage divider for AN0 (R1=3.9k)

    AttoPilot sensor version: 50V / 90A


    AttoPilot sensor data sheet: 

    I soldered the Atto sensor according to the data sheet (I think the ArduPilot Wiki shows an earlier version of Atto sensor layout). The same wiki mentions the choice of using AttoPilot sensor onboard voltage divider OR the APM voltage divider. As I write above about setup, I use the APM onboard divider, R1=3.9k.

    Studying the Atto datasheet I am unable to find ANY reference to an optional AttoPilot sensor board voltage divider!

    Now, quoting the APM wiki: "If you are using the current sensor board voltage divider do not put a resistor in for the APM onboard voltage divider AND you will have to change the voltage divider ratio in the firmware."

    So, I take it, since I am NOT using the current sensor board voltage divider I should not have to change the voltage divider ration in the firmware. Right?

    Then follows the APM board close-up photo. And let´s just agree that the text has gotten the top / bottom reference the wrong way around. Anyhow, I soldered a 3.9k resistor in the top slot of the voltage dividers.



    Then, the final confusion (remember from above: NOT using current sensor voltage divider - NO firmware modification neccesary):

    Instructions for setting up the APM code to use the AttoPilot sensor:

    1. Remove all voltage divider resistors from APM board
    2. In the APM Arduino code's APM_config.h add these lines:
      For 4 cell LiPo add this line: "#define VOLT_DIV_RATIO 16.6" 
      For 3 cell LiPo add this line: "#define VOLT_DIV_RATIO 12.6"
    3. If you have trouble compiling for 1280 board, write additional line to APM_config.h #define LOGGING_ENABLED DISABLED It will prevent error (sketch too big). New board APM2560 does have more memory.
    4. Upload firmware and connect external sensor

    These four steps did not seem to be conditioned by usage of current sensor board voltage divider. Or are they?

    So why am I unable to enter anything in the Battery tab fields?

    What should I do to make it right?

    / Tomas

This reply was deleted.


DIY Robocars via Twitter
RT @chr1sa: Just a week to go before our next @DIYRobocars race at @circuitlaunch, complete with famous Brazilian BBQ. It's free, fun for k…
DIY Robocars via Twitter
How to use the new @donkey_car graphical UI to edit driving data for better training https://www.youtube.com/watch?v=J5-zHNeNebQ
Nov 28
DIY Robocars via Twitter
RT @SmallpixelCar: Wrote a program to find the light positions at @circuitlaunch. Here is the hypothesis of the light locations updating ba…
Nov 26
DIY Robocars via Twitter
RT @SmallpixelCar: Broke my @HokuyoUsa Lidar today. Luckily the non-cone localization, based on @a1k0n LightSLAM idea, works. It will help…
Nov 25
DIY Robocars via Twitter
@gclue_akira CC @NVIDIAEmbedded
Nov 23
DIY Robocars via Twitter
RT @luxonis: OAK-D PoE Autonomous Vehicle (Courtesy of zonyl in our Discord: https://discord.gg/EPsZHkg9Nx) https://t.co/PNDewvJdrb
Nov 23
DIY Robocars via Twitter
RT @f1tenth: It is getting dark and rainy on the F1TENTH racetrack in the @LGSVLSimulator. Testing out the new flood lights for the racetra…
Nov 23
DIY Robocars via Twitter
RT @JoeSpeeds: Live Now! Alex of @IndyAChallenge winning @TU_Muenchen team talking about their racing strategy and open source @OpenRobotic…
Nov 20
DIY Robocars via Twitter
RT @DAVGtech: Live NOW! Alexander Wischnewski of Indy Autonomous Challenge winning TUM team talking racing @diyrobocars @Heavy02011 @Ottawa…
Nov 20
DIY Robocars via Twitter
Incredible training performance with Donkeycar https://www.youtube.com/watch?v=9yy7ASttw04
Nov 9
DIY Robocars via Twitter
RT @JoeSpeeds: Sat Nov 6 Virtual DonkeyCar (and other cars, too) Race. So bring any car? @diyrobocars @IndyAChallenge https://t.co/nZQTff5…
Oct 31
DIY Robocars via Twitter
RT @JoeSpeeds: @chr1sa awesomely scary to see in person as our $1M robot almost clipped the walls as it spun at 140mph. But it was also awe…
Oct 29
DIY Robocars via Twitter
RT @chr1sa: Hey, @a1k0n's amazing "localize by the ceiling lights" @diyrobocars made @hackaday! It's consistently been the fastest in our…
Oct 25
DIY Robocars via Twitter
RT @IMS: It’s only fitting that @BostonDynamics Spot is waving the green flag for today’s @IndyAChallenge! Watch LIVE 👉 https://t.co/NtKnO…
Oct 23
DIY Robocars via Twitter
RT @IndyAChallenge: Congratulations to @TU_Muenchen the winners of the historic @IndyAChallenge and $1M. The first autonomous racecar comp…
Oct 23
DIY Robocars via Twitter
RT @JoeSpeeds: 🏎@TU_Muenchen #ROS 2 @EclipseCyclone #DDS #Zenoh 137mph. Saturday 10am EDT @IndyAChallenge @Twitch http://indyautonomouschallenge.com/stream
Oct 23