Pedalling functions - prueferfrank/EBikeController GitHub Wiki

Functions for pedalling

  • current cadence in rev per minute (only when pedaling)
  • min cadence in rev per minute per trip
  • max cadence in rev per minute per trip
  • average cadence in rev per minute per trip
  • average cadence in rev per minute overall
  • crank turns per trip
  • crank turns overall (stored when pedaling ends)

Auto detecting pedaling

Pedaling is detected automatically. The first pulse of the pedal sensor starts pedaling; the time between the pulses defines how long the pedaling is still active. Here we have two modes: one which immediately detects the pedaling for engine support.To check this pedaling activity I assume a minimum pedaling cadence of 60/min-1, which is 1/second. Divided by the number of magnets (4) I get a min. time between pulses of 250 ms. If the time is above pedaling is stopped.

For caclulating the current and average cadence this time is to low. I assume that a time of 2 seconds after the last pulse is ok to detect pedaling really stopped.

Settings

There is only one setting for this controller: Number of magnets per crank turn. Default Value is 4, minimum is 1, maximum is 16.

Pages

I see a couple of pages / subpages for the cadence.

Trip Cadence Values

Big Font for current cadence Smaller Font for min/max/avg