KDE Direct KDE-UAS40UVC UVC Electronic Speed Controller

KDE Direct KDE-UAS40UVC UVC Electronic Speed Controller

Overview

This document covers the steps and components needed to enable DroneCAN with a KDE Direct UVC series ESC and a Pixhawk 2.1 (CUBE). The configuration steps for the Pixhawk flight controllers, hardware, and software are explained in further detail. For more information about DroneCAN, refer to https://dronecan.org

Quick Start and Requirements

Hardware required: 

Software required: 

  • ESC firmware (D4600341.dfu) or above
  • KDE Device Manager (KDE_Direct_Device_Manager_V138.4.exe) or above
  • Mission Planner

Quick Setup Guide: 

  1. Correctly wire the ESCs to connect the CAN bus network.
  2. Update all ESCs with the latest firmware supporting DroneCAN, and assign each ESC Node ID and Motor ID using the KDE Device Manager.
  3. Update the Pixhawk with the latest firmware and go through the initial configuration via Mission Planner.
  4. Set CAN_P1_DRIVER to 1, reboot and set CAN_D1_UC_ESC_BM correctly then write the parameters and restart the Pixhawk by unplugging and reconnecting power.
  5. Press the connect button in Mission Planner. Telemetry data can be viewed from Data -> Status tab.

Detailed Setup Guide – CAN bus Wiring

  1. Connect the yellow wire between the first ESC and the Pixhawk. We recommend cutting the CAN bus 3.3V wire (the right-most yellow wire on the ESC side) that connects the ESC to the flight controller. Since the ESC supplies 3.3V to this wire, this can inadvertently power the Pixhawk which isn’t recommended. Only CAN_L, and CAN_H wires are required.
  2. Connect each ESC together with the red / black wires included in the KDECAN-KIT
  3. Add the 120-ohm terminating resistor (from the KDECAN-KIT) to the last ESC on the Bus
    Figure 1: CAN bus wiring.
    Detailed Setup Guide - CAN bus Wiring

Warning: Incorrect wiring can result in damage to the flight controller or ESC.

  • Figure 1: Pixhawk 2.1 (CUBE) & ESC wiring pins.
    Detailed Setup Guide - CAN bus Wiring

Note: 3.3V CAN transceivers are fully interoperable with 5V CAN transceivers.
Note: If using Pixhawk 2.1, connect to port CAN2 as the ports are incorrectly labelled.

Update ESCs and Assign IDs

Run the latest KDE Device Manager installer (V1.38.4) and connect the ESC to the PC via the USB cable provided with the ESC. Update the ESC to the latest firmware online (D460341.dfu). Then change the following settings:

  • Set the Throttle Calibration Mode to RANGE and the min and max to 1000-2000
  • Set the CAN BUS NODE ID to a unique value
  • Set the CAN BUS CONTROL to DRONECAN
  • Set the DRONECAN MOTOR ID to the motor it is connected to (e.g. 1-4 for QuadCopter)
  • Set the DRONECAN POLES to the number of magnetic poles on the motor

Press the “Send Settings” button and proceed to repeat the steps above for each ESC, making sure to increment the CAN BUS NODE ID and DRONECAN MOTOR ID.

  • Figure 3: KDE Device Manager DRONECAN settings
    Update ESCs and Assign IDs

Note: When CAN BUS CONTROL is set to DRONECAN, the ESC will prioritize the throttle sent via the PWM wire (if available). If you send the throttle via the PWM wire (white, red, black) and disconnect it, the ESC will fallback on the DroneCAN throttle. Connecting the PWM wire is optional when using DroneCAN.

For throttle control to work properly via DRONECAN, first you need to set the CAN_P1_DRIVER to 1 (First Driver) and set CAN_D1_PROTOCOL to 1 (DroneCAN) then reboot the flight controller (all features that require chunks of memory to initialize are done once at boot). Next, you need to set CAN_D1_UC_ESC_BM to the number of ESCs you are using in Mission Planner. This bitmask tells the flight controller which Servo Outputs are routed to DroneCAN ESCs (the bitmask should match the servo motor output you are using). For example, if you are using a QUAD X frame, then you would select ESC 1, ESC 2, ESC 3, and ESC 4 for channels 1-4.

  • Figure 4: Mission Planner CAN_D1_UC_ESC_BM example.
    Update ESCs and Assign IDs

You also need to configure this on each ESC using the KDE Direct Device Manager too. For example, if you’re using a QUAD X, the top left motor is ID 3 so the ESC controlling the top left motor needs to have the DRONECAN MOTOR ID set to 03. You will need to set the MOTOR ID for each ESC connected.

  • Figure 5: KDE Device Manager MOTOR ID.
    Update ESCs and Assign IDs
  • Figure 6: Mission Planer Frame Type.
    Update ESCs and Assign IDs

Viewing Live Telemetry

The Pixhawk will now receive DRONECAN messages. If it’s not working, go back through the steps and verify all settings and parameters have been set correctly. * Note: Mission Planner will not update the ESC status fields unless the motor is spinning.

While connected to MAVLink 2 via the COM port, the ESC live telemetry can be viewed via “Flight Data” -> “Status”. Each ESC has numerous fields marked (escX_volt, escX_curr, etc.) with X indicating the DRONECAN MOTOR ID. The fields indicate the ESCs’ voltage, current, rpm, and temperature. To view the telemetry graphically, click the “Tuning” checkbox, double click the empty graph, and then select up to ten parameters to populate the graph.

  • Figure 7: Mission Planner telemetry window.
    Update ESCs and Assign IDs

For PX4 Autopilot firmware with QGroundControl:

set Vehicle Setup -> Actuator Outputs -> Configure: “Sensors and Actuators (ESCs) Automatic Config” set Vehicle Setup -> ESCs 1-4 function to output to Motors 1-4
Update ESCs and Assign IDs

You can now view the ESC_STATUS message in Analyze Tools -> MAVLink Inspector
Update ESCs and Assign IDs

Logo

Documents / Resources

KDE Direct KDE-UAS40UVC UVC Electronic Speed Controller [pdf] User Guide
KDE-UAS40UVC UVC Electronic Speed Controller, KDE-UAS40UVC, UVC Electronic Speed Controller, Electronic Speed Controller, Speed Controller, Controller

References

Leave a comment

Your email address will not be published. Required fields are marked *