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

Nfer said:
casainho said:
2. What means start assist of 20%? 20% of what??

There are feedback from users of cargo bikes that like the BOOST at startup.

I was thinking in maybe remove BOOST since other users/developers say it is not needed anymore if using torque mode instead of power mode. I would prefer to not add new features and even ones that maybe be similar, hard to understand the difference from others.

With the 20% I am trying to say that this function needs an initial power value a 0.000001s to achieve the goal.
The problem I experience with the torque mode is that I don't have the legs to increase the speed only with torque from standstill.
Obviously, it is impossible to cover with only one firmware the different types of user (trail, city, leisure, speed, old, young, strong....).
If I am the only one with this is issue and the rest of the city cyclists using this firmware don't have any problem with it, it doesn't make sense to spend time on this functionally.
For me, it doesn't make sense to carry a battery of 696wh and a 750W motor and feel that I have stand up on the pedals every red light because the system doesn't deliver any power when I need the most, but I have to push against the motor drag and carry the extra weight.
In NYC there is a red light at every other block and I am not going to put my life at risk as other people running red lights to keep the momentum.
Are you riding a single speed, or you have gears? You sound like me, single speed riding and needing to put maximum weight on the pedals to get started.
 
Nfer said:
casainho said:
2. What means start assist of 20%? 20% of what??

There are feedback from users of cargo bikes that like the BOOST at startup.

I was thinking in maybe remove BOOST since other users/developers say it is not needed anymore if using torque mode instead of power mode. I would prefer to not add new features and even ones that maybe be similar, hard to understand the difference from others.

With the 20% I am trying to say that this function needs an initial power value a 0.000001s to achieve the goal.
Hmmm, I still do not understand what 20% refers to. If I did understand correctly, the amount of power assistance is always the same which I don't like - I started to implement BOOST as a fixed power value but in the end it was awkward because if I was with a low assist level riding like on a shared bike path with low gears, I wanted a small BOOST but on other occasions like stop on red lights I wanted a strong BOOST. In the end, the amount of BOOST is configured for each assist level and is also an amplification of the power or torque done on the pedals, meaning that users still have real time control on the amount of BOOST.

Nfer said:
The problem I experience with the torque mode is that I don't have the legs to increase the speed only with torque from standstill.

For me, it doesn't make sense to carry a battery of 696wh and a 750W motor and feel that I have stand up on the pedals every red light because the system doesn't deliver any power when I need the most, but I have to push against the motor drag and carry the extra weight.
In NYC there is a red light at every other block and I am not going to put my life at risk as other people running red lights to keep the momentum.
Well, the BOOST is exactly to improve the situation you refer!! Is to take advantage of ebikes motors compared to a regular bicycle, to decrease the disadvantage the bicycle have related to motor cycles and cars on that situation. Also, after the last discussion of street legal mode, where what makes sense is to limit motor continuous power but permit short bursts of motor power at startup, BOOST must be implemented.
I should note that my main motivation developing OpenSource knowledge and technology for ebikes is because I want to have a greener world with less cars (even if the cars are electric, I own one electric car since 7 years ago) and so I want the ebikes to be the best possible for commuting.

I think I will remake the BOOST feature. Currently BOOST works like this:
1. user configures an amount of time BOOST will be active, let's say 1 second
2. user configures an assist level factor for BOOST (this should be higher than regular assist level)
3. user configures if BOOST happens only when start pedaling and wheel speed is zero or if always when start pedaling
4. user configures an amount of time for transition from BOOST to regular mode, let's say 2 seconds

What I think it is hard to understand is 2. but I think I will improve it to be a factor from regular assist level. Let's say 3.0, would mean that BOOST would amplify by 300% the motor assistance compared to not having BOOST feature enable.

2020-05-14-08-42-09.jpg
 
casainho said:
...Also, after the last discussion of street legal mode, where what makes sense is to limit motor continuous power but permit short bursts of motor power at startup, BOOST must be implemented...
casainho, even if it sounds like a reasonable idea, I guess legal mode and boost have nothing to do with it. You can do ANYTHING you want with this controller and motor combination as long as you don't add any cooling mods. This is the only method I can think of (beside of making use of input power more efficient) to raise the 250W continous rating.
You can keep EVERYTHING as you have it right now, change it, or not, it will NOT change the thermal (nominal) rating of this motor. That's a GOOD thing. EU regulation never mentions a maximum power limit (eg. boost). Other then the Austrian law unfortunately, that claims a 600W maximum rating (and still not mentioning if it's battery power, motor power, or power at the wheel :? ), so I set my controller to 600W battery power.
 
casainho said:
I do not want to discuss cruise as it is a different feature, with different objective.

Ok understood just last thing I wanna better understand is why the Cruise mode is removed from the current release ?
 
elfnino said:
casainho said:
I do not want to discuss cruise as it is a different feature, with different objective.
Ok understood just last thing I wanna better understand is why the Cruise mode is removed from the current release ?
It is not removed, simple it is not implemented - if other developers want to discuss a possible implementation and collaborate with the implementation, great!!
 
Just regarding the graph above.
Boost and transition...
There has to be some thought going into how to implement that properly
On my bosch motor if you stop pedalling just after boost comes in you literally loose all assistance for a couple of seconds which really sucks.

Although it's a very short time, there will be cases possibly safety reasons where you may change the torque either backing off or applying more torque maybe even more than once and the motor still needs to respond to that instantaneously.
ie. Overlay the graph for the selected time span but multiply it with instantaneous torque readings, if during this time the torque is zero then the boost mode is cancelled but normal mode resumes without lag.
 
jbalat said:
Just regarding the graph above.
Boost and transition...
There has to be some thought going into how to implement that properly
On my bosch motor if you stop pedalling just after boost comes in you literally loose all assistance for a couple of seconds which really sucks.

Although it's a very short time, there will be cases possibly safety reasons where you may change the torque either backing off or applying more torque maybe even more than once and the motor still needs to respond to that instantaneously.
ie. Overlay the graph for the selected time span but multiply it with instantaneous torque readings, if during this time the torque is zero then the boost mode is cancelled but normal mode resumes without lag.
I notice this behaviour with 1.0.0beta1 in Torque mode, when pulling away and turning. You stand on pedals to get going, then turn onto the road, there is obviously some reduction in pedal torque at this point, then there is a slight delay before the motor cuts back in again as you go back on the pedals. I will ride some more later today to try and find at what assistance levels this happens.
 
I need to distinguish Trip and "short Trip":
1. Trip: will be recorded time, distance and Wh and these can be quick reset from main screen.
2. "short Trip" is the same as Trip but that variables are only and always reset at system startup.

What can be a good name for the 2.? short trip? quick trip? and what can be a short name for it: QTrip? STrip?
 
casainho said:
Nfer said:
casainho said:
2. What means start assist of 20%? 20% of what??

There are feedback from users of cargo bikes that like the BOOST at startup.

I was thinking in maybe remove BOOST since other users/developers say it is not needed anymore if using torque mode instead of power mode. I would prefer to not add new features and even ones that maybe be similar, hard to understand the difference from others.

With the 20% I am trying to say that this function needs an initial power value a 0.000001s to achieve the goal.
Hmmm, I still do not understand what 20% refers to. If I did understand correctly, the amount of power assistance is always the same which I don't like - I started to implement BOOST as a fixed power value but in the end it was awkward because if I was with a low assist level riding like on a shared bike path with low gears, I wanted a small BOOST but on other occasions like stop on red lights I wanted a strong BOOST. In the end, the amount of BOOST is configured for each assist level and is also an amplification of the power or torque done on the pedals, meaning that users still have real time control on the amount of BOOST.

Nfer said:
The problem I experience with the torque mode is that I don't have the legs to increase the speed only with torque from standstill.

For me, it doesn't make sense to carry a battery of 696wh and a 750W motor and feel that I have stand up on the pedals every red light because the system doesn't deliver any power when I need the most, but I have to push against the motor drag and carry the extra weight.
In NYC there is a red light at every other block and I am not going to put my life at risk as other people running red lights to keep the momentum.
Well, the BOOST is exactly to improve the situation you refer!! Is to take advantage of ebikes motors compared to a regular bicycle, to decrease the disadvantage the bicycle have related to motor cycles and cars on that situation. Also, after the last discussion of street legal mode, where what makes sense is to limit motor continuous power but permit short bursts of motor power at startup, BOOST must be implemented.
I should note that my main motivation developing OpenSource knowledge and technology for ebikes is because I want to have a greener world with less cars (even if the cars are electric, I own one electric car since 7 years ago) and so I want the ebikes to be the best possible for commuting.

I think I will remake the BOOST feature. Currently BOOST works like this:
1. user configures an amount of time BOOST will be active, let's say 1 second
2. user configures an assist level factor for BOOST (this should be higher than regular assist level)
3. user configures if BOOST happens only when start pedaling and wheel speed is zero or if always when start pedaling
4. user configures an amount of time for transition from BOOST to regular mode, let's say 2 seconds

What I think it is hard to understand is 2. but I think I will improve it to be a factor from regular assist level. Let's say 3.0, would mean that BOOST would amplify by 300% the motor assistance compared to not having BOOST feature enable.

2020-05-14-08-42-09.jpg

20% of the initial torque so the graphic starts with power higher than 0. But I am not a developer, so I don't know how long it takes to the speed sensor to detect the speed and the torque sensor detect the push, so the motor gives that initial power. We are talking of 0.1seconds.
The problem of 3.0 factor of 0 is 0 power when you need small power to move the pedals.
 
casainho said:
I need to distinguish Trip and "short Trip":
1. Trip: will be recorded time, distance and Wh and these can be quick reset from main screen.
2. "short Trip" is the same as Trip but that variables are only and always reset at system startup.

What can be a good name for the 2.? short trip? quick trip? and what can be a short name for it: QTrip? STrip?

Hello Casainho, my idea: MTrip vor manuell, ATrip vor automatic. Mhm
 
Nfer said:
20% of the initial torque so the graphic starts with power higher than 0. But I am not a developer, so I don't know how long it takes to the speed sensor to detect the speed and the torque sensor detect the push, so the motor gives that initial power. We are talking of 0.1seconds.
The problem of 3.0 factor of 0 is 0 power when you need small power to move the pedals.
User can keep some pressure on the pedals and release brake sensors, can't be faster like this!!
 
casainho said:
User can keep some pressure on the pedals and release brake sensors, can't be faster like this!!

Never tried it because I don't have the brake sensors. It is an option. Or the startup assist without pedal rotation with a torque threshold as was implemented on V0.20 to avoid the use of brake sensors. I think one member posted this idea a couple days ago.

Thanks Casainho!
 
Nfer said:
Never tried it because I don't have the brake sensors. It is an option. Or the startup assist without pedal rotation with a torque threshold as was implemented on V0.20 to avoid the use of brake sensors. I think one member posted this idea a couple days ago.
I implemented that torque sensor threshold and will be available on next version. But this threshold is probably useful to bring safety when cadence sensor will be disabled because (like broken cadence sensor that happened to me once) depending on torque sensor only can be dangerous.
 
izeman said:
You can do ANYTHING you want with this controller and motor combination as long as you don't add any cooling mods. This is the only method I can think of (beside of making use of input power more efficient) to raise the 250W continous rating.
another method would be adding a higher voltage battery.

I think there is a lot confusion going on with the 250W "limit". It is not a maximum power limit and also no average power limit.
IIRC it is defined as the maximum power the motor heats no more than 20°C within 30 minutes under laboratory conditions. not all relevant parameters (voltage, rpm,..) are defined here so a manufacturer has options to shift this limit. 250W is a label a manufacturer can give to a motor but it is nothing that can easily be tested - so having two organizations testing the same motor would most likely lead to two different power ratings.

So how does it come that the TSDZ2 250W/350W 36V and 500W/750W 48V motors are the exact same hardware for each voltage? (at least the wiki says so). Even the 750W motor cannot handle 750W for 30 minutes without overheating and i think running on 500W would lead to the same result.
i think tongshen is just putting different labels on the product pages for marketing purposes - maybe with a different max current limit in the controller (can someone confirm?). The 48V motor has no wattage printed on it - maybe for a reason. the wiki says the stock power limit is 16 amps, so on 48V it is ~750W.
so from my point of view, we do not have any real continuous rated power for the TSDZ2 motors (at least the 48v ones). maybe there is not even a law that a manufacturer has to follow when defining the continues power of a motor - so maybe manufacturers can print on their products whatever they want as long as it does not lead to false advertising. (can someone confirm or deny?)

From what i have read from the internet, the TSDZ2 (48V) has a similar power like some 250W rated bosch bikes that pump 800W uphills, so it should be fine.

IMHO the 250W law is only there to stop people to build bikes with 4000W engines and do wheelies on the streets. An maximum power law would still have been better (and easier to follow for us).

Rene Kreher (youtube link some posts ago) has asked his insurance and some german police office and got the feedback that they do not really care much about the rated wattage (as they cant measure it) and stick to the speed limit and only power while pedaling rules.

casainho said:
...Also, after the last discussion of street legal mode, where what makes sense is to limit motor continuous power but permit short bursts of motor power at startup, BOOST must be implemented...

i had the idea to implement an average power limit that limits the power to 250W when the average of the last 30 minutes reaches 250W. that would be a continues power limit made in software :)
but im not sure if this would make the bike more legal.
the core of the question is: is it legal to limit the motor power by software. and on that one i have currently no idea.

i also guess the bosch CX bikes could to more than 250W continues, they may just heat more than 20° and it would still be legal.
 
raw said:
Rene Kreher (youtube link some posts ago) has asked his insurance and some german police office and got the feedback that they do not really care much about the rated wattage (as they cant measure it) and stick to the speed limit and only power while pedaling rules.
Well, one, two, or even three police officers are not enough to ask to get an answer that will help you if you get fined anyway.
And as I said, and you confirmed: There is no easy way to test the "nominal power". The TSDZ2 surely falls into the 250W category. A big DD motor surely not. Also the small size makes it obvious that this is no drag race machine.
If we want to make the bike as legal as possible: support until 25km/h and then stop (and some countries like Germany need this stupid "no support under 6km/h" as well), and you should be fine in 99.5% of all cases. And if there is a hidden "unlegal" mode, make it user defineable, so it can't be revealed by reading some wiki on the internet.
 
If you are in the UK: Don't ride like an idiot, don't go flying along without pedalling, and if you ever crash then you had better make up a fake name and address on the spot :)

I don't think anyone cares about 250w or not...
 
casainho said:
I implemented that torque sensor threshold and will be available on next version. But this threshold is probably useful to bring safety when cadence sensor will be disabled because (like broken cadence sensor that happened to me once) depending on torque sensor only can be dangerous.

I haven't tried the torque sensor only but I agree with you.
So just to summary, the only thing I can see to improve the actual BOOST function is to allow the user to specify a different and higher BOOST current ramp than the typical. 8amps/s could not be enough for startup and enough for regular pedaling.
 
izeman said:
raw said:
Rene Kreher (youtube link some posts ago) has asked his insurance and some german police office and got the feedback that they do not really care much about the rated wattage (as they cant measure it) and stick to the speed limit and only power while pedaling rules.
Well, one, two, or even three police officers are not enough to ask to get an answer that will help you if you get fined anyway.
And as I said, and you confirmed: There is no easy way to test the "nominal power". The TSDZ2 surely falls into the 250W category. A big DD motor surely not. Also the small size makes it obvious that this is no drag race machine.
If we want to make the bike as legal as possible: support until 25km/h and then stop (and some countries like Germany need this stupid "no support under 6km/h" as well), and you should be fine in 99.5% of all cases.
i agree with you. i will add more options to make the street mode more legally secure.

izeman said:
And if there is a hidden "unlegal" mode, make it user defineable, so it can't be revealed by reading some wiki on the internet.
nah, i would not help people to break laws.
casainho just said he wants a greener world and ebikes to be the best possible way for commuting. this is also where my motivations comes from and why im currently trying to make it as (configurable) street as legal as possible. i like the idea that more people run ebikes with open source software, because it means freedom but i dont like putting them at legal risks by doing so.
currently it is all below the radar but i would not like to see the open source ebike movment thrown into the same bucket as the illegal ebike tuners.
 
Nfer said:
casainho said:
I implemented that torque sensor threshold and will be available on next version. But this threshold is probably useful to bring safety when cadence sensor will be disabled because (like broken cadence sensor that happened to me once) depending on torque sensor only can be dangerous.

I haven't tried the torque sensor only but I agree with you.
So just to summary, the only thing I can see to improve the actual BOOST function is to allow the user to specify a different and higher BOOST current ramp than the typical. 8amps/s could not be enough for startup and enough for regular pedaling.
4* the specified ramp gets you off the line nicely :)
That's what r0mko used in his torque mode fork from a month ago and it has instant away-from-the-lights performance
 
HughF said:
Nfer said:
I haven't tried the torque sensor only but I agree with you.
So just to summary, the only thing I can see to improve the actual BOOST function is to allow the user to specify a different and higher BOOST current ramp than the typical. 8amps/s could not be enough for startup and enough for regular pedaling.
4* the specified ramp gets you off the line nicely :)
That's what r0mko used in his torque mode fork from a month ago and it has instant away-from-the-lights performance

So, for initial power after 1 second, 4*the current ramp will be give more than 4*power assist level, right?
Casainho can confirm but I think that with the increase of power limited by the current ramp, above certain level the BOOST power factor does give more power, right?
 
raw said:
i also guess the bosch CX bikes could to more than 250W continues, they may just heat more than 20° and it would still be legal.
I ride regularly with a guy on a late Trek Rail with the latest Bosch motor, on long climbs of say 5 - 10 minutes I limit my TSDZ2 to 550 W continuous, he simply just motors off into the distance at some rate, if that engine is only putting out 850W as some are saying then my TSDZ2 550W is over reading :D

The other thing very noticeable with that Bosch motor is that it will put power out without pedal movement, on steeper climbs he can actually stop and restart almost effortlessly from 0mph, definitely we need to think about having the ability to move off with high pedal loads with a ramping up of power that doesn't kill the blue gears. MBrusa I think with the latest iteration of his on the V20 and VLCD5 has done exactly that, maybe it would be worthwhile copying over his code ?
 
A question, on my V20 unit ( but I think the code for calculating out the W/Hr's are the same as on the V50 ) the number of used W/Hr's is showing more than what I put back into the battery on recharge ? is there a calculation approximation, or is the logger I am using for when charging, not a correctly calibrated unit ?
 
raw said:
nah, i would not help people to break laws.
....
currently it is all below the radar but i would not like to see the open source ebike movment thrown into the same bucket as the illegal ebike tuners.
I understand your motivation, but I also like the idea of own responsibility. Having the motor support only above 6km/h is just plain stupid. And it can be very handy to have an off-road mode at hand once you arrive at where you leave public ground. But both can only be acchieved by "hiding from stupid laws". I may bend the word legal here in my favor, but I guess I'm not alone with my thoughts.
 
izeman said:
I understand your motivation, but I also like the idea of own responsibility.
me too, that is why it is (and will be) configurable. its your responsibility to set the correct options if you want to be street legal. i will just make sure the options are there so if you i.e. are building a bike for your grandparents, you can set the options so they do not get into trouble.

izeman said:
Having the motor support only above 6km/h is just plain stupid.
Where are you from? i hear this the first time. maybe you are confusing something with the 6km/h limit for motor support without pedaling? With pedaling, the limit is 25km/h in europe which is good enougt for most situations.

izeman said:
And it can be very handy to have an off-road mode at hand once you arrive at where you leave public ground.
Handy yes but very problematic. You can compare it to motor bikes that only get their license plate and insurance when their motor power is below a given limit. very powerful bikes have to be limited i.e. by a physical gas stop. if you could remove that gas stop any time while driving, you would never get the license plate and insurance policy, even if you promise you will never do :)

that is why i did a PR with an option to disable the street mode hotkey so the street mode is only switchable from the configuration menu. With that hotkey, you can just leave the street mode off all the time, does not matter. without it, your bike *may* be street legal.

this is not my last PR, there is more to come :)
 
@casainho

just some bainstorming... i think about the possibility of using a smartphone as controller instead of the Bafang display. for the buttons something like this could be used.
then just a small circuit that tunnels the uart packages over serial bluetooth to the smartphone and back. would that work from the latency/bandwidth side or would it require modifications of the motors firmware?
 
Back
Top