Tongsheng TSDZ2 open source firmware issues

paulc1976

Pedelecer
May 22, 2014
50
6
48
I have recently purchased a Tongsheng TSDZ2 48v 750w kit from PSWpower to replace my previous TSDZ2 36v 250w motor (also purchased from PSWpower). I have a VLCD5 and wanted to use the open source firmware on the unit (the embrusa firmware for the VLCD5 screen).

I bought an ST link adaptor from Amazon and wired it up as the instructions on the wiki to a speed sensor extension cable (see image). Connecting it to the speed sensor cable running to the motor. I’ve tried the ST link software and the Java tool and I’m unable to get a connection on Windows 10 (with drivers installed) or Linux. It just refuses to connect. Any ideas why this will not work? I purchased another ST link USB dongle from another amazon seller and that won’t connect either.

I used these instructions


I've tried 2 motors and 2 STlink USB dongles and still no joy.

Any help would be much appreciated.
 

Attachments

Bikes4two

Esteemed Pedelecer
Feb 21, 2020
1,017
436
Havant
OSF only works with the original controllers (now refered to as V1) - maybe your have a version 2 controller - to check which one you have, see the details in the pic below.
51388 51389
 

Nealh

Esteemed Pedelecer
Aug 7, 2014
20,982
8,565
61
West Sx RH
To me the st link wiring looks much too long , it need to be as short as poss.
My st link wiring is o/a 10.5cm inc the speed connector , the actual wiring in between is 7.5cm long only.
 
Last edited:

guerney

Esteemed Pedelecer
Sep 7, 2021
11,531
3,277
To me the st link wiring looks much too long , it need to be as short as poss.
My st link wiring is o/a 10.5cm inc the speed connector , the actual wiring in between is 7.5cm long only.
Bafang programming cables also enable connection at 9600 baud, and they're 110cm long. Do only such short cables work on the TSDZ2 because they're of low quality?


I have recently purchased a Tongsheng TSDZ2 48v 750w kit from PSWpower to replace my previous TSDZ2 36v 250w motor (also purchased from PSWpower). I have a VLCD5 and wanted to use the open source firmware on the unit (the embrusa firmware for the VLCD5 screen).

I bought an ST link adaptor from Amazon and wired it up as the instructions on the wiki to a speed sensor extension cable (see image). Connecting it to the speed sensor cable running to the motor. I’ve tried the ST link software and the Java tool and I’m unable to get a connection on Windows 10 (with drivers installed) or Linux. It just refuses to connect. Any ideas why this will not work? I purchased another ST link USB dongle from another amazon seller and that won’t connect either.

I used these instructions


I've tried 2 motors and 2 STlink USB dongles and still no joy.

Any help would be much appreciated.

my previous TSDZ2 36v 250w motor
If you managed to install the OSF on your previous TSDZ2 36v 250w motor using the same PC, the following is irrelevant: Sometimes manufactuers - particularly of laptops - implement USB oddly. If JAVA is installed correctly, the paths are correct, compiles but doesn't connect, even after you've checked if your controller is flashable, and are using a shorter cable, perhaps try again using a different PC? Also, you could have problems if the computer you're using is very old - I had no joy trying to configure my BBS01B's firmware using a very old Sony VAIO P laptop, and a Core2Quad system's chipset was too old... but no problem when using a more modern 4th gen i7 desktop PC.
 

Nealh

Esteemed Pedelecer
Aug 7, 2014
20,982
8,565
61
West Sx RH
Not forgetting the issues I had with my W10 lap top not letting JAVA download to the registry, in the end using a W8 note book that was fit for recycling . A badly cracked screen and dead batteries, it takes a about 5 mins to warm up and load up.

Regarding the st link , I have no idea why the wire length is critical but it is.
A few have had connection issues if the wiring is much greater then 10cm.
 
  • Informative
Reactions: Woosh

afzal

Pedelecer
Mar 26, 2023
48
21
Kerala, India
Bafang programming cables also enable connection at 9600 baud, and they're 110cm long. Do only such short cables work on the TSDZ2 because they're of low quality?
It is not the problem of TSDZ2, but because of the interface used. Stlink uses SWD (serial wire debug), it is more susceptible to noise as compared to the UART interface used by Bafang.
 
  • Like
Reactions: guerney

guerney

Esteemed Pedelecer
Sep 7, 2021
11,531
3,277
Not forgetting the issues I had with my W10 lap top not letting JAVA download to the registry, in the end using a W8 note book that was fit for recycling . A badly cracked screen and dead batteries, it takes a about 5 mins to warm up and load up.
Backing up your data, formatting the drive and reinstalling Windows 10 could enable you to install a working JAVA on your newer AMD Windows 10 laptop - with a lot of software installs, the registry can get quite muddled. Microsoft claim they don't impede JAVA's installation and use, but that acrimony goes back a long way, even before the free OpenOffice:

 
Last edited:

paulc1976

Pedelecer
May 22, 2014
50
6
48
Hi all,

Many thanks for all of the advice. The cable would not work with my old 36v motor or the new 48v motor.

The entire cable is 13cm long from end to end. I have tried with windows 10 and 11 installed on a fairly modern laptop and a separate desktop PC. Also tried Linux and no joy with any of them.

I tested the voltage on the pin shown above for the 48v motor and it reads 5v so I assume it's version 1. I haven't tested the old motor as it is packed away now but it was bought in April 2020 from pswpower so I assume that one is version 1 too.

I don't want to give up yet but where should I go from here? I guess trying to shorten the cable so the entire cable is under 10cm?

As an aside, maybe I was expecting more but the performance difference on the 48 TSDZ2 wasn't that much better than the 36v version. I'm running it on a specialized crosstrail disc with the standard chainring on the front and 11-34T cassette on the back. I'm running a 48v Yosepower battery 13ah fully charged and it is maxing out at 20mph on flat ground in top gear. I've set the display VLC5 to max speed limit and it's set to 16a current on the display (was bought as a 750w 48v kit from pswpower).

Maybe I'm underwhelmed because I've got BBS02 500w and BBSHD (de-tuned to lower amps than stock) on other bikes and they feel considerably more powerful but the 48v TSDZ2 it doesn't seem that much more powerful than the older 36v version and the top end speed is about the same.
 

guerney

Esteemed Pedelecer
Sep 7, 2021
11,531
3,277
I'm assuming you've installed the software correctly. If not, we went through it all on this rather long thread, which could be of use:

 

guerney

Esteemed Pedelecer
Sep 7, 2021
11,531
3,277
Yes software all installed correctly. It just refuses to connect
Time to get the wire cutters and soldering iron out then! I was terrible at soldering before I got an ebike. Once I got the hang of it, for a short while I couldn't stop.
 

Nealh

Esteemed Pedelecer
Aug 7, 2014
20,982
8,565
61
West Sx RH
Reduce the cable length first to the ST link and see if it works.

My first and only cable /st link worked first time out, I read and listened to other users who simply made them a little too long . Those who made them 13 -15cm had connection issues and the advice is to keep them to approx 10cm max o/a length .

Of course it could be the st link it self if a clone one.
 
Last edited:

paulc1976

Pedelecer
May 22, 2014
50
6
48
I will try shortening the cable first. This is the second STlink dongle I've tried from Amazon (using different sellers) so it is more likely to be the length of the cable.
 

paulc1976

Pedelecer
May 22, 2014
50
6
48
I did try 3.3v instead of 5v and no difference. Been busy with work but will try the shortened cable this weekend.

Does the OSF make much difference to the torque or top end speed (compared to stock firmware 48v 16a)?
 

paulc1976

Pedelecer
May 22, 2014
50
6
48
Update, tried with a much shortened cable (see attached pics) at 3.3 and 5v. No change. Any other suggestions before I give up? I've tried 2 STlink clones from different vendors and no joy.

514855148651487
 

guerney

Esteemed Pedelecer
Sep 7, 2021
11,531
3,277
If that's the message in the black DOS box (after running the batch file as Administrator), on the command line, maybe try different clones bought from ebay, which could be different to those sold by sellers on Amazon? Have noticed sellers generally prefer one or the other - Amazon's storage fees are insanely high.
 

guerney

Esteemed Pedelecer
Sep 7, 2021
11,531
3,277
Before giving up... personally, I'd try the same using Windows 7, in case Microsoft has pushed through an update to Windows 10 which has borked JAVA for your uses - it's fully functional without activation, for a time. You can buy valid serials on ebay from scrapped PCs for about a tenner or less. Unfortunately, unlike Windows 10, Windows 7 cannot be installed to run on a thumb drive.
 
Last edited:

paulc1976

Pedelecer
May 22, 2014
50
6
48
I've tried both Linux and Windows 10 on 2 different PCs desktop and laptop. Java is working all ok. Assume it's a hardware issue or incompatibility with the motor.