Commit Graph

7 Commits

Author SHA1 Message Date
Benjamin Vedder a8c0968888 Added lbm-extension app-pas-get-rpm 2022-11-09 11:56:59 +01:00
Kenn Sebesta cf6f32332d [Utils] Update the header includes 2022-03-23 20:25:37 -04:00
Benjamin Vedder 9c484d01e4 Decreased stack sizes to save ram 2022-01-16 21:57:12 +01:00
Marcos Chaparro 627c12b1ca bbshd: Ruggedize PAS against vibrations
Also includes an update to set power limits from other threads (like a display) and
prepares support for PAS torque sensors.

Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2021-12-28 11:17:53 -03:00
Afzal b1ec844b2f PAS: add constant torque control type
For gearless electric bicycles, riding up the slope and during start,
good torque support from the motor helps the rider ride with less
effort. Pedal assist based on cadence provides higher torque with higher
pedalling speed. In the situations mentioned above, where user naturally
pedals slow, aid from cadence based system is less. On a geared setup,
changing to low gear comes to the rider's help.

Here another control type is provided - Constant Torque, whenever the
rider pedals, motor would provide constant torque. The torque value can
be set using 'PAS max current' setting thus acting as fine PAS assist
level.

This type of control is similar to 'Basic PAS, constant throttle' of
'PAS Control Schemes' [1], with the difference that throttle setting
in that article corresponds to speed, while here torque.

Also riding experience on some of the popular (not high end) e-bicycles
having PAS indicates they might be having this kind of control
internally.

[1] https://ebikes.ca/learn/pedal-assist.html
2021-10-05 13:05:31 +05:30
Benjamin Vedder 2133d21fbc Avoid numerical instability when utils_map is used over a range that approaches 0 2021-03-27 11:18:47 +01:00
Marcos Chaparro 33b5d5c1ba Pedal assist support (PAS)
This commit enables cadence-based pedal assist for ebikes using
quadrature-style pedal speed sensors.

There are 2 operation modes:
* PAS only: Motor current is based only on pedal feedback
* ADC + PAS: The code will use both ADC and pedal feedback and use
the strongest command to provide seamless overlap when the user is
pedalling and requests extra torque with the throttle.

Signed-off-by: Marcos Chaparro <mchaparro@powerdesigns.ca>
2020-12-07 17:06:36 -03:00