Motor Setup
This guide covers motor configuration and the autotune process for ASI BAC motor controllers.
Critical Safety Instructions
Safety Warning
Installation or setup of the ASI controller must be done by a trained technician. Failure to follow these warnings can damage the controller, computer, vehicle and/or cause serious injury or death.
Before starting motor setup:
- Wear appropriate PPE (Personal Protective Equipment) when working with batteries or moving parts
- Use insulated tools to protect from electric shock
- ALWAYS use a USB isolator between the computer and controller
- Ensure the battery or power source is disconnected before making connections
- Keep all people, children, and pets away from the vehicle during testing
- Ensure wheels are off the ground on an approved bike stand or jack stands
- Alternatively, secure the motor to a workbench vice or solid stand
- Make sure all moving parts (pedals, wheels) are clear to move in either direction
Motor Profile Configuration
Before controlling the motor, you must input the rated parameters from the motor's datasheet. Contact your motor manufacturer if you don't have this information.
Required Parameters
Navigate to the Peripheral Selection tab, then select the Motor Nameplate Ratings page.
| Parameter | Description | Notes |
|---|---|---|
| Rated motor power | Maximum continuous power output | Set to rated voltage × battery peak current, or lower |
| Rated motor current | Maximum continuous current | From motor datasheet |
| Rated motor speed | Maximum RPM | From motor datasheet |
| # of motor pole pairs | Number of magnetic pole pairs | Count or from datasheet |
| Gear ratio | Motor to wheel gear ratio | 1:1 for direct drive |
Power Rating Tip
Set your Rated motor power to the Rated system voltage multiplied by your battery's peak rated current output (or lower) to avoid damaging your battery or tripping your BMS.
Configuration Steps
Enter Motor Parameters
Enter each parameter and press Enter after every entry, or press Write after entering each value.
Add Missing Parameters
Add any parameters if missing as necessary for your motor type.
Save to Flash
Press Save to flash in the Parameter drop-down menu to store the configuration.
Autotune Process
The autotuning process measures the motor's inductance (Ls) and resistance (Rs) via the Motor discover mode feature.
Danger - Motor Will Spin
The motor will spin for up to 20 seconds at 50% of the Rated motor speed (RPM) and high current. Ensure all moving parts are clear to move in either direction and the motor is securely mounted.
Power Requirements
This test draws the full rated motor current. Ensure your power source can supply adequate current without damage.
Autotune for Hall Sensors
For motors with Hall sensors (Motor Position Sensor Type = 0):
Set Sensor Type
Set Motor Position Sensor Type to 0 (Hall based).
Start Motor Discovery
In the Write (Temp) section, enter value 9 in Motor discover mode and press Enter or click Write.
Monitor Motor
The motor will spin for about 20 seconds, reaching half of the rated speed. It should run steadily in the forward direction.
To stop the test early, enter 0 in Motor discover mode.
Verify Results
Once stopped, press Read in the Display Only section and verify:
autotune rated rpmis near your entered Rated motor speedautotune Rsandautotune Lsvalues are copied to Rs and Ls parameters- Hall table is valid (see validation below)
Save Configuration
Save to flash to store the discovered values.
Hall Table Validation
A valid Hall table consists of 8 values stored in autotune hall sector[0-7]:
| Valid Table | Invalid Table |
|---|---|
[-1, 0, 4, 5, 2, 1, 3, -1] | [-1, -1, -1, -1, -1, -1, -1, -1] (all -1) |
| Two -1 values maximum | [-1, 0, 4, -1, 2, 1, 3, -1] (three -1 values) |
| Values 0-5 appear once each | [-1, 0, 4, 5, 2, 2, 3, -1] (repeated value) |
Autotune for Sensorless Operation
For sensorless motor control (Motor Position Sensor Type = 2):
Set Sensor Type
Set Motor Position Sensor Type to 2 (Sensorless).
Start Motor Discovery
Enter value 9 in Motor discover mode and press Enter.
Monitor and Verify
After the motor stops, verify:
autotune rated rpmmatches expected valueautotune Rsandautotune Lsare populated
Save Configuration
Save to flash.
Autotune for Hall Start + Sensorless Run
To use Hall sensors for startup and sensorless for running:
- Complete the Hall sensor autotune (Type 0) first
- After successful Hall autotune, change
Motor Position Sensor Typeto 1 - Save to flash
Autotune for Sine-Cosine Encoders
Switching Frequency Limitation
Encoder autotune cannot run at switching frequencies higher than 12 kHz. Lower to 10 kHz before this process. Frequencies below 13 kHz will disable Bluetooth connectivity—use TTL or CAN instead.
Set Sensor Type
Set Motor Position Sensor Type to 3 (Encoder).
Discover Rs and Ls
Set Motor discover mode to 1 to discover motor resistance and inductance.
Copy Values
Copy discovered values from autotune Rs and autotune Ls to the Rs and Ls parameters.
Discover Encoder Parameters
Set Motor discover mode to 5 to discover encoder parameters.
Verify Results
Read the encoder angle parameters and confirm autotune offset error (parameter 357) is less than 3 degrees.
The following parameters update automatically:
- Encoder Sine/Cos High/Low Voltage
- Encoder offset
- Encoder Sine/Cos V Source
Save and Power Cycle
Save to flash. If switching frequency was lowered, raising it again may require a power cycle.
Troubleshooting
Controller Won't Power On
High-power controllers have larger capacitors that require charging during initial power-up. This can cause some BMS systems to trip due to overcurrent.
Solution: Use a pre-charge circuit to prevent damage to the controller and battery.
Connection/Communication Issues
If the controller is powered on (solid or blinking LED):
For PC BACDoor:
- Remove all peripherals (displays, throttle, etc.)
- Verify the controller LED is lit (solid or flashing)
- Remove unnecessary computer peripherals to isolate the correct port
- Ensure Network Baud rate is set to 115200 (default)
- If not connecting, try 9600 as the baud rate may have been changed
- Once connected, set both
Baud rateandBaud rate port2to 115200 - Save to flash and power cycle
For BACDoor Mobile:
- Verify your controller has Bluetooth (part number includes "BT")
- Ensure Bluetooth is ON on your device
- Look for "e-Bike" or "ASI devices" in the connection list
- Place phone close to controller and refresh to identify by signal strength
- Disconnect any peripherals (especially displays)
Ls and/or Rs Are Negative
Negative values indicate wiring issues or internal motor problems:
| Possible Cause | Solution |
|---|---|
| Insufficient battery current | Lower Rated motor current and retry |
| Current too low for measurement | Increase Rated motor current |
| Rated motor rpm too high | Lower the value |
| Phase wire shorting | Verify no external shorts |
| Internal phase short | May require motor replacement |
| Disconnected phase | Check all connections |
Motor/Wheel Does Not Spin
| Possible Cause | Solution |
|---|---|
| Controller faulted | Check LED flash code, see Faults and Warnings |
| Loose phase wires | Verify all connections |
| Freewheeling motor spinning backwards | Swap phases (see below) |
| Brakes enabled | Check eBike flags bit 0 (Brake) and bit 1 (cut-out) |
| Power settings too low | Increase Rated motor current and power |
| Sensorless frequency too high | Set Sensorless closed loop enable frequency to 10% of rated electrical frequency |
| EN controller requires pedal input | Provide pedal input per legislation |
Motor Spins in Wrong Direction
If the motor spins in reverse:
Option 1 - Physical Swap: Swap phase wires A (Green) and C (Blue) physically.
Option 2 - Digital Swap:
Enable Motor features bit 0 in BACDoor to swap phases digitally.
Motor Does Not Spin Fast Enough
| Possible Cause | Solution |
|---|---|
| Inaccurate Rated motor speed | Use autotune Rated rpm value if motor runs stably |
| Firmware behavior | FW 6.016+ runs discovery at ~20% electrical frequency (was 50%) |
| Wrong pole pairs | Verify # of motor pole pairs setting |
| Sensorless frequency too high | Set to 10% of rated electrical frequency |
Motor Speed Is Unsteady
| Possible Cause | Solution |
|---|---|
| Disconnected phase wire | Check all connections |
| Rated motor speed incorrect | Double or halve the value and retry |
| Wrong pole pairs | Verify and correct setting |
| Sensorless frequency too high | Set to 10% of rated electrical frequency |
Hall vs Sensorless Position Fault
If you get this error with Motor Position Sensor Type set to 0 or 1:
Solution: Set Motor Position Sensor Type to 2 (Sensorless) for the motor speed autotune, then change back after completion.
Key Parameters Reference
| Address | Parameter | Function |
|---|---|---|
| 69 | Rated motor power | Maximum continuous power (W) |
| 70 | Rated system voltage | Nominal battery voltage (V) |
| 71 | Rated motor current | Maximum continuous current (A) |
| 72 | Rated motor speed | Maximum RPM |
| 73 | # of motor pole pairs | Magnetic pole pairs |
| 74 | Gear ratio | Motor to wheel ratio |
| 75 | Rs | Stator resistance (Ω) |
| 76 | Ls | Stator inductance (H) |
| 77 | Motor Position Sensor Type | 0=Hall, 1=Hall+Sensorless, 2=Sensorless, 3=Encoder |
| 78 | Motor discover mode | Autotune trigger (9=start, 0=stop) |
Next Steps
- Configure Position Sensor Tuning for advanced sensor setup
- Set up Battery Configuration for proper limits
- Review Protection Systems for safe operation