I am running APM 2.12

I added a current sensor (details later).

When I run APM terminal and invoke test] current I get good numbers reported for battery voltage, current and mAh keeps climbing.

When I switch to telemetry and HK GS, battery voltage is reported correctly, but battery current is zero and mAh does not change.

Furthermore, when I look at HK's serial diagnostics which interpret the MAVlink packets, the only one that I can see that includes battery information looks like this:

WP#0,Dist=0,Battery=10.795,Mode=,Throttle=0.2

Note the missing Mode value. APM terminal reports battery mode is 4 (as it should be).

There is no current info or mAh info that I can find in the serial streams.

The current sensor that I added is NOT the standard one. It is a Pololu 0 to 30A sensor. I attached it to one the expansion ports on the IMU shield and made the followings changes in the code:

#define CURRENT_PIN_1 6 // in defines.h (AN6)

In APM_config.h I added:

#define CURR_AMP_PER_VOLT 7.52 // Pololu ACS715 is 0-30A 113mv per amp
#define CURR_AMPS_OFFSET 0.454 // Pololu ACS715 has nominal 500mv offset (measured 454mv)

While that installation is non-standard, I don't think that that is where the problem is because APM terminal is returning good readings.

I'm stuck and need to be pointed gently in the right direction.

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • i am having the same problem. the current shows in the CLI but does not comes to the serial data in HK GCS. i think it has to be defined to go to serial 3. I am using attopilot current and voltage sensor. the voltage  is showing on the HK GCS. but current is zero on HK GCS.
  • Developer
    HK-GCS is not compatible with current and mAh usage reporting from APM at this time.  Mavlink has no spot for current, which HK-GCS wants.  It does have a spot for % of battery capacity remaining, which HK-GCS does not use.  It is just a mismatch at present between what can be transmitted with the protocol and what HK-GCS uses.  We have requested that current be added in Mavlink somewhere, but that might be a while before it is implemented.  I do not know what Paul intends in this matter for HK-GCS.
This reply was deleted.

Activity