Pedal Cadence
Table of contents
- Introduction
- Warnings
- Required tools
- Supported pedal types
- Pedal input & wiring
- Pedal sensor setup
- Configuration parameters
- Troubleshooting
1 – Introduction
Pedal sensors form part of the PAS (Pedal Assist System) of eBikes. Pedal sensors read the pedal cadence speed to determine when and how much motor assistance to provide, regardless of pedal effort. Furthermore, pedal sensors are mandated in some jurisdictions that in the event the operator stops pedalling, the motor assist stops providing power to the vehicle.
This section will guide you through setting up your pedal cadence sensor.
2 – Warnings
ATTENTION – Indicates a step or procedure required before proceeding to the next step or page.
CAUTION – Indicates a potentially hazardous situation which may result in minor injury or product damage.
WARNING – Indicates a Hazardous situation which if not avoided will result in serious injury/death to person(s) or damage to product and/or equipment.
TIP – Indicates a helpful Tip to make things easier and faster.
3 – Required tools
- Appropriate personal protective equipment (PPE) as required(e.g. Safety glasses, gloves, etc.)
- ASI BACDoor software
- 22 AWG Wire strippers (eMobility)
- 18 AWG Wire strippers (high power)
- Vehicle stand, or motor stand to securely support the vehicle or motor drive wheel off the ground for testing (e.g. Bike stand, jack stands, etc.)
4 – Supported pedal types
There are 4 pedal sensor archetypes:
- Single output dual hall sensors produce an output only in the forward direction.
- Single output single hall sensors produce a different length pulse in one direction or the other.
- Two output pedal sensors where the direction is encoded as a quadrature signal.
- Usually, this type is used with pedal-torque sensors. See torque sensors to setup torque sensor functionality.
- Pulse and direction sensors (not yet supported)
The following pedal cadence sensor types are supported:
- Single Hall digital pedal cadence
- Single output, dual Hall digital pedal cadence
- Single Hall reverse digital pedal cadence
- Quadrature speed (Sine/Cosine) digital pedal cadence
- Quadrature torque with (Sine/Cosine) digital pedal cadence
- Single Hall torque sensor (e.g.: Methode)
- Single Hall reverse torque sensor (e.g.: LDS)
5 – Pedal input & wiring
Example 1: Single-output pedal cadence sensor
Single output single or dual Hall pedal sensors typically have 3 wires: 5V or 12V, GND and signal. The signal wire must be wired to PFS/Digital input 2.
Example 2: Two output pedal cadence sensor (Quadrature speed)
Two signal pedal speed sensors typically have 4 wires: 5V or 12V, GND, Sine signal and Cosine Signal. The Sine signal must be wired to PFS/Digital input 2 and the Cosine signal to Cruise/Digital input 1.
6 – Pedal sensor setup
WARNING – Ensure vehicle is secured in-case the motor engages unexpectedly while manually configuring your pedal sensor.
TIP – Hover over the information icon
for parameter location in BACDoor™ shorthand.TIP – Make a backup copy of the parameter file often by saving it to file as shown before. It can be sent to ASI for support or you can revert if strange behaviour occurs.
With the pedal sensor connected to the controller:
Option A) PC BACDoor™
- Set Control command source to 0 (serial stream) to prevent the motor from accidentally spinning while manually setting the pedal sensor.
- Set Pedal sensor type to your pedal sensor type and press enter.
- Enter your Pedal speed sensor pulses per revolution
- Note: Quadrature pedal types Pedal speed sensor pulses per revolution is the sum of both sine and cosine pulses.
and press enter. - This step will enable your throttle. Set Control command source to 2 (pedal sensor) and press enter.
- Ensure you do not have any faults, and test that when rotating the pedals in the forward direction, the motor spins up, and when no longer rotating or spinning the pedals backwards the motor coasts to a stop. If not see troubleshooting.
- Press Write to write the changes to the controller.
- In the Parameter drop-down menu, press Save to flash to save the parameters to the controller.
- Perform the Average pedal speed test to ensure the pedal sensor is set up correctly.
Option B) BACDoor™ Mobile
- Set Control Command Source to Serial to prevent the motor from accidentally spinning while manually setting the throttle.
- Set Pedal sensor type to your pedal sensor type and press enter.
- Enter your Pedal Speed Sensor Pulses Per Revolution
- Note: Quadrature pedal types Pedal speed sensor pulses per revolution is the sum of both sine and cosine pulses.
and press enter. - Set Control Command Source to Pedal Sensor and press enter.
- Ensure you do not have any faults, and test that when rotating the pedals in the forward direction the motor spins up, and when no longer rotating or spinning the pedals backwards the motor coasts to a stop. If not see troubleshooting.
- Press Save to flash lightning bolt icon, top right, to save the parameters to the controller.
- Perform the Average pedal speed test to ensure the pedal sensor is set up correctly.
Pedal sensor fine-tuning feel and adjustment parameters are explained in Section 4 – Ride Performance: Pedal and torque sensor tuning.
Average pedal speed test
To check if the pedal output is configured and is working properly. Operating the pedals in the forward direction and examining the value of the average pedal speed parameter. If the value is positive when pedalling forward and negative when pedalling backwards, the wiring is correct. If the average pedal speed values are reversed, then the wires connected to the PFS/Digital input 2 and Cruise/Digital input 1 inputs need to be reversed. If the average pedal speed value is erratic at a constant pedal cadence then there is likely an issue with the wiring.
7 – Configuration parameters
Command inputs configuration
The following parameter is key to configuring the main method by which a vehicle is commanded to move.
Name | Description | Units | Address |
Control command source | 208 |
Pedal input configuration
The minimum information required to set up a pedal sensor is the sensor type and the pulses per revolution.
Name | Description | Units | Address |
Pedal sensor type | 211 | ||
Pedal speed sensor ppr | 234 |
Pedal input parameter
These values can be monitored to ensure your pedal sensor is wired correctly and the controller is measuring the pedal input speed.
Name | Description | Units | Address |
average pedal speed | 331 | ||
pedalec timeout delay | 409 | ||
instantaneous pedal speed | 328 | ||
Digital input PFS | 276bit3 | ||
Digital input Cruise | 276bit4 |
Command levels
The motor command levels can be monitored with the parameters below.
Name | Description | Units | Address |
torque command | 335 | ||
torque reference | 336 | ||
pedal speed gain | 338 |
eBike flags
eBike flags are a convenient parameter to monitor when developing a drive system. They indicate what the controller state is when any input is activated.
Name | Description | Units | Address |
ebike flags | 327 |
8 – Troubleshooting
8.1 – I have no motor assist when pedalling
8.1.2 – Is the pedal sensor wired to the correct input? Power (5V or 12V) and 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
8.1.3 – Are the input signal bits changing with pedal speed?
- Check that digital inputs bit 3 Pedal First input changes from 0 to 1 in PC BACDoor™ and back, or from Disabled to Enabled and back in BACDoor™ mobile for single output sensors.
- Check that digital inputs bit 3 Pedal First input & digital inputs bit 4 Cruise both change from 0 to 1 in PC BACDoor™ and back, or from Disabled to Enabled and back in BACDoor™ mobile independently for dual output sensors.
8.1.4 – What is the pedal cadence signal voltage? Scope the sensor signals and note the high and low voltage values. Compare the values against the input specifications listed in Hardware inputs as your sensor may not be supported. For example, we have seen digital output voltages of 1.3V and 3.7V, the digital “Low” threshold for a BAC 855 is 4V and thus the bit never changes and the controller never sees pedal speed.
8.1.5 – Are the Rated motor power (Race mode PAS power) and Rated motor power (Street mode PAS power), if using alternate power mode, filled in with the motors rated power for pedals. These must be filled in for the pedals to command motor assistance when in their respective power mode.
8.2 – Brake and cutout enabled
For example, eBike bit 1: Cutout enabled prevents the motor from engaging, this is generally coupled with eBike bit 0: Brake enabled. This means the brake is enabled and is causing the motor to cutout. Solutions include:
- Disconnect your brakes, they may be pulling the brake voltage out of range.
- Set the Cutoff brake sensor source to out of range if not already to stop reading the external brake sensor source and clear the two eBike flags (cutout and brake).
- Poll the chosen Cutout brake sensor source voltage, ensure it is above the Analogue brake full voltage value. If for example, your voltage source is 3.5V and the analogue brake full voltage is 4V, the cutout will be enabled.
8.3 – My motor engages when pedalling backwards, but not forwards
Our controller may be interpreting the forward pedal cadence signal as if the pedals are rotating in the reverse direction and thus not providing any motor assist. Switch your Pedal sensor type to reverse type or from reverse type to standard type. For example, switch from single Hall (0) to single hall reverse (6).
8.4 – Ebike flag not set in communications configuration vector
Enable communications configuration vector bit 10 (Enable Ebike) to enable Pedal sensors.