Frans-Willem / TSDZ2-Clean-EBike

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

[BUG] Motor starts later than stock firmware #1

Open Frans-Willem opened 5 years ago

Frans-Willem commented 5 years ago

Coming from the stock firmware, I feel like the starting from a traffic light is much much slower. I get that everything else feels more agile, but sometimes I feel like it takes almost a full rotation of the pedals before I feel the power kicking in.

Things I've tried so far:

The only thing that really works is "Motor assistance startup without pedal rotation", with the downside that whenever I rest my foot very slightly on the pedals, it already starts twitching.

Would it be possible to replace "Motor assistance startup without pedal rotation" with a "Motor assistance startup torque threshold without pedal rotation", which would result in logic like:

That way if you set a reasonable threshold, you can still rest your foot on the pedal without starting the motor, but once you actually put some weight into it, it should start right away instead of waiting for rotation.

Frans-Willem commented 5 years ago

After having gone through the (19.0) code, I have a suspicion on what's happening. This firmware checks cadence RPM, which is calculated from the time between your pedals passing the PAS magnets. If you've been standing still, the time from your last magnet hit to your first magnet hit will be so large, that the RPM will still be 0. It's only after you'll hit your second magnet, that the RPM reflects your cadence.

I think that stock firmware may not actually be checking the cadence, but just keeps track of how long ago your pedals passed a magnet.

Thus the open-source firmware, you need to pedal enough to pass two magnets before it'll allow the motor to start, whereas on the stock firmware, it's enough to pass just one magnet.

benno90 commented 4 years ago

I have rewritten the PAS cadence code in my branch (benno-development). The reaction time is now comparable to the stock firmware.