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 Drones via Twitter
RT @MarvelmindMaxim: Extreme precision for 60 swarming robots. #marvelmind #autonomousrobotics #robotics #swarmrobotics #rtls #ips #indoor…
17 hours ago
DIY Drones via Twitter
RT @MarvelmindMaxim: Precise (±2cm) tracking for racing boats and autonomous boats. Works outdoor and indoor. #autonomous #AutonomousVehic…
17 hours ago
DIY Drones via Twitter
RT @MarvelmindMaxim: Helping PixHawk folks to fly autonomous quadcopters using PX4 and ArduPilot. https://marvelmind.com/drones/ Equally suitab…
17 hours ago
DIY Robocars via Twitter
RT @chr1sa: The @DIYRobocars @donkey_car virtual AI car race is starting in 15 minutes! Watch it live on Twitch https://www.twitch.tv/mossmann3333 htt…
DIY Robocars via Twitter
RT @chr1sa: Don't miss our monthly @DIYRobocars @donkey_car virtual AI car race tomorrow at 10:00am PT live on Twitch. Head-to-head racing…
DIY Robocars via Twitter
RT @sparkfun: Our completed tutorial on building an @NVIDIA Jetson Nano-powered @Sphero RVR gets your bot up and running via teleoperation…
DIY Robocars via Twitter
RT @SmallpixelCar: Freeway test https://t.co/4V5tV9lhIP
DIY Robocars via Twitter
Very small autonomous cars racing, thanks to an overhead camera: https://control.ee.ethz.ch/research/team-projects/autonomous-rc-car-racing.html
DIY Robocars via Twitter
DIY Robocars via Twitter
DIY Robocars via Twitter
RT @chr1sa: Don't miss our virtual AI car race this Saturday! Real developers + virtual cars =🏎️🏎️🏎️ Head-to-head battles with thrills, sp…
Jul 28
DIY Robocars via Twitter
Jul 27
DIY Robocars via Twitter
RT @usashirou1: Jetson nano by Isaac Kaya #jetson https://t.co/Mu1N0CyQkN
Jul 23
DIY Robocars via Twitter
RT @GPUsolution: JetRacer mady by Iflytek company #JetsonNANO #Nvidia https://t.co/MimTymIwge
Jul 23
DIY Robocars via Twitter
RT @openmvcam: I love this: Mega or Mini? Image Classification on the 1MB OpenMV Cam H7 by Ish Ot Jr. in OpenMV, Edge Impulse, Internet of…
Jul 23
DIY Robocars via Twitter
RT @RoboticMasters: This is looking pretty good... but still needs a bit more refinement. Pure OpenCV Turning Sign Detection. No Tensorfl…
Jul 23