ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

PX4 Battery monitor current sense not working - fw 2.75

Open MrMap opened this issue 13 years ago • 19 comments

Upon bench testing my PX4 after firmware upgrade to 2.75 and MP 1.2.85 I am unable to get any battery current reading, using the Battery monitor function.

The pin selected is still 101, as before. Last time I played with it was some time agon, on 2.74 and then it worked, so I suspect firmware / software issue here.

batterymonitormp

parametercurr

MrMap avatar Nov 04 '13 18:11 MrMap

Same problem here. Quick workaround: use one of the analog inputs of the FMU (I used the 6.6V input and adjusted the BATT_AMP_PERVOLTn param).

hsteinhaus avatar Nov 08 '13 18:11 hsteinhaus

@hsteinhaus Smart workaround! Issue not fixed in 2.76

MrMap avatar Nov 10 '13 15:11 MrMap

Is this fixed now in 3.1.1? I think I have the same problem.

totaltmega avatar Jan 28 '14 14:01 totaltmega

It should be working in AC3.1.1 at least for the Pixhawk. I'm slightly less sure about the PX4.

rmackay9 avatar Jan 29 '14 01:01 rmackay9

Maybe this is the fix we have been waiting for? https://github.com/diydrones/PX4Firmware/commit/2699e15d52962e24f6b5aa44bce8d23b49d570e9

I tried to access the shell and did a adc test in px4io and it said it had 2 adc, the first was around 2000 in value i think and the second was 0 all the time. To try this fix, can I take this bin file (http://firmware.diydrones.com/PX4IO/latest/PX4IO/px4io-v1.bin) or do I need to compile the arducopter firmware myself?

Thanx for all your work Randy :)

totaltmega avatar Jan 29 '14 08:01 totaltmega

On closer inspection of the px4io firmware I saw that px4io v1 has 2 adc, first is ADC_VBATT which is defined and is meassured and second is ADC_IBATT which is not defined, but ADC_IN5 is but never used, I think ADC_IN5 should be renamed to ADC_IBATT and it will be working. adc_5

totaltmega avatar Jan 29 '14 08:01 totaltmega

It worked, compiled the latest Arducopter 3.1.1rc2 with the following changes: https://github.com/totaltmega/PX4Firmware/commit/c08af3473325a92d3576576d1e028403776540b1 Hope I did right :P

totaltmega avatar Jan 29 '14 14:01 totaltmega

Feel free to add the fix in PX4Firmware main :)

totaltmega avatar Feb 03 '14 10:02 totaltmega

Is this fix added yet?

totaltmega avatar Feb 24 '14 06:02 totaltmega

I cant confirm that in 3.1.3 current sensor does NOT work оn pin101. This evening I will try totalmega's solution.

AntonGmKz avatar Apr 21 '14 09:04 AntonGmKz

ChesterKz did you try it? Can someone check this out and add it before 3.2?

totaltmega avatar Apr 27 '14 07:04 totaltmega

I tried to it. But it doesn't help for me. I switched to pin12 and pin13. They work fine.

AntonGmKz avatar Apr 27 '14 10:04 AntonGmKz

This feature is part of the 3.2 release.

CraigElder avatar Jul 11 '14 18:07 CraigElder

I don't think this fix was ever applied to the diydrones repository.

It's here: https://github.com/3yc/hott-for-ardupilot/blob/cb57931a748056419d92f5c155df32d28a7f7584/PX4/hott-px4-code/PX4Firmware/src/drivers/boards/px4io-v1/board_config.h

But, not here: https://github.com/diydrones/PX4Firmware/blob/ArduCopter-3.2.1/src/drivers/boards/px4io-v1/board_config.h

abencomo avatar Apr 15 '15 16:04 abencomo

How about this issue? Still experiencing it on APM:Copter V3.3.2.

kallaspriit avatar Jan 06 '16 18:01 kallaspriit

I have not checked it and have since a setup like hsteinhaus below:

hsteinhaus commented on 8 Nov 2013 Same problem here. Quick workaround: use one of the analog inputs of the FMU (I used the 6.6V input and adjusted the BATT_AMP_PERVOLTn param).

Would be good to have it working non the less!

totaltmega avatar Jan 06 '16 19:01 totaltmega

Seems like a really simple fix to just merge with the diydrones repo, any reason this has not been done?

kallaspriit avatar Jan 07 '16 10:01 kallaspriit

@kallaspriit, are you using the older PX4 or a Pixhawk? See links below and scroll down a bit to see the pictures. Pixhawk: http://copter.ardupilot.com/wiki/common-pixhawk-overview/ PX4: http://copter.ardupilot.com/wiki/common-px4fmu-overview/

If you're using a Pixhawk I'm certain that current monitoring is working.

rmackay9 avatar Jan 07 '16 11:01 rmackay9

I'm using the older PX4FMU+PX4IO combination.

kallaspriit avatar Jan 07 '16 13:01 kallaspriit