Pedal sensors
Introduction
Pedal sensors are part of the pedal assist system (PAS) of eBikes. Pedal sensors read the pedal cadence, the pedal torque, or the two. The controller uses these values to calculate when to supply motor assistance, and how much.
Supported pedal sensors
| Pedal Sensor type value | Pedal Sensor type | Direction | Notes |
|---|---|---|---|
| 0 | Single Hall | Duty cycle directional | >50% duty cycle is forward |
| 1 | Single Hall | Non-directional | |
| 3 | Quadrature Speed & Torque | PFS leads Cruise input is forward | Duty cycle 50:50 |
| 4 | Quadrature Speed only | PFS leads Cruise input is forward | Duty cycle 50:50 |
| 5 | Axle Torque | Non-directional | Simple torque only |
| 6 | Single Hall | Inverted duty cycle Directional | <50% duty cycle is forward |
| 7 | Single Hall and Torque | Logical input Directional | Cruise input active is forward |
| 8 | Single Hall and Torque | Non-directional | |
| 9 | Dyname torque | Non-directional | Refined torque only |
Wiring
Single-output sensors usually have 3 wires: 5 V or 12 V, GND, and signal. Connect the signal wire to PFS/Digital input 2.

Single-output sensors with direction usually have 4 wires: 5 V or 12 V, GND, signal, and direction. Connect the signal wire to PFS/Digital input 2. Connect the direction wire to Cruise/Digital input 1.
Two-signal pedal speed sensors usually have 4 wires: 5 V or 12 V, GND, sine signal, and cosine signal. Connect the sine signal to PFS/Digital input 2. Connect the cosine signal to Cruise/Digital input 1.

Axle torque is a legacy configuration. Its only permitted source is the Throttle analog input. All other pedal torque sensors can use an available analog input, for example Throttle, Brake1, Brake2, ABMS, or Remote Throttle Voltage.
Configuration
DANGER
Make sure that the vehicle cannot move. The motor can start unexpectedly while you configure the pedal sensor manually.
TIP
Save a backup copy of the parameter file frequently. You can send the file to ASI for support. You can also use it again if unusual behaviour occurs.
TIP
Set Control command source to 0 / Remote. This prevents accidental motor rotation while you set the pedal sensor manually.
Configuration:
- Set
Pedal sensor typeto the applicable value. - Enter
Pedal speed sensor pulses per revolution. For quadrature pedal types, the value depends on the firmware version:- Up to 6.026: the sum of the PFS/sine and Cruise/cosine pulses. Quadrature sensors support up to 18 pulses per revolution.
- 6.027 and higher: the PFS/sine pulses only. All pedal speed sensors support 1 to 72 pulses per revolution.
- Set
Control command sourceto 2 / Pedal Sensor or 4 / throttle OR pedal sensor, as applicable to your application. This step enables the pedal sensor. - Make sure that there are no faults.
- Turn the pedals in the forward direction. Make sure that the motor speed increases.
- Stop the pedals, or turn them backward. Make sure that the motor coasts to a stop. If the motor does not operate as given in steps 5 and 6, refer to Troubleshooting at the end of this page.
- Do the Average pedal speed test to make sure that the pedal sensor is set up correctly.
Tuning:
The pedal speed sensor parameters with the largest effect on the bike feel are: Pedalec positive motoring torque ramp and Pedalec negative motoring torque ramp, Pedal speed map end, and Pedal speed map offset.
To make the bike feel softer, increase Pedal speed map end and Pedalec positive motoring torque ramp from their default values (64 RPM and 200 ms). To make the bike feel more sensitive, decrease these values.
Pedal sense delay is the number of PFS input pulses that the controller must detect before it considers the pedals active. In firmware 6.027 and later, for quadrature sensors, the controller must detect this number of pulses on each input. A higher value increases the pedal rotation that is necessary before assistance and Pedalec positive motoring torque ramp start. If the value is too low, the system can be too sensitive.
Pedal speed map end sets the pedal RPM above which pedal speed gain (the pedal assist request) is 100%.
Pedal speed map offset is the pedal-assist request when the pedal RPM is zero and the pedals are active. A value above 0 gives pedal assist at 0 RPM. With a value below 0, the pedal RPM must be more than 0 RPM before the controller supplies assistance. The pedal-assist request is limited to the range 0% to 100%. If Pedal speed map offset is more than 1, the pedal-assist request is 0% above Pedal speed map end.
The controller uses Assist cut out distance to calculate the time (pedalec_timeout_delay) until Pedalec negative motoring torque ramp starts. The calculation uses the instantaneous vehicle speed and the time from the last pedal pulse. Two limits apply:
Pedalec minimum timeoutis the minimum time before the negative ramp starts.Pedalec maximum timeoutis the maximum time before the negative ramp starts.
If there is no pedal torque signal, Assist level configuration controls the torque and speed behaviour of the vehicle.
Configuration:
- Set
Pedal sensor typeto the applicable value. - Enter
Pedal speed sensor pulses per revolution. For quadrature pedal types, the value depends on the firmware version:- Up to 6.026: the sum of the PFS/sine and Cruise/cosine pulses. Quadrature sensors support up to 18 pulses per revolution.
- 6.027 and higher: the PFS/sine pulses only. All pedal speed sensors support 1 to 72 pulses per revolution.
- Set
Control command sourceto 2 / Pedal Sensor or 4 / throttle OR pedal sensor, as applicable to your application. This step enables the pedal sensor. - Set
Torque sensor voltage source. - Set
Torque sensor offsetto the input voltage at rest. - Set
Torque sensor gainto the real sensitivity in Nm/V. - Make sure that there are no faults.
- Turn the pedals in the forward direction. Make sure that the motor speed increases.
- Stop the pedals, or turn them backward. Make sure that the motor coasts to a stop. If the motor does not operate as given in steps 8 and 9, refer to Troubleshooting at the end of this page.
- Do the Average pedal speed test to make sure that the pedal sensor is set up correctly.
Tuning:
The average pedal torque, multiplied by Pedalec power gain and by the average pedal speed, gives the average pedal speed gain before the rate limit.
Pedalec torque symmetry sets how the controller calculates the average of the pedal torque input for average pedal torque:
-
0 / One cycle: the average is over one full pedal rotation. This gives the smoothest response, because the average is over the longest time. This option is best for single-sided torque sensors.
-
1 / Half cycle: the average is over each half pedal rotation.
-
2 / Quarter cycle: the average is over each quarter pedal rotation.
-
3 / Instantaneous: the controller does not filter the pedal torque. The power output is 1:1 with the torque input. The feel is similar to a throttle.
Pedalec power gain is the primary parameter to adjust the feel of bikes with a torque sensor. A higher value makes the motor assist come on more quickly. A lower value makes the power delivery softer. Pedalec power gain multiplies the applied pedal torque, relative to 64 Nm, to calculate the average pedal torque for a torque assist request of up to 100%. The full torque assist request occurs at these measured torques, from Torque sensor offset plus the Pedalec deadband torque voltage:
Pedalec power gain= 1: 64 NmPedalec power gain= 2: 32 NmPedalec power gain= 0.5: 128 Nm
Torque assist request [%] = 100 [%] * Average pedal torque [Nm] * Pedalec power gain / 64 [Nm]
Pedalec deadband torque sets the torque input (or noise input) that is necessary before the controller supplies assistance. For example, set Torque sensor gain to 32 Nm/V and Pedalec deadband torque to 10 Nm. Then the torque sensor voltage must increase by 0.3125 V (= 10 Nm / (32 Nm/V)) before the controller supplies assistance. A lower value decreases the force that is necessary for assistance. But if the value is too low, noise can cause sudden changes in assistance.
Pedalec initial torque sets the initial power command when you start to pedal. You can use it to compensate for some torque sensors that do not measure the torque from one leg. We recommend that you start the torque sensor tuning with Pedalec initial torque set to 0. A higher value increases the initial gain. The initial torque decreases by half each 1 ms.
You can also adjust the Pedalec positive motoring torque ramp and Pedalec negative motoring torque ramp ramps.
In firmware 6.027 and later, Torque Sensor Filter Bits (address 1927) also filters the average pedal RPM calculation for these sensor types. A higher value gives more filtering, but a slower response. The permitted range is 0 to 15.
Assist level configuration controls the torque and speed behaviour of the vehicle.
Connect the axle torque sensor to Throttle/Analog input 1 on the controller. Then do these steps:
- Set
Control command sourceto 0 / Remote. This prevents accidental motor engagement while you set up the torque sensor. - In
Communications Configuration Vector, enable the 'eBike flag bit 10'. - Poll
throttle voltage. Apply a load to the torque sensor. Make sure that the wiring is correct and that the throttle voltage changes when the torque input changes. - Set
Pedal sensor typeto 5 / Axle torque. - Set the gains
Axle torque sensor 1,Axle torque sensor 2, andAxle torque sensor 3. - For the first tests, set
Pedalec power gainto 1 (1:1 power gain relative to the measured torque). - Set
Control command sourceto Pedal sensor or throttle or pedal sensor, as applicable. - Make sure that the torque output of the sensor operates correctly:
- Apply a small resistance to the motor wheel with a bike trainer or the brakes.
- Pedal in the forward direction at a cadence that is as constant as possible.
- Make sure that
average pedal torqueincreases when you increase the brake resistance, and decreases when you decrease it.
For the fine tuning of the torque sensor feel, refer to Tuning in the 3, 7 & 8 Cadence with Torque tab.
Basic Setup/Configuration:
- Set
Pedal sensor typeto 9 - Dyname torque sensor. - Set
Torque sensor voltage sourceto your input source. - Set
Torque sensor offsetto the sensor voltage at rest. -
Set the
Torque Sensor Voltage Filterbits. In firmware 6.027 and later, this parameter is namedTorque Sensor Filter Bits. This sets the time over which the controller calculates the average of the torque sensor signal. A higher value gives more filtering, but a slower response. A lower value gives less filtering and a faster response.The permitted range is 0 to 15. The average time is 2^value ms. For
Torque Sensor Voltage Filter= 7, the time is 2^7 = 128 ms (approximately 1/8 s). -
Set
Torque sensor gain. The controller uses it to calculate the torque. - Set
Pedalec deadband torque. Below this value, the controller ignores the filtered calculated torque. This can decrease the sensitivity when the rider moves the pedals or stands on them. For example, at 28 Nm/V, a threshold of 10 Nm is a deadband threshold of 10 Nm / (28 Nm/V) = 0.35 V.
Optional settings:
- Enable
Features bit 9 rolling start enable. Then the controller disables torque belowRolling start speed. This prevents torque while the vehicle is stationary or at very low speeds, also with a sensitive or small deadband. For example, if you set 3 km/h, the controller supplies no torque below 3 km/h. - Optional, after the previous setting: set
Dyname rolling start ignore torque. Above this torque threshold, the controller ignores the rolling start. For example, with 14 Nm (0.5 V aboveTorque sensor offset), the controller supplies motor assistance also below 3 km/h.
Faults/Protections
Static/stuck torque signal fault
- Set
Throttle deadband threshold. The static voltage fault does not trigger or clear unless the voltage is more than the deadband above or belowTorque sensor offset. - Set
Torque Sensor Static Voltage Fault Thresholdto the voltage change that resets the static voltage fault timer. To disable the static faults, setTorque Sensor Static Voltage Fault Thresholdto a negative value. - Set
Torque Sensor Static Voltage Fault Timeto the time after which a constant voltage (in the threshold) trips a fault.
Average pedal speed test
Use this test to make sure that the pedal output is configured and operates correctly.
- Turn the pedals in the forward direction, and monitor
average pedal speed. -
Turn the pedals backward, and monitor
average pedal speed. -
If the value is positive when you pedal forward and negative when you pedal backward, the wiring is correct.
- If the values are reversed, interchange the wires on the PFS/Digital input 2 and Cruise/Digital input 1 inputs.
- If
average pedal speedis erratic at a constant pedal cadence, the cause is usually the wiring.
Throttle in speed mode with pedals in torque mode
In firmware 6.023 and higher, the throttle can operate in speed mode while the pedals operate in torque mode with speed limiting.
- Set
Control command sourceto 4 / throttle OR pedal sensor. - Set the ramp times for torque mode with speed limiting, and the acceleration and deceleration ramps for speed mode. Refer to Acceleration and braking ramps.
- Enable
Features4bit 2 Throttle=Speed mode, Pedal=Torque with speed limiting.
The controller uses the input with the larger request, and applies the control mode of that input. For example, if throttle setpoint is higher than the pedal speed gain (pedal setpoint), the controller operates the motor in speed mode. If not, it operates the motor in torque mode with speed limiting.
Inputs scaled to available power
In firmware 6.024 and higher, you can map the pedal input to the available output current, not to Rated motor current. Then you can use the full pedal range also when the available output current is limited, for example by the active Rated motor power parameter, battery limits, or other protections.
- Enable
Features4(address 1974) bit 10 Input target scaling to Available Power.
When this bit is enabled, the controller scales the requested torque command (calculated from pedal speed gain) by its present power limit.
Example
If the power limit from current, battery, motor, and other protections is 37% of the maximum, a 0-100% pedal input gives a 0-37% requested torque output.
Dynamic pedal gain
Firmware
Available in firmware 6.019 and later.
For torque sensors, the controller can decrease Pedalec power gain as the vehicle speed increases. Use this function, for example, to meet a standard that limits the ratio of motor assist to rider power at speed.
- Below
Full Pedalec Assistance Speed for Pedal Torque gain, the gain is limited toMaximum Pedalec Assistance Gain for Pedal torque. - At
Vehicle Maximum Speed for Pedalec Assistanceand higher, the gain isMinimum Pedalec Assistance Gain for Pedal torque. -
Between these two speeds, the gain limit decreases linearly from the maximum gain to the minimum gain.
-
Set
Full Pedalec Assistance Speed for Pedal Torque gainandVehicle Maximum Speed for Pedalec Assistance, in km/h. - Set
Maximum Pedalec Assistance Gain for Pedal torqueandMinimum Pedalec Assistance Gain for Pedal torque. - Enable
Features3bit 1 Dynamic Pedalec gain. - Save the parameters to flash.
Example: JIS D 9115
The Japanese standard JIS D 9115 limits the ratio of motor assist to rider power to 2 below 10 km/h. The ratio decreases linearly to 0 at 24 km/h. These settings follow that profile:
| Parameter | Value |
|---|---|
Full Pedalec Assistance Speed for Pedal Torque gain |
10 km/h |
Vehicle Maximum Speed for Pedalec Assistance |
24 km/h |
Maximum Pedalec Assistance Gain for Pedal torque |
2 |
Minimum Pedalec Assistance Gain for Pedal torque |
0 |
Dynamic pedal gain settings for JIS D 9115
The system integrator must make sure that the complete vehicle meets the standard.
| Parameter | Address | Units | Description |
|---|---|---|---|
Pedalec power gain |
179 | G | Scales pedal torque to the assist command. At 1, 64 Nm gives 100%. |
Features3 |
1919 | Bit field. Bit 1: Dynamic Pedalec gain. | |
Vehicle Maximum Speed for Pedalec Assistance |
1920 | km/h | At this speed and higher, the gain is the minimum gain. |
Full Pedalec Assistance Speed for Pedal Torque gain |
1921 | km/h | Below this speed, the gain is limited to the maximum gain. |
Maximum Pedalec Assistance Gain for Pedal torque |
1922 | G | Gain limit at low speed. |
Minimum Pedalec Assistance Gain for Pedal torque |
1940 | G | Gain at and above the maximum speed. |
Dynamic pedal gain parameters
Troubleshooting
I have no motor assist when pedalling
Make sure that the pedal sensor is connected to the correct inputs: power (5 V or 12 V), GND, and:
- PFS/Digital input 2 for single output sensors
- PFS/Digital input 2 (Sine) and Cruise/Digital input 1 (Cosine) for dual output sensors
Make sure that the input signal bits change with the pedal speed:
- Single-output sensors: make sure that
digital inputs bit 3Pedal First input changes from 0 to 1 and back in BACDoor® PC, or from Disabled to Enabled and back in BACDoor® Mobile. - Dual-output sensors: make sure that
digital inputs bit 3Pedal First input anddigital inputs bit 4Cruise each change from 0 to 1 and back in BACDoor® PC, or from Disabled to Enabled and back in BACDoor® Mobile.
Measure the pedal cadence signal voltages with an oscilloscope. Record the high and low voltage values. Compare them with the input specifications in Pinout specifications, because it is possible that the controller does not support your sensor. For example, one sensor had digital output voltages of 1.3 V and 3.7 V. The digital "Low" threshold for a BAC855 is 4 V. Thus, the bit did not change, and the controller did not detect pedal speed.
Make sure that Rated motor power (Race mode PAS power) is set to the rated motor power for pedals. If you use the alternate power mode, also set Rated motor power (Street mode PAS power). The pedals can command motor assistance in a power mode only when its parameter is set.
Brake and cutout enabled
When eBike flags bit 1 Cutout is enabled, the motor does not engage. Usually, eBike flags bit 0 Brake is also enabled. This shows that the brake is enabled and stops the motor current. Possible solutions:
- Disconnect your brakes. They can pull the brake voltage out of range.
- If it is not already set, set
Cutoff brake sensor sourceto out of range. Then the controller stops reading the external brake sensor source, and clears the two eBike flags (cutout and brake). - Poll the voltage of the selected
Cutoff brake sensor source. Make sure that it is aboveAnalogue brake full voltage. For example, if your voltage source is 3.5 V and the analogue brake full voltage is 4 V, the cutout is enabled.
My motor engages when pedalling backwards, but not forwards
The controller can read the forward pedal cadence signal as reverse rotation, so it does not supply motor assistance. Change Pedal sensor type from the standard type to the reverse type, or from the reverse type to the standard type. For example, change from Single Hall, duty cycle directional (0) to Single Hall, inverted duty cycle directional (6).
8.4 - Ebike flag not set in communications configuration vector
To enable the pedal sensors, enable communications configuration vector bit 10 Enable Ebike.