Features Configuration
This guide covers the configuration of user-facing features for ASI BAC motor controllers, including assist levels, cruise control, reverse operation, walk mode, and display integration.
Assist Level Configuration
Assist levels allow the rider to adjust maximum power and speed. Depending on the type of displays or buttons used, these levels can be adjusted dynamically.
How Assist Levels Work
Assist levels set two key parameters:
- Assist gain: Limits output current/power (0-100% of active motor output power limit)
- Assist speed limit: Limits active speed in speed-limiting modes (0-100% of speed limit)
Assist Mode Sources
| Value | Source | Description |
|---|---|---|
| 0 | None | Assist speed limit and assist gain always = 100% |
| 1 | Analog | Uses voltage-based interpolation |
| 2 | Display | Uses PWM values from display |
| 5 | Network gains | Remote control via network |
| 9 | Discrete | Digital input selection |
| 11 | Momentary switch | Cycles through levels with button press |
Analog Assist Configuration
For analog assist devices (JT405, potentiometers) with 0-5V range:
Connect Hardware
Connect the analog assist device to the Brake 2 input of the controller.
Set Assist Mode
Set Assist mode source to 1 (Analog).
Measure Voltages
Poll and read the Brake 2 voltage input to measure the analog assist levels.
Configure Low Voltage
Enter the level 0 (low assistance) voltage into Assist low voltage reading.
Configure High Voltage
Enter the level 3 (high assistance) voltage into Assist high voltage reading.
The controller linearly interpolates between Assist gain 1/Assist speed 1 at low voltage and 100% assist at high voltage.
Display Assist Configuration
For display-based assist control:
Display Interpolation
Displays typically send PWM values that may not match 1:1 with assist levels. The controller interpolates between configured gain/speed values based on the PWM signal.
- Assist level 0: Assist gain and speed limit set to 0%
- Assist levels 1-3: Map to
Assist gain 1-3andAssist speed 1-3 - Higher levels (4-9): Interpolate between configured values
Momentary Switch Configuration
For single-button assist level cycling:
- Configure
Momentary Assist Sourceto the digital input connected to the switch - Set
Momentary Assist Modesto total number of assist modes (including zero-assist) - Configure
Assist gainandAssist speedparameters for each mode
Mode Count
The Momentary Assist Modes parameter must include the 'zero-assist' mode. For 6 configurable gains/speeds, set this to 7.
Cruise Control
Cruise control allows users to operate at constant speed when in torque mode or torque with speed limiting mode.
Cruise Input Sources
| Bit | Source | Input Type |
|---|---|---|
| 0 | Hall C | Digital |
| 1 | Hall B | Digital |
| 2 | Hall A | Digital |
| 3 | PFS | Digital |
| 4 | Cruise | Digital |
| 5 | Brake1 | Analog (Active low) |
| 6 | Brake2 | Analog (Active low) |
| 7 | ABMS | Analog (Active high >2.7V) |
| 8 | Throttle | Analog (Active high >2.7V) |
| 9 | Remote Brake | Network |
| 10 | Remote Power Switch | Network |
| 15 | Remote Reverse | Network |
Cruise Configuration
Select Input Source
Enable the appropriate bit in Cruise Enable Source for your input type.
Set Input Mode
Set Cruise Input Mode:
- 0: Momentary push button (press to engage/disengage)
- 1: Latching switch
Configure Minimum Speed
Set the minimum cruise speed (km/h) the vehicle must exceed to enable cruise.
Set Torque Limits
Configure Cruise Braking Torque Limit and Cruise Motoring Torque Limit as percentage of motoring current.
Configure Disengage Thresholds
Set Cruise Disengage Increase Threshold and Cruise Disengage Decrease Threshold for allowable speed deviation before cruise disengages.
Enable Feature
Enable Features5 bit 14 to activate cruise control.
Reverse Operation
Reverse allows the motor to operate in the opposite direction via a switch or network command.
Wiring
A single-throw switch is typically used, connected between GND and either:
- Cruise/Digital Input 1
- PFS/Digital Input 2 (Firmware 6.019+)
Legacy Firmware
For Firmware 6.018 and earlier, Cruise/Digital Input 1 is the only input option.
Reverse Configuration
Enable Reverse
Enable Features bit 1 (Reverse enable on cruise).
Select Input Source
Set Reverse Enable Source (address 1936) for Firmware 6.019+.
Set Speed Limit
If in a speed-limiting mode, set Vehicle jog speed to limit reverse speed.
Configure Interlock (Optional)
Enable Features bit 7 (Reverse interlock disable) to allow switching to reverse without coming to a full stop.
Verify Operation
Enable reverse and verify eBike flags bit 8 (Reverse) becomes active.
Network Reverse Control
For network control, send a command to Remote Digital Commands bit 15 (Enable reverse) - available in Firmware 6.019+.
Walk Mode
Walk mode is an auxiliary command source typically triggered via display or network for walking alongside the vehicle.
Walk Mode Setup
Enable Walk Mode
Enable Features bit 11 (Walk mode enable).
Set Signal Source
Set Walk mode signal source to 4 (Serial/display).
Set Speed Limit
Set Vehicle jog speed to limit walk mode speed.
Speed Limiting
Speed is only limited in Speed regulator mode 0 (Speed) or mode 2 (Torque with speed limiting). Mode 1 (Torque) is not speed limited.
Optional: Custom PI Gains
Set Speed regulator Ki for Walk mode and Speed regulator Kp for Walk mode to non-zero values for custom walk mode tuning.
Test Operation
Enable walk command from display, or write 1 to Display walk command via network.
EN Configuration Requirements
For TE Configuration 1 Pedal Bikes (ISO13849) "EN" firmware 6.017+:
- Requires heartbeat faster than 0.4 Hz
- Send
Remote state commandwith rolling counter:
| Byte | Function | Notes |
|---|---|---|
| Low byte | Remote State Command | 0=Off, 1=Idle, 2=Active |
| High byte | Watchdog Counter | Rolling 0-255 on 100ms interval |
Display Integration
Displays provide user input for assist levels, diagnostics, and rider information.
Wiring Warnings
Voltage Warning
The B+ pin outputs battery voltage. Ensure the display is compatible with this voltage, or use the 12V output pin instead.
Wiring Caution
If wired incorrectly, battery voltage could damage communication ports or the control board. Verify pinout with your display manufacturer before connecting.
Supported Display Protocols
| Value | Protocol | Interface | Notes |
|---|---|---|---|
| 0 | Disabled | N/A | |
| 1 | SWLCD open 9 mode | TTL | |
| 2 | SWLCD (closed) | TTL | |
| 4 | KM5 open 9 mode | TTL | King Meter Open, 9 assist levels |
| 5 | KM5 open 5 mode | TTL | King Meter Open, 5 assist levels |
| 6 | Wuxing 3 mode | TTL | |
| 7 | Bafang display | TTL | Specific Bafang protocol |
| 8 | KM5S | TTL | King Meter 5S protocol |
| 9 | Big Stone | TTL | |
| 10 | Bafang BMS | TTL | |
| 11 | KT | TTL | |
| 12 | Omni IoT | TTL |
Display Configuration
Connect Display
Wire display to controller, verifying pinout matches.
Enable E-Bike Mode
Enable Communications configuration vector bit 10 (Enable Ebike).
Set Protocol
Set Display protocol (port 1) or Display protocol2 (port 2) to match your display.
Configure Assist
Set Assist mode source to 2 (Display).
Enable Walk Mode
Set Walk mode signal source to 4 (Display) and enable Features bit 11.
Set Wheel Parameters
Configure Wheel diameter (mm), Wheel speed sensor source, and Wheel speed sensor pulses per revolution.
Bidirectional Throttle
Available in firmware 6.025+, bidirectional throttle allows one side for forward driving and the other for braking or reverse.
Bidirectional Throttle Configuration
Set Sensor Source
Set Throttle sensor source to match your analog input.
Configure Forward Voltage
Move throttle fully forward and set Throttle full voltage to that reading.
Configure Reverse Voltage
Move throttle fully to reverse/braking and set Throttle off voltage to that reading.
Set Fault Range
Configure Throttle fault range for fault detection outside the voltage range.
Set Endpoint Deadband
Configure Throttle deadband threshold for maximum command at endpoints.
Set Midpoint
Configure Bidirectional Throttle Midpoint (address 1987) to the resting position voltage.
Set Neutral Zone
Configure Bidirectional Throttle Deadband (address 1988) for neutral zone width centered on midpoint.
Configure Behavior
Set Reverse_Enable_Source and/or Regen brake source to 4 (bidirectional throttle) and enable corresponding feature bits.
Enable Feature
Enable Features4 bit 11 (Bidirectional throttle).
Rolling Start
Rolling start delays motor power until reaching a specified speed, useful for sensorless operation and certain pedal sensor configurations.
Rolling Start Configuration
Enable Rolling Start
Enable Features bit 9 (Rolling start enable).
Set Start Speeds
Configure start speeds based on assist mode:
- No assist mode: Use
Rolling start speed - With assist modes: Use
Rolling start speed 1,2, and3for respective assist levels
Recommended Setting
Set start speed to 0.5 km/h or greater minimum. Testing determines the appropriate level for smooth power delivery.
External Speed Sensor
Clutched motors require an external speed sensor since motor RPM is 0 until assistance begins.
Alternate Speed/Power Modes
The BAC controllers support two configurable power and speed modes: Race mode (default) and Street mode (secondary).
Mode Selection
The active mode depends on input state:
- Input inactive: Race mode (default)
- Input active: Street mode
Alternate Power Mode
Enable Feature
Enable Features bit 10 (Alternate power limit enable).
Select Input Source
Set Alternate power switch source to your input.
Configure Power Limits
Set power limits for each mode:
Rated motor power (Race mode PAS power)Rated motor power (Race mode Throttle power)Rated motor power (Street mode PAS power)Rated motor power (Street mode Throttle power)
Power Ordering
Race mode power must be set higher than Street mode power.
Alternate Speed Mode
Enable Feature
Enable Features bit 8 (Alternate speed limit enable).
Select Input Source
Set Alternate speed limit switch source to your input.
Configure Speed Limits
Set speed limits for each mode:
Vehicle maximum speed (Race mode PAS max speed)Vehicle maximum speed (Race mode Throttle max speed)Vehicle maximum speed (Street mode PAS max speed)Vehicle maximum speed (Street mode Throttle max speed)
Available Input Sources
- Cruise/Digital input 1
- PFS/Digital input 2
- Brake 1/Analog input 2
- Brake 2/Analog input 3
- Remote power switch (
Remote Digital Commands bit 6) - Remote speed switch (
Remote Digital Commands bit 5)
Key Parameters Reference
Assist Level Parameters
| Address | Parameter | Function |
|---|---|---|
| 200 | Assist mode source | Input source selection (0-11) |
| 201 | Assist low voltage reading | Low assist voltage threshold |
| 202 | Assist high voltage reading | High assist voltage threshold |
| 203-211 | Assist gain 1-9 | Power gain per level (pu) |
| 212-220 | Assist speed 1-9 | Speed limit per level (pu) |
| 221 | Momentary Assist Source | Digital input for button |
| 222 | Momentary Assist Modes | Number of assist modes |
Cruise Control Parameters
| Address | Parameter | Function |
|---|---|---|
| 1930 | Cruise Enable Source | Input source bitmask |
| 1931 | Cruise Input Mode | 0=Momentary, 1=Latching |
| 1932 | Cruise minimum speed | Minimum speed to engage (km/h) |
| 1933 | Cruise Motoring Torque Limit | Max motoring current (%) |
| 1934 | Cruise Braking Torque Limit | Max braking current (%) |
| 1935 | Cruise Disengage Thresholds | Speed deviation limits |
Walk Mode Parameters
| Address | Parameter | Function |
|---|---|---|
| 230 | Vehicle jog speed | Walk mode speed limit (km/h) |
| 231 | Walk mode signal source | Input source selection |
| 232 | Speed regulator Kp for Walk mode | Walk mode Kp |
| 233 | Speed regulator Ki for Walk mode | Walk mode Ki |
Reverse Parameters
| Address | Parameter | Function |
|---|---|---|
| 1936 | Reverse Enable Source | Input source selection |
| 230 | Vehicle jog speed | Reverse speed limit (km/h) |
Next Steps
- Configure Speed Regulator Modes for motor control behavior
- Review Pedal Sensors for PAS configuration
- Set up System Tuning for control loop optimization