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
13 hours ago
DIY Robocars via Twitter
14 hours ago
DIY Robocars via Twitter
14 hours ago
DIY Robocars via Twitter
RT @SmallpixelCar: Test my algorithm on real car https://t.co/idWRxcrmuK
DIY Robocars via Twitter
RT @breadcentric: Evo is coming to town. If you have an #AWS #DeepRacer, you can purchase an extension pack! https://t.co/w60JwI98Hp #Machi…
DIY Robocars via Twitter
DIY Drones via Twitter
RT @chr1sa: My talk on PX4 and FAA certification is coming up at 1:45 PST today on the PX4 Dev Summit livestream. Includes some cool new st…
Jul 7
DIY Drones via Twitter
RT @seesharp: I'm tuned into the PX4 / Dronecode free live conference. Great stuff. Microsoft AirSim talk in 10 minutes. https://t.co/0zbZ2…
Jul 6
DIY Robocars via Twitter
RT @masato_ka: 距離センサを3つとESP32を付けたラジコンカーをDonkeyCarライクにNNで自動走行。3層FC極小モデルをTensorFlow Lite for microcontrollerで動かしてる。機体は借り物でRumiCarって言います。Tenso…
Jul 5
DIY Robocars via Twitter
RT @SmallpixelCar: My car was able to go all the way autonomously until the crosswalk. It was only 100 yards from the target. What should b…
Jul 4
Liam left a comment on Agricultural UAVs
I'm Liam from T-MOTOR. I would like to reach out to see if there is any possibility for us to work together.
We are a propulsion system manufacturer who offers motors, propellers and ESCs for all kinds of drone applications which vary from secur…"
Jun 30
DIY Robocars via Twitter
RT @SmallpixelCar: Smart move. The car used the shadow to guide it through the bridge. This was never in the training samples. But it learn…
Jun 30
DIY Robocars via Twitter
RT @SmallpixelCar: Getting closer to the target. Single camera. Untrained road. https://t.co/Wsr7RwDamj
Jun 29
Richard Cox left a comment on Australia
"Anyone in the DIYDRONES Australian subgroup based in Alice Springs, NT?
I am experimenting with Ardupilot (standard Arduplane), Pixhawk 4 FC in a 4-ch
RC "AXN Floater Jet" foamy plane..."
Jun 29
Omar Sykes left a comment on Australia
"Hi everyone, I am looking for someone who is good at drone building, repair and software in Adelaide. Please give me a call on 0477 319 219."
Jun 29
DIY Robocars via Twitter
RT @RoboticMasters: #donkeycar https://t.co/czuLoVRcA4
Jun 29