New "TSDZ2 Torque Sensor Central Motor"

aja said:
I’ve made another short cable but this time using the speed sensor cable end; identical problem; this is a total waste of time ☹️. As lots of people have done this successfully there’s something I’m not doing right; what can it be?
I soldered connections onto the speed sensor cable so that it could be connected to the ST LINK V2. My cable is about 10-11cm long. I also made a 9cm then cut it down to 5cm home made cable before I bastardised the speed sensor cable. 4 wires including 5V for power are connected.

I have Windows VM running.
I open up the ST Visual programmer application.
I plug in the ST LINK V2 to the USB already plugged in to the TSDZ2. A blue light shines on the ST LINK V2.
I click on the USB bar in Windows and select the ST LINK V2
I select STM8S105x6 (I have also tried the x4 variant; makes no difference).
Port: USB; Programming mode SWIM.
I then try to read the controller by pressing Read all tabs: I then get the following error:
Cannot communicate with device!
Check Swim cable connection and check all the needed pin connections on the Swim connector.
If the application code uses Swim Disable and Reset pin as output or has disabled SEIM clock divider. Try now to Switch off and on the application power supply while NRST reset pin is forced low.
The light alternates from blue to red a couple of after the error pops up then goes red.
Where am I going wrong?

To anyone who is struggling with this issue of "Cannot communicate with device!" in the ST Visual Programmer while trying to "read all tabs (on active sectors if any)" I would like to share my experience of overcoming this issue.
While google and reading I've concluded that this problem arises from the long communication wires (i've seen people making as short as 5 cm wire between StLink and the motor speed sensor connections, some even were directly soldering wires to the motor controller). Well after my first attempt failed (I've been using a USB type StLinkv2 for programming (https://imgaz2.staticbg.com/thumb/large/oaupload/banggood/images/A6/A7/fa2d5c18-1122-43de-93a6-4358ac72bf5e.JPG)) I've went and bought a StLinkV2 programmer/debugger (a cheap knock-off from China that I've bought a local store for 7.5 EUR (https://lt.farnell.com/productimages/standard/en_GB/1892523-40.jpg)). After connecting it to TSDZ2 I was still receiving error "Cannot communicate with device!". After that I did some more googling and came across a solution that worked for me. I'm posting some links below to the wiring diagram that helped me to flash the firmware with no errors using the StLink programer/debugger (not he USB dongle, but he copy of STMicroelectronics one):
1) StLink side wiring (note I did not care for colors of the wires as long as they helped me separate the connections):
https://i.imgur.com/BH3Z2D1.jpg
2) TSDZ2 side wiring:
https://i.imgur.com/AdVpVD6.jpg
3) If someone is interested in how long was my wire connections, here are the image for that:
https://i.imgur.com/FSuzVlD.jpg

Hope this helps to anybody who is the same situation that I was :)
 
bergerandfries said:
Keithchris said:
First an apology if this question is in the wrong place - this is my first post on ANY site and I hope you will treat me gently... I have built 2 bikes with TONGSHENG mid motor kits from PS Power - built in September and used with no issues a few times - however now my wife’s bike is not “ starting “ - battery and controller seem OK as I have switched parts over to my bike and they perform OK - I have followed the starting procedure ie ‘ feet off “ pedals and allow time for system to initialise - but there is no assist initially - after further attempts at switching on/off and pedalling around for a while the system suddenly kicks in and is OK after that for the journey we make including any stops we make - the system is OK - however if I leave it for a couple of days we are back to square one . Am I missing something simple here ? ANY help welcome !! Thanks
Quick terminology check: there is a controller built into the motor housing, and display that connects via a cable to the motor. I think you mean that you switched displays with no change of behavior on hers/your bike?
Also, what happens when you leave the battery powered on for a while while hitting buttons on the display to keep it from going to sleep? That might be a useful diagnostic to see if it is related to time that battery power is applied to the motor (I'm thinking faulty/failing capacitor on the controller in the motor housing?)
Yep switched displays as you describe - I did actually leave the battery on overnight after the first episode and the bike functioned OK - This time the bike was left with the battery on but for 3 days and was not OK - Does that support your thinking here ?- I will try over the next few days keeping hitting buttons as you suggest - thank you
 
Keithchris said:
bergerandfries said:
Keithchris said:
First an apology if this question is in the wrong place - this is my first post on ANY site and I hope you will treat me gently... I have built 2 bikes with TONGSHENG mid motor kits from PS Power - built in September and used with no issues a few times - however now my wife’s bike is not “ starting “ - battery and controller seem OK as I have switched parts over to my bike and they perform OK - I have followed the starting procedure ie ‘ feet off “ pedals and allow time for system to initialise - but there is no assist initially - after further attempts at switching on/off and pedalling around for a while the system suddenly kicks in and is OK after that for the journey we make including any stops we make - the system is OK - however if I leave it for a couple of days we are back to square one . Am I missing something simple here ? ANY help welcome !! Thanks
Quick terminology check: there is a controller built into the motor housing, and display that connects via a cable to the motor. I think you mean that you switched displays with no change of behavior on hers/your bike?
Also, what happens when you leave the battery powered on for a while while hitting buttons on the display to keep it from going to sleep? That might be a useful diagnostic to see if it is related to time that battery power is applied to the motor (I'm thinking faulty/failing capacitor on the controller in the motor housing?)
Yep switched displays as you describe - I did actually leave the battery on overnight after the first episode and the bike functioned OK - This time the bike was left with the battery on but for 3 days and was not OK - Does that support your thinking here ?- I will try over the next few days keeping hitting buttons as you suggest - thank you
If the battery has an "off" switch, turn it off when done with the bike, or even take the battery inside (I do this for temperature reasons), and try that after a few days? It could be that continuous power to the motor is what it doesn't like? Strange issue to be sure...
 
Thanks bergerandfries - going through the on/off testing as you suggest , in the meantime I have contacted PS POWER and asked for a replacement controller - which they have agreed to if I pay the shipping cost , however, I bought the system as advertised as 36v and 500W - the controllers they appear to have now are 36v 250/350w or 42v 500/750w - I assume I have to maintain the 36v spec but will a 350w controller function in my 500W system?
Sorry to ask but reading the posts on the forum which describe so many performance improvements of standard parts I wondered if the 350w controller spec is wide enough to manage 500W ?
 
Keithchris said:
Thanks bergerandfries - going through the on/off testing as you suggest , in the meantime I have contacted PS POWER and asked for a replacement controller - which they have agreed to if I pay the shipping cost , however, I bought the system as advertised as 36v and 500W - the controllers they appear to have now are 36v 250/350w or 42v 500/750w - I assume I have to maintain the 36v spec but will a 350w controller function in my 500W system?
Sorry to ask but reading the posts on the forum which describe so many performance improvements of standard parts I wondered if the 350w controller spec is wide enough to manage 500W ?
As far as we know, the watt rating is meaningless. There are only two versions of the motor: 36V and 48V. Controller is the same for either voltage.
 
I am looking to do some maintenance on myTSDZ2, what is the best grease to use on the blue gear?


Sent from my iPad using Tapatalk Pro
 
andrewgateway said:
I am looking to do some maintenance on myTSDZ2, what is the best grease to use on the blue gear?


Sent from my iPad using Tapatalk Pro

I will let someone else answer what special grease the plastic gear requires. My comment will be about the lube requirements of the one way roller clutch inside it.
Light grease is better than heavy ( light oil is best but not practical).
Don't pack it full or the rollers can't move freely to lock and unlock, 50% is recommended.
No teflon,graphite, or other friction modifiers. They can cause it to slip.
 
Retrorockit said:
andrewgateway said:
I am looking to do some maintenance on myTSDZ2, what is the best grease to use on the blue gear?
Don't pack it full or the rollers can't move freely to lock and unlock, 50% is recommended.
Yes, I think from my experience that to much grease, or maybe incorrect one, may cause the issue of clutch slipping:

https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/FAQ#blue-gear-roller-clutch-slipping
 
Tomcys said:
To anyone who is struggling with this issue of "Cannot communicate with device!" in the ST Visual Programmer while trying to "read all tabs (on active sectors if any)" I would like to share my experience of overcoming this issue.
While google and reading I've concluded that this problem arises from the long communication wires (i've seen people making as short as 5 cm wire between StLink and the motor speed sensor connections, some even were directly soldering wires to the motor controller). Well after my first attempt failed (I've been using a USB type StLinkv2 for programming (https://imgaz2.staticbg.com/thumb/large/oaupload/banggood/images/A6/A7/fa2d5c18-1122-43de-93a6-4358ac72bf5e.JPG)) I've went and bought a StLinkV2 programmer/debugger (a cheap knock-off from China that I've bought a local store for 7.5 EUR (https://lt.farnell.com/productimages/standard/en_GB/1892523-40.jpg)). After connecting it to TSDZ2 I was still receiving error "Cannot communicate with device!". After that I did some more googling and came across a solution that worked for me. I'm posting some links below to the wiring diagram that helped me to flash the firmware with no errors using the StLink programer/debugger (not he USB dongle, but he copy of STMicroelectronics one):
1) StLink side wiring (note I did not care for colors of the wires as long as they helped me separate the connections):
https://i.imgur.com/BH3Z2D1.jpg
2) TSDZ2 side wiring:
https://i.imgur.com/AdVpVD6.jpg
3) If someone is interested in how long was my wire connections, here are the image for that:
https://i.imgur.com/FSuzVlD.jpg

Hope this helps to anybody who is the same situation that I was :)

i had the same problem with the same stlinkv2 programmer. i have tried it with 5v cable on the 4-pin connector and without connecting reset without any success.

i got it working by powering the motor completely up by connecting and turning on the display.

can you add your findings and the pictures to the wiki?
 
TSDZ2 virtual throttle

I implemented the virtual throttle feature, now we don't need a physical throttle installed. I think this feature may be useful for the ones that use sporadically the throttle and may prefer to not install it and have the handler bars less cluttered - or others like me that has the motor temperature sensor installed.

Check the video to see this feature working. You can also see:

NOTE: the noise is the bicycle tire rubbing on the training rollers.

1. (0:03) quick enter on the MAX POWER configuration
2. (0:07) after 1., quick enter on the VIRTUAL THROTTLE mode - throttle value not increasing because assist level is 0
3. (0:24) throttle now increases because assist level is higher than 0. Note that first user need to do long press on UP button for first value increase, this is a safety measure
4. (0:38) as throttle increases in steps of 5%, the motor current also increases
5. (1:17) the motor speed goes up to 655 ERPS when the PWM goes over up to 107 (the max value would be 111). The nominal motor speed 525 ERPS (4000 RPM) --> pedal cadence 90 RPM but here the motor is running with Field Weakening and so is achieving +25% motor speed. Note that PWM and motor speed fields transition the color to yellow and red and the values approach the limit
6. (1:47) on configurations screen, changing the virtual throttle increase/decrease step from 5 to 1
7. (2:00) increase throttle now with steps of 1%
8. (2:35) releasing the UP or DOWN buttons and the throttle value goes to 0, this is a safety measure

[youtube]vtmDy7YFLvQ[/youtube]

Changelog:
- added virtual throttle: user can use UP and DOWN buttons to increase throttle value (from 0 to 100%). User must keep pressed UP or DOWN buttons, otherwise, after one second the throttle value goes to 0 (this works as a security measure)
- added configuration for virtual throttle increase/decrease steps in %

Download here the new version v1.0.0-alpha.4: https://github.com/OpenSource-EBike-firmware/Color_LCD/releases/tag/860C_850C_SW102_v1.0.0-alpha.4
 
I can't add to how it gets there but the end result of the OSF effect on the performance of a TSDZ2 is pretty amazing. The higher cadence support and more finite assist levels provide a much more natural pedal feel than the stock programming.

Groadster dt side.jpg
 
Bigwheel said:
I can't add to how it gets there but the end result of the OSF effect on the performance of a TSDZ2 is pretty amazing. The higher cadence support and more finite assist levels provide a much more natural pedal feel than the stock programming.
Thanks for the feedback and for sharing a picture of your ebike.
 
bergerandfries said:
Keithchris said:
bergerandfries said:
Keithchris said:
First an apology if this question is in the wrong place - this is my first post on ANY site and I hope you will treat me gently... I have built 2 bikes with TONGSHENG mid motor kits from PS Power - built in September and used with no issues a few times - however now my wife’s bike is not “ starting “ - battery and controller seem OK as I have switched parts over to my bike and they perform OK - I have followed the starting procedure ie ‘ feet off “ pedals and allow time for system to initialise - but there is no assist initially - after further attempts at switching on/off and pedalling around for a while the system suddenly kicks in and is OK after that for the journey we make including any stops we make - the system is OK - however if I leave it for a couple of days we are back to square one . Am I missing something simple here ? ANY help welcome !! Thanks
Quick terminology check: there is a controller built into the motor housing, and display that connects via a cable to the motor. I think you mean that you switched displays with no change of behavior on hers/your bike?
Also, what happens when you leave the battery powered on for a while while hitting buttons on the display to keep it from going to sleep? That might be a useful diagnostic to see if it is related to time that battery power is applied to the motor (I'm thinking faulty/failing capacitor on the controller in the motor housing?)
Yep switched displays as you describe - I did actually leave the battery on overnight after the first episode and the bike functioned OK - This time the bike was left with the battery on but for 3 days and was not OK - Does that support your thinking here ?- I will try over the next few days keeping hitting buttons as you suggest - thank you
If the battery has an "off" switch, turn it off when done with the bike, or even take the battery inside (I do this for temperature reasons), and try that after a few days? It could be that continuous power to the motor is what it doesn't like? Strange issue to be sure...
So - test so far
Display switch on / off - motor functions OK
Battery switch on / off - motor functions OK
Battery remove from holder then refit - motor functions OK
Battery remove / recharge / refit - motor functions NOK - same failure as described in start of this post .
Does replacing the controller in the motor sound like a solution - PSpower have agreed a replacement but I have to take out the existing controller and send a photograph to them - of course I would like to avoid doing that if someone believes the problem lies elsewhere.
Thanks to all for the help so far
 
Keithchris said:
So - test so far
Display switch on / off - motor functions OK
Battery switch on / off - motor functions OK
Battery remove from holder then refit - motor functions OK
Battery remove / recharge / refit - motor functions NOK - same failure as described in start of this post .
Does replacing the controller in the motor sound like a solution - PSpower have agreed a replacement but I have to take out the existing controller and send a photograph to them - of course I would like to avoid doing that if someone believes the problem lies elsewhere.
Thanks to all for the help so far

Does the failure occur only when battery is fully charged? Are you using the stock firmware or the open source and which display? Apparently you have 36V motor and battery, could you check the voltage of the charged battery with a multimeter ?
 
ilu said:
Keithchris said:
So - test so far
Display switch on / off - motor functions OK
Battery switch on / off - motor functions OK
Battery remove from holder then refit - motor functions OK
Battery remove / recharge / refit - motor functions NOK - same failure as described in start of this post .
Does replacing the controller in the motor sound like a solution - PSpower have agreed a replacement but I have to take out the existing controller and send a photograph to them - of course I would like to avoid doing that if someone believes the problem lies elsewhere.
Thanks to all for the help so far

Does the failure occur only when battery is fully charged? Are you using the stock firmware or the open source and which display? Apparently you have 36V motor and battery, could you check the voltage of the charged battery with a multimeter ?

Great ideas! Confirm what the battery voltage is before you pull anything out of the motor. I would even charge the battery to different levels (max, 90% charge, 80% charge) and see what point it stops being a problem. Also note, that the stock firmware will create a strange lack of power when it thinks the battery is too fully charged. That sounds like what's happening to me. You can test this with a throttle or in the walk-mode as it won't even make the bike move but will make strange noises and maybe even jerk weakly.
 
Hi All,
Thank you to the forum members who share their ideas, discoveries and experiences with this conversion. It is a great resource and without it I would not have bought a TSDZ2. The idea of getting to experiment with hacking together cables and flashing firmware so I can benefit from Cashaino's work was a great motivation too. I wonder how many motors have been bought on the strength of this crowd sourcable support. It must be thousands. Does anyone have a contact at the manufacturer that I can email to tell them that they owe my business to you all?
I wanted to share my effort as it might give others some help with ideas I I have been helped by theirs.
I had an ebike without a motor or battery and I wanted to repower it with a unit that would match the previous one in as many respects as possible and give a good heavy duty frame a new life without spending thousands. I had to make a few custom parts, modify the motor and battery casings and modify the bike's motor cradle.

49840435813_33af95a857_k.jpg

49840449298_a033b58483_k.jpg

49840447613_d4251da276_k.jpg

49840445728_0c2057a2d5_k.jpg

PVC pipe of wall thickness 2.5mm in this particular installation was perfect to create a tight fit and prevent motor movement.
49841282262_6399939705_k.jpg

Cartridge had to be able to slide in and out of frame with motor fitted.
49841280527_f98a052a5e_k.jpg

More structural fixing method, weight is lower down, can't be removed in a hurry.
49840439008_ba691458ec_k.jpg

Foam handlebar grips stuck down with silicon.
49841279097_078a461fa1_k.jpg

One of MANY trial fits.

I had it out for a couple of glorious hours before it developed play in the cranks, it is back on the stand with the motor in pieces.
If they had only paid a tiny bit more attention to tolerances on the axle outer diameters and torque sensor drive side inner diameter this motor unit would be performing pretty much perfectly so far.
While it's apart I have ordered some bearings including some SKF needle rollers which are wider than stock. I hope to modify the outer race to get the rollers supporting the torque sensor assembly near the very end of the journal.
Also I intend to shim out as much play as possible with very thin steel. For anyone else keen to attempt the same I would suggest buying a cheap set of feeler gauges and seeing if you can fit any of them between the axle shaft and the bearing inner race on the non drive side. Possibly also on the drive side although the axle must be free to twist a couple of degrees or so inside the torque sensor. Steel is not an ideal material to avoid galling here but options are limited. I might have to report back on how I go with that.
 
An interesting project and one I to have been looking at. There's some really nice carbon frames out there which have been manufactured to take the Bafang M600 and M500 motors, now with an adaptor such as you have made, they suddenly come into play. There's also a huge number of the Specialized bikes around with low secondhand values as their motor warranties are expired, perhaps wait until the Brose motor dies and know you can retro fit a TSDZ2.

Mmmmm a business opportunity for some one with a CNC cutter.
 
Not getting and speed or distance readings on my new bike build. I am assuming it has to do with the speed sensor which I have checked the plug connection and the distance to the wheel magnet and both are good? I have the wheel size set correctly.

Edit: I guess the gap to the sensor was too much after all. It needs to be pretty close to operate, at least closer than my other two motors have been.
 
bergerandfries said:
ilu said:
Keithchris said:
So - test so far
Display switch on / off - motor functions OK
Battery switch on / off - motor functions OK
Battery remove from holder then refit - motor functions OK
Battery remove / recharge / refit - motor functions NOK - same failure as described in start of this post .
Does replacing the controller in the motor sound like a solution - PSpower have agreed a replacement but I have to take out the existing controller and send a photograph to them - of course I would like to avoid doing that if someone believes the problem lies elsewhere.
Thanks to all for the help so far

Does the failure occur only when battery is fully charged? Are you using the stock firmware or the open source and which display? Apparently you have 36V motor and battery, could you check the voltage of the charged battery with a multimeter ?

Great ideas! Confirm what the battery voltage is before you pull anything out of the motor. I would even charge the battery to different levels (max, 90% charge, 80% charge) and see what point it stops being a problem. Also note, that the stock firmware will create a strange lack of power when it thinks the battery is too fully charged. That sounds like what's happening to me. You can test this with a throttle or in the walk-mode as it won't even make the bike move but will make strange noises and maybe even jerk weakly.

So it seems the battery voltage is creating the problem - I have measured the fully charged battery at 54v - I have the same battery from another bike ( same build ) measured at 47v - using the battery with lower voltage both bikes function OK - with the higher voltage battery one bike ( the original problem bike ) will not ‘start’ the other bike kind of hesitated but eventually did ‘start’ exchanging the batteries a few times bike to bike the problem could be switched on and off.
Is there any recommended action I can take now - apart from managing the charging level of the battery ?
The firmware level shown on the display is 4.1 .
Thank you
 
Keithchris said:
So it seems the battery voltage is creating the problem - I have measured the fully charged battery at 54v - I have the same battery from another bike ( same build ) measured at 47v - using the battery with lower voltage both bikes function OK - with the higher voltage battery one bike ( the original problem bike ) will not ‘start’ the other bike kind of hesitated but eventually did ‘start’ exchanging the batteries a few times bike to bike the problem could be switched on and off.
Is there any recommended action I can take now - apart from managing the charging level of the battery ?
The firmware level shown on the display is 4.1 .
Thank you
No problems. You can either:
A) Change over to the Open Source Code firmware for the motor (If you want to keep your standard display, I prefer the qmarco version of the code fork)
B) Change over to the higher voltage standard firmware (found at https://www.eco-ebike.com/blogs/eco-cycles-instructionals/tsdz2-motor-firmware-programming under the "STOCK FIRMWARE ARCHIVE" at the bottom of the page)
C) Change over to the Open Source Code firmware and update your display to match.
D) Return the motor that has the wrong firmware

I think that covers the options?
 
I want to go for a long ride with my little son tomorrow, so unnecessary stops are not advisable :)
So far I've been using the stable version 0.19.0 + Bafang 850C but I'm having problems with the engine overheating and I need to have a temperature preview showing the current exact value - that is from version 0.7.0 upwards.

When I turn on my bike and start it, when I stop pedalling the engine stops giving power. Sometimes it continues to work after a break in pedalling, but usually I have to restart the driver to start. Yesterday when I was riding I just kept pedalling and when I had to stop I restarted the bike... I did a torque sensor calibration process, but when I turn off the calibration it happens the same.

I add photos of my settings with 52V 17.5Ah Sanyo GA 840Wh 14S5P battery and 27.5 inch wheels, or which firmware version is stable?

Zrzut ekranu 2020-05-1 o 21.08.17.jpg
 
arka said:
I want to go for a long ride with my little son tomorrow, so unnecessary stops are not advisable :)

I add photos of my settings with 52V 17.5Ah Sanyo GA 840Wh 14S5P battery and 27.5 inch wheels, or which firmware version is stable?
Well, the latest version 1.0.0-alpha.4 is the most stable judging the users feedback. See as example the feedback from Martin555:

Martin555 said:
First of all, I want to say thank you to Casainho and all contributors!! Your firmware doubled the value of my TSDZ2!
After the fix I were now able to install 1.0.0 on my SW102 and I have to admit, it put my motor on a new level. I found no issues yet at all. I use the motor with a 24v battery, which I removed from an electric skateboard, hence until now the motor only supported up to a cadence of 50. But the update destroyed this large disadvantage. So if you need feedback or testing of particular features with this voltage, I'd be pleased to help.

The latest versions solved issues of sometimes motor incorrect initialization, seems the ones you are having - now is just perfect.

Enjoy your ride in family!! Many of us like me are most time at home because the usual activities like MTB events are now cancelled due to Covid-19. I found I really need to be with others, I quick get bored riding alone.
 
casainho said:
arka said:
I want to go for a long ride with my little son tomorrow, so unnecessary stops are not advisable :)

I add photos of my settings with 52V 17.5Ah Sanyo GA 840Wh 14S5P battery and 27.5 inch wheels, or which firmware version is stable?
Well, the latest version 1.0.0-alpha.4 is the most stable judging the users feedback. See as example the feedback from Martin555:

Martin555 said:
First of all, I want to say thank you to Casainho and all contributors!! Your firmware doubled the value of my TSDZ2!
After the fix I were now able to install 1.0.0 on my SW102 and I have to admit, it put my motor on a new level. I found no issues yet at all. I use the motor with a 24v battery, which I removed from an electric skateboard, hence until now the motor only supported up to a cadence of 50. But the update destroyed this large disadvantage. So if you need feedback or testing of particular features with this voltage, I'd be pleased to help.

The latest versions solved issues of sometimes motor incorrect initialization, seems the ones you are having - now is just perfect.

Enjoy your ride in family!! Many of us like me are most time at home because the usual activities like MTB events are now cancelled due to Covid-19. I found I really need to be with others, I quick get bored riding alone.

Dear casainho
I was just on a test drive and I think I know what's going on. The problem comes when I hold up and turn on the lights. Then it stops reacting. When I turn it off, it goes back to normal.
IMG_0493.jpeg
Connect the lights directly to the battery and there should be no problem. At the same time, I'm glad that I managed to help with software development and found an bug :) Tomorrow is preparing a great day with your son, thanks for your work :)
 
Back
Top