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?

Views: 7043

Reply to This

Replies to This Discussion

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:

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.

 

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

As per today, calibration function not yet implemented in MP.

Read this thread: http://diydrones.com/group/arducopterusergroup/forum/topics/unable-...

So, until further, we can stop trying...

Which means only way (that I am aware of) to get the AttoPilot voltage & current sensor to do its job is to add some lines in the APM_Config.h file. Here are my lines:

#define INPUT_VOLTAGE         4.66

#define VOLT_DIV_RATIO       15.574

#define LOW_VOLTAGE     10.4

#define CURR_AMP_PER_VOLT    31,2618

#define BATTERY_EVENT        ENABLE

# define HIGH_DISCHARGE     2000

Comments:

I measured the input voltage on the Oilpan shield.Measure and enter this before you start tweaking exact values for Volt div ration and Curr amp per volt.

These values works for me - reports voltage within 0.1V and battery discharge indication seemingly within some single %. I had to tweak the values at bit to get that good precision.

 

As you see I have also tried to activate low level alarms, but without effect. I was hoping to get an alert in Mission Planner when the threashold were exceeded, but nothing happens, don´t know why...

 

Hardware setup in my case: 3S LiPo, AttoPilot current sensor 90A/50V (latest model, no voltage divider option), NO voltage divider resistor on the ACM Oilpan board.

Good luck!

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?

But what video??

Are you saying that you have identified a specific resistor on the latest version sensor board which (the resistor) is today making a voltage divider? Ok, maybe I understand if I get to se that video...?

I think the sentence about not using the voltage divider on the sensor board refers to a previous version sensor board, designed with a dedicated slot for soldering an optional divider resistor. And that option was removed upon releasing the new sensor board version.

Anyhow, my setup works pretty well, so I guess I will keep it as is... Plenty of other matters to struggle with ;)

Oooops here is the link vimeo.com/9124273 

Aha! Watched the video.

Well, I guess following those instructions MIGHT enable better resolution in the AD conversion. As I believe the signal min/max range from sensor board would be more on par with the AD converter.

Still, it seems to work satisfying as I have it now.

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

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.

I've had troubles calibrating mine due to the mission planner shows the plane powered by USB not the BEC. I tried using 63.6 as the divider. I got massively high values, but that gave me a clue. I divided the high battery voltage by the high mission planner voltage and got 0.89.

So I calibrated the voltages correctly in the mission planner using the instructions from the Wiki. I found that after changing a value you need to click around the text fields a few times for the other values to settle.

Once the voltage showed correctly in the mission planner HUD I went to the raw parameters in the config and divided the voltage_divider value by 0.89. Once I'd entered this new value, the voltages showed correctly in my OSD when powered by the battery. :)

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.

Reply to Discussion

RSS

Groups

Season Two of the Trust Time Trial (T3) Contest 
A list of all T3 contests is here. The current round, the Vertical Horizontal one, is here

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service