Inaccurate current measurement - hardware problem?

Hi,

I have observed that the current measurements of my Navio2 are very inaccurate and too low with the current that by boat draws - that means around 5 amps and lower. My case seems to exactly similar to this old thread Problem with the ADC power module current input on Navio2. I can also read reasonable values from the current sensing pin with multimeter but not with Navio2.

Is it a confirmed design flaw that the voltage divider resistors in the Navio2 board make the input impedance too low for the standard power unit at low current levels?

I guess that with my experience about soldering surface mounted components I am not going to try if changing the resistors into 50K would help. However, I might have a try by adding an operation amplifier (OPA340, for example https://static.sparkfun.com/datasheets/Sensors/Current/ina169.pdf) between the power cable and power port of Navio2. I wonder if anyone has been trying that before and if it helps. Any workarounds would be appreciated as well, like if it would work better to measure the voltage of the current sensing pin directly with Raspberry.

Hi @jukka.rahkonen,

Welcome to our community forum!

You need to multiply the current and voltage readings from ADC onto the coefficient to get the real values. For current, it is 17.0 by default.

However, this value might slightly differ from setup to setup due to the characteristics of the various power modules. You can additionally tune that coefficient by cross-checking the current with the multimeter as you did before. This guide in our docs includes more info on that.

Hi,

I should have mentioned that I have followed the documentation and I use value 17 in Ardupilot settings. However, like in the comments in post Problem with the ADC power module current input on Navio2 the multiplication factor should be set somewhere are range 100-150. Unfortunately the response is not linear over current range 1-5 Amps so fiddling with the coefficient is only a workaround.

I acquired my board three years ago but it has been unused until now. Perhaps the issue affected only those older boards (the other post is from 2016) if you know that the response with new boards is linear even at low current values, and coefficient around 17 is good to use.

Hi Jukka,

Sorry it took so long to get back to you.

We’re currently investigating this issue. To determine the cause of it, we will need to fully understand your hardware setup. Please, share the photos of it with us.

Hi,

The hardware setup is simple.

  • Input 18 V through fuse box and reverse polarity protection unit (from the bottom).
  • Emlid Power unit 1.0 (bottom left).
  • SiK radio (right)
  • RC receiver and PWM to PPM converter (left)
  • Navio2 servo rail powered with LM317 regulator (next to the power unit).
  • Two BlueRobotics basic ESCs.
  • Output cords for two BlueRobotics T200 thrusters (on top).

This table shows the current measured with amp meter (promised accuracy +/- 2.5% but the measurement was noisy) and current from Navio2 (taken from Mission Planner). Amperes per volt setting was set to the default value 17. As a load I used one BlueRobotics thruster submerged into a small water tank. That was a poor test setup because cavitation made the load unstable and at 4.4 amps I had to stop the test to protect the thruster. However, the numbers should show what is essential.

reference A measured A
========= ==========
0.05 0
0.14 0
0.30 0
0.73 0.1
1.2 0.13
1.95 0.34
2.7 0.4
3.45 0.44
4.4 0.47

1 Like

Hi Jukka,

Thanks for the detailed description!

We’ll check it and I’ll get back with the news.

I managed to make one more measurement at about 14 A. Mission planner showed 1.3 A which means that the response curve is actually rather linear, just the coefficient 17 should rather be ten times larger.

Hi,
I’m not all surprised by that.
In one of the Wiki’s I found a report that most current sensors are designed for larger currents as drones usually use currents in excess of 40A. So whilst you can measure something in regards to low current it is not reliable unless you have at least a current of 20A or more.
Also whilst the current advice is for at least 10A for any calibration, (Power Monitor/Module Configuration in Mission Planner — Copter documentation)
in other documents I’ve found clear advice of using at least 20A for any calibration and reliable readings.
Yes, roughly ten times sounds about right in MP settings. If remember correctly I’ve got around 158 set as Amps per Volt for my 3S battery setup. In my 6S drone I’ve got 208 Amps per Volt and a voltage divider of 10.9

In my case I have the advantage of having a laboratory power supply available and can dial in something like 12V and a current of 25A for calibration. Which means I have a precise comparison between actual current to indicated current in MP. - But the more basic way works as well providing you can achieve a higher current for initial configuration.

Another thing I’ve noticed over time is that setting the current divider in QGroundControl was not successful in some earlier versions - haven’t tried a recent version. Also had that problem using earlier versions of MP running on Linux. ( I believe MP 1.3.74 on Linux works as it uses Mono )
Yet running MP on Windows worked fine.

See also this:

CodeChiefTony WallPro user

Dec '15

Current sense at low amps is not accurate, take the props off and run it up to about 10 amps then take measurements again to calculate the amps per volt. That is documented on the APM Web site. I don’t think Navio is any better at this (the original Pixhawk and APM compatible PDB I use both have the same limitation and the Navio power cable appears to be identical to the Pixhawk cable).

keithc

Dec '15

Hmm, yes the accuracy improves as the Amp goes up.

Because the code (in addition to voltage monitoring) monitors the current usage and triggers the failsafe on low battery, I found the the current calculations may be tripping things up much earlier than expected. I am going to change it to monitor just the voltage for failsafe, until I test a bit more on the current side of things.

I made a small test with the power unit, laboratory power source, and an adjustable resistive load. I measured the voltage from the current output pin (I) of the power unit directly with a multimeter and it seems that wiki is giving too pessimistic view about the accuracy and reliability of the current sensors. Of coarse both the sensor and the measuring circuit have they roles and the measurement as a whole can be just as unreliable as the wiki describes.

In my test the voltage in the current sensing pin of the power unit was quite stable beginning at about 2.0 A current. Input voltage affects also the voltage level in the I pin, not only the current so the system should be calibrated to suit with the battery pack. Further research would be needed, but it may be that other flight controllers are also using a measurement circuit that does not really match with their power units.

These three points are with 12 V input.

Amps / V output of the I pin / coefficient Amps/Volt

2.0 A / 0.178 V / 11.23
5.0 A / 0.430 V / 11.63
10,0 / 0,850 V / 11.76

Hi Jukka,

Sorry for the delay.

We need to reproduce the setup on our side to address your request, but it might take more time as we are working remotely. I will let you know once we’ll reach some progress.

Hey everyone,

Thank you for all the test results! Let me conclude this topic.

There are certain difficulties in obtaining the correct current measurement. The specifics of different modules, the setup differences affect the value of the transformation coefficient. This leads to the fact that voltage can be calibrated but the same process can’t be fully applied to the current measurements.

We’ll make sure to reflect this in our docs in a more clear way. Also, we’ll change the recommended coefficient value for the power module so that it’s easier to start tuning the settings to the specifics of your setup.

However, as these values are generally going to be different for each of the users depending on the load and setup, it can hardly be possible for us to create a unified table of coefficients to be used.