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

Electric Motors and Controllers
casainho   10 GW

10 GW
Posts: 4101
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Nov 06 2019 4:14am

cnrd wrote:
Nov 06 2019 4:10am
I saw that a KT-LCD4 was released, looking exactly like the SW102, anyone know if it is actually the same?
Looks exactly from outside but the LCD is the same old technology -- we can´t simple show our many custom information there, just the regular basic. Think of it as KT-LCD3 on that small shape.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

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.

cnrd   100 mW

100 mW
Posts: 36
Joined: Apr 12 2019 5:47am

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

Post by cnrd » Nov 06 2019 4:27am

casainho wrote:
Nov 06 2019 4:14am
cnrd wrote:
Nov 06 2019 4:10am
I saw that a KT-LCD4 was released, looking exactly like the SW102, anyone know if it is actually the same?
Looks exactly from outside but the LCD is the same old technology -- we can´t simple show our many custom information there, just the regular basic. Think of it as KT-LCD3 on that small shape.
Would it work with the LCD3 FW? As I want a smaller display that won't break as easy when I fall on my MTB. :lol:

zappan   10 W

10 W
Posts: 68
Joined: Sep 27 2018 3:00am
Location: Sicilia

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

Post by zappan » Nov 06 2019 5:30am

Hi Buba and welcome back :D , I'm using it and I didn't have any wonderful work problems, I noticed though that the LCD3 actually measures the battery voltage a little higher than that measured by my WattzUp instrument, a problem that was also reported from another user here:
viewtopic.php?f=28&t=103087

casainho   10 GW

10 GW
Posts: 4101
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Nov 06 2019 5:46am

cnrd wrote:
Nov 06 2019 4:27am
casainho wrote:
Nov 06 2019 4:14am
cnrd wrote:
Nov 06 2019 4:10am
I saw that a KT-LCD4 was released, looking exactly like the SW102, anyone know if it is actually the same?
Looks exactly from outside but the LCD is the same old technology -- we can´t simple show our many custom information there, just the regular basic. Think of it as KT-LCD3 on that small shape.
Would it work with the LCD3 FW? As I want a smaller display that won't break as easy when I fall on my MTB. :lol:
Yes, use the SW102!!
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

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: 588
Joined: Aug 31 2018 12:36am

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

Post by buba » Nov 06 2019 5:39pm

jeff.page.rides wrote:
Nov 05 2019 10:20pm
jeff.page.rides wrote:
Nov 04 2019 5:24pm
casainho wrote:
Nov 04 2019 8:54am
Waynemarlow wrote:
Nov 04 2019 8:16am
The motor changes that Buba integrated seem very good and reliable, has anybody suggested that we should move to V20 on all applications such as Marcoq's and Casainho's ?
Soon the 850C and SW102 display will work on V20. lowPerformer already did work for support V20 but I did not test yet, geeksville, the other developer, is away for some days and when he arrives, I think we will be able to work hard on it.

For myself, I will port the torque sensor full calibration for V20, so I can keep playing/develop for V21.

I hope to make a V21 quick after V20, mainly to support the new displays - the idea is that development need to continue but is not possible anymore with KT-LCD3 because it is already full of memory, also is much more limited on the information it shows to user so it limits the innovation.

As the configurations grows on the display, maybe we could have a software to change them on PC side (would change the firmware .bin file) -- this if some new developer will be available to develop and maintain. This would be an alternative, as all the configurations will always be available on the display.
Hey Buba and Casainho,
I'm very grateful for all the work you guys have done in version 20 it has been working well for me. I am excited about version 21 so that I can set the settings on the torque sensor. Because in version 20 I am still pulling backward on my cranks with a coaster brake version to trick torque sensor into thinking I'm putting more torque on the cranks than I am. I have been doing this ever since I installed my power assist with the stock firmware. It would be great to just put in the setting I like and not have to pull back on my cranks anymore to trick the torque sensor. This will also help those that don't have very strong legs or arms like me and use the standard motor. Because you can't pull back with the standard motor, to trick the torque sensor, With the stock firmware I had to pull back to trick the torque sensor or it was completely unusable. With version 20 pulling back makes a big difference, but the power assist will work without pulling back just not enough for me to enjoy riding. Thanks again for all the time that has been donated to this project, Jeff
I forgot to include that I'm pulling back on the cranks and holding them as I turn on the system. That's how I'm tricking the torque sensor into thinking I'm applying more torque to the cranks then I really am.
Hello Jeff,

Yes, I do remember! Did think about that one for a while. It is difficult to implement on the KT-LCD3 due to memory constraints. I have some ideas that would help but those will only be possible to implement on the new displays. Unless we remove functions on the KT-LCD3 to make some room.

Am really sorry you are not able to enjoy the TSDZ2 fully :( But do remember that this project is in constant development!

buba   10 kW

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

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

Post by buba » Nov 06 2019 5:58pm

Waynemarlow wrote:
Nov 06 2019 3:34am
The only things I have found is the problem with moving around the sub fields on the display, the delay between needing a key input is really short and for people like me with fat fingers and age on the wrong side, then getting the right speed of input is tough. I had offered an alternative scheme of a press on both the home and down key simultaneously to enter into that sequence rather than the home then up then long up. It would allow one to change fields whilst on the move as both the home and down key can be covered by your thumb.
I do understand it can be tricky to use some button events. Would you mind explaining how you operate the buttons when changing between subfields?

You should basically double-click the button but instead of releasing on the second click you should hold until the subfield changes. There is no timing required. Just a quick double-click but no release on the second click: CLICK -> RELEASE -> CLICK-HOLD. When you now exactly how the system works you can also do it somewhat "slowly".

Please try it out some more with an open mind and let me know what you come up with. Would love for you to get along with the buttons!

Waynemarlow wrote:
Nov 06 2019 3:34am
Something no one else has reported is whilst in Emtb there is quite a bit more delay from the time stopping peddling to the engine shutting off than in say Power mode. My Bafang engine was very similar but one has to ask why the difference between Emtb and Power mode. It’s not unsafe just noticeable.
It should be faster than 0.19.0 but there might be differences between modes. It depends on the logic. If you want a really fast "motor-cutoff" you should not only stop the pedals but also rotate them slightly backwards. As soon the system notices backwards pedal rotation it will immediately stop the motor. But note that there is soft-slow-down implemented so the motor will not immediately stop.

buba   10 kW

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

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

Post by buba » Nov 06 2019 6:13pm

zappan wrote:
Nov 06 2019 5:30am
Hi Buba and welcome back :D , I'm using it and I didn't have any wonderful work problems, I noticed though that the LCD3 actually measures the battery voltage a little higher than that measured by my WattzUp instrument, a problem that was also reported from another user here:
viewtopic.php?f=28&t=103087
Hello and thank you Zappan! :D

The accuracy of the measurements depend on many different parameters. Such as temperature, ADC non-linearity and battery voltage. So there might be some large differences in accuracy between different systems. But I will nonetheless take a look and see if we can make it more accurate.

EDIT: I have also answered the other user on the link you posted.

jeff.page.rides   100 W

100 W
Posts: 100
Joined: Aug 13 2019 10:16am

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

Post by jeff.page.rides » Nov 06 2019 6:28pm

buba wrote:
Nov 06 2019 5:39pm
jeff.page.rides wrote:
Nov 05 2019 10:20pm
jeff.page.rides wrote:
Nov 04 2019 5:24pm
casainho wrote:
Nov 04 2019 8:54am

Soon the 850C and SW102 display will work on V20. lowPerformer already did work for support V20 but I did not test yet, geeksville, the other developer, is away for some days and when he arrives, I think we will be able to work hard on it.

For myself, I will port the torque sensor full calibration for V20, so I can keep playing/develop for V21.

I hope to make a V21 quick after V20, mainly to support the new displays - the idea is that development need to continue but is not possible anymore with KT-LCD3 because it is already full of memory, also is much more limited on the information it shows to user so it limits the innovation.

As the configurations grows on the display, maybe we could have a software to change them on PC side (would change the firmware .bin file) -- this if some new developer will be available to develop and maintain. This would be an alternative, as all the configurations will always be available on the display.
Hey Buba and Casainho,
I'm very grateful for all the work you guys have done in version 20 it has been working well for me. I am excited about version 21 so that I can set the settings on the torque sensor. Because in version 20 I am still pulling backward on my cranks with a coaster brake version to trick torque sensor into thinking I'm putting more torque on the cranks than I am. I have been doing this ever since I installed my power assist with the stock firmware. It would be great to just put in the setting I like and not have to pull back on my cranks anymore to trick the torque sensor. This will also help those that don't have very strong legs or arms like me and use the standard motor. Because you can't pull back with the standard motor, to trick the torque sensor, With the stock firmware I had to pull back to trick the torque sensor or it was completely unusable. With version 20 pulling back makes a big difference, but the power assist will work without pulling back just not enough for me to enjoy riding. Thanks again for all the time that has been donated to this project, Jeff
I forgot to include that I'm pulling back on the cranks and holding them as I turn on the system. That's how I'm tricking the torque sensor into thinking I'm applying more torque to the cranks then I really am.
Hello Jeff,

Yes, I do remember! Did think about that one for a while. It is difficult to implement on the KT-LCD3 due to memory constraints. I have some ideas that would help but those will only be possible to implement on the new displays. Unless we remove functions on the KT-LCD3 to make some room.

Am really sorry you are not able to enjoy the TSDZ2 fully :( But do remember that this project is in constant development!
Buda, thanks for the reply.If It's too much trouble to do on the LCD3 I can buy a new display, Handcycles with coaster brake motors don't use torque assist, cadence assist, walk assist, Cruise, City mode or a throttle and Street mode. If it's not too much trouble to remove all those and there could be room to put in the torque sensor settings that would be great, but if not will just upgrade all the current LCD3 on the units we've sold with the 850C
Thanks, Jeff

buba   10 kW

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

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

Post by buba » Nov 06 2019 6:54pm

jeff.page.rides wrote:
Nov 06 2019 6:28pm
buba wrote:
Nov 06 2019 5:39pm
jeff.page.rides wrote:
Nov 05 2019 10:20pm
jeff.page.rides wrote:
Nov 04 2019 5:24pm


Hey Buba and Casainho,
I'm very grateful for all the work you guys have done in version 20 it has been working well for me. I am excited about version 21 so that I can set the settings on the torque sensor. Because in version 20 I am still pulling backward on my cranks with a coaster brake version to trick torque sensor into thinking I'm putting more torque on the cranks than I am. I have been doing this ever since I installed my power assist with the stock firmware. It would be great to just put in the setting I like and not have to pull back on my cranks anymore to trick the torque sensor. This will also help those that don't have very strong legs or arms like me and use the standard motor. Because you can't pull back with the standard motor, to trick the torque sensor, With the stock firmware I had to pull back to trick the torque sensor or it was completely unusable. With version 20 pulling back makes a big difference, but the power assist will work without pulling back just not enough for me to enjoy riding. Thanks again for all the time that has been donated to this project, Jeff
I forgot to include that I'm pulling back on the cranks and holding them as I turn on the system. That's how I'm tricking the torque sensor into thinking I'm applying more torque to the cranks then I really am.
Hello Jeff,

Yes, I do remember! Did think about that one for a while. It is difficult to implement on the KT-LCD3 due to memory constraints. I have some ideas that would help but those will only be possible to implement on the new displays. Unless we remove functions on the KT-LCD3 to make some room.

Am really sorry you are not able to enjoy the TSDZ2 fully :( But do remember that this project is in constant development!
Buda, thanks for the reply.If It's too much trouble to do on the LCD3 I can buy a new display, Handcycles with coaster brake motors don't use torque assist, cadence assist, walk assist, Cruise, City mode or a throttle and Street mode. If it's not too much trouble to remove all those and there could be room to put in the torque sensor settings that would be great, but if not will just upgrade all the current LCD3 on the units we've sold with the 850C
Thanks, Jeff
I would be more than happy to fork the project and make a special version. I could even implement some really nice features and characteristics with your help and recommendations. I bet there are several things you would like to include that are specific to handcycles. How about... ?

- Ultra sensitivity and really fast response times for the coaster brake
- Torque filtering for uneven power delivery between right and left arms
- Communication with other hardware that can enhance the experience
- Remove unnecessary things to make room for other more appropriate features and functions

We can do a lot of things and I think many riders will benefit from this. But it would have to diverge from the main project because it will be adapted to other needs. Again, I would happily do this but am extremely time constrained now. I used a lot of vacation days for the 0.20.0 and it is difficult to find that kind of time now. In the meantime there will be new displays coming and those will have some more configuration options that will hopefully enhance the experience for all users. Later on we can create some exciting new things!

jeff.page.rides   100 W

100 W
Posts: 100
Joined: Aug 13 2019 10:16am

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

Post by jeff.page.rides » Nov 07 2019 12:09am

buba wrote:
Nov 06 2019 6:54pm
jeff.page.rides wrote:
Nov 06 2019 6:28pm
buba wrote:
Nov 06 2019 5:39pm
jeff.page.rides wrote:
Nov 05 2019 10:20pm


I forgot to include that I'm pulling back on the cranks and holding them as I turn on the system. That's how I'm tricking the torque sensor into thinking I'm applying more torque to the cranks then I really am.
Hello Jeff,

Yes, I do remember! Did think about that one for a while. It is difficult to implement on the KT-LCD3 due to memory constraints. I have some ideas that would help but those will only be possible to implement on the new displays. Unless we remove functions on the KT-LCD3 to make some room.

Am really sorry you are not able to enjoy the TSDZ2 fully :( But do remember that this project is in constant development!
Buda, thanks for the reply.If It's too much trouble to do on the LCD3 I can buy a new display, Handcycles with coaster brake motors don't use torque assist, cadence assist, walk assist, Cruise, City mode or a throttle and Street mode. If it's not too much trouble to remove all those and there could be room to put in the torque sensor settings that would be great, but if not will just upgrade all the current LCD3 on the units we've sold with the 850C
Thanks, Jeff
I would be more than happy to fork the project and make a special version. I could even implement some really nice features and characteristics with your help and recommendations. I bet there are several things you would like to include that are specific to handcycles. How about... ?

- Ultra sensitivity and really fast response times for the coaster brake
- Torque filtering for uneven power delivery between right and left arms
- Communication with other hardware that can enhance the experience
- Remove unnecessary things to make room for other more appropriate features and functions

We can do a lot of things and I think many riders will benefit from this. But it would have to diverge from the main project because it will be adapted to other needs. Again, I would happily do this but am extremely time constrained now. I used a lot of vacation days for the 0.20.0 and it is difficult to find that kind of time now. In the meantime there will be new displays coming and those will have some more configuration options that will hopefully enhance the experience for all users. Later on we can create some exciting new things!
Buda, thank you very much for such a genuine offer to help! Cycling season is winding down but I still ride through the winter but most don't. If we slowly work on this over the winter and have a good usable version by spring that would be great. There are quite a few things that we could do that pertain to hand cycles. Your Suggestions would all be valid for a hand cycle. One thing I'm not sure if you realize but when you're riding a hand cycle both pedals are in the same position not opposites like a bicycle so you really do have a strong bicep pull and a weaker tricep push with both arms going the same direction at the same time. That's one of the reasons that tricking the torque sensor help so much is because you have such a lopsided torque circle. I'd hate to put so much effort into something that only works on the LCD3. We need to look at now and the future so whatever we do moves forward with the rest of the development. Again thank you for all your efforts and your desire to continue. If we can have something to allow us to adjust the torque sensor by spring that would be awesome along with whatever else helps improve the whole experience.

casainho   10 GW

10 GW
Posts: 4101
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Nov 07 2019 12:22am

jeff.page.rides wrote:
Nov 07 2019 12:09am
If we can have something to allow us to adjust the torque sensor by spring that would be awesome along with whatever else helps improve the whole experience.
For your description, the issue is lack of sensitivity on your torque sensor, it is mainly an hardware issue. You should start learning and testing your torque sensor -- go to the wiki to see this to improve the hardware:
https://github.com/OpenSource-EBike-fir ... que-sensor

Then next step is to use the full calibration, that I am using on a V0.19 branch code, as experimental. This linearized the torque sensor output and I like a lot the result that I do no want to go back anymore.
I wrote instructions before on the thread how to use this branch and setup manually the full calibration.

Anyway, the plan is to bring the full calibration on the V0.21 for 850C and SW102 displays only.

It is very important that you learn and test more your torque sensor... Please measure both left and right ADC values with various weights and plot graphs to show us. On my torque sensor I can measure up to 110 kgs, my weight. I would like to know what are the max values you put with your arms.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

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.

cnrd   100 mW

100 mW
Posts: 36
Joined: Apr 12 2019 5:47am

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

Post by cnrd » Nov 07 2019 3:44am

casainho wrote:
Nov 06 2019 5:46am
cnrd wrote:
Nov 06 2019 4:27am
casainho wrote:
Nov 06 2019 4:14am
cnrd wrote:
Nov 06 2019 4:10am
I saw that a KT-LCD4 was released, looking exactly like the SW102, anyone know if it is actually the same?
Looks exactly from outside but the LCD is the same old technology -- we can´t simple show our many custom information there, just the regular basic. Think of it as KT-LCD3 on that small shape.
Would it work with the LCD3 FW? As I want a smaller display that won't break as easy when I fall on my MTB. :lol:
Yes, use the SW102!!
Do we still need to cut the SW102 or did you guys get the firmware update to work without pulling it apart? :-)

danielson   10 mW

10 mW
Posts: 30
Joined: Aug 21 2019 1:45am

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

Post by danielson » Nov 07 2019 5:00am

Not sure if this is the right place to ask but hopefully someone will point me in the right direction.

I've gone to fit a TSDZ2 to an early Cannondale Scalpel and the RHS chainstay is in line with the outside of the bottom bracket.
There is a ring on the rear of the case that protrudes about 1.5mm and it fouls on the chainstay and stops the motor moving all the way to the left, I was thinking of removing about a small portion of the ring but thought I should ask before I grind through the case into something vital. I have searched google and I think a stationery ring is housed in there - possible part of the speed or torque sensor.
The raised area between the white marks is what I would like to remove. I know I can add a washer and move to the right but would prefer to move the the left if possible.

Image
Last edited by danielson on Nov 07 2019 5:08am, edited 2 times in total.

casainho   10 GW

10 GW
Posts: 4101
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Nov 07 2019 5:03am

cnrd wrote:
Nov 07 2019 3:44am
Do we still need to cut the SW102 or did you guys get the firmware update to work without pulling it apart? :-)
Follow the wiki instructions.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

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   100 W

100 W
Posts: 100
Joined: Aug 13 2019 10:16am

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

Post by jeff.page.rides » Nov 07 2019 6:30pm

casainho wrote:
Nov 07 2019 12:22am
jeff.page.rides wrote:
Nov 07 2019 12:09am
If we can have something to allow us to adjust the torque sensor by spring that would be awesome along with whatever else helps improve the whole experience.
For your description, the issue is lack of sensitivity on your torque sensor, it is mainly an hardware issue. You should start learning and testing your torque sensor -- go to the wiki to see this to improve the hardware:
https://github.com/OpenSource-EBike-fir ... que-sensor

Then next step is to use the full calibration, that I am using on a V0.19 branch code, as experimental. This linearized the torque sensor output and I like a lot the result that I do no want to go back anymore.
I wrote instructions before on the thread how to use this branch and setup manually the full calibration.

Anyway, the plan is to bring the full calibration on the V0.21 for 850C and SW102 displays only.

It is very important that you learn and test more your torque sensor... Please measure both left and right ADC values with various weights and plot graphs to show us. On my torque sensor I can measure up to 110 kgs, my weight. I would like to know what are the max values you put with your arms.
Just to clarify, I've ridden 4 different handcycles all with the TSDZ2 coaster brake Motors. And everyone was identical, with the stock firmware they are useless for a handcycle in less you pull back on the cranks and hold it while you're turning it on. They are usable with version 20 beta 1 but it's a lot of work and too hard for me to keep the power assist helping.
I really wish I could run all those tests but, without hands that work it's totally impossible. I do totally appreciate all the work that everyone has done to get to this point and all the work that needs to be done to continue to make this the best power assist option for hand cyclists and everyone else out there.

danielson   10 mW

10 mW
Posts: 30
Joined: Aug 21 2019 1:45am

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

Post by danielson » Nov 07 2019 8:40pm

danielson wrote:
Nov 07 2019 5:00am
Not sure if this is the right place to ask but hopefully someone will point me in the right direction.

I've gone to fit a TSDZ2 to an early Cannondale Scalpel and the RHS chainstay is in line with the outside of the bottom bracket.
There is a ring on the rear of the case that protrudes about 1.5mm and it fouls on the chainstay and stops the motor moving all the way to the left, I was thinking of removing about a small portion of the ring but thought I should ask before I grind through the case into something vital. I have searched google and I think a stationery ring is housed in there - possible part of the speed or torque sensor.
The raised area between the white marks is what I would like to remove. I know I can add a washer and move to the right but would prefer to move the the left if possible.

I meant to take a photo before I put the motor in however the news is it can be done however I went very slowly and it took some time.

casainho   10 GW

10 GW
Posts: 4101
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Nov 07 2019 10:59pm

jeff.page.rides wrote:
Nov 07 2019 6:30pm
I really wish I could run all those tests but, without hands that work it's totally impossible. I do totally appreciate all the work that everyone has done to get to this point and all the work that needs to be done to continue to make this the best power assist option for hand cyclists and everyone else out there.
TSDZ2 differentiates from the other DIY mid drive motors because of the torque sensor, yet, I took more than 1 year to realize that it is not so good as I expected -- random very different from bicycle to bicycle; measures up to only about the first 40 kgs; has different sensitivity on left and right pedals.

But this can be improved on the firmware side, but also means users need first to take measures of his specific torque sensor.

I really hope you can find help from someone. Don´t you have kids that can help you put weights on the pedals so you can see the torque sensor ADC values?
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

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.

Pingu_3D   1 µW

1 µW
Posts: 2
Joined: Nov 05 2019 2:30am

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

Post by Pingu_3D » Nov 08 2019 4:48am

I had my first ride last night on my TSDZ2 and LCD3 with v0.20.1 beta, 36v motor with 48v battery, mounted on a Turner 5-spot mtb on some very hilly off-road terrain. Lot's of fun trying out different assist levels/gear ratios. Worked a treat and I'm very thankful for all the work you guys have put in to this project.

I couldn't get my speed sensor isn't working which isn't a problem for me as I use a Garmin gps and am more interested in seeing my HR bpm. I've tested the speed sensor are multiple distances from the magnet so I'm pretty sure it's faulty.

I'd be very happy to remove the speed sensor but does your firmware need this value to perform any of it's wonderful magic, apart from the obvious speed indications (which I get off my Garmin gps)? Will my experience be compromised if I don't bother contacting PSW Power for a replacement?
Last edited by Pingu_3D on Nov 10 2019 2:22am, edited 3 times in total.

mittkonto   10 mW

10 mW
Posts: 34
Joined: Mar 02 2019 2:31am

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

Post by mittkonto » Nov 08 2019 11:39am

I have installed a temp sensor.

However, the install was horrible, as the first screw to the motor controller loosened almost to easy, but second one. Jeez.. I was very careful for ten minutes, and then the screw was done for.

So I put the torque cable aside and pushed the cables through so I could solder on some longer cable for the sensor. Seems it works, the measurements jumps up and down a few c, but works otherwise.

Also put in silicone pillows, less then 10c out and temp was over 30c not more. Still I rode hard on a gravel road with hills were just skidders and forwarders go.

When I rode the bike, I thought the torque sensing was more then a bit off, it "worked", I needed to really push it for the torque would engage, but haphazardly, I looked at the adc value in menu 11-2 and it was about 200. (version 0.20beta)

Also, when waiting for the train, suddenly the brake indication was on, once. Turned off the system and back on again. Haven't happen since then.

Alrighty then.

Of to calibrate the torque sensor, shutdown the system in zero assist, disconnect battery, open motor(controller side) disconnected the torque sensor, poked it in a bit so it wouldn't snag on its way out the other side, removed the needed parts and finally the torquesensor. Looked for a spring for like 15min... :roll:

Started the system with brakes on as it says on the calibration page, but the display would not initialise. Just all characters.

Brakes off, shows the brakes engaged on the display, even if I disconnect the brakes physically.

The torque sensor seems dead. I jumps a bit 0-5 adc value. Off to buy a replacement, I suppose.
Man those cable are fragile, I treated the torque sensor as nitroglycerine and it loosened very easily. :confused:
By the wholesome Code Gods of Muchgivings!!? A tidy TSDZ2 spliced cable and a nice chunk of HIGO-Z812-B with a tad of temperature mods sprinkled on top, you say?

casainho   10 GW

10 GW
Posts: 4101
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Nov 08 2019 1:13pm

mittkonto wrote:
Nov 08 2019 11:39am
The torque sensor seems dead. I jumps a bit 0-5 adc value. Off to buy a replacement, I suppose.
Man those cable are fragile, I treated the torque sensor as nitroglycerine and it loosened very easily. :confused:
Yes, the hardware calibration of torque sensor is very delicate. I now know that the best we can get is calibration on the firmware, I wish I can find more time to implement it.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

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.

mittkonto   10 mW

10 mW
Posts: 34
Joined: Mar 02 2019 2:31am

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

Post by mittkonto » Nov 08 2019 1:41pm

casainho wrote:
Nov 08 2019 1:13pm
mittkonto wrote:
Nov 08 2019 11:39am
The torque sensor seems dead. I jumps a bit 0-5 adc value. Off to buy a replacement, I suppose.
Man those cable are fragile, I treated the torque sensor as nitroglycerine and it loosened very easily. :confused:
Yes, the hardware calibration of torque sensor is very delicate. I now know that the best we can get is calibration on the firmware, I wish I can find more time to implement it.
Update: Managed to actually "tare off" one of the leads! The Right One™!!! 8) :lol:

Resoldering, was a.. doozy.
I could somehow though, lots of solder, not winning any neat solder of the year awards anytime soon. Digging in the silicone, as by a dried up well in the desert.

However, the spectrum now is in the range 50isch to 250isch.
Similar as with the temp it oscillates by 60 +/- 5. The temp oscillates around +-2.

casainho: Do you believe this range will suffice for the later firmware to adapt to?
Edit: I suppose in the meantime I could alter some settings? Is this possible in the display, senitivity?

In any case, will fiddle with it for a bit more. I don't know, feeling a bit sceptical here, moving the sensor changes the displayed value, however when trying to get it change by flexing the shaft, not at all...
By the wholesome Code Gods of Muchgivings!!? A tidy TSDZ2 spliced cable and a nice chunk of HIGO-Z812-B with a tad of temperature mods sprinkled on top, you say?

casainho   10 GW

10 GW
Posts: 4101
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Nov 08 2019 2:23pm

mittkonto wrote:
Nov 08 2019 1:41pm
casainho wrote:
Nov 08 2019 1:13pm
mittkonto wrote:
Nov 08 2019 11:39am
The torque sensor seems dead. I jumps a bit 0-5 adc value. Off to buy a replacement, I suppose.
Man those cable are fragile, I treated the torque sensor as nitroglycerine and it loosened very easily. :confused:
Yes, the hardware calibration of torque sensor is very delicate. I now know that the best we can get is calibration on the firmware, I wish I can find more time to implement it.
Update: Managed to actually "tare off" one of the leads! The Right One™!!! 8) :lol:

Resoldering, was a.. doozy.
I could somehow though, lots of solder, not winning any neat solder of the year awards anytime soon. Digging in the silicone, as by a dried up well in the desert.

However, the spectrum now is in the range 50isch to 250isch.
Similar as with the temp it oscillates by 60 +/- 5. The temp oscillates around +-2.

casainho: Do you believe this range will suffice for the later firmware to adapt to?
Edit: I suppose in the meantime I could alter some settings? Is this possible in the display, senitivity?

In any case, will fiddle with it for a bit more. I don't know, feeling a bit sceptical here, moving the sensor changes the displayed value, however when trying to get it change by flexing the shaft, not at all...
So your torque sensor is failing. If I was you, I would enable the PAS mode only (it is a new feature of firmware v0.20.0) and ride with it, this way the torque sensor is ignored.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

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.

mittkonto   10 mW

10 mW
Posts: 34
Joined: Mar 02 2019 2:31am

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

Post by mittkonto » Nov 08 2019 2:53pm

casainho wrote:
Nov 08 2019 2:23pm
mittkonto wrote:
Nov 08 2019 1:41pm
casainho wrote:
Nov 08 2019 1:13pm
mittkonto wrote:
Nov 08 2019 11:39am
The torque sensor seems dead. I jumps a bit 0-5 adc value. Off to buy a replacement, I suppose.
Man those cable are fragile, I treated the torque sensor as nitroglycerine and it loosened very easily. :confused:
Yes, the hardware calibration of torque sensor is very delicate. I now know that the best we can get is calibration on the firmware, I wish I can find more time to implement it.
Update: Managed to actually "tare off" one of the leads! The Right One™!!! 8) :lol:

Resoldering, was a.. doozy.
I could somehow though, lots of solder, not winning any neat solder of the year awards anytime soon. Digging in the silicone, as by a dried up well in the desert.

However, the spectrum now is in the range 50isch to 250isch.
Similar as with the temp it oscillates by 60 +/- 5. The temp oscillates around +-2.

casainho: Do you believe this range will suffice for the later firmware to adapt to?
Edit: I suppose in the meantime I could alter some settings? Is this possible in the display, senitivity?

In any case, will fiddle with it for a bit more. I don't know, feeling a bit sceptical here, moving the sensor changes the displayed value, however when trying to get it change by flexing the shaft, not at all...
So your torque sensor is failing. If I was you, I would enable the PAS mode only (it is a new feature of firmware v0.20.0) and ride with it, this way the torque sensor is ignored.
So, using PAS mode it would be as if I put in a lot of wattage or how does that work?

But the emtb is so nice!!!
By the wholesome Code Gods of Muchgivings!!? A tidy TSDZ2 spliced cable and a nice chunk of HIGO-Z812-B with a tad of temperature mods sprinkled on top, you say?

casainho   10 GW

10 GW
Posts: 4101
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Nov 08 2019 3:32pm

mittkonto wrote:
Nov 08 2019 2:53pm
So, using PAS mode it would be as if I put in a lot of wattage or how does that work?

But the emtb is so nice!!!
I never used that mode, I don't know.
- TSDZ2 FAQ: issues and repairs, etc
- TSDZ2 OpenSource firmware

Developer of the Flexible OpenSource firmware for EBikes: TSDZ2 mid drive motor, KT motor controllers and displays: Bafang 850C color, SW102 Bluetooth and KT-LCD3.

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   100 W

100 W
Posts: 100
Joined: Aug 13 2019 10:16am

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

Post by jeff.page.rides » Nov 08 2019 3:38pm

casainho wrote:
Nov 07 2019 10:59pm
jeff.page.rides wrote:
Nov 07 2019 6:30pm
I really wish I could run all those tests but, without hands that work it's totally impossible. I do totally appreciate all the work that everyone has done to get to this point and all the work that needs to be done to continue to make this the best power assist option for hand cyclists and everyone else out there.
TSDZ2 differentiates from the other DIY mid drive motors because of the torque sensor, yet, I took more than 1 year to realize that it is not so good as I expected -- random very different from bicycle to bicycle; measures up to only about the first 40 kgs; has different sensitivity on left and right pedals.

But this can be improved on the firmware side, but also means users need first to take measures of his specific torque sensor.

I really hope you can find help from someone. Don´t you have kids that can help you put weights on the pedals so you can see the torque sensor ADC values?
I can definitely buy a fish scale and have my kids help me use that, but there's no way we could take the motor apart and modify the torque sensor.

Post Reply