Motor setup
Enter the rated values of your motor. Then run motor discovery, so that the controller measures the motor and its position sensor (if installed). At the end, the controller can operate your motor.
Critical Safety Instructions
Make sure that only a trained technician installs or sets up the Accelerated Systems controller. If you do not obey these instructions, damage to the controller, the computer, or the vehicle can occur. These hazards can also cause injury or kill you.
Before you connect, set up, or operate the controller, read these instructions:
- Wear the applicable personal protective equipment (PPE) near batteries and moving parts.
- Use insulated tools. Insulated tools prevent electrical shock.
- Always connect a USB isolator between the computer and the controller. If you do not use a USB isolator, damage to the computer or the controller can occur. ASI is not responsible for this damage.
- Before you make connections, make sure that the battery or power source is disconnected or set to OFF.
- Make sure that the area around the vehicle is clear. Keep all persons and animals away from the vehicle during tests and operation. The motor turns during setup and tests.
- Before you do a test of the motor or vehicle, put the vehicle on a stand. Use an approved bike stand or automotive jack stands. Make sure that the wheels do not touch the ground.
- As an alternative, attach the motor to a workbench vise or a solid stand. This holds the motor in position during tests.
- Make sure that all moving parts (for example, pedals and wheels) can turn freely in the two directions.
Prerequisites
Prerequisites
- Rated limits are set, including
Rated system voltage. - You have the motor datasheet: maximum power, rated (peak) phase current, no-load speed, number of pole pairs, and gear ratio. If you do not have this information, contact your motor manufacturer.
- The motor phases and the position sensor (if installed) are connected to the controller. Refer to Pinout specifications.
- The motor is attached tightly, and the wheels do not touch the ground.
- The battery or power supply can supply the full
Rated motor current.
How it works
The rated values tell the controller how to operate the motor:
Rated motor power (Race mode PAS power)is the maximum electrical power that the controller can supply to the motor in that mode. It is not the continuous power from the motor datasheet. The other threeRated motor powerparameters apply only when their mode is active (throttle or street mode). The rated battery current, and thus the battery current limits, use this value. Refer to Rated limits.Rated motor currentis the rated peak phase current of the motor.Rated motor speedis the no-load speed of the motor in RPM, without field weakening. It depends onRated system voltage.# of motor pole pairsis the number of magnets divided by 2.Gear ratiois the number of motor revolutions for one wheel revolution.
Motor discovery measures the motor. Motor discover mode selects the type of discovery:
| Value | Discovery |
|---|---|
| 1 | Stationary discovery: measures Rs and Ls. |
| 2 | Moving discovery. |
| 5 | Encoder discovery. The switching frequency must be 10 kHz. |
| 6 | Motor phase connection test. The controller turns on the phase A (U) low-side MOSFETs and measures the voltages on phases B (V) and C (W). If they also go low, all three motor phases are connected. Refer to Check the motor phase connections. |
| 9 | Automatic sequence: stationary, then moving discovery. If discovery is successful, it copies the results to the motor parameters. |
| 0 | Off. Stops discovery. |
Motor discover mode values used on this page
During moving discovery, the motor turns at a fraction of Rated motor speed: 25% by default in firmware 6.016 and later, and 50% in earlier firmware. In firmware 6.021 and later, you can change it with Motor Discovery Speed (address 1683).
Wiring
Connect the three motor phases and the position sensor as shown in Pinout specifications. If the motor turns in the incorrect direction, interchange phase A (green) and phase C (blue). You can also interchange them in the software. Refer to Additional options.
Configure the motor
Enter the rated values
Go to the Peripheral Selection tab. Select the Motor Nameplate Ratings page.
TIP
Set Rated motor power (Race mode PAS power) to Rated system voltage multiplied by the peak rated current output of your battery, or lower. This prevents damage to the battery, and prevents BMS trips.
- Enter
Rated motor power (Race mode PAS power). - Enter
Rated motor current. - Enter
Rated motor speed. - Enter
# of motor pole pairs. - Enter
Gear ratio.
After each entry, press Enter, or press Write below this section. If a parameter is not on the page, add it. Refer to the image that follows. Press Save to flash in the Parameter drop-down menu.

Run motor discovery
DANGER
- The motor turns for up to 20 seconds with high current, at 25% of
Rated motor speedby default (50% in firmware before 6.016). - Make sure that all moving parts (for example, the motor, pedals, and wheels) can turn freely in the two directions.
- Make sure that the motor is attached tightly and that the wheels do not touch the ground.
To stop the motor, do these steps in this sequence:
- Enter 0 in
Motor discover mode. - Turn off the key-in.
- Disconnect the battery only if the other steps do not stop the motor. If you disconnect the battery while the motor turns, a voltage spike can cause damage to the controller.
WARNING
Connect the system to a power source that can supply the full rated motor current. Discovery draws the full rated motor current. It can cause damage to a power source that cannot supply this current.
- Set
Motor position sensor typeto 0 (Hall based). - In the Write (Temp) section, enter 9 in
Motor discover mode. Press Enter or click Write. The motor turns for approximately 20 seconds at the discovery speed. Make sure that it turns steadily in the correct forward direction. To stop the test, enter 0 inMotor discover mode. - When the motor stops, press Read in the Display Only section. Make sure that the results are correct. Refer to Verify.
- To use Hall start with sensorless run, refer to Additional options.
- Save the parameters to flash.
- Set
Motor position sensor typeto 2 (Sensorless). - In the Write (Temp) section, enter 9 in
Motor discover mode. Press Enter or click Write. The motor turns for approximately 20 seconds at the discovery speed. Make sure that it turns steadily in the correct forward direction. To stop the test, enter 0 inMotor discover mode. - When the motor stops, press Read in the Display Only section. Make sure that the results are correct. Refer to Verify.
- Save the parameters to flash.
Note
Encoder discovery cannot operate at switching frequencies higher than 12 kHz. Thus, the procedure sets the switching frequency to 10 kHz before discovery. Switching frequencies below 13 kHz disable Bluetooth, so you must do this procedure through TTL or CAN.
-
Enter 15350 in
Parameter access code 1(shown as 3BF6 in hexadecimal in newer dictionaries). This gives user access level 1, so that you can changeSwitching frequency.WARNING
We recommend that you do not increase
Switching frequencyabove the default (13 kHz). The upper limit is different for each application. If the value is too high, the controller can stop. Then you must send it to ASI to unlock it. -
Set
Switching frequencyto 10 kHz. Save to flash. Then power cycle the controller. - Set
Encoder Sine V SourceandEncoder Cos V Sourceto the two analog inputs that the encoder is connected to. For the permitted inputs, refer to Position sensor tuning. - Set
Motor position sensor typeto 3 (Sine Cos Encoder). - Set
Motor discover modeto 1. This measures the resistance (Rs) and inductance (Ls) of the motor. Copyautotune Rsandautotune LstoRsandLs. - Set
Motor discover modeto 5. This runs encoder discovery and updates the encoder high and low voltages,Encoder offset, and the sine and cosine sources. - Make sure that the results are correct. Refer to Verify.
- Save the parameters to flash.
- If you use Bluetooth, set
Switching frequencyback to 13 kHz andBaud rate port2back to 115200. To resetruntime max switching frequency, it can be necessary to power cycle the controller.
Verify
After discovery, make sure that:
autotune rated rpmis approximately equal to theRated motor speedthat you entered. If it is not, refer to Troubleshooting.autotune Rsandautotune Lsare positive, and are copied toRsandLs.-
Halls:
autotune hall sector[0]toautotune hall sector[7]make a valid Hall table, and are copied toHall sector[0]toHall sector[7]. A valid Hall table has 8 values. The value -1 can occur two times, and the values 0 to 5 occur one time each. For example: [-1, 0, 4, 5, 2, 1, 3, -1].Example
These Hall tables are not valid:
- All values are -1: [-1, -1, -1, -1, -1, -1, -1, -1]
- More than two values are -1: [-1, 0, 4, -1, 2, 1, 3, -1]
- A value from 0 to 5 occurs more than one time: [-1, 0, 4, 5, 2, 2, 3, -1]
Refer to Troubleshooting.
-
Halls:
autotune hall offset angleis copied toHall offset. - Encoder:
autotune offset erroris less than 3 degrees.
Additional options
Use Hall start and sensorless run
After a successful Hall discovery, you can set Motor position sensor type to 1 (Hall start and sensorless run). Then the motor starts with the Hall sensors, and changes to sensorless operation at speed. For the transition settings, refer to Position sensor tuning.
Reverse the motor direction
If the motor does not turn in the correct forward direction:
- Wait until motor discovery is complete and the motor stops.
- Enable
Motor featuresbit 0 Swap phase A and phase C. As an alternative, interchange the phase wires A (green) and C (blue). - Run motor discovery again.
Check the motor phase connections
Motor discover mode 6 tells you if a motor phase is disconnected. The motor does not turn during this test.
- Set
Motor discover modeto 6. - Read
motor phase U low voltage POST(address 301),motor phase V low voltage POST(address 303) andmotor phase W low voltage POST(address 305). The values are normalized to the battery voltage. - Compare the values with the table.
| U (301) | V (303) | W (305) | Result |
|---|---|---|---|
| 0.15 ± 0.05 | 0.15 ± 0.05 | 0.15 ± 0.05 | All three phases are connected. |
| 0.15 ± 0.05 | 0.15 ± 0.05 | 0.5 ± 0.05 | Phase W is disconnected. |
| 0.15 ± 0.05 | 0.5 ± 0.05 | 0.15 ± 0.05 | Phase V is disconnected. |
| 0.15 ± 0.05 | 0.5 ± 0.05 | 0.5 ± 0.05 | Phase U is disconnected, or the motor is disconnected. |
Motor phase connection test results
Change the discovery speed
In firmware 6.021 and later, you can change the speed of moving discovery with Motor Discovery Speed. The value is a fraction of Rated motor speed.
Troubleshooting
The controller does not power on, or the BMS trips at power-up
The input capacitors of the controller draw a large inrush current when they charge at power-up. This current can trip the battery BMS on overcurrent, and can cause damage to components. High-power systems must have a pre-charge circuit. Refer to Capacitor inrush current protection.
You cannot connect to the controller
Refer to the connection troubleshooting in the BACDoor®3 user guide or the BACDoor® Mobile user guide.
Ls or Rs is negative
The cause can be in the wiring or in the motor. Possible causes:
- The battery cannot supply sufficient current for the test. Decrease
Rated motor current, and try again. - The current is not sufficient for the test. Increase
Rated motor current. Rated motor speedis too high. Decrease it.- There is a short circuit on the phase wires, or between two or more phases. This can be in the motor.
- A phase is disconnected. To find a disconnected phase, refer to Check the motor phase connections.
The motor does not spin
- The controller can have a fault. Look at the faults, or count the LED flash code. Refer to Faults and warnings.
- A phase wire can be loose. Examine all connections. Refer to Check the motor phase connections.
- A freewheeling motor can turn in the reverse direction and not engage. Refer to Reverse the motor direction.
- The brakes can stop the motor current. Look at
controller flags(formerlyeBike Flags) bit 0 (Brake) and bit 1 (Cut-out).- If the two bits are set, the brakes stop the motor current.
- If only Cut-out is set, a different item stops the motor current. Disconnect all peripherals. If necessary, start again from the parameter file that you saved before.
- To see the live flag values, click poll. Enabled bits show in the right column.
- The active
Rated motor powerparameter orRated motor currentcan be too low for the starting torque. IncreaseRated motor currentand all fourRated motor powerparameters. - Try to set
Sensorless closed loop enable frequencyto 10% of therated electrical frequency. To see the value, click Read. - On EN controllers, the law permits motor operation only with pedal input.
The motor does not spin as fast as expected
- If
Rated motor speedis an estimate, and the motor turns steadily during discovery, useautotune rated rpmasRated motor speed. - Discovery operates at 25% of
Rated motor speedby default in firmware 6.016 and later (50% in earlier firmware). Refer to Change the discovery speed. - If
autotune rated rpmis very different, make sure that# of motor pole pairsis correct. - Try to set
Sensorless closed loop enable frequencyto 10% of therated electrical frequency.
The motor speed is unsteady during discovery
- A phase wire can be disconnected.
Rated motor speedcan be very different from the correct value. MultiplyRated motor speedby 2 or divide it by 2. Then run discovery again.- Make sure that
# of motor pole pairsis correct. - Try to set
Sensorless closed loop enable frequencyto 10% of therated electrical frequency.
Hall vs Sensorless position fault during discovery
This fault can occur if the Hall offset in the controller is different from the offset of the motor that you measure. Set Motor position sensor type to 2 (Sensorless). Clear the fault and run motor discovery. Then set Motor position sensor type back to 0 (Hall based) or 1 (Hall start and sensorless run).
Hall table is invalid
- All values are -1: the Hall sensors have no ground or no power, or they are not connected. Make sure that the sensors are connected to Hall 5V and Hall GND. Also make sure that they are connected to Hall A, Hall B, and Hall C.
- A value occurs more than one time, or more than two values are -1: one or more Hall sensors are not connected. Examine Hall A, Hall B, and Hall C.
- High speed together with bad signal quality can also cause values that occur more than one time.
Hall discovery does not work
For Hall discovery, Rated motor power (Race mode PAS power) must be equal to or more than the maximum power of the motor.
Counting motor pole pairs
Contact ASI support.
Parameters
| Parameter | Address | Units | Description |
|---|---|---|---|
Switching frequency |
2 | Hz | PWM switching frequency. |
Rated system voltage |
70 | V | Nominal battery voltage. |
Rated motor current |
71 | A | Motor rated peak phase current. |
Rated motor speed |
72 | RPM | Motor no-load speed, without field weakening. |
Ls |
74 | µH | Motor phase-to-neutral inductance. |
Rs |
75 | mΩ | Motor phase-to-neutral resistance. |
Motor position sensor type |
77 | 0: Hall based. 1: Hall start and sensorless run. 2: Sensorless. 3: Sine Cos Encoder. | |
# of motor pole pairs |
78 | Number of magnets divided by 2. | |
Hall offset |
79 | degrees | Hall sensor offset angle. |
Hall sector[0] to Hall sector[7] |
80 to 87 | Hall table. -1 is an illegal state. | |
Rated motor power (Race mode PAS power) |
122 | W | Maximum electrical motor power in the default mode. |
Motor features |
127 | Bit field. Bit 0: Swap phase A and phase C. | |
Gear ratio |
226 | N:1 | Motor revolutions per wheel revolution. |
autotune offset error |
357 | degrees | Averaged encoder offset error after encoder discovery. |
motor phase U low voltage POST |
301 | V (norm) | Read only. Phase U voltage, normalized to the battery voltage. Used by the phase connection test. |
motor phase V low voltage POST |
303 | V (norm) | Read only. Phase V voltage, normalized to the battery voltage. |
motor phase W low voltage POST |
305 | V (norm) | Read only. Phase W voltage, normalized to the battery voltage. |
autotune Rs |
425 | mΩ | Resistance measured by discovery. |
autotune Ls |
426 | µH | Inductance measured by discovery. |
autotune hall sector[0] to autotune hall sector[7] |
440 to 447 | Hall table measured by discovery. | |
autotune hall offset angle |
460 | degrees | Hall offset measured by discovery. |
autotune rated rpm |
462 | RPM | Speed measured by discovery. |
Motor discover mode |
481 | Discovery to run. See How it works. | |
Motor Discovery Speed |
1683 | pu | Speed for moving discovery, as a fraction of Rated motor speed. Firmware 6.021 and later. |
Encoder Sine V Source, Encoder Cos V Source |
1960, 1961 | Analog inputs used by the encoder. | |
Encoder offset |
1962 | degrees | Encoder sensor offset angle. |
Parameters used on this page