TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)

How feasible would it be to run this motor without an LCD? Could be useful for troubleshooting, or just a minimalist setup. Not sure if it could start without a power button. Many batteries have on off switches on them.
 
twiersum said:
PhotoPictureResizer_190716_184252676_crop_2132x2192-852x876.jpg

I Lost 8oz on my main drive gear....next I'm going for 4 more oz with a smaller needle clutch bearing.
This thing is built like a tank with a Prius motor!

Very cool.
 
shaddi said:
Hm, i do not understand the intention of the "street-mode" after the changes >18.0.
...
If i get off the public roads, i would like to use a button-combination (that should not be to "easy" and get
activated "by accident" :twisted: ) to enable an offroad-mode or disable the new "street-mode".

Why is this changed in the new version? For me, it just looks like an inversed offroad-mode. Why would somebody
want a mode, that obviously get attraction by the blinking assist-symbol for "street-mode"?

The logic was inverted from the beginning and some users reported that it was complicated. It should be easier to understand Street Mode and how it operates.

But you and others have given good feedback regarding the blinking. It should be able to blink when Street Mode is not enabled but the function is activated. So this will be sorted out in the 0.20.0!

Street Mode is enabled by holding the ONOFF and DOWN buttons for a short period of time. This is so users can somewhat easily and discretely switch between different modes. Do you feel this is bad?



shaddi said:
For me, most of the time i'm on the public streets where (at least in germany)
you are not allowed to get assistance over 25 km/h and have to limit the power to 250 watts.
Of course, cruise-mode is also not allowed...

Will take a look at Cruise in Street Mode!
 
jimmyfergus said:
buba said:
Quick update for anyone interested.

I am very satisfied with how everything is working but have a couple of things to do. Am now focusing on the cadence sensor.

Sweet! I'm just about to go on vacation, and very enthusiastic about trying all the new stuff some time after I get back in August.

Thank you!

Glad to hear! I think there will be a rather stable release for you to test when you get back!

Will soon update the thread with news!
 
The compliments are always too few for the work you are doing which is wonderful.
I quickly read the new wiki of the future release 20.0 and I didn't understand the three ways:
- cadence
-torque
- emtb
That is, for a comparison, in the current version 19.0 which system is adopted?
I am puzzled by the separation of modes, is it not a mixture now?
Will there not be a similar mode to the current one?
You may not have understood correctly because of the language, excuse me ... :cry: :cry:
 
andrea_104kg said:
The compliments are always too few for the work you are doing which is wonderful.
I quickly read the new wiki of the future release 20.0 and I didn't understand the three ways:
- cadence
-torque
- emtb
That is, for a comparison, in the current version 19.0 which system is adopted?
I am puzzled by the separation of modes, is it not a mixture now?
Will there not be a similar mode to the current one?
You may not have understood correctly because of the language, excuse me ... :cry: :cry:

I will assume you are asking me and I will happily explain the new riding modes. By the way, thank you for the kind compliments!

Power Assist = This is the current riding mode we all use in version 0.19.0 and below. It is assist based on human power. It will still be there in the 0.20.0.

Torque Assist = This is a new riding mode that only looks at the torque sensor value and convert that to a motor torque value. The harder we press the pedals the more torque we get from the motor. It is a linear correlation assuming your torque sensor is linear in the range you are riding. This works very similarly to the original firmware.

PAS/Cadence Assist = This is actually the standard riding mode on most electric bikes. Most electric bikes can only sense crank rotation. When the system senses crank rotation it will engage the motor so as to assist the user.

eMTB = This is a dynamic riding mode that works much like torque assist. But it adjusts the assist factor depending on the amount of torque applied and the wheel speed. You need more assistance when going faster and this relationship is not linear. This is why eMTB is dynamic and changes depending on several parameters.

You can switch between any mode you like, however you like! The system overall has a greater resolution, response and operates very cleanly. Even Walk Assist and Cruise are improved in many ways. All other functions have increased resolution and accuracy as well. Safety is much tighter!

Everything is also simplified and made modular so development from 0.20.0 will be very easy! This is very important for the new displays. We could implement however many riding modes we want: Workout Mode, Energy Mode, Speed Mode, Trail Mode, Virtual Throttle Mode and so much more!
 
thineight said:
fi7ippo said:
twiersum said:
PhotoPictureResizer_190716_184252676_crop_2132x2192-852x876.jpg

I Lost 8oz on my main drive gear....next I'm going for 4 more oz with a smaller needle clutch bearing.
This thing is built like a tank with a Prius motor!

Wow, a lot of work!! Very good job! I think that if you not use the cruise function as me and many others, you can safely remove the clutch bearing and use an thickness of aluminum keyed! This paired with along with your lightening solution would save a lot of weight :thumb:

Not sure you can get rid of the clutch bearing.. when you stop pedaling the motor still assists you for a little while therefore without the bearing the pedals, and so your leg, receive a unwanted "kick".. am I right?

Hi thineight, yes the motor still assists for a little, but I don't think is really a "kick" because forward your legs in the natural direction it is rather like an inertia of a flywheel sensation.
I think the coster brake version do the same because has not freewheel on crown! In addition, you would gain a lot in rigidity on the crown for better power delivery to the wheel!
 
Thank' for replay buba! I have some difficulties with english :)
It will be possible, on lcd3, to have a mix of mode, as emtb on level one and the other in power mode?
 
Fi7ippo it's very interesting, it's possibile to have a photo of your work? Have you used a solid piece of aluminium?
 
andrea_104kg said:
Thank' for replay buba! I have some difficulties with english :)
It will be possible, on lcd3, to have a mix of mode, as emtb on level one and the other in power mode?

It will be possible to have eMTB with any other riding mode and you can switch it just by adjusting assist levels. :)

If you have nine assist levels this is how it will work:

Assist level 0: No mode
Assist level 1: Assist level 1 of Power, Torque or Cadence Assist
Assist level 2: Assist level 2 of Power, Torque or Cadence Assist
Assist level 3: Assist level 3 of Power, Torque or Cadence Assist
Assist level 4: Assist level 4 of Power, Torque or Cadence Assist
Assist level 5: Assist level 5 of Power, Torque or Cadence Assist
Assist level 6: Assist level 6 of Power, Torque or Cadence Assist
Assist level 7: Assist level 7 of Power, Torque or Cadence Assist
Assist level 8: Assist level 8 of Power, Torque or Cadence Assist
Assist level 9: Assist level 9 of Power, Torque or Cadence Assist
Assist level 10 is displayed as symbol "E": This is eMTB mode if function is enabled


If you use less than nine assist levels, maybe just five, this is how it might look like:

Assist level 0: No mode
Assist level 1: Assist level 1 of Power, Torque or Cadence Assist
Assist level 2: Assist level 2 of Power, Torque or Cadence Assist
Assist level 3: Assist level 3 of Power, Torque or Cadence Assist
Assist level 4: Assist level 4 of Power, Torque or Cadence Assist
Assist level 5: Assist level 5 of Power, Torque or Cadence Assist
Assist level 6 is displayed as symbol "E": This is eMTB mode if function is enabled
 
Great progress!

I have increased the resolution of the cadence sensor and it feels and works better than expected! We are effectively doubling the resolution and it is almost as if we have 40 magnets instead of 20. It gives power almost instantly and it powers off very quickly! And this is without any optimizations or scaling of resolution depending on wheel speed so it can only get better if we want to!

However, whenever the hardware is lacking we instead need to create better and more complex software. So this new cadence sensing code is more complex but I will simplify it as much as possible. Will also explain what I have done and maybe even make a video. Execution time, performance and everything else is the same if not better.

I am so sorry if the community feels the development is taking too long. I am truly doing my best and can only ask for more time and patience. In return we will have a foundation that is forever rock solid and can instead focus on displays and riding modes.
 
buba said:
Power Assist = ...

Torque Assist = ...

PAS/Cadence Assist = ...

eMTB = ...

Hi buba, would you be so kind to post the formulas behind the modes? I don't know, where to find your sourcecode, is it in some of the existing forks?!
https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/network/members

edit: ah, I just found it in your signature :) but there is no recent commit in any branch?!

Power Assist:
Code:
 U_battery * I_battery = torque@crank * cadence * 2PI * assistfactor

Torque Assist:
Code:
 I_motor = torque@crank * assistfactor

PAS Assist:
Code:
  I_battery = I_max * assistfactor

eMTB:
Code:
  I_? = torque@crank * assistfactor * (1+wheelspeed/wheelspeed_max) *???

especially the eMTB-mode is mysterious :)

If you call it eMTB- (e-mountain-bike) mode I would assume, that the power should increase with decreasing speed at constant system power (means that you are starting to climb a hill)

If you increase power with speed just to compensate the higher air resistance it has nothing to do with a mountain :wink:

buba said:
Most electric bikes can only sense crank rotation.

I think this must be "Most cheap electric bikes can only sense crank rotation." Most more expensive bikes (with Yamaha, BionX, Panasonic, Bosch... motor) are using power mode or even more complex modes....

regards
stancecoke
 
buba said:
Great progress!

I have increased the resolution of the cadence sensor and it feels and works better than expected! We are effectively doubling the resolution and it is almost as if we have 40 magnets instead of 20. It gives power almost instantly and it powers off very quickly! And this is without any optimizations or scaling of resolution depending on wheel speed so it can only get better if we want to!

However, whenever the hardware is lacking we instead need to create better and more complex software. So this new cadence sensing code is more complex but I will simplify it as much as possible. Will also explain what I have done and maybe even make a video. Execution time, performance and everything else is the same if not better.

I am so sorry if the community feels the development is taking too long. I am truly doing my best and can only ask for more time and patience. In return we will have a foundation that is forever rock solid and can instead focus on displays and riding modes.

Sounds great very much looking forward to testing this!. No need to apologize Buba you are doing a fantastic job!
 
buba said:
I am so sorry if the community feels the development is taking too long.

Personally, not at all!

I'm impressed at how much you've done hard on the heels of 0.19.0. Way more rapid than I'd expect. I'm only itching to try it because it sounds so good.
 
stancecoke said:
buba said:
Power Assist = ...

Torque Assist = ...

PAS/Cadence Assist = ...

eMTB = ...

Hi buba, would you be so kind to post the formulas behind the modes? I don't know, where to find your sourcecode, is it in some of the existing forks?!

...

If you call it eMTB- (e-mountain-bike) mode I would assume, that the power should increase with decreasing speed at constant system power (means that you are starting to climb a hill)

If you increase power with speed just to compensate the higher air resistance it has nothing to do with a mountain :wink:

regards
stancecoke

Hello Stancecoke,

You can find my development branch here:
https://github.com/leon927/TSDZ2-Smart-EBike/tree/testing-pwm-acc

It is not the most recent code so a lot of things are dated and eMTB is not added there as I wish to finish everything else before adding all riding modes. But will hopefully soon merge all my local branches and would love some feedback then! Would love an overall discussion when I am finished and a beta is out so we can further improve it all!

eMTB is based on this:
https://www.bosch-ebike.com/en/news/no-trigger-the-new-emtb-mode/



stancecoke said:
buba said:
Most electric bikes can only sense crank rotation.

I think this must be "Most cheap electric bikes can only sense crank rotation." Most more expensive bikes (with Yamaha, BionX, Panasonic, Bosch... motor) are using power mode or even more complex modes....

Most electric bikes are the cheap ones :wink: But yeah, most expensive ones do have more sensing. Just wanted to explain it so that it is clear what Cadence Assist is.
 
buba said:
I am so sorry if the community feels the development is taking too long.

perryscope said:
Sounds great very much looking forward to testing this!. No need to apologize Buba you are doing a fantastic job!

jimmyfergus said:
Personally, not at all!

I'm impressed at how much you've done hard on the heels of 0.19.0. Way more rapid than I'd expect. I'm only itching to try it because it sounds so good.

Appreciate it a lot!
 
buba said:
eMTB is based on this:
https://www.bosch-ebike.com/en/news/no-trigger-the-new-emtb-mode/

Hm, the information in your link is just markteting-bla-bla :wink:
I'll just wait until you commit your latest changes at github and then I'll take a look at the formulas in your code. Perhaps you can give a hint in which file and line number I can find them :D

regards
stancecoke
 
stancecoke said:
buba said:
eMTB is based on this:
https://www.bosch-ebike.com/en/news/no-trigger-the-new-emtb-mode/

Hm, the information in your link is just markteting-bla-bla :wink:

Haha! As usual! :wink:



stancecoke said:
I'll just wait until you commit your latest changes at github and then I'll take a look at the formulas in your code. Perhaps you can give a hint in which file and line number I can find them :D

regards
stancecoke

That would be great! Of course! Will include as much information as possible and update here in the thread! As soon as it is time for a beta I would love some feedback!
 
buba said:
The logic was inverted from the beginning and some users reported that it was complicated. It should be easier to understand Street Mode and how it operates.

yes, i saw the discusion about that. And yes, the new logic is better now. The best part is, that this limits are not set in the motor controller by a flag anymore. The limits are already pushed every lcd-loop... Kind of stupid protocol if you ask me..

Yay, just saw my Issue #30 got solved? So there is a hope for lcd-less operation?

buba said:
But you and others have given good feedback regarding the blinking. It should be able to blink when Street Mode is not enabled but the function is activated. So this will be sorted out in the 0.20.0!

oh, lol, Frans-Willem was faster then me on github :D #106

buba said:
Street Mode is enabled by holding the ONOFF and DOWN buttons for a short period of time. This is so users can somewhat easily and discretely switch between different modes. Do you feel this is bad?
hm, for me this is too easy to guess. I dont want to risk that some officers try pushing around the buttons and disable the street-mode by "accident". But please, get your focus on the controller firmware; cant wait to test your work! :)
Im trying to find a better solution by myself and send a pull-request for review..
Quite hard to find a good balance between "complicated" and "ergonomic" :)

buba said:
Will take a look at Cruise in Street Mode!
Thanks! Have done it already on my fork, but cant get that damn sdcc to compile it. So waiting for your version :)

Many many thanks to all the developers! :bigthumb:
 
shaddi said:
buba said:
Street Mode is enabled by holding the ONOFF and DOWN buttons for a short period of time. This is so users can somewhat easily and discretely switch between different modes. Do you feel this is bad?
hm, for me this is too easy to guess. I dont want to risk that some officers try pushing around the buttons and disable the street-mode by "accident". But please, get your focus on the controller firmware; cant wait to test your work! :)
Im trying to find a better solution by myself and send a pull-request for review..
Quite hard to find a good balance between "complicated" and "ergonomic" :)

Hi shaddi, maybe 2 or 3 ONOFF click followed ONOFF & DOWN for a while, or 3 ONOFF followed by long DOWN (more easy to do specially in winter) could be a solution.
You can also choice to switch the mode only if You are on a specific Odometer submenu when You start the button sequence!
I hope to give you some ideas

Have a nice day!
 
This is the graph of my torque sensor and follows the same as presented before by another user (and I though I did a good calibration but in the end, it starts at 35 while it should start at 25).

Anyway, were is the graph. I used a fixed weight of 15 kgs to be able to measure up to 50 kgs (did max of 35 kgs with my arm). The last value of 115 kg was my weight + the 15 kgs and that makes sense to me. Max measured value was 70 of unknown weight.

image.png


So, for firmware calibration, I think we should add a two dimensional array of 5 units:

uint8_t torque_sensor_calibration[5][5];

User would need to choose 5 points, 1 for value at resting, 1 for value of user on top of pedals (user weight value) and the last 3 around the corner where there is a transition. I would select this values:

image.png


We also need ADC 10 bits value and not only 8 bits, as it should improve the resolution from the 15 kg / ADC unit to 3.75 kg / ADC unit on the high end scale.
 
I'm trying to decide between a 48V or 52V battery because the cadence limit is an issue.

I often cruise at about 80 RPM unassisted which seems right on the edge. Of course this may drop once I have a motor under me.

Does anyone know if the same cadence limit applies to both 48V and 52V? Or would I still need to enable Experimental High Cadence Mode with 52V?

How well does that mode work on 48V and are their any downsides? eg: torque loss, greatly increased battery usage etc.

If there are any downsides, do they only apply when exceeding the factory limit, or does it now affect the whole range?

52V appears to be the more popular choice these days and I see some sellers with little or no 48V offerings. Please correct me if I'm mistaken.

Thanks.
 
Very interesting development, I am following this thread and from what I can tell you guys are doing a great job! :D

I did a quick search but didn't find anything so please excuse if this has been asked before:

Do you plan to support other common motors in the future? It would be great to see something like this for Bafang's range of mid drive motors like G510 and G521.

Also, did you consider implementing shift detection (if possible with the hardware)?
 
El_Topo said:
Very interesting development, I am following the development of this and from what I can tell you guys are doing a great job! :D

I did a quick search but didn't find anything so please excuse if this has been asked before:

Do you plan to support other common motors in the future? It would be great to see something like this for Bafang's range of mid drive motors like G510 and G521.

Also, did you consider implementing shift detection?
TSDZ2 was my first mid drive motor and I like it because I can install in any regular bicycle. I would not like to start a project for something very specific, I mean a motor for a specific frame -- like I was able to install TSDZ2 on a 24 wheel for my son and I think there not much ebikes with that specific frames, for kids.

I like things that are relatively cheap/accessible, even for maintenance/repair.

Seems original does not implement that shifting, maybe we could use the Bafang shift sensor but seems no cares about it on TSDZ2.
 
Back
Top