Copter, Plane and Rover support UAVCAN Electronic Speed Controllers (ESCs) that allow two-way communication with the flight controller enabling potentially easier setup and in-flight monitoring of ESC and motor health.
List of CAN ESCs¶
Connecting to the Pixhawk¶
One ESC (it does not matter which) should be connected to the Pixhawk’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 it’s 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 it’s 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).