emmebrusa / TSDZ2-Smart-EBike-1

TSDZ2 Open Source Firmware adapted to VLCD5-VLCD6-XH18 displays
GNU General Public License v3.0
141 stars 34 forks source link

Make a bafang-like cruise function? #83

Open mishuha opened 1 year ago

mishuha commented 1 year ago

I've tried to use the cruise mode as is and I found it very disappointing. It's required long pressing of a button (the same can be reached by pushing throttle) or idle pedaling. Riding tens of kilometers holding something pressed is exhausting for hands. I'd like to avoid this.It also leads to losing of dosed pedal-assisting benefits when it is required because of that cruise is an separate mode excluding assist. I have not found also how to regulate the power increment stepping and motor turning on to reach the speed feels like an impact every time.

With the bafang mid-drive a cruise mode is implemented as a function, not like an additional mode. That is much more convenient.

So the script is:

  1. Get the required speed by pedaling or by throttle bar;
  2. Press cruise button to fix the speed (could be holding a "walk assist" button on TSDZ);
  3. Stop pedaling or release the throttle bar;
  4. Now the bike in the cruise mode.

To switch off: touch throttle again or touch brakes or press cruise button. And it is available with any assist mode.

And 1st point as alternative could be realized just like now: with level-depending predefined values.

Is it possible to implement on TSDZ?

emmebrusa commented 11 months ago

I'm answering now because I was on break this summer. I'm surprised there is anyone who uses cruise, even more so with throttle installed. The logic you described was present in the versions previous to mine (in the 860C version it is still like this), but always holding down the walk assist button.

In the version for standard displays, I preferred to make a separate mode, with more features.

I don't know what Bafang is like, but I think maintaining speed without holding down a button or throttle is very dangerous. Please note that TSDZ2 installations are almost all brake sensorless.

Maintaining speed without holding down a button or moving the pedals is against my safety principles.

What isn't good in cruise is the PID adjustment, very crude. When I have time and desire I will try to improve it.

I consider cruise an emergency mode (if throttle is not installed). In the event of a breakage of the clutch bearing (sprocket side) or of the pedal axle (it happens), with appropriate settings and by holding down the walk assist button, you can go home. The settings, which I do not set as default because it becomes a throttle and therefore illegal in the EU, are these: "Speed cruise enabled" = 0 "Cruise without pedaling" = enabled possibly "Cruise on street mode" = enabled The speed is the one chosen with the assist level.

I add, in case you haven't read the manual, copy/paste regarding cruise:

"13 – Cruise mode “Cruise assist” is a speed control assist mode.