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):

3690894831?profile=original

 

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

http://code.google.com/p/ardupilot-mega/wiki/Voltage

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: 
http://dlnmh9ip6v2uc.cloudfront.net/datasheets/Sensors/Current/DC%2...)

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.

AttoPilot_current.jpg

 

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

 

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

Join diydrones

Email me when people reply –

Replies

  • Cross reference to other relevant thread:

    http://diydrones.com/forum/topics/voltage-sensor-calibration

    Sorry for any multi thread mess confusion...

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

     

    Where are the programmers to answer this Q?

  • 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.

     

    b.

  • 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.

     

  • 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.

This reply was deleted.