OpenSourceEBike / TSDZ2-Smart-EBike

Flexible OpenSource firmware for TongSheng TSDZ2 mid drive ebike motor
GNU General Public License v3.0
255 stars 131 forks source link

[Feature] Sloped temperature limit #156

Closed PrivatePuffin closed 2 years ago

PrivatePuffin commented 2 years ago

Currently there is a single hardlimit option when using the temperature sensor. This is great for protecting the motor, but with a minimal amount of work, it's possible to create something that's a bit more flexible:

3 settings:

Low temperature slope: Start decreasing Amps linearly High temperature slope: Stop decreasting temperature and hold at effectively 250w (nominal motor rating) Critical-Temperature: Cut's off the motor to cool down

Technically the motor should never reach the critical cutoff (if it's high enough), because the 250w rating means it can be run at that wattage endlessly without damage.

PrivatePuffin commented 2 years ago

nvm. I was being an idiot: https://github.com/OpenSourceEBike/TSDZ2_wiki/wiki/Features-and-configurations-on-display#Motor_temperature__Motor_temp