Skip to content

AP_Periph Add Actuator Telemetry Support#31557

Merged
tridge merged 3 commits intoArduPilot:masterfrom
Huibean:pr-ap-periph-add-actuator-power-monitor
Dec 8, 2025
Merged

AP_Periph Add Actuator Telemetry Support#31557
tridge merged 3 commits intoArduPilot:masterfrom
Huibean:pr-ap-periph-add-actuator-power-monitor

Conversation

@Huibean
Copy link
Copy Markdown
Member

@Huibean Huibean commented Nov 20, 2025

add AP_Periph Actuator telemary support

Test and development hardware: VM-L431-SRV-Hub-4CHP

  • VM-L431-SRV-Hub-4CHP has 4 adc channel for current sampling on each Servo port power supply
  • this PR will add support to read adc value and covert it currect, compare with preset max currect and return power percentage to Dronecan uavcan.equipment.actuator.Status(1011), possible to detect a block
  • new params
OUTx_TELEM_RATE 25     #telem rate in Hz, 0 to dsiable
OUTx_CURR_PIN 9        #current sample pin
OUTx_AMP_OFFSET 0      #current offset
OUTx_AMP_PERVLT 10     #current amp per voltage, ie gain 100V/V, Resistance 1mΩ
OUTx_CURR_MAX 2.5      #max current, to calculate the result of power usage percentage
f2ca6ef75b7c8a4c25993f51089a4234 VImdrones Product Pinout 025

84d4feffa8db7a570dc3112279f4ce05

@Hwurzburg Hwurzburg added the WikiNeeded needs wiki update label Nov 20, 2025
@IamPete1
Copy link
Copy Markdown
Member

IamPete1 commented Nov 24, 2025

This should go via the existing servo telem lib. I have a branch that adds support for that to periph.

Edit: I have opened a draft PR. #31577

Copy link
Copy Markdown
Contributor

@tridge tridge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer that this be in Tools/AP_Periph/actuator_telem.cpp, including a parameter table, with the telem rate, offsets and scaling as single parameters, the only per channel parameters would be the current pin
So the idea is to minimise the impact on the rest of the code, and isolate the changes as much as possible in Tools/AP_Periph/actuator_telem.cpp

@tridge
Copy link
Copy Markdown
Contributor

tridge commented Nov 25, 2025

@Huibean have a look at Tools/AP_Periph/batt_balance.cpp as an example for a similar task

@CraigElder CraigElder changed the title AP_Periph Add Actuator Telemary Support AP_Periph Add Actuator Telemetry Support Nov 25, 2025
@Huibean Huibean force-pushed the pr-ap-periph-add-actuator-power-monitor branch 2 times, most recently from 1724bfc to cbfbe7f Compare December 5, 2025 09:18
@Huibean
Copy link
Copy Markdown
Member Author

Huibean commented Dec 5, 2025

2025.12.05 update
move to Tools/AP_Periph/actuator_telem.cpp
new param format

ACT_TELEM_RATE 10
ACT_NUM_CHANS 4
ACT_CURR_PIN1 9
ACT_AMP_OFFSET 0
ACT_AMP_PERVLT 10
ACT_CURR_MAX 2.5
image image image

@Huibean Huibean force-pushed the pr-ap-periph-add-actuator-power-monitor branch 2 times, most recently from dc67c45 to 37f5bb1 Compare December 8, 2025 12:58
@Huibean Huibean force-pushed the pr-ap-periph-add-actuator-power-monitor branch 4 times, most recently from 22c3641 to cab9c9f Compare December 8, 2025 16:27
@Huibean Huibean force-pushed the pr-ap-periph-add-actuator-power-monitor branch from cab9c9f to 48a62db Compare December 8, 2025 16:31
@Huibean Huibean removed the request for review from peterbarker December 8, 2025 16:32
@tridge tridge merged commit ad51931 into ArduPilot:master Dec 8, 2025
107 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WikiNeeded needs wiki update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants