Battery Sensor Current Reading Error

Hi Alex,

A bug was found in MP and it was corrected today. Please try with latest MP beta.

Just wanted to confirm everything has worked fine. Multiple test flight have been conducted and readings are correct. Thanks for your help :)!

Hello,
I just found this thread searching an issue I have with Arduplane 3.8beta5. Everything was working fine with Arduplane 3.7.1 stable, but when I installed the 3.8beta5, I notice that the current readings in Mission Planner were broken, sudden jumps from 0 to 140 Amps while idle. This was with a pixhawk clone (lite 32 from hobby king), so I though the sensor was broken.
Then I changed also to Arduplane 3.8beta5 in another plane with a original 3DR pixhawk (version 1), and got the same problem! I did not change anything else, same hardware, same parameters, ā€¦ only using the default battery pins. Tried to calibrate current sensor again but no luck.
So, I understand after reading your posts that there is some bug in Mission Planner (not in Arduplane) that is solved in the last beta? It is weird that the issue appears when changing Arduplane version but the bug is in MP.

Thanks in advance, regards,
Adolfo.,

Hello, all.

I have a Pixhawk 2.1 running with dual power sources and two PMs. Iā€™m running MP 1.3.48.3 and Copter V3.4.6. Iā€™ve configuring the voltage and current per the notes in the Configuration page (BATT_VOLT_PIN = 13, BATT_CURRENT_PIN = 14), and both values on the Flight Data Quick display are incorrect. When I set BATT_VOLT_PIN = 2 (Pixhawk/Pixracer/Navio2) the voltage is correct. Cannot get current to display properly.

Just wondering how others are configuring for both batteries, and how to get the current to work properly. Doesnā€™t seem the fix mentioned previously is working.

really ?
http://ardupilot.org/copter/docs/parameters.html
BATT_MONITOR = 4
BATT2_MONITOR = 4
BATT_VOLT_PIN = 2
BATT2_VOLT_PIN = 13
BATT_CURR_PIN = 3
BATT2_CURR_PIN = 14
etc.
Set ALL the BATT_xxx and BATT2_xxx parameters to the correct values and do a power cycle.

1 Like

If this doesnā€™t fix itā€™s probably because you havenā€™t calibrated the sensors. http://ardupilot.org/copter/docs/common-power-module-configuration-in-mission-planner.html

1 Like

Hi, folks!

First, thanks for the quick response and help. I do appreciate it.

Second, this didnā€™t work. I tried these values AND Iā€™ve previously attempted to calibrate the sensor values. Setting the values to ones above will give a voltage reading but no current readings.

With regard to calibrating the sensor, it seems like it is possible with the primary battery values (Batt) but not with Batt2 values. ā€œOtherā€ is not even a selection on the drop down for Batt2. Itā€™s not clear to me why the drop down lists are different between the two. Seems like the lists should be the same. With current measurements, the system would not even accept a measured current.

Third, (a little soap boxing) the values that were provided above do NOT meet the documentation in either the Copter Docs (provided link) nor the notes on the Configuration page in MP. In both of these location the docs specify that BATT_VOLT_PIN be set to 13 for BOTH of the batteries. Same for the current values. When setting the values per the actual documentation, I still only get voltage and zero current.

I agree but for the moment they are not, simplest way is probably to set the current and voltage pins for each module on batt1, calibrate them and then copy those values in from the parameter list to batt2

The PM1 pins are the same as the original pixhawk so only the PM2 pins are explicitly listed

@ScottR Iā€™m having the same issue as you. My voltage is correct, but Iā€™m not getting any current readings. Looking forward to getting this one resolved. I had to find this thread to realize we needed to set BATT1 to 2 and 3 and BATT2 to 13 and 14.

Clearly this is a common problem, Iā€™ve created a pull request to update the documentation to make it clearer which pins to use with the Pixhawk 2, https://github.com/ArduPilot/ardupilot/pull/6492.

In terms of current readings, i use different modules to those that came with the pixhawk and get correct current readings so the pins are correct. Most likely itā€™s due the voltage range the current sensor produces, iā€™ll have a play when i next get access to my pixhawk and let you know,

@fsherratt Thanks, I saw the PR, that should definitely help.

Hmm, well it seems like the ProfiCNC power modules are the issue. I may switch these out to the mRobotics PMs. For the sake of clarity, here are my settings (running ArduSub 3.5):


@fsherratt has had the pull request accepted for fixing the docs, if others could use that as a guide, that would be good.

Thanks for assisting with the docs!

The pull request has been accepted

Iā€™m having similar issues with Mauch Power modules. with the recommended setup above 2,3 and 13,14. on battery 2 Iā€™m always getting voltage around 20v without any batteries or both etc. Really donā€™t have time to debug this right now. current when batt 2 is plugged in is 60amps with nothing powered on bothe monitors, remove batt2 and normal batt 1 current is read.

same here. PX2.1 w/proficnc mini power brick, no current info (voltage ok) plugged into power1. Tried different BATT_CURR_PIN settings, no result.

Following any suggestion if someone make it work

Yep after sorting out my head Iā€™m getting what look like good independant readings on both voltages
Getting a reading for current 2 and 1 around 2.5 amps with 8 motors at 80% (no props) using the calibrated amp per volt and voltage dividers with the mauchā€™s.
Seems to be all good now using the following

BATT_MONITOR = 4
BATT2_MONITOR = 4
BATT_VOLT_PIN = 2
BATT2_VOLT_PIN = 13
BATT_CURR_PIN = 3
BATT2_CURR_PIN = 14
etc.
Set ALL the BATT_xxx and BATT2_xxx parameters to the correct values and do a power cycle.

Bear in mind that unless both batteries are exactly the same voltage one is going to be drawing current over the other (which is why I thought one monitor wasnā€™t sensing any current)

Has anyone been able to get the ProfiCNC power modules to read current? Voltage is working but no current reading. With BATT_CURR_PIN = 3 I get a constant reading of 0 amps. If i set BATT_CURR_PIN = 14 I get some numbers and can calibrate the current reading but the current stays constant and does not move when spooling up the motors. Any ideas on how to get an accurate current reading with these modules?

Just forked out $350 for a genuine pixhawk2 cube, been trying all day to get the included power module to show current, but itā€™s stuck at 0, BATT_CURR_PIN is set to 3, if I change to other pins I get the floating voltages displayed, but itā€™s like 3 is pulled to ground or something. The only reason I looked into it was that I was getting bad voltage readings while flying. It keeps sounding the battery alarm, but when I land and check it, itā€™s fine, also having compass issues, but canā€™t run compassmot without the current sensor working.

When I look at the volts in the log itā€™s strange, it starts at 12volts, which on this flight was correct, then as the first minute goes on it gets less and less until it hits 10 and the alarm is triggered, as soon as I land, it shoots back to 12v, Itā€™s a gradual fall as well, so I know Iā€™m not looking at the current.

Please help, Desperate.

I fixed the voltage problem, was .3 ohm resistance in one of the plugs, doesnā€™t explain why no one on the forum can get the included power module to read current though? has anyone got the included power module to read current?

I am unable to receive correct current data from MAUCH HS sensor board 200A, seems to only display the current used by Pix CUBE and attached devices. When I increase power to say 30A there is no change on the Bat Current (Amps) from the .23 (fluctuates).

Everything was working fine then all of a sudden my current is not being updated correctly.

I have attached my bat params, I really would appreciate some help.

Thank you for your time.