-
Notifications
You must be signed in to change notification settings - Fork 41
Configuration
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 | Increase motor timing |
41 | Decrease motor timing |
42 | Increase acceleration ramping |
43 | Decrease acceleration ramping |
Commands 40-43 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 # Increase "timing" value by 1
dshotprog 255 12 # Save settings
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.
-
Make sure ESCSERIAL resource is assigned to PPM pin (or any other pin with a timer).
-
Go to Motors, set ESC/Motor protocol to DISABLED, and click Save and Reboot.
-
After reboot, 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 serial device (COM port) for one-way connection.
Examples depending on socat's flavour:
socat - /dev/ttyUSB0,rawer,b38400
socat - /dev/cu.SLAB_USBtoUART,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.
Reset settings to defaults. Type save
to save the changes.
Save settings.
Play <music>
with optional <volume>
.
Set the current throttle position as value
between -2000 (full reverse) and 2000 (full forward). This command is intended for real time testing. Use with 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.
info
ESCape32 rev3 [ESCAPE1]
Temp: 25C
Volt: 11.60V
Curr: 0.00A
Csum: 0mAh
ERPM: 0
OK
beep
OK
get revdir
revdir: 0
OK
set revdir 1
revdir: 1
OK
save
OK
play cdefg_g_a2Cag_g
OK
play a2D_D3EF#2D_D3C#b2E_E3DC#2a_a3
OK
throt 0
OK
throt 100
OK
throt 0
OK
Enable arming (wait for 250ms zero throttle on startup):
-
0
: off -
1
: on
Enable damped mode (active freewheeling):
-
0
: off -
1
: on
Reversed motor direction:
-
0
: off -
1
: on
Motor timing (3.75*X degrees) [1..7]. The default value is the middle ground in most cases. Should the motor stutter on a full throttle punch, try increasing this value a notch. See also duty_ramp
.
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.
Sine startup power (%) [1..15]. Use with 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..100]. 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.5*X %/ms) [0 - off, 1..10]. This parameter controls power increase during acceleration. Decreasing this value is another way to eliminate desyncs on a full throttle punch. See also timing
.
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 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, DSHOT -
1
: analog -
2
: serial (+) -
3
: iBUS -
4
: SBUS (*)
Mode 1 is available on ESCs with PA2/PA6 input pin. Mode 2-4 is 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..12].
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.
See Examples above.
Sound volume (%) [0..100].
Beacon volume (%) [0..100].
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.