ArduPilot / ardupilot

ArduPlane, ArduCopter, ArduRover, ArduSub source
http://ardupilot.org/
GNU General Public License v3.0
10.47k stars 17.12k forks source link

AP_BattMonitor: SMBus Ehancements #6029

Open WickedShell opened 7 years ago

WickedShell commented 7 years ago

Issue details

This is meant to be a tracking issue for planned SMBus specific features, and the required support in AP_BattMonitor. I've had the same conversation 4 times over the last week covering the same topics with different people, so I thought it would make more sense to document everything in one place. (I'm aware of #5900, but that is solo specific).

Features:

Those are just the ideas off the top of my head, I welcome other comments and requests. (This is primarily intended to be a list of common SMBus features however). I'm not promising to address all of these items immediately, but this is whats on my radar, and some of them will be addressed by myself at least soon.

Platform

[ x ] All [ ] AntennaTracker [ ] Copter [ ] Plane [ ] Rover

adrianbostan commented 4 years ago

Hi,

I'm designing a SMBus battery monitor with high accuracy energy accumulation measurement ~ 0.1%.

I've noticed a limitation in the SMBus protocol:

Range: 0 to 32,767 mA for charge or
0 to -32,768 mA for discharge

The issue is that 32Amps it's a big limitation and we need to add an option to select the scaling of the current like : 32,768 ---> 327A.

Also i've noticed a bug the arduplane 4.0.5, BATT_CRM_MAH and BATT_LOW_MAH failsafe are not working with SMBus. Also tested with copter 4.0.5 and it's working.

Regards, Adrian

be-ska commented 1 year ago

I've noticed a limitation in the SMBus protocol:

Range: 0 to 32,767 mA for charge or
0 to -32,768 mA for discharge

The issue is that 32Amps it's a big limitation and we need to add an option to select the scaling of the current like : 32,768 ---> 327A.

The PR #23786 I've just submitted should fix this issue, using the SpecificationInfo() SMBus function.