-
Notifications
You must be signed in to change notification settings - Fork 2
Configuration
The CLI (command line interface) is how the user can configure the ESC, and also perform some simple tests.
To install, update, and configure Hydra firmware, you must use a USB-linker meant for communicating with ESCs. These are used with AM32, BLHeli_32, and BLHeli_S, for configuration and firmware updating.
See this wiki page for a list of USB-linkers you can use. That page also has links to the appropriate USB drivers that you might need to install.
You need a simple serial terminal app of some sort installed on your computer.
For Windows, some of the popular choices: Tera Term, PuTTY, RealTerm, Arduino IDE's built-in serial monitor, some of the extensions available in VSCode
For Linux, perhaps try: Minicom
, picocom
, screen
, gtkterm
Please remember to choose the correct serial port (the name will vary), and then configure the serial port for 19200 baud rate, 8 bits, no parity.
SparkFun Electronics has a tutorial about serial terminals
These steps are different from installing the firmware. Please do not confuse the two different instructions.
-
Make sure the ESC is disconnected from everything. Do not connect the USB linker to it just yet. Keep the power off.
-
Power on the ESC. The LED should indicate that it is disarmed (LED will stay solid RED, or whatever colour is used).
-
Wait 10 seconds. After 10 seconds have passed, the LED blinking should have changed to a different pattern (if there is no LED, then the ESC will make the motor start buzzing at a high pitch)
-
Connect the USB linker to the computer
-
Connect the USB linker to the ESC
-
Run the serial terminal app
The LED blink pattern will change again to indicate successfully entering CLI mode
Send the enter keystroke into the terminal a few times and you should see >
appear on your screen. This means you are ready to enter in a command.
NOTE: arrow keys will never work, the delete or backspace key will simply cancel the entire command
NOTE: the CLI will never exit until you reboot the entire ESC with the USB linker disconnected
-
vsplitmode
is defaulted to the weakest mode that is easy to use, you might want to try out one of the boost modes -
inputmode
is obviously important if you are using CRSF or had problems doing the input wiring -
phasemap
is important because you don't know which motor output phase is the default common-shared phase (see this guide)
The command is read
It will output a giant list of all of the settings.
You can copy this block of text into a text file for safekeeping.
(there's a section later describing each of the setting items)
The command looks like <setting-name> <value>
, for example, inputmode 1
.
A confirmation will shown if you are successful.
If you pasted in multiple lines, it will change multiple settings all at once. So you may paste in the text file you saved earlier.
WARNING: please don't go crazy with the values. The CLI is only smart enough to know if you forgot to include a value, or if you made a spelling mistake, but it cannot actually check if your value is within the correct range.
NOTE: for settings that are either true or false, please use 1
or 0
(there's a section later describing each of the setting items)
The command is factoryreset
This will change every setting back to their default values.
The command is reboot
This will cause the ESC to enter into the AM32 bootloader.
command | default | range | description |
---|---|---|---|
vsplitmode |
0 | 0 - 2 | voltage splitting mode 0 = boosted almost always 1 = half voltage 2 = boosted while not turning |
loadbal |
0 | 0 or 1 | lowers load on common-shared MOSFET |
inputmode |
0 | 0 - 3 | 0 = RC PWM pulse input 1 = CRSF input 2 = RC PWM input through SWCLK 3 = CRSF input through SWCLK |
tankmix |
0 | 0 or 1 | enables arcade tank drive mixing |
phasemap |
1 | 1 - 3 | selects which one of the three phases is used as the common-shared phase |
baud |
0 | baud rate used for CRSF 0 means default (420000) useful for taking commands from slower microcontrollers |
|
channel_1 |
1 | 0 - 16 | which CRSF channel is the 1st channel, 0 = unassigned |
channel_2 |
2 | 0 - 16 | which CRSF channel is the 2nd channel, 0 = unassigned |
channel_mode |
0 | 0 - 16 | which CRSF channel can control the voltage splitting mode, useful for temporary voltage boosting, 0 = unassigned |
channel_brake |
0 | 0 - 16 | which CRSF channel can control the braking mode, 0 = unassigned |
rc_mid |
1500 | 800 - 2200 | RC PWM pulse middle value, in microseconds, does not affect CRSF |
rc_range |
500 | 0 - 1000 | RC PWM pulse range, 500 means 1000 to 2000, does not affect CRSF |
rc_deadzone |
10 | 0 - uint16 | RC PWM pulse deadzone around the center used if the signal is noisy unit is in microseconds does also apply to CRSF |
pwm_period |
???? | 0 - 65535 | PWM period, generator reload value, controls the PWM frequency unit is in clock ticks Do not modify lower value = higher frequency |
pwm_deadtime |
50 | 0 - uint32 | PWM cannot be always 100% since the MOSFET drivers use a charge pump. High value means lower power for the motors, but if the value is too low then the high-side MOSFETs might stop working at full throttle. |
braking |
1 | 0 or 1 | If true, enables complementary PWM and never floats the output pins. If false, disables complementary PWM and floats the output pins if throttle is 0 |
chanswap |
0 | 0 or 1 | swaps the output channels |
flip1 |
0 | 0 or 1 | flips (reverse) the 1st output channel |
flip2 |
0 | 0 or 1 | flips (reverse) the 2nd output channel |
tied |
0 | 0 or 1 | one channel controls both motors |
armdur |
100 | 0 - uint32 | arming duration required, the number of valid arming pulses (zero throttle) required before becoming armed setting 0 means always armed |
disarmtime |
3000 | 0 - uint32 | number of milliseconds of signal loss before going into disarmed state setting 0 means never |
templim |
0 | 0 - 255 | temperature limit in degrees-Celcius setting 0 means limit disabled |
currlim |
0 | 0 - 255 | current limit in milliamps setting 0 means limit disabled |
voltlim |
0 | 0 - 65535 | low battery voltage limit in millivolts setting 0 means limit disabled please read this guide to understand this item |
cellmaxvolt |
0 | 0 - 65535 | per cell maximum voltage in millivolts setting 0 means "use absolute limit instead" please read this guide to understand this item |
lowbattstretch |
0 | 0 - 65535 | determines if reaching the low-battery limit will stop the motors or simply slow it down please read this guide to understand this item |
voltdiv |
???? | 0 - uint32 | hardware voltage divider adjustment default is dependant of hardware, do not adjust if you don't need to |
curroffset |
???? | 0 - uint32 | hardware current sensor offset adjustment default is dependant of hardware, do not adjust if you don't need to |
currscale |
???? | 0 - uint32 | hardware current sensor scaling adjustment default is dependant of hardware, do not adjust if you don't need to |
adcfilter |
10 | 1 - 100 | analog signal low-pass filtering constant, for avoiding noisy sensor measurements low value means strong filtering, slow changes high value means weak filtering, fast changes 0 and 100 both mean "disable filter" |
curlimkp |
100 | percentage | PID constant P for the current limiting feature do not adjust, 100% is default and ideal |
curlimki |
0 | sint32 | PID constant I for the current limiting feature do not adjust |
curlimkd |
100 | percentage | PID constant D for the current limiting feature do not adjust, 100% is default and ideal |
There are other items that are not always used, they are described in other usage guides, including the page on fancy features
The voltage splitting mode and the braking mode can also be assigned to CRSF channels so that they can be adjusted on-the-fly. Please see this page about how.
Use the command version
to show some version information.
The command is hwtest
, using it will enter into a test mode, it will ask you to press a key to choose a test mode.
- key
v
will help you do voltage sensor calibration - key
c
will help you do current sensor calibration - key
p
will help you do test phase mapping
Please see this sensor-calibration guide
Please see this hardware guide for information on finding the common-shared phase