DroneCAN ESCs
PX4 supports DroneCAN compliant ESCs.
Supported ESC
INFO
Supported ESCs in ESCs & Motors may include additional devices that are not listed below.
The following articles have specific hardware/firmware information:
- PX4 Sapog ESC Firmware
- Zubax Telega
- Vertiq (larger modules)
- VESC Project
- RaccoonLab Cyphal and DroneCAN PWM nodes
Hardware Configuration
General DroneCAN hardware configuration is covered in DroneCAN > Hardware Setup.
DroneCAN ESCs should be on their own dedicated CAN interface(s) because ESC messages can saturate the bus and starve other nodes of bandwidth.
PX4 Configuration
DroneCAN peripherals are configured by following the procedure outlined in DroneCAN.
In addition to the general setup:
Set UAVCAN_ENABLE to
3.TIP main (PX4 v2.0)
There is no need to enable UAVCAN_PUB_ARM.
In earlier versions you would need to set
UAVCAN_PUB_ARM=1in order to publish the ArmingStatus (this is required by some ESCs in order to respond correctly during both flight and Actuators page tests). The status is now published automatically ifUAVCAN_ENABLE=3.Select the specific CAN interface(s) used for ESC data output using the UAVCAN_ESC_IFACE parameter (all interfaces are selected by default).
Configure the motor order and servo outputs.
Reversible Motors
main (PX4 v2.0)Motors can be reversible "on the fly" (bidirectional) if the motor hardware supports reversal, the ESC firmware is configured for 3D/bidirectional operation, and the motor is set as bidirectional in the actuator configuration.
When configured as bidirectional, PX4 commands the motor with a signed uavcan.equipment.esc.RawCommand value, as defined by the DroneCAN ESC message protocol:
- Zero: Motor stop / neutral
- Positive values: Forward thrust
- Negative values: Reverse thrust
Motors that are not configured as bidirectional continue to receive positive values only.
Verifying Operation
Check the sign of the RPM reported in the ESC telemetry to confirm that the ESC is interpreting negative commands correctly and actively spinning the motor in reverse.
Reversible motors may also be used in Motor Failure Recovery to keep a hexarotor controllable after a single motor failure. That case still needs ESCs configured for reversal. However it is not necessary to set the motor as bidirectional in the actuator configuration, because PX4 makes the recovery motor reversible as it handles the failure.