Copter, Plane and Rover support UAVCAN Electronic Speed Controllers (ESCs) that allow two-way communication with the autopilot enabling potentially easier setup and in-flight monitoring of ESC and motor health.
List of CAN ESCs¶
|Zubax Orel 20||Yes||Yes|
|HiEnd Can Bus ESC||Yes||?|
Connecting to the Flight Controller¶
One ESC (it does not matter which) should be connected to the flight controller’s CAN port using a 4-pin DF13 to 4-pin UAVCAN adapter cable. Each subsequent ESC should be connected to the previous using a 4-pin UAVCAN cable. The final ESC should have a CAN bus terminator plugged into one of its 4-pin UAVCAN ports.
The FTDI Cable connection is only required for the one-time set-up discussed below.
Alternatively, the ESC can be configured via CAN bus using the UAVCAN GUI Tool.
ESC setup using CLI¶
Each ESC must go through a one-time manual setup using an FTDI cable to define its UAVCAN Node Id and motor number. In future versions of ArduPilot this will be replaced with a setup procedure using the mission planner (and other GCSs).
The steps required are:
- Connect the FTDI cable to the ESC’s “Developer port” as shown in the image above.
- Power the ESCs with a battery
- Use a terminal program such as Putty to connect to the ESC using the FTDI cable’s COM port, using serial at 115200 baud
- press Enter into the terminal and a “ch>” prompt should appear
cfg listto see a full list of parameters
- on motor #1 (i.e. front-right on a quad) set the uavcan_node_id to
“10” and esc_index to “0” by typing:
cfg set uavcan_node_id 10
cfg set esc_index 0
cfg save(to save the configuration)
- to test the motor moves:
dc arm(to enable the output)
dc 0.2(to spin motor at 20%)
dc(to stop motor)
- repeat for motors #2 (back left on a quad), #3, #4, etc with each motor having a node-id and index one higher than the previous (in fact the node-id doesn’t matter as long as it’s unique).
Logging and Reporting¶
UAVCAN ESCs provide information back to the autopilot which is recorded in the autopilot’s onboard log’s CESC messages and can be viewed in any ArduPilot compatible log viewer. This information includes:
- Error Count
- Power (as a percentage)
The RCOU messages are also written to the onboard logs which hold the requested output level sent to the ESCs expressed as a number from 1000 (meaning stopped) to 2000 (meaning full output).