Read correct battery voltage

Hello,

I am trying to get the correct battery voltage on my navio2.
arducopter seems to display the somewhat correct voltage (17.1V when it should be 16.8V according to my charger).
When using the ADC example (https://docs.emlid.com/navio2/dev/adc/) from the Navio githib repo I get the following output:

➜  ADC git:(master) ✗ ./ADC
A0: 4.9710V A1: 0.0240V A2: 1.5080V A3: 0.0000V A4: 0.0180V A5: 0.0240V
A0: 4.9950V A1: 0.0240V A2: 1.5080V A3: 0.0000V A4: 0.0220V A5: 0.0240V
A0: 4.9920V A1: 0.0240V A2: 1.5080V A3: 0.0000V A4: 0.0200V A5: 0.0260V
A0: 4.9920V A1: 0.0240V A2: 1.5080V A3: 0.0000V A4: 0.0220V A5: 0.0240V
A0: 4.9920V A1: 0.0240V A2: 1.5080V A3: 0.0000V A4: 0.0160V A5: 0.0200V
A0: 4.9890V A1: 0.0240V A2: 1.5080V A3: 0.0000V A4: 0.0160V A5: 0.0260V
A0: 4.9920V A1: 0.0240V A2: 1.5060V A3: 0.0000V A4: 0.0240V A5: 0.0240V
A0: 4.9920V A1: 0.0240V A2: 1.5080V A3: 0.0000V A4: 0.0180V A5: 0.0200V
A0: 4.9950V A1: 0.0240V A2: 1.5100V A3: 0.0000V A4: 0.0220V A5: 0.0240V
A0: 4.9920V A1: 0.0240V A2: 1.5080V A3: 0.0000V A4: 0.0240V A5: 0.0220V
A0: 4.9890V A1: 0.0240V A2: 1.5080V A3: 0.0000V A4: 0.0180V A5: 0.0240V
A0: 4.9950V A1: 0.0240V A2: 1.5080V A3: 0.0000V A4: 0.0160V A5: 0.0260V
A0: 4.9950V A1: 0.0240V A2: 1.5080V A3: 0.0000V A4: 0.0200V A5: 0.0240V
A0: 4.9950V A1: 0.0240V A2: 1.5100V A3: 0.0000V A4: 0.0160V A5: 0.0240V
A0: 4.9950V A1: 0.0240V A2: 1.5100V A3: 0.0000V A4: 0.0240V A5: 0.0240V
A0: 4.9890V A1: 0.0240V A2: 1.5080V A3: 0.0000V A4: 0.0240V A5: 0.0240V
A0: 4.9920V A1: 0.0240V A2: 1.5080V A3: 0.0000V A4: 0.0180V A5: 0.0280V
A0: 4.9950V A1: 0.0240V A2: 1.5120V A3: 0.0000V A4: 0.0160V A5: 0.0240V
A0: 4.9920V A1: 0.0240V A2: 1.5080V A3: 0.0000V A4: 0.0200V A5: 0.0240V
A0: 4.9920V A1: 0.0240V A2: 1.5080V A3: 0.0000V A4: 0.0200V A5: 0.0240V
A0: 4.9920V A1: 0.0240V A2: 1.5100V A3: 0.0000V A4: 0.0240V A5: 0.0240V
A0: 4.9950V A1: 0.0240V A2: 1.5080V A3: 0.0000V A4: 0.0240V A5: 0.0240V
A0: 4.9950V A1: 0.0240V A2: 1.5080V A3: 0.0000V A4: 0.0220V A5: 0.0220V

How do I get the correct voltage? Do I just need to multiply one of the values (I guess A2?) with the correct scaling? If yes, why wasnt this done in the example?

Also, can I get the Ampere that is currently used? I guess its Channel A3, but why is it labeled with Voltage in the example? Is the correct unit Ampere?

I found some other topics related to this, but they didnt really help me and it was stated that it “will be fixed”.

Thanks
Mirko

Nothing? Is nobody using the voltages?

Hi @mirkow,

Navio2’s ADC example shows 6 values:

A0 - board voltage
A1 - servo rail voltage
A2 - Voltage on Power port
A3 - Current on Power port
A4 - ADC port voltage
A5 - ADC port current

Navio2’s examples were made to test if the board works. They were not intended to make any precise measurements.

If you need to measure battery voltage you can apply a 1.13 multiplier to the A2 channel readings in C++ or Python examples code.

Thanks, I did that but the multiplier is around 11. I didnt find the other thread though and didnt know if it is linear.

Is it the same multiplier for the current?
That is difficult to measure for me since it needs to be measured during operation.

Hi @mirkow,

The multiplier for voltage is 11.3, while for the current it is 17.0. The voltage can be calibrated according to that guide.

However, there is no such procedure for the current value, that is why the real current numbers might slightly differ. However, it could be still used just fine for relatively accurate monitoring.

Great thanks. Would be great to include that in your documentation.

Hi @mirkow

Thank you. We will add that info to our docs.

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.