Skip to content

Commit

Permalink
add AM32 ESC protocol to ESC docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Hwurzburg committed Sep 26, 2024
1 parent 112e1e6 commit ab3e23a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 24 deletions.
23 changes: 12 additions & 11 deletions common/source/docs/common-blheli32-passthru.rst
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
.. _common-blheli32-passthru:

==========================
BLHeli32 and BLHeli_S ESCs
==========================
================================
BLHeli32,AM32, and BLHeli_S ESCs
================================

The BLHeli firmware and configuration applications were developed to allow the configuration of ESCs and provide additional features. ESCs with this firmware allow configuring timing, motor direction, LEDs, motor drive frequency, etc. Before attempting to use BLHeli please follow the :ref:`DShot setup instructions <common-dshot-escs>`.

Depending on ESC, BLHeli/BLHeli_S/BLHeli32 provides the following features
Depending on the ESC, BLHeli/BLHeli_S/BLHeli32/AM32 provides the following features:

- Pass-Through support in ArdduPilot allows the BLHeliSuite and other ESC configurators to be used to configure the ESCs while remaining connected to the autopilot via USB cable.
- Pass-Through support in ArduPilot allows the BLHeliSuite, AM32 and other ESC configurators to be used to configure the ESCs while remaining connected to the autopilot via USB cable.
- :ref:`Reversible DShot <blheli32-reversible-dshot>` (aka 3D mode) allows the motor to be spun in either direction
- :ref:`Bi-directional DShot <bidir-dshot>` allows the ESCs to send RPM back to the autopilot without the need for an additional telemetry connection
- :ref:`ESC Telemetry <blheli32-esc-telemetry>` allows the ESCs to send RPM, voltage and current information back to the autopilot so that it can be logged, viewed in real-time or even allow the removal of a :ref:`battery monitor <esc-telemetry-based-battery-monitor>`

"BLHeli" covers covers multiple (sometimes competing) projects providing ESCs firmware and accompanying configuration software
"BLHeli" (and now AM32) covers multiple (sometimes competing) projects providing ESCs firmware and accompanying configuration software

- BLHeli was the original open source software that is no longer maintained and is not available on modern ESCs
- `BLHeli32 <https://github.com/bitdump/BLHeli>`__ is closed source and based on 32bit ARM MCUs. All modern BLHeli ESCs use BLHeli32
- BLHeli32is closed source and based on 32bit ARM MCUs and development and licensing was terminated in 2024. All modern BLHeli ESCs use BLHeli32 but will be replaced with AM32 in the future.
- 'AM32 <https://am32.ca>`__ is open source with the same features as BLHeli32 before it became unavailable for new designs but continues to evolve.
- `BLHeli_S <https://github.com/bitdump/BLHeli>`__ is open source and 16bit. This is no longer actively maintained but the last published version, 16.7, is installed by default on "BLHeli_S" ESCs when shipped from the factory
- `BLHeli_S JESC <https://jflight.net>`__ is paid, closed source software and 16bit allowing it to run on lower end hardware
- `BLHeli_S BlueJay <https://github.com/mathiasvr/bluejay>`__ is free, open source software and 16bit
Expand All @@ -29,22 +30,22 @@ Pass-Through Support

..note:: This feature is only available on NON IOMCU outputs. Autopilots which have an IOMCU co-processsor (usually marked as having "MAIN" outputs from the IOMCU and "AUX" outputs from the main cpu) will not pass-through on those outputs. Use this features on "AUX" or "FMU" outputs with DShot capability.

The Pass-Through feature allows BLHeli32 and BLHeli_S ESCs to be upgraded and configured using the corresponding BLHeliSuite32 or BLHeliSuite application (running on the user's PC) while the ESCs remain connected to the autopilot. To use this feature please follow these steps
The Pass-Through feature allows BLHeli32, AM32, and BLHeli_S ESCs to be upgraded and configured using the corresponding BLHeliSuite32, AM32 Configurator, or BLHeliSuite application (running on the user's PC) while the ESCs remain connected to the autopilot. To use this feature please follow these steps

- Download and install `BLHeliSuite32 <https://github.com/bitdump/BLHeli/releases>`__ (for use with BLHeli32 ESCs), `BLHeliSuite <https://github.com/bitdump/BLHeli>`__ (for BLHeli_S ESC) or `JESC configurator <https://github.com/jflight-public/jesc-configurator/releases>`__ (for use with BLHeli_S JESC) on your PC
- Download and install `Linux or Windows AM32 configurator <https://am32.ca/downloads>`__ (for use with AM32 ESCs), `BLHeliSuite32 <https://github.com/bitdump/BLHeli/releases>`__ (for use with BLHeli32/AM32 ESCs), `BLHeliSuite <https://github.com/bitdump/BLHeli>`__ (for BLHeli_S ESC) or `JESC configurator <https://github.com/jflight-public/jesc-configurator/releases>`__ (for use with BLHeli_S JESC) on your PC.
- Connect your PC to the autopilot using a USB cable and then connect with a ground station (e.g. Mission Planner, QGC).
- Set :ref:`SERVO_BLH_AUTO <SERVO_BLH_AUTO>` to 1 to automatically enable pass-through on all outputs configured as motors (e.g. :ref:`SERVOx_FUNCTION <SERVO9_FUNCTION>` = "Motor1", "Motor2", etc) for multicopters and quadplanes or throttle (e.g. those with :ref:`SERVOx_FUNCTION <SERVO9_FUNCTION>` set to 70 ("throttle"), 73 ("throttle left") or 74 ("throttle right")) on rovers. For most multicopters, quadplanes and rovers this will do the right thing but for planes, set :ref:`SERVO_BLH_MASK <SERVO_BLH_MASK>` to enable pass-through on the appropriate servo outputs.
- If your PC is connected to the autopilot using a telemetry radio (instead of using USB cable as recommended above) set :ref:`SERVO_BLH_PORT <SERVO_BLH_PORT>` to the autopilot port connected to the telemetry radio. Beware that this is does NOT specify the port used for :ref:`ESC telemetry <blheli32-esc-telemetry>` feedback to your autopilot!
- If using a safety switch ensure it is pushed (or disabled by setting :ref:`BRD_SAFETY_DEFLT <BRD_SAFETY_DEFLT>` = 0). (``BRD_SAFETYENABLE`` in older firmware versions)
- Disconnect the ground station (but leave the USB cable connected)
- Start the ESC configuration software and connect to the autopilot's COM port by selecting "BLHeli32 Bootloader (Betaflight/Cleanflight)" from the interfaces menu. Press "Connect" and "Read Setup". You should be able to upgrade and configure all connected ESCs
- Start the ESC configuration software and connect to the autopilot's COM port by selecting "BLHeli32/AM32 Bootloader (Betaflight/Cleanflight)" from the interfaces menu. Press "Connect" and "Read Setup". You should be able to upgrade and configure all connected ESCs

.. image:: ../../../images/blhelisuite32.jpg
:target: ../_images/blhelisuite32.jpg
:width: 450px

.. note::
ArduPilot firmware supports the pass-through protocol with up-to-date BLHeli32 firmware and BLHeliSuite32, or BLHeli_S firmware and BLHeliSuite only.
ArduPilot firmware supports the pass-through protocol with up-to-date BLHeli32, AM32 firmware and BLHeliSuite32, or BLHeli_S firmware and BLHeliSuite only.

.. warning::
For pass-through to function, the autopilot must be configured to use one of the DShot protocols. If you wish to eventually use one of the other protocols (e.g. PWM, OneShot125) that the ESC supports, you may still configure the ESCs using Pass-Through (e.g. change motor directions, set min/max values, etc) but then finally re-configure the autopilot to *not* use DShot. Once the autopilot and ESCs are rebooted the ESC should auto-detect that the ESCs are no longer using DShot.
Expand Down
8 changes: 4 additions & 4 deletions common/source/docs/common-dshot-escs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ DShot is a digital ESC protocol which allows fast, high resolution digital commu
- Clock differences between the ESC and autopilot don't affect flight performance
- ESC calibration is not required

DShot is the underlying ESC control protocol used by :ref:`BLHeli <common-blheli32-passthru>` ESCs. Many BLHeli ESC versions offer even more features such as ESC configuration, :ref:`ESC telemetry <blheli32-esc-telemetry>`, LED control and/or :ref:`Bi-directional dshot <bidir-dshot>`. If choosing a DShot enabled ESC we recommend using one that also supports BLHeli32 or BLHeli_S.
DShot is the underlying ESC control protocol used by :ref:`BLHeli/AM32 <common-blheli32-passthru>` ESCs. Many BLHeli/AM32 ESC versions offer even more features such as ESC configuration, :ref:`ESC telemetry <blheli32-esc-telemetry>`, LED control and/or :ref:`Bi-directional dshot <bidir-dshot>`. If choosing a DShot enabled ESC we recommend using one that also supports BLHeli32, AM32, or BLHeli_S.

.. note::
Only try DShot on ESCs that are known to support it or you will get unpredictable results.

.. note::
Recently there is a growing number of proprietary and non-proprietary 16 / 32 bit ESCs with firmware that support DShot and other digital ESC protocols, but not BLHeli32 specific features like passthrough and telemetry. See your ESC's manual for further detail on supported features.
Recently there is a growing number of proprietary and non-proprietary 16 / 32 bit ESCs with firmware that support DShot and other digital ESC protocols, but not BLHeli32/AM32 specific features like passthrough and telemetry. See your ESC's manual for further detail on supported features.

.. note:: most DShot ESCs normally will also operate as normal :ref:`PWM ESCs <common-brushless-escs>`.

Expand Down Expand Up @@ -61,7 +61,7 @@ For smaller craft, DShot600 is by far the most widely used and can therefore be

Higher rates (e.g. DShot600 and DShot1200) are more susceptible to noise but have the advantage that they tie up the allocated DMA channel for less time which can be beneficial on autopilots with a lot of DMA sharing.

If :ref:`Bi-directional DShot <bidir-dshot>` will be used, DShot300 and DShot600 are preferred, because this feature requires a longer pulse width as it has to wait for the response from the ESC before it can send another pulse. Bi-directional DShot does not share DMA channels and so there is no impact on other peripherals. Bi-directional DShot is only supported on BLHeli32 ESCs
If :ref:`Bi-directional DShot <bidir-dshot>` will be used, DShot300 and DShot600 are preferred, because this feature requires a longer pulse width as it has to wait for the response from the ESC before it can send another pulse. Bi-directional DShot does not share DMA channels and so there is no impact on other peripherals. Bi-directional DShot is only supported on BLHeli32/AM32 ESCs

Configure the Servo Functions
=============================
Expand Down Expand Up @@ -122,7 +122,7 @@ Reversible DShot ESCs

Reversible DShot (aka 3D mode) allows the motor to be spun in either direction which is important for Rover, Boats and :ref:`Planes with reverse thrust <plane:reverse-thrust-setup>`.

Currently, only BLHeli32 and BLHeli_S capable reversible DShot ESCs are supported. In order to use one, the output which drives it must be designated with the appropriate bit in the :ref:`SERVO_BLH_3DMASK<SERVO_BLH_3DMASK>` bitmask parameter. This will map the outputs 1000-1500-2000 values to the correct digital values for the ESC to provide FullReverse-Idle-FullForward range operation, respectively.
Currently, only BLHeli32, AM32, and BLHeli_S capable reversible DShot ESCs are supported. In order to use one, the output which drives it must be designated with the appropriate bit in the :ref:`SERVO_BLH_3DMASK<SERVO_BLH_3DMASK>` bitmask parameter. This will map the outputs 1000-1500-2000 values to the correct digital values for the ESC to provide FullReverse-Idle-FullForward range operation, respectively.

If :ref:`DShot commands <dshot-commands>` have been enabled then ArduPilot will automatically configure the ESCs to reversible mode (3D mode) at startup, according to the :ref:`SERVO_BLH_3DMASK<SERVO_BLH_3DMASK>`. Enabling :ref:`DShot commands <dshot-commands>` will allow the other DShot commands to be sent to any other ESC configured as DShot by the DShot mask parameters discussed in :ref:`DShot setup instructions <common-dshot-escs>`.

Expand Down
8 changes: 4 additions & 4 deletions common/source/docs/common-esc-telemetry.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Connecting the ESCs Telemetry wire

Connect all ESC telemetry wires to a single serial port's RX pin on the autopilot (above diagram uses Serial5 as an example). A pin or wire for ESC telemetry is pre-soldered on most BLHeli32 ESCs. If the wire isn't pre-soldered you will need to solder it yourself. CubePilot serial port pinsouts can be found :ref:`here <common-thecube-overview>`.

Set the following parameters to enable BLHeli32 telemetry feedback to the autopilot's serial port:
Set the following parameters to enable BLHeli32/AM32 telemetry feedback to the autopilot's serial port:

- :ref:`SERIALx_PROTOCOL <SERIAL5_PROTOCOL>` 16 (= ESC telemetry) where "x" is the autopilot serial port number connected to the ESCs telemetry wire. The mapping between serial port numbering and UART physical ports for you autopilot should be documented in its description page linked :ref:`here <common-autopilots>`.

Expand All @@ -36,7 +36,7 @@ Set the following parameters to enable BLHeli32 telemetry feedback to the autopi
Bi-directional DShot
====================

Newer versions of BLHeli32 (32.7 and higher) and BLHeli_S (16.73 and higher) support returning motor RPM values over the DShot signal line. Supporting bi-directional DShot requires exclusive use of one or more DMA channels and thus not all autopilots support it. Versions that support bi-directional DShot have this stated in their wiki pages, see :ref:`common-autopilots` for your autopilot.
Newer versions of AM32, BLHeli32 (32.7 and higher), and BLHeli_S (16.73 and higher) support returning motor RPM values over the DShot signal line. Supporting bi-directional DShot requires exclusive use of one or more DMA channels and thus not all autopilots support it. Versions that support bi-directional DShot have this stated in their wiki pages, see :ref:`common-autopilots` for your autopilot.

Some autopilots with IOMCUs can not only support Dshot on their "Main" outputs (see :ref:`common-dshot-escs` for setup and more information), but also bi-directional DShot on their first four outputs. Currently, this is limited only to Pixhawk6X/C autopilots.

Expand All @@ -51,7 +51,7 @@ First ensure that you have an appropriate version of BLHeli32 or BLHeli_S instal

Set the following parameters to enable BLHeli32 and BLHeli_S bi-directional DShot:

- :ref:`SERVO_BLH_BDMASK <SERVO_BLH_BDMASK>`: a bitmap used to enable BLHeli32 or BLHeli_S bi-directional DShot support. On autopilots without IOMCU this would normally be set to 15 to indicate four active channels. On autopilots with an IOMCU this can be set to 3840 to indicate four active AUX channels (bi-directional DShot will only work on the AUX outputs).
- :ref:`SERVO_BLH_BDMASK <SERVO_BLH_BDMASK>`: a bitmap used to enable BLHeli32, AM32, or BLHeli_S bi-directional DShot support. On autopilots without IOMCU this would normally be set to 15 to indicate four active channels. On autopilots with an IOMCU this can be set to 3840 to indicate four active AUX channels (bi-directional DShot will only work on the AUX outputs).

- :ref:`SERVO_BLH_POLES <SERVO_BLH_POLES>` defaults to 14 which applies to the majority of brushless motors and normally does not need to be changed. Adjust as required if you're using motors with a pole count other than 14 to calculate true motor shaft RPM from ESC's e-field RPM (small motors might have 12 poles).

Expand Down Expand Up @@ -87,7 +87,7 @@ In addition, some telemetry values can be displayed on the integrated :ref:`on-b
Use as Battery Monitor
======================

By setting a battery monitor instance to BLHeli32 ESC type (for example :ref:`BATT2_MONITOR<BATT2_MONITOR>` = 9), all connected BLHeli32 ESCs with connected telemetry wiring to the configured autopilot serial port, will be aggregated as a single source. The voltages reported will be averaged, the currents totaled, and the consumed current accumulated.
By setting a battery monitor instance to BLHeli32/AM32 ESC type (for example :ref:`BATT2_MONITOR<BATT2_MONITOR>` = 9), all connected BLHeli32/AM32 ESCs with connected telemetry wiring to the configured autopilot serial port, will be aggregated as a single source. The voltages reported will be averaged, the currents totaled, and the consumed current accumulated.

.. _bidir-dshot:

6 changes: 3 additions & 3 deletions common/source/docs/common-escs-and-motors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,13 @@ Protocols
common-hargrave-dronecan-escs


ESCs using BLHeli32 or BLHeli-S Configuration Firmware
------------------------------------------------------
ESCs using BLHeli32, AM32, or BLHeli-S Configuration Firmware
-------------------------------------------------------------

.. toctree::
:maxdepth: 1

BLHeli/BLHeli32 Capable ESCs <common-blheli32-passthru>
BLHeli/BLHeli32/AM32 Capable ESCs <common-blheli32-passthru>


Telemetry
Expand Down
4 changes: 2 additions & 2 deletions common/source/docs/common-powermodule-landingpage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ I2C Power Monitor

Rotoye BatMon Smart Battery <common-smart-battery-rotoye.rst>

Power Monitoring Via Telemetry Equipped BLHeli32/S ESCs
=======================================================
Power Monitoring Via Telemetry Equipped AM32/BLHeli32/S ESCs
============================================================

- See :ref:`this section<esc-telemetry-based-battery-monitor>` of the :ref:`blheli32-esc-telemetry` page

Expand Down

0 comments on commit ab3e23a

Please sign in to comment.