Background
The CAN-DShot ESC Adapter Board is an EFS & EE collaboration project. EE makes the board, and EFS writes the firmware for it. The final application of this board is to control the DShot ESCs on a fixed-wing aircraft over CAN protocol. To make that happen, EFS needs to work on firmware that converts the ESC throttle values (transmitted by CAN Bus from the flight controller) to the DShot signal that ESCs understand.
Table of Contents
Important Links for the CAN-DShot ESC Adapter Board
Firmware: https://github.com/UWARG/efs-can-esc
EE Documentation: ESC CAN Adapter
Board Schematic (pinout, PCB layout): https://warg.365.altium.com/designs/9504A71D-9B2B-4328-B339-C3EBBC2F7DF1
MCU Datasheet: STM32L431KCU6
Using the CAN-DShot ESC Adapter Board
Board Configuration
Follow these steps to configure and flash firmware to the CAN-DShot ESC adapter board.
Clone the
can-esc
firmware repository.Configure board settings in Core/Inc/node_settings.h
Attach STLink to connector on the underside of the board (see https://uwarg-docs.atlassian.net/wiki/x/XICRlw).
Build and flash firmware to board using STM32CubeIDE or STM32Cube Programmer.
Flight Controller Configuration in Mission Planner
To configure the flight controller to output ESC signals over CAN protocol, follow these steps:
Install ArduPilot Mission Planner.
Click “Config” > “Full Parameter List“ and find can_D1_UC_ESC_BM (it should be under can > D1 > ESC)
Select can_D1_UC_ESC_BM > set bitmask
Toggle the appropriate bits (e.g. for 4-rotor, enable bits 0, 1, 2, 3).
Click “Write Parameters“ and confirm to save changes.
Don’t forget to revert your changes in case the next person is working with a non-CAN ESC!!
Development
For more information about developing this board and the implementation of its firmware, please see https://uwarg-docs.atlassian.net/wiki/pages/resumedraft.action?draftId=2868412558&draftShareId=ab2783b9-da7d-4d02-aef0-24ab75d0c88a.
0 Comments