-
Notifications
You must be signed in to change notification settings - Fork 37
TipsAndTricks
Sine startup mode is designed for use in crawlers. In this mode, all three phases are energized using sinusoidal commutation. Since BEMF sensing is not available in this mode, there is no way to determine a rotor's position unlike in trapezoidal 6-step commutation (trap mode), hence throttle controls rotation speed rather than duty cycle. The following general approach can be used for tuning:
- Reset settings to defaults.
- Enable bidirectional throttle by setting
throt_mode
to 1 (forward/reverse). - Make sure the motor runs well in trap mode. You may need to adjust motor PWM frequency and/or other settings in some corner cases.
- Enable sine startup mode via
sine_range
. - Set desired power level using
sine_power
. Use caution because high values may lead to overheating. - Increase the stall protection ERPM threshold using
prot_stall
until the motor gets a sufficient power boost for smooth transition between sine startup and trap mode. This value should not be too high (2200-2800 in most cases) to keepsine_power
low without losing step. - Enable temperature protection by setting
prot_temp
to 80˚C or so. (IMPORTANT!!!) - Set drag brake using
duty_drag
if needed.
Proportional brake mode is designed for use in RC cars. In this mode, proportional motor brake is engaged the first time throttle goes into reverse. General steps:
- Reset settings to defaults.
- Enable proportional brake mode by setting
throt_mode
to 2 (forward/brake/reverse) or 3 (forward/brake). - Disable damped mode (complementary PWM) to allow the motor to coast while running.
In cases when a motor drives an inertial load (a propeller or a flywheel), it may be necessary to limit maximum power at lower RPM during a full throttle punch in order to avoid desyncing or even frying the motor/ESC due to oversaturation of the coils. The duty_ramp
parameter (maximum duty cycle ramp) enables maximum power limit to linearly change from duty_spup
(at zero RPM) to 100% (at duty_ramp
kERPM) depending on RPM. The duty_rate
parameter (duty cycle slew rate) is used to control the speed of power change (higher values bring more agility).
- See Targets to determine the target names for your ESC and download the latest release here.
- Flash the corresponding bootloader installer using AM32 ESC Config Tool or ESC-Configurator:
- Disconnect the signal line and power cycle the ESC. (IMPORTANT!!!)
- Proceed to firmware update.
Note: This method will not work on some MCUs with read-out protection enabled.
The most convenient and hassle-free way to update the firmware is to use an ESCape32 Wi-Fi Link board. Ubiquitous and cheap C3 Super Mini and S2 Mini boards are available on AliExpress and Amazon. Please see the Wi-Fi Link page for more information.
Alternative steps:
- Download ESCape32 Update Utility.
- Connect to the ESC as described in Installation: Step 5.
- Power-off the ESC.
- Run the update utility (it will start probing or counting depending on selected connection type).
- Power-on the ESC immediately.
- Wait until the operation is complete.
Examples:
# Use option "-d" to override path to serial device
# Use option "-f" to force update in case of one-way connection
escape32-update [-d /dev/mySerialDevice] [-f] ...
# Print ESC info
escape32-update
# Flash firmware
escape32-update firmware.bin
# Flash bootloader
escape32-update -B bootloader.bin
# Disable write protection
escape32-update -P0
# Enable bootloader write protection
escape32-update -P1
# Enable full write protection
escape32-update -P2
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.