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

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,

Hello, all.

I have a Pixhawk 2.1 running with dual power sources and two PMs. I’m running MP 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 ?
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.

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,

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

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.