-
Notifications
You must be signed in to change notification settings - Fork 41
Configuration
This page corresponds to the latest firmware revision. Previous versions of this page can be found here.
Command | Description |
---|---|
1-5 | Play beacon tone 1-5 |
7 | Set normal motor direction |
8 | Set reversed motor direction |
9 | 3D mode off (unidirectional mode) |
10 | 3D mode on (bidirectional mode) |
12 | Save settings |
20 | Turtle mode off |
21 | Turtle mode on |
22-25 | LED 1-4 on |
26-29 | LED 1-4 off |
40 | Select motor timing |
41 | Select PWM frequency |
42 | Increase acceleration ramping |
43 | Decrease acceleration ramping |
47 | Reset settings to defaults |
Commands 40-47 are non-standard hence they must be manually repeated at least 6 times. They beep the new value back. For example:
dshotprog 255 40 40 40 40 40 40 # Select the next timing value
dshotprog 255 12 # Save settings
Command 41 (select PWM frequency) selects the next value that corresponds to the following settings:
# | freq_min |
freq_max |
---|---|---|
1 | 24 | 48 |
2 | 28 | 56 |
3 | 32 | 64 |
4 | 36 | 72 |
5 | 40 | 80 |
6 | 44 | 88 |
7 | 48 | 96 |
The firmware features a UNIX-style console (no echo, LF as EOL) on the signal line at 38400 baud 8N1 using a USB-TTL adapter. Although not strictly required (see below), the following simple circuit is needed to convert two RX/TX pins on the USB-TTL adapter into one-wire two-way connection with the ESC:
In case of one-way connection when the ESC is connected to the TX and GND pins or via Betaflight, type beep
to enable audio feedback mode. You should hear a beep in return.
For connection via Betaflight, use KISS ESC passthrough mode:
-
Open Betaflight Configurator.
-
Go to Motors, set ESC/Motor protocol to DISABLED, and click Save and Reboot.
-
Make sure ESCSERIAL resource is assigned to an inactive pin with a timer.
-
Go to CLI and type one of the following to enter passthrough mode:
escprog ki 0 # Connect to ESC 1 escprog ki 1 # Connect to ESC 2 escprog ki 2 # Connect to ESC 3 escprog ki 3 # Connect to ESC 4
-
Close Betaflight Configurator.
-
Use Betaflight's serial device (COM port) for one-way connection.
Download the latest release here and run:
escape32-cli -d /dev/mySerialDevice
On Windows, COM port must be specified as /dev/ttySx
, i.e. COM1 → /dev/ttyS0
, COM2 → /dev/ttyS1
, etc.
On UNIX, the list of serial devices can be retrieved by running:
ls /dev/tty* # Linux
ls /dev/cu.* # macOS
ls /dev/cua* # BSD
Examples depending on socat's flavour:
socat - /dev/ttyUSB0,rawer,b38400
socat - /dev/cu.usbserial-0001,rawer,ispeed=38400,ospeed=38400
Since standard PuTTY uses CR as EOL for serial connections, download modified PuTTY.
Open a serial connection, turn on echo, and enable CR/LF:
Print basic usage help.
Print ESC information.
Print settings.
Print (and beep if audio feedback mode is enabled) the value of <param>
.
Set <param>
to <value>
and print (and beep if audio feedback mode is enabled) the resulting (possibly trimmed) value.
Save settings. For example, the following commands reverse motor direction and save the changes:
set revdir 1
save
Reset settings to defaults.
Play <music>
with optional <volume>
. See also music
for music format. Examples:
play cdefg_g_a2Cag_g
play a2D_D3EF#2D_D3C#b2E_E3DC#2a_a3
Set the current throttle position as value
between -2000 (full reverse) and 2000 (full forward). This command is intended for real time testing. Use caution because this command actually starts the motor. If arming is enabled (the default), type throt 0
to arm the ESC. It is possible to change settings on the fly while the motor is running.
Enable audio feedback mode. This command also beeps the last value. In the following example, the last two commands beep the current timing value:
beep
get timing
beep
Enable arming (wait for 250ms zero throttle on startup):
-
0
: off -
1
: on
Enable damped mode (complementary PWM, active freewheeling):
-
0
: off -
1
: on
Reversed motor direction:
-
0
: off -
1
: on
Motor timing (3.75*X degrees) [1..7].
Sine startup range (%) [0 - off, 5..25]. This value sets the portion of throttle range dedicated to sine startup mode. Additionally, increasing duty_min
a notch can help smooth out transition between sine startup and normal drive. Damped mode must be enabled (the default) before sine startup mode can be activated.
Sine startup power (%) [1..15]. Use caution because higher values may lead to motor overheating.
Minimum PWM frequency (kHz) [16..48].
Maximum PWM frequency (kHz) [16..96]. Smooth transition from minimum to maximum PWM frequency happens across 30000-60000 ERPM range.
Minimum duty cycle (%) [1..100].
Maximum duty cycle (%) [1..100].
Maximum power during spin-up (%) [1..25]. Higher values give more power to the motor until the first sync'ed revolution, yet may increase the risk of overheating should the motor get jammed during a full throttle punch. Do not exceed the default value unless you know what you are doing.
Acceleration ramping (0.1*X %/ms) [1..100]. This value controls power increase during acceleration. Should the motor stutter on a full throttle punch, try decreasing it. Alternatively, you can try increasing timing
albeit at the cost of efficiency and torque.
Drag brake amount when the motor is stopped (%) [0..100]. This value is also a starting brake amount in proportional brake mode.
Throttle mode:
-
0
: forward -
1
: forward/reverse -
2
: forward/brake/reverse (proportional brake mode)
Automatic throttle calibration for standard servo PWM frequencies, e.g. 50Hz, 100Hz, 125Hz, 200Hz, 250Hz, 333Hz:
-
0
: off -
1
: on
This mode works by aligning the internal clock with servo PWM period that is a multiple of 1000µs, i.e. for servo PWM frequency F=1000/n where n=3..20. It must be disabled should a non-standard servo PWM signal be used.
Minimum throttle in servo PWM mode (µs).
Middle throttle in servo PWM mode (µs).
Maximum throttle in servo PWM mode (µs).
Input mode:
-
0
: servo PWM, Oneshot125, DSHOT -
1
: analog -
2
: serial (+) -
3
: iBUS -
4
: SBUS (*)
Mode 1 is available on ESCs with PA2/PA6 input pin. Modes 2-4 are available on ESCs with PA2 input pin.
(+) 16-bit value (first low byte, then high byte) is received at 115200 baud 8N1 following by at least one idle character, lower 12 bits are throttle value from -2000 (full reverse) to 2000 (full forward), higher 4 bits are CRC (XOR'ed nibbles), update rate is 40Hz or higher.
(*) Uninverted on AT32F421 MCU.
iBUS/SBUS channel ID [0 - off, 1..14 - iBUS, 1..16 - SBUS].
Telemetry mode:
-
0
: KISS -
1
: KISS auto (+) -
2
: iBUS -
3
: S.Port (*)
(+) Telemetry data is sent every 32ms.
(*) Uninverted on AT32F421 MCU.
S.Port physical ID [0 - off, 1..28].
Number of motor poles for RPM telemetry [2..100].
Temperature threshold (˚C) [0 - off, 60..140]. If enabled, maximum power is reduced when the ESC becomes hotter than this temperature. The lowest maximum power is 25% at 15˚C above the theshold.
Low voltage cutoff per battery cell (V/10) [0 - off, 28..38].
Number of battery cells [0 - auto, 1..16].
Maximum current (A) [0..255].
Startup music. A sequence of characters is translated into music in the following way:
-
_
(underscore) is a pause; -
cdefgab
are low notes; -
CDEFGAB
are high notes; -
#
(pound) after a note makes it a sharp note; -
12345678
after a note or pause is a duration: 1 - 1/16 (default), 2 - 1/8, 3 - 3/16, 4 - 1/4, etc.
Sound volume (%) [0..100].
Beacon volume (%) [0..100].
LED on/off bits [0..15].
Enable brushed mode:
-
0
: off -
1
: on
In this mode, the ESC can be used with brushed motors connected to phases A and B (or C and B). The following settings have no effect: timing
, sine_range
, sine_power
, freq_max
, duty_spup
.
This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. NOT FOR MILITARY USE. May all beings be happy.