This is a copy from a Ground Stations thread where a user reporded unable to enter anything into the parameter fields in the battery tab.

- 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 (apart from selecting Monitor and Capacity):


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


Views: 1088

Replies to This Discussion

Since the scale output is up to 3.3V and APM analog input takes up to 5V, i would connect this sensor without any resistor.

In this case, you'll lose some reslotuion, since APM expect 5V (max) on analog....unless there's a way to change reference voltage for this specific port. In some PIC's (microchip) you can change reference voltage by hardware and software, but it's for all AD Ports. I don't know about atmel.

I just had a similar problem where the voltage measured by the APM/AttoPilot was a bit lower than the measured voltage (~10.5V vs. 12.2V). I modified the VOLT_DIV_RATIO constant in the header until the voltages matched.


I don't have any voltage divider resistors installed on the APM board. After changing the divider ratio, I checked against three different LiPos and measured matched expected within .1V in all cases.


Thanks for comment Jonis, and I am sure you are right.

But it does not really address the core issue here:

- Not being able to enter values into the Battery tab fields.

Hi Brian, thanks for reply

Interesting that you get it to work without any voltage divider resistor on the APM board, despite of the instructions in the wiki. Have you added any voltage divider resistor on the AttoPilot sensor board?


Did you use the Mission Planner / Configuration / Setup / Battery tab to enter calibration values?

/ Tomas



I got my AttoPilot sensor from jDrones, if that makes any difference. I didn't see any place for a resistor on the sensor board, nor do I recall anything from the datasheet. 


I wasn't able to change the values from the Mission Planner, so I just brought up the 2.0.49 source in the Arduino IDE and added the line  in APM_Config.h, recompiled, re-downloaded to APM.




I also got my sensor from jDrones, so we have tha same. I believe the AC2 wiki shows a photo of a previous generation of current sensor, maybe the voltage divider option was removed on the new generation sensor board?

Ok, you too could not enter anything into the Planner Battery tab calibration fields. Now there are at least three persons reporting the same issue and I hope it is being adressed by the developers, but so far I did not see any confirmation that this is a known issue, to be dealt with.

Guess I will try to work it around same way as you did.

By the way, have you gotten the current measurement to work ok?

I only saw near-zero values from the CLI, I presume because I had a full battery and no load on the system. I connected via XBee and saw the battery percentage at 99%. I ran the motors for a little bit and saw the value drop over time. I am guessing that it's working correctly, but I'm not going to trust the numbers completely until I get some more experience with the system.



I did the same thing but as its relative, I found as the voltage dropped it was no longer accurate, as its a 'ratio'

I wonder if anyone has been able to enter values in the boxes?


Where are the programmers to answer this Q?

I also could not enter anything into the Planner Battery tab calibration fields . I have tried  2.0.48 ,2.0.49  with  Mission_Planner  1.0.84 ,  1.0.85 and 1.0.86 ,  all the same.


the battery tab is not implemented in AC2 or AP at the moment. it is in AP beta

Thanks for the headsup, I thought I was going crazy!


© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service