TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Electric Motors and Controllers
casainho   1.21 GW

1.21 GW
Posts: 3589
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Sep 04 2019 5:38am

mctubster wrote:
Sep 04 2019 5:28am
thineight wrote:
Sep 04 2019 5:10am
buba wrote:
Sep 04 2019 4:00am
ri53hu wrote:
Sep 04 2019 2:24am
Aho guys, I also started to use ALFA 10 but I can not adjust the torque sensor, I can give a more detailed explanation (or I can set it as I have 112 kg and in the hills does not stretch much.) R.
Please use a weight less than 25 kg when calibrating and it should work perfectly! :)
Just for my understanding, what is the range of average force that a "normal" cyclist applies on the pedals during a ride, intended as force during a, say, 15% climb or pushing a bike at 40 km/h with a 52t chainring?
I feel I'm not putting a force above 20 kg for 95% of the time, therefore I do not fully understand the need to calibrate the nonlinear segment up to the full body weight.
If we already have a sensor that can reasonably appreciate linearly 25kg, maybe buba's signal-torque coefficient is enough to calculate the human power that is accurate enough for practically all the situations..

I maybe miss some pieces in the logic, so please feel free to add more details and explaination.

Many thanks
Are are correct.

If you are in the cadence range of 60-90RPM and producing say 200W (a reasonable continuous limit for a fit recreational rider) your torque will be

Torque = 9.5488 x Power (W) / Speed (RPM)
So in this example pedal torque in the range of 32-21 Nm or based on 170mm cranks, approx 19-12kg weight (all of this averaged over 360deg)
You guys are correct that you are NOT viewing the full range, bellow the 60-90 RPM, that is the startup and is much relevant be it on MTB or in the city, because we need very good assistance at startup (otherwise this is almost as having a PAS sensor only at startup).

Also you are not discounting the weight of legs, because my leg weights about 10 kgs so on the 25 kgs, you will have only 15 kgs.

Also the torque sensors vary a lot between each TSDZ2 and some of them can't even measure linearly the first 10 kgs. Others can measure 40 kgs linearly.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

buba   10 kW

10 kW
Posts: 550
Joined: Aug 31 2018 12:36am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by buba » Sep 04 2019 5:46am

thineight wrote:
Sep 04 2019 5:10am
buba wrote:
Sep 04 2019 4:00am
ri53hu wrote:
Sep 04 2019 2:24am
Aho guys, I also started to use ALFA 10 but I can not adjust the torque sensor, I can give a more detailed explanation (or I can set it as I have 112 kg and in the hills does not stretch much.) R.
Please use a weight less than 25 kg when calibrating and it should work perfectly! :)
Just for my understanding, what is the range of average force that a "normal" cyclist applies on the pedals during a ride, intended as force during a, say, 15% climb or pushing a bike at 40 km/h with a 52t chainring?
I feel I'm not putting a force above 20 kg for 95% of the time, therefore I do not fully understand the need to calibrate the nonlinear segment up to the full body weight.
If we already have a sensor that can reasonably appreciate linearly 25kg, maybe buba's signal-torque coefficient is enough to calculate the human power that is accurate enough for practically all the situations..

I maybe miss some pieces in the logic, so please feel free to add more details and explaination.

Many thanks
The engineers behind the TSDZ2 tried to come up with what effective range would be sufficient enough and keep the costs down. So I think they had a goal somewhere between a max value of 30 to 50 kg for their torque sensor using the standard crank arms. With an appropriate assist level this would be sufficient enough for almost all users. So your logic is totally valid and not in any way flawed! It is simply a good observation of how they probably designed the system!

What Casainho wants to do is to increase the effective range so it can measure around the 100 kg level. This would enable a low assist level multiplier but still have the possibility to get a lot of assistance. You just push more and get more. The result would be that we can remove a couple of assist levels. Every assist level would be closer to a really nicely configured eMTB.

Mctubster replied to you with a great analysis I am also going to include here:
mctubster wrote:
Sep 04 2019 5:28am
If you are in the cadence range of 60-90RPM and producing say 200W (a reasonable continuous limit for a fit recreational rider) your torque will be

Torque = 9.5488 x Power (W) / Speed (RPM)
So in this example pedal torque in the range of 32-21 Nm or based on 170mm cranks, approx 19-12kg weight (all of this averaged over 360deg)
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

10 kW
Posts: 550
Joined: Aug 31 2018 12:36am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by buba » Sep 04 2019 5:50am

mctubster wrote:
Sep 04 2019 5:33am
buba wrote:
Sep 04 2019 5:21am


Thank you for getting back and sharing your data! :bigthumb: That is, as always, very interesting to see!

I hope that you will find the calculated human power much more accurate now! :)

As for the Torque Assist and eMTB: both riding modes use the ADC torque value and are not converting it to actual torque. So you can maintain your settings and setup. But the displayed human power and the weight on pedal in the odometer field will be more accurate.
Got it. Of course, why convert. I've seen all of the gymnastics in the code to use integers only :)

Hopefully my flashing cable for my 850c will turn up any day, would like to see some of this data graphed in real time :)

Thanks again
Haha! Yeah, the integer gymnastics are crazy! :wink:

I can imagine the graphs are going to look really nice!

Cheers!
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

10 kW
Posts: 550
Joined: Aug 31 2018 12:36am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by buba » Sep 04 2019 5:55am

casainho wrote:
Sep 04 2019 5:38am
Also you are not discounting the weight of legs, because my leg weights about 10 kgs so on the 25 kgs, you will have only 15 kgs.
That is actually countered by the other leg so the net torque is zero.

casainho wrote:
Sep 04 2019 5:38am
Also the torque sensors vary a lot between each TSDZ2 and some of them can't even measure linearly the first 10 kgs. Others can measure 40 kgs linearly.
Yes, that is really a shame... There are large discrepancies between units. But it is still a really good package when considering the low price. And it operates so much better than cadence only systems! :)
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

casainho   1.21 GW

1.21 GW
Posts: 3589
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Sep 04 2019 5:58am

buba wrote:
Sep 04 2019 5:46am
The engineers behind the TSDZ2 tried to come up with what effective range would be sufficient enough and keep the costs down. So I think they had a goal somewhere between a max value of 30 to 50 kg for their torque sensor using the standard crank arms. With an appropriate assist level this would be sufficient enough for almost all users.
I have a different opinion on the results. I feel that I am being fooled when I buy a TSDZ2 because I can get one unit that has almost no linear range. (Even when buying a new torque sensor for repair, which I bought 2 units recently and have this issue of lack of linear range).

We also know that the torque sensor linear zone is getting lost over the time. And plus, the right and left pedals have different linear zones, where one is worst than the other.

Without the linear range, the TSDZ2 behaves like a Bafang motor that has PAS only.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

thineight   100 W

100 W
Posts: 188
Joined: Oct 05 2018 3:53am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by thineight » Sep 04 2019 6:37am

buba wrote:
Sep 04 2019 5:46am
thineight wrote:
Sep 04 2019 5:10am

Just for my understanding, what is the range of average force that a "normal" cyclist applies on the pedals during a ride, intended as force during a, say, 15% climb or pushing a bike at 40 km/h with a 52t chainring?
I feel I'm not putting a force above 20 kg for 95% of the time, therefore I do not fully understand the need to calibrate the nonlinear segment up to the full body weight.
If we already have a sensor that can reasonably appreciate linearly 25kg, maybe buba's signal-torque coefficient is enough to calculate the human power that is accurate enough for practically all the situations..

I maybe miss some pieces in the logic, so please feel free to add more details and explaination.

Many thanks
The engineers behind the TSDZ2 tried to come up with what effective range would be sufficient enough and keep the costs down. So I think they had a goal somewhere between a max value of 30 to 50 kg for their torque sensor using the standard crank arms. With an appropriate assist level this would be sufficient enough for almost all users. So your logic is totally valid and not in any way flawed! It is simply a good observation of how they probably designed the system!

What Casainho wants to do is to increase the effective range so it can measure around the 100 kg level. This would enable a low assist level multiplier but still have the possibility to get a lot of assistance. You just push more and get more. The result would be that we can remove a couple of assist levels. Every assist level would be closer to a really nicely configured eMTB.

Mctubster replied to you with a great analysis I am also going to include here:
mctubster wrote:
Sep 04 2019 5:28am
If you are in the cadence range of 60-90RPM and producing say 200W (a reasonable continuous limit for a fit recreational rider) your torque will be

Torque = 9.5488 x Power (W) / Speed (RPM)
So in this example pedal torque in the range of 32-21 Nm or based on 170mm cranks, approx 19-12kg weight (all of this averaged over 360deg)
Thank you guys for all the replies!
Regarding the leg weight, I think that while pedalling the rear leg is not just resting (i.e. we don't put 10kg that counterbalance the front leg) but the weight is almost zero or even negative (pulling) if you have the right pedals.
Therefore I think we do not lose completely the first 10kg in the linear range.

Reading your tips I had the confirmation that we are possibly/currently losing some amount of real torque only for a short period, i.e. at startup and strong acceleration. The bilinear torque scale that casainho is currently implementing is then filling this gap: something that is making even better a already wonderful OSfirmware.

As I suppose that on new displays the torque bilinear function will be set by user, will the relationship hard coded on the LCD3 due to the memory limit?
Thanks again!
MTB KTM Ultra 29" - City bike DAYTONA 28"

buba   10 kW

10 kW
Posts: 550
Joined: Aug 31 2018 12:36am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by buba » Sep 04 2019 6:39am

casainho wrote:
Sep 04 2019 5:58am
buba wrote:
Sep 04 2019 5:46am
The engineers behind the TSDZ2 tried to come up with what effective range would be sufficient enough and keep the costs down. So I think they had a goal somewhere between a max value of 30 to 50 kg for their torque sensor using the standard crank arms. With an appropriate assist level this would be sufficient enough for almost all users.
I have a different opinion on the results. I feel that I am being fooled when I buy a TSDZ2 because I can get one unit that has almost no linear range. (Even when buying a new torque sensor for repair, which I bought 2 units recently and have this issue of lack of linear range).

We also know that the torque sensor linear zone is getting lost over the time. And plus, the right and left pedals have different linear zones, where one is worst than the other.

Without the linear range, the TSDZ2 behaves like a Bafang motor that has PAS only.
Well the result is another matter. It is truly disappointing to have a lacking torque sensor in something that really depends on the torque sensor for the best experience. So I can agree it is a shame. I personally do not feel tricked because I really like that their kit exists and I have never had any problems with the torque sensor nor experience other than maybe reduced effective range.

Having said that, I understand you are very unsatisfied with the performance even though it is designed to a price.

But I think your torque sensor calibration will make a big difference for those that want a big operating range! Do you mind sharing how satisfied you are with your torque sensor calibration? Do you feel a big difference and have you reduced the number of assist levels?
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

10 kW
Posts: 550
Joined: Aug 31 2018 12:36am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by buba » Sep 04 2019 6:48am

thineight wrote:
Sep 04 2019 6:37am
buba wrote:
Sep 04 2019 5:46am
thineight wrote:
Sep 04 2019 5:10am

Just for my understanding, what is the range of average force that a "normal" cyclist applies on the pedals during a ride, intended as force during a, say, 15% climb or pushing a bike at 40 km/h with a 52t chainring?
I feel I'm not putting a force above 20 kg for 95% of the time, therefore I do not fully understand the need to calibrate the nonlinear segment up to the full body weight.
If we already have a sensor that can reasonably appreciate linearly 25kg, maybe buba's signal-torque coefficient is enough to calculate the human power that is accurate enough for practically all the situations..

I maybe miss some pieces in the logic, so please feel free to add more details and explaination.

Many thanks
The engineers behind the TSDZ2 tried to come up with what effective range would be sufficient enough and keep the costs down. So I think they had a goal somewhere between a max value of 30 to 50 kg for their torque sensor using the standard crank arms. With an appropriate assist level this would be sufficient enough for almost all users. So your logic is totally valid and not in any way flawed! It is simply a good observation of how they probably designed the system!

What Casainho wants to do is to increase the effective range so it can measure around the 100 kg level. This would enable a low assist level multiplier but still have the possibility to get a lot of assistance. You just push more and get more. The result would be that we can remove a couple of assist levels. Every assist level would be closer to a really nicely configured eMTB.

Mctubster replied to you with a great analysis I am also going to include here:
mctubster wrote:
Sep 04 2019 5:28am
If you are in the cadence range of 60-90RPM and producing say 200W (a reasonable continuous limit for a fit recreational rider) your torque will be

Torque = 9.5488 x Power (W) / Speed (RPM)
So in this example pedal torque in the range of 32-21 Nm or based on 170mm cranks, approx 19-12kg weight (all of this averaged over 360deg)
Thank you guys for all the replies!
Regarding the leg weight, I think that while pedalling the rear leg is not just resting (i.e. we don't put 10kg that counterbalance the front leg) but the weight is almost zero or even negative (pulling) if you have the right pedals.
Therefore I think we do not lose completely the first 10kg in the linear range.
:bigthumb:

Actually you do not lose the first 10 kg in any way. I can guarantee they are used!


thineight wrote:
Sep 04 2019 6:37am
Reading your tips I had the confirmation that we are possibly/currently losing some amount of real torque only for a short period, i.e. at startup and strong acceleration. The bilinear torque scale that casainho is currently implementing is then filling this gap: something that is making even better a already wonderful OSfirmware.
Exactly, the gap is present whenever the user is applying a lot of torque so if you can improve this the experience will be better!


thineight wrote:
Sep 04 2019 6:37am
As I suppose that on new displays the torque bilinear function will be set by user, will the relationship hard coded on the LCD3 due to the memory limit?
Thanks again!
We will have to wait and see how everything is implemented. For now the plan is to get the 0.20.0 stable and then switch focus to display support and the 0.21.0. So in short, there will be updates in the future! :)
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

casainho   1.21 GW

1.21 GW
Posts: 3589
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Sep 04 2019 8:32am

buba wrote:
Sep 04 2019 6:39am
But I think your torque sensor calibration will make a big difference for those that want a big operating range! Do you mind sharing how satisfied you are with your torque sensor calibration? Do you feel a big difference and have you reduced the number of assist levels?
I feel a big difference, I don't want to go back.

I still need to change the number of assist levels, mainly because sometimes I want to ride at 45 kms/h with a lot of cars and for my safety, I need that fast speed.

When I am riding like at 25 or 30 kms/h, on cycle paths for instance, I simple don't change and I do what is usual with a bicycle: when I want a fast acceleration, I can quickly get up from the saddle and I get it. Is very natural and is a pleasure.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

jeff.page.rides   10 mW

10 mW
Posts: 22
Joined: Aug 13 2019 10:16am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by jeff.page.rides » Sep 04 2019 12:15pm

buba wrote:
Sep 04 2019 3:33am
jeff.page.rides wrote:
Sep 03 2019 4:38pm
Before the new Firmware having a coaster brake motor had 2 advantages. (1) I could pull backward and brake and (2) I could preset the torque Sensor, by holding backward brake pressure on the torque sensor when it turned on. This allowed me to put in my small amount of effort (week arms) and the torque sensor would register that I was putting in a large amount of effort. If I didn't pull back hard enough then the motor wouldn't have the power I need to ride. If I pulled back too hard then when I went to stop rotation it would jerk some before it stopped rotation or went to brake. Over time I learned the exact amount of pressure to get it right where I wanted it.

With the new firmware and the right settings, I can ride without pulling back on the torque sensor as I turn on the power-assist. But if I use just the weight of my arm hanging off the crank in the brake direction everything works much better especially in E-MTB.

Today I rode 36 miles and the only changes I made were, Changing back and forth from eMTB and the Power-Assist settings with Max 700 Watts and Max 15 amps, set at a multiplier of 6.0. If I pull on the crank with the weight of my arm I like eMTB mode way better. If I just turned it on with no pressure on the cranks then I like the power-assist mode.

I am so grateful for all your work so that I and many others can enjoy hand-cycling and others that ride recumbent trikes and don't have the power to do it on their own. Although I have learned the right amount of pressure to put on the cranks so the torque sensor works for me with the original firmware. It's not something that I wanted to pass on to others because you really can apply more power then is safe, because the motor wanted to just keep moving forward. When I stopped the forward rotation then there was no resistance on the brakes with the original firmware. Now with the changes in 20 Alpha 10, no matter how high I trick the torque sensor to turn it up it stops in just a second or so on its own.

In an earlier post, I listed all my settings. And where I've been using the new firmware for the last couple weeks. I'm not totally sure what each setting does.

I'd like to know if one of these settings is the one for the torque sensor so I can set it where I want it without having to use any back pressure to trick the torque-sensor into thinking I am applying more pressure than I am?

Here are the main settings I'm using below.

...

Thanks again, Jeff
It is very good that you have explained, in detail, how you actually use the TSDZ2. Because I can now clearly see what parameter you would like to configure. And that is the ADC torque sensor offset. The ADC torque sensor offset is calibrated during every power-up. The system usually measures the resting torque value from the ADC for around three seconds and calculates the average value.

When applying backward torque and letting it calibrate with a lower value it actually tricks the system into believing that you are applying torque when you have the pedals resting. So when you do actually apply torque it seems you are pushing much harder.

There is no way to change the offset in the Alpha 10. But what could be implemented is a way to change the calibration value from the display so it does not need to be calibrated every time you start the system. Basically you could choose between automatic calibration every system startup or manual calibration. Manual calibration is done once and would save around three seconds of startup. But this can be dangerous if not properly configured and the bike might accidentally apply power for users that have the assistance without pedal rotation enabled.

Another solution that would be safer is to add an offset to the eMTB. You mention that the Power Assist works fine with lower torque but eMTB is lacking unless applying backward torque when calibrating. Can you confirm that you can use Power Assist to your satisfaction without applying backward torque during calibration but the eMTB needs the backward torque to work to your satisfaction? If this is confirmed I can give it a thought and come up with a solution.

Thank you!
Yes, I can confirm that in the power assist mode when it's turned all the way up with the settings given earlier it's satisfactory without pulling back on the torque sensor when I turn it on. But it does work better with a slight amount of backpressure. If given too much back pressure it jumps a bit when stopping rotation and if braking quickly it jumps and then goes into resistance and then stops. When using eMTB even if I pull too much it doesn't jump when I try to stop pedaling or change direction but does go into resistance for that short second no matter where I set the torque sensor when braking.
With the factory firmware or with version 20 no matter how hard I pulled back when I turned it on it has never tried to go on its own. And I have it set to start assistance without rotation, this setting really helps when I'm starting out on an uphill. The thing that's weird is it did this even with the factory firmware and version 20 is that start assistance starts to go for a split-second stops for a split-second and then starts and stays on and continues forward.
I'm so excited about all the progress that's being made that helps me and many others and I'm completely thankful for all of everyone's time and input.
Jeff

GTrider   10 µW

10 µW
Posts: 6
Joined: Jan 10 2019 2:14am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by GTrider » Sep 05 2019 3:59am

SO I managed to flash the KT-LCD3 and motor with the opensource firmware. When I press the power button attached to the screen it turns on but just show a bunch of 8's. not sure why. Any help is appreciated. Thanks.

perryscope   100 W

100 W
Posts: 106
Joined: Jan 06 2019 4:29pm
Contact:

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by perryscope » Sep 05 2019 4:05am

GTrider wrote:
Sep 05 2019 3:59am
SO I managed to flash the KT-LCD3 and motor with the opensource firmware. When I press the power button attached to the screen it turns on but just show a bunch of 8's. not sure why. Any help is appreciated. Thanks.
Hi this would indicate that the screen is unable to speak to the motor controller over the UART serial cables.
Double check your TX and RX cables are wired correct. on one of my screens I had to reverse these to get it to work

It will also be unable to speak to the motor if the motor controller is not flashed correctly or is still running the stock firmware. until it can see the Motor controller the LCD£ screen will just show all segments like that.
Last edited by perryscope on Sep 05 2019 4:07am, edited 1 time in total.
Empowered people support rider and trustee
www.empoweredpeople.co.uk

thineight   100 W

100 W
Posts: 188
Joined: Oct 05 2018 3:53am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by thineight » Sep 05 2019 4:07am

perryscope wrote:
Sep 05 2019 4:05am
GTrider wrote:
Sep 05 2019 3:59am
SO I managed to flash the KT-LCD3 and motor with the opensource firmware. When I press the power button attached to the screen it turns on but just show a bunch of 8's. not sure why. Any help is appreciated. Thanks.
Hi this would indicate that the screen is unable to speak to the motor controller over the UART serial cables.
Double check your TX and RX cables are wired correct. on one of my screens I had to reverse these to get it to work
Or, if you have the brake sensor installed, make sure the circuit is working (i.e. magnet installed) otherwise you see all "8" at startup.
It is well written in the wiki
MTB KTM Ultra 29" - City bike DAYTONA 28"

mctubster   100 W

100 W
Posts: 182
Joined: Feb 26 2018 6:21am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by mctubster » Sep 05 2019 5:45pm

casainho wrote:
Sep 04 2019 8:32am
buba wrote:
Sep 04 2019 6:39am
But I think your torque sensor calibration will make a big difference for those that want a big operating range! Do you mind sharing how satisfied you are with your torque sensor calibration? Do you feel a big difference and have you reduced the number of assist levels?
I feel a big difference, I don't want to go back.

I still need to change the number of assist levels, mainly because sometimes I want to ride at 45 kms/h with a lot of cars and for my safety, I need that fast speed.

When I am riding like at 25 or 30 kms/h, on cycle paths for instance, I simple don't change and I do what is usual with a bicycle: when I want a fast acceleration, I can quickly get up from the saddle and I get it. Is very natural and is a pleasure.
Hi - quick update after scaling my torque sensor down - I am seeing reasonable human power levels now. Casainho you are right that over a certain weight on the pedals the torque sensor does not really register an increase - so yes I am unable to get more than 450W when using eMTB mode. Right now I have a single power option available for climbing very steep hills or going fast :), but it would be great to have full scale so the motor gives me full power (650W) when I am pressing very hard on the pedals.

klaus2650   10 µW

10 µW
Posts: 5
Joined: Mar 19 2019 10:47pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by klaus2650 » Sep 07 2019 2:59am

I did flash a new KT-LCD3 with KTLCD3-0.20.0-Alpha-10.ihx firmware file.
Display do now not turn on after re-connecting programmer.
any sugestions ?

Rafe   10 W

10 W
Posts: 91
Joined: Oct 16 2018 5:56pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by Rafe » Sep 07 2019 4:27am

Buba

Reading the comments I noticed that 25kg is discussed as the maximum high calibration for the torque sensor. I had not noticed that 25kg max when the torque sensor cal was introduced into the settings menu, has the Wiki been updated down the line or did I simply miss it?

Anyways I assumed the high cal point was the rider's weight and the zero cal point was no weight on the pedals (at every system startup) , and that it was assumed for simplicity that the sensor is linear and the gain set accordingly with no bias. Have to say that in my ignorance it has worked well for me all this time.

buba   10 kW

10 kW
Posts: 550
Joined: Aug 31 2018 12:36am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by buba » Sep 07 2019 6:35am

jeff.page.rides wrote:
Sep 04 2019 12:15pm
buba wrote:
Sep 04 2019 3:33am
jeff.page.rides wrote:
Sep 03 2019 4:38pm
Before the new Firmware having a coaster brake motor had 2 advantages. (1) I could pull backward and brake and (2) I could preset the torque Sensor, by holding backward brake pressure on the torque sensor when it turned on. This allowed me to put in my small amount of effort (week arms) and the torque sensor would register that I was putting in a large amount of effort. If I didn't pull back hard enough then the motor wouldn't have the power I need to ride. If I pulled back too hard then when I went to stop rotation it would jerk some before it stopped rotation or went to brake. Over time I learned the exact amount of pressure to get it right where I wanted it.

With the new firmware and the right settings, I can ride without pulling back on the torque sensor as I turn on the power-assist. But if I use just the weight of my arm hanging off the crank in the brake direction everything works much better especially in E-MTB.

...

...

Thanks again, Jeff
...

Another solution that would be safer is to add an offset to the eMTB. You mention that the Power Assist works fine with lower torque but eMTB is lacking unless applying backward torque when calibrating. Can you confirm that you can use Power Assist to your satisfaction without applying backward torque during calibration but the eMTB needs the backward torque to work to your satisfaction? If this is confirmed I can give it a thought and come up with a solution.

Thank you!
Yes, I can confirm that in the power assist mode when it's turned all the way up with the settings given earlier it's satisfactory without pulling back on the torque sensor when I turn it on. But it does work better with a slight amount of backpressure. If given too much back pressure it jumps a bit when stopping rotation and if braking quickly it jumps and then goes into resistance and then stops. When using eMTB even if I pull too much it doesn't jump when I try to stop pedaling or change direction but does go into resistance for that short second no matter where I set the torque sensor when braking.
With the factory firmware or with version 20 no matter how hard I pulled back when I turned it on it has never tried to go on its own. And I have it set to start assistance without rotation, this setting really helps when I'm starting out on an uphill. The thing that's weird is it did this even with the factory firmware and version 20 is that start assistance starts to go for a split-second stops for a split-second and then starts and stays on and continues forward.
I'm so excited about all the progress that's being made that helps me and many others and I'm completely thankful for all of everyone's time and input.
Jeff
I apologize for the delay in my answer but I hope you know I have read your post!

Have tried to make a simple change to the eMTB mode. It should improve the response ever so slightly. I considered doing larger changes but am afraid to do too drastic changes in the 0.20.0. I believe the torque sensor calibration that is planned will help all users finely tune the system for a perfect response. Whatever I do now will possible get rewritten or changed.

The changes will be present in the official 0.20.0 Beta 1! :)
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

10 kW
Posts: 550
Joined: Aug 31 2018 12:36am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by buba » Sep 07 2019 6:38am

klaus2650 wrote:
Sep 07 2019 2:59am
I did flash a new KT-LCD3 with KTLCD3-0.20.0-Alpha-10.ihx firmware file.
Display do now not turn on after re-connecting programmer.
any sugestions ?
Not sure what it might be but have your tried holding the power button a bit longer when you want to turn on the system?
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

10 kW
Posts: 550
Joined: Aug 31 2018 12:36am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by buba » Sep 07 2019 6:53am

Rafe wrote:
Sep 07 2019 4:27am
Buba

Reading the comments I noticed that 25kg is discussed as the maximum high calibration for the torque sensor. I had not noticed that 25kg max when the torque sensor cal was introduced into the settings menu, has the Wiki been updated down the line or did I simply miss it?

Anyways I assumed the high cal point was the rider's weight and the zero cal point was no weight on the pedals (at every system startup) , and that it was assumed for simplicity that the sensor is linear and the gain set accordingly with no bias. Have to say that in my ignorance it has worked well for me all this time.
Hello Rafe!

The torque sensor is only linear in the first 0 -> 30-40 kg so it should be calibrated somewhere in between those extremes. So a value around 10 -> 25 kg should be good for the single point calibration we currently use in the 0.20.0. I recently updated the wiki so that is why you did not see the 25 kg max before.

The calibration changes the system response when using Power Assist and also the calculation of human power. In other words, it will not affect eMTB Assist. If you are lucky you have a really good torque sensor that allows a calibration such as you described. But for maximum accuracy of human power calculation it needs to be calibrated in its approved operating range: 0 -> around 30 - 40 kg. Recommended to calibrate around 10 to 25 kg.

But: if you are not interested in the human power accuracy and only want a nice experience with a wide operating range you can increase the calibration value to maybe 50 - 70 kg. This will scale the torque sensor output slightly and it can feel as if you have a torque sensor with a wider operating range! In short, the human power data will not be as accurate but it will possibly give a slightly better experience using Power Assist.
Last edited by buba on Sep 07 2019 7:16am, edited 1 time in total.
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

10 kW
Posts: 550
Joined: Aug 31 2018 12:36am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by buba » Sep 07 2019 7:11am

I will submit one last change today and then I would recommend to finally release the official 0.20.0 Beta 1! It will only have some minor changes from the Alpha 10 so most users do not have to update. But if you are using a version before Alpha 10 I highly recommend to update to the Beta 1 when it is released.

I am assuming that there will no bugs in the Beta 1 so we will be able to rather quickly jump to the stable release of the 0.20.0 firmware version.
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

10 kW
Posts: 550
Joined: Aug 31 2018 12:36am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by buba » Sep 07 2019 7:57am

0.20.0 Beta 1 - Soon to be released!

I assume that Casainho will take a look at the latest changes and then create an official release as soon as possible - when time allows! For users that are still on 0.19.0 or earlier I recommend to take a look at the 0.20.0 wiki and consider updating.

The wiki is also beta :wink: So let me know if you see anything that needs some attention!

Here is the wiki:
https://github.com/OpenSource-EBike-fir ... %7C-Manual

From previous post:
buba wrote:
Sep 07 2019 7:11am
...

It [0.20.0 Beta 1] will only have some minor changes from the Alpha 10 so most users do not have to update. But if you are using a version before Alpha 10 I highly recommend to update to the Beta 1 when it is released.

I am assuming that there will no bugs in the Beta 1 so we will be able to rather quickly jump to the stable release of the 0.20.0 firmware version.
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

arka   1 mW

1 mW
Posts: 10
Joined: May 19 2018 11:27am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by arka » Sep 07 2019 1:35pm

Is 850C control described somewhere?

1. How to display the current Watt battery or the current engine temperature on the main screen?
2. Which button change the chart from "human power" to "wheel speed" and other charts?
3. Can I change the items displayed in the main MENU? or switch between parameters. I can't find it in settings.
IMG_0438.jpg
IMG_0438.jpg (479.56 KiB) Viewed 371 times
- Felt redemption 3 HUB:
Sabvoton SVMC72100 (M)
Mxus v3 3K-Turbo 16x4T
67V 16s16p Sanio GA
EV Computer
- Giant Yukon FX 2 MID:
TSDZ2 750W
13s5p 48V 17,5Ah 840Wh Sanyo NCR18650GA

jeff.page.rides   10 mW

10 mW
Posts: 22
Joined: Aug 13 2019 10:16am

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by jeff.page.rides » Sep 07 2019 2:25pm

Any idea when the beta 20 for 850 C and SW102 could be ready?
Because most of us have the LCD3 displays there should be a way to delete unnecessary things that aren't used by the majority of users so that we can put the torque sensor updates on the LCD3 without losing anything important. If not everyone has to upgrade to a new display. It would be great if we had the opportunity to choose which display we want to use in the future rather be than being forced to use one of the newer displays with more memory.
Thanks, Jeff

andrea_104kg   100 W

100 W
Posts: 152
Joined: Mar 05 2018 5:51pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by andrea_104kg » Sep 08 2019 4:00am

Inglese

I think that if there are space problems we can do 2 versions, city and mtb there are things that on mtb you never use es cruise etc.

casainho   1.21 GW

1.21 GW
Posts: 3589
Joined: Feb 14 2011 2:43pm

Re: TSDZ2 mid drive -- Flexible OpenSource firmware for TongSheng TSDZ2 mid drive motor

Post by casainho » Sep 08 2019 12:26pm

arka wrote:
Sep 07 2019 1:35pm
Is 850C control described somewhere?

1. How to display the current Watt battery or the current engine temperature on the main screen?
2. Which button change the chart from "human power" to "wheel speed" and other charts?
3. Can I change the items displayed in the main MENU? or switch between parameters. I can't find it in settings.

IMG_0438.jpg
The information shown on main screen is fixed but only the variables in graph can be changed and on this way, you can see the motor temperature there. I hope you did read the wiki page that says this:

https://github.com/OpenSource-EBike-fir ... figuration

Keys combinations:
on main screen:
UP + DOWN buttons click to enter configurations screen. ON/OFF long click to leave.
ON/OFF + UP buttons click to enter max power configuration (motor power field will blink). ON/OFF long click to leave.
ON/OFF button click + long click to select graph data variable (graph title will blink) and UP or DOWN buttons to choose new graph data variable. ON/OFF long click to leave.
on configurations screen:
UP or DOWN buttons click to scroll. ON/OFF click to edit field and ON/OFF long click to leave.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

If you like my work, please consider making a donation. I am being using the donations to buy needed resources for my developments. My paypal: casainho AT gmail.com.

Post Reply