Skip to content

Pedal tuning

Pedal and Torque Sensor Tuning

This section concerns Pedal cadence and Pedal torque sensors. This article does not concern Axle torque sensors. Pedal torque sensors include both a cadence and torque signal and both parts must be tuned accordingly. Axle torque sensors do not include a cadence signal.

Pedal Cadence Sensor Tuning

The pedal speed sensor parameters that have the largest effect in terms of changing bike feel are the Pedalec positive motoring torque and Pedalec negative motoring torque ramps, and the Pedal speed map end and Pedal speed map offset.

Bike feel can be softened by increasing the Pedal speed map end and Pedalec positive motoring torque ramp values from their default values, 64 RPM and 200 ms respectively. Conversely, bike feel can be stiffened by decreasing these values.

Pedal sense delay represents the number of PFS input pulses that must be observed before the pedals are deemed active. Increasing this increases the amount the pedals must rotate before assistance is provided and Pedalec positive motoring torque ramp begins. Setting this too low might make the system too sensitive.

Pedal speed map end dictates the pedal rpm above which the pedal speed gain, the pedal assist request, is 100%.

Pedal speed map offset is the pedal-assist request when pedal rpm is zero, and pedals are active. Setting this above 0 gives you pedal-assist when at 0rpm, and setting this below 0 will require the pedal rpm to be greater than 0rpm before assistance is provided. The pedal-assist request is limited to between 0 and 100%. Note that if Pedal speed map offset is set greater than 1, the pedal-assist request will be 0% when above the Pedal speed map end.

Assist cut out distance is used to calculate the time (pedalec_timeout_delay) until the Pedalec negative motoring torque ramp begins based on the instantaneous vehicle speed and the time since the last pedal pulse. However, two bounds apply: The Pedalec minimum timeout is the minimum time before the negative ramp begins. The Pedalec maximum timeout is the maximum time before the negative ramp begins

In the absence of a pedal torque signal, the vehicle torque and speed behaviour is controlled using Assist Level Configuration.

Torque Sensor Tuning

As pedal-torque sensors include cadence, do not forget to tune the cadence sensor. See above.

The average pedal torque multiplied by the Pedalec power gain and the average pedal speed results in the average pedal speed gain before rate-limiting.

Pedalec torque symmetry is used to average the pedal torque input for calculating the average pedal torque. If set to:

  • 0 / One cycle averages the torque over one full pedal rotation. This provides the smoothest response, as it averages the torque input over the longest time. This option is best for single-sided torque sensors.

  • 1 / Half cycle averages torque over every half-pedal rotation.

  • 2 / Quarter cycle averages torque over every quarter pedal rotation.

  • 3 / Instantaneous, the pedal torque is not filtered and provides the instantaneous power output 1:1 to torque input. The feeling is similar to using a throttle.

Pedalec power gain can be considered the master parameter that allows the simplest adjustment of the feel of torque sensor-based bikes. Increasing Pedalec power gain will result in brisker arrival of the motor assist, whereas reducing it will soften the power delivery. Pedalec power gain multiplies the applied pedal torque relative to 64Nm to determine the average pedal torque that equates to a torque assist request of up to 100%. When Pedalec power gain is set to 1, we are setting full torque-assist request at 64Nm measured, when Pedalec power gain is set to 2, we are setting full torque-assist request at 32Nm, and when set to 0.5, we are setting full torque-assist request at 128Nm, from the Torque sensor offset plus the required Pedalec deadband torque voltage.

Torque assist request [%] = 100 [%] * Average pedal torque [Nm] * Pedalec power gain / 64 [Nm]

Pedalec deadband torque defines the amount of torque input, or noise input, that is needed before assistance is provided. For example, if you set the Torque sensor gain to 32Nm/Volt, and the Pedalec deadband torque to 10Nm. It will require the torque sensor voltage to climb 0.3125V (= 10Nm/(32Nm/Volt)) before providing assistance. Reducing this value will require less force before assistance is provided, but reducing too much may result in noise-induced jumpiness of the bike.

Pedalec initial torque dictates the initial power commanded when you begin pedalling and can be used to offset the lack of measured torque on one leg of some torque sensors. It is recommended to start tuning the torque sensor with Pedalec initial torque set to 0. Increasing this value increases the initial gain. The initial torque decays by half every 1 ms.

Pedalec positive motoring torque and Pedalec negative motoring torque ramps can also be adjusted.

Axle Torque Tuning

With the axle torque sensor connected to Throttle/Analog input 1 on the controller:

  1. Set the Control command source to 0 / serial stream to prevent the motor from accidentally engaging while setting up the torque sensor.
  2. Enable the eBike flag, bit 10 under communications configuration vector.
  3. Poll throttle voltage and apply load to the torque sensor to verify the throttle voltage is wired correctly and responding to changes in torque input
  4. Set the Pedal sensor type to 5 / Axle torque
  5. Set gains Axle torque sensor 1, Axle torque sensor 2 and Axle torque sensor 3
  6. Set the Pedalec power gain to 1 for 1:1 power gain relative to measured torque to start testing with.
  7. Set the Control command source to Pedal sensor or throttle or pedal sensor, as appropriate.
  8. Check if the torque output of the sensor configured and is working properly. Add a small amount of resistance to the motored wheel either using a bike trainer or the brakes and then pedal in the forward direction at as constant a cadence as possible. Observe that the average pedal torque increases/decreases with the addition/subtracting of resistance provided by the brake.

Torque sensor fine-tuning of feel and adjustment parameters are explained in the Torque Sensor Tuning section.

Troubleshooting

I have no motor assist when pedalling

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

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.

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 Connector Interface 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.

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.

Brake and cutout enabled

For example, eBike flags 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.

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.