Skip to content

Commit

Permalink
Common: add AM32 page
Browse files Browse the repository at this point in the history
  • Loading branch information
rmackay9 committed Nov 22, 2024
1 parent b51c0f2 commit ea16b40
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 0 deletions.
54 changes: 54 additions & 0 deletions common/source/docs/common-am32-escs.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
.. _common-am32-escs:

===================
AM32 Drone CAN ESCs
===================

.. image:: ../../../images/am32-dronecan-escs-title.jpg
:width: 450px

The `AM32 ESC firmware <https://github.com/am32-firmware/AM32>`__ is open source ESC firmware for use on multicopters and rovers. DroneCAN support was added in late 2024

Where to Buy
------------

AM32 ESCs that support DroneCAN

- `VimDrones ESC Nano <https://dev.vimdrones.com/products/vimdrones_esc_nano/>`__
- `VimDrones ESC Development Board <https://dev.vimdrones.com/products/vimdrones_esc_dev/>`__

More ESCs may be found from the `AM32 targets.h <https://github.com/am32-firmware/AM32/blob/main/Inc/targets.h>`__ file (seach for _CAN)

ArduPilot Configuration
=======================

To enable communication with the AM32 ESCs using DroneCAN, set the following parameters

- Set :ref:`CAN_P1_DRIVER <CAN_P1_DRIVER>` = 1 (First driver) to specify that the ESCs are connected to the CAN1 port
- Set :ref:`CAN_D1_PROTOCOL <CAN_D1_PROTOCOL>` = 1 (DroneCAN)
[site wiki="copter,rover"]
- Set :ref:`MOT_PWM_MIN <MOT_PWM_MIN>` = 1000 and :ref:`MOT_PWM_MAX <MOT_PWM_MAX>` = 2000 so ArduPilot uses an output range that matches the ESCs input range
[/site]
[site wiki="plane"]
- Set ``SERVOx_MIN`` = 1000 and ``SERVOx_MAX`` = 2000 for each ESC connected (``x`` corresponds to the ESC number) so ArduPilot uses an output range that matches the ESCs input range
[/site]
- Set ``SERVOx_FUNCTION`` to each motor channel (e.g. 33 - 40 for motors 1 - 8). This is automatically configured when setting frame class/type. If a motor channel isn't assigned to a servo output, commands won't be sent to the associated ESC.

By default, all configured motor channels are used to send control commands to the ESCs. These control messages are transmitted by the autopilot at a default rate of 50Hz. These parameters can be modified using:

- :ref:`CAN_D1_PC_ESC_BM <CAN_D1_PC_ESC_BM>` is a bitmask that determines which ESC (motor) channels are transmitted over CAN
- :ref:`CAN_D1_PC_ESC_RT <CAN_D1_PC_ESC_RT>` determines the rate (Hz) at which commands are sent out to the ESCs

ESC Configuration
=================

The AM32 ESC can be setup using the `AM32 configurator <https://am32.ca/configurator>`__

Logging and Reporting
---------------------

ESCs RPM, voltage, current and temperature are recorded in the autopilot's onboard log and reported in real-time to the ground station

.. image:: ../../../images/dshot-realtime-esc-telem-in-mp.jpg
:target: ../_images/dshot-realtime-esc-telem-in-mp.jpg
:width: 450px
1 change: 1 addition & 0 deletions common/source/docs/common-escs-and-motors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Protocols
DShot ESCs <common-dshot-escs>
KDE CAN ESCs <common-kde-can-escs>
DroneCAN ESCs <common-uavcan-escs>
AM32 ESCs <common-am32-escs>
Currawong Velocity ESCs <common-velocity-can-escs>
Hobbywing DroneCAN ESCs <common-hobbywing-dronecan-esc>
FETtec OneWire ESCs <common-fettec-onewire>
Expand Down
1 change: 1 addition & 0 deletions common/source/docs/common-uavcan-escs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ List of DroneCAN ESCs
=====================


- :ref:`AM32 ESCs <common-am32-escs>`
- :ref:`Currawong Velocity ESC <common-velocity-can-escs>`
- :ref:`Hargrave Technologies DroneCAN ESCs <common-hargrave-dronecan-escs>`
- :ref:`Hobbywing CAN ESCs <common-hobbywing-dronecan-esc>`
Expand Down
Binary file added images/am32-dronecan-escs-title.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit ea16b40

Please sign in to comment.