Integrating Custom STM32 Servo Health Monitor via DroneCAN / Custom ArduPilot Peripheral

Hello ArduPilot Community,

I am developing a custom subsystem and want to integrate it directly into the ArduPilot ecosystem rather than running parallel hardware.

My Current Setup & Hardware:

  • Custom Hardware: An STM32-based PCB acting as an intelligent servo power distribution and health monitoring board.
  • Capabilities: Powers 12V high-voltage servos externally, monitors per-channel current, and provides hardware-level overvoltage, overcurrent, and temperature protection.
  • Current Telemetry: The STM32 detects faults/alerts and currently transmits this data via a completely separate, dedicated telemetry module (independent of the Pixhawk).

Goal:
I want to eliminate the secondary telemetry module and make this custom PCB a native ArduPilot peripheral (similar to how an external GPS, airspeed sensor, or EFI system behaves), routing the health data directly through the flight controller’s telemetry stream.

Questions for the Community:

  1. DroneCAN Feasibility: Is it possible to port an STM32 MCU over as a custom DroneCAN node? What is the recommended workflow or stack (e.g., using AP_Peripheral or libcanard) for a custom health-monitoring node?
  2. Existing Messages vs. Custom Fields: Are there existing DroneCAN / ArduPilot messages that support per-channel servo diagnostics (current, temp, status flags), or will I need to define custom DSDL messages?
  3. Driver Architecture: How should I approach writing the ArduPilot-side frontend/backend driver to parse this data and potentially trigger failsafes if a servo channel reports an overcurrent or temperature alert?

I would highly appreciate any guidance on the recommended architecture, code repositories to look at for reference, or best practices for implementing this.

Thank you!