New "TSDZ2 Torque Sensor Central Motor"

Discussions related to motors other than hub motors.
This includes R/C motors, botttom bracket, roller and geared drives.
User avatar
jbalat   10 kW

10 kW
Posts: 522
Joined: Nov 10 2012 11:50pm
Location: Melbourne, Australia

Re: New "TSDZ2 Torque Sensor Central Motor"

Post by jbalat » Sep 28 2018 5:31pm

Bartman wrote:
Sep 28 2018 11:41am
Does the VLC5 (standard tsdz2 LCD screen) work with a TSDZ2 motor that has been flashed with the opensource software ? Reason I ask is that I've flashed my motor and the new LCD , but have not fitted lcd3 yet. I e also had to redo my batter as the case smashed. When I did a test run, the vlcd5 comes on but does not register speed or provide any assistance.
Unfortunately no.
Please subscribe to my Youtube home page for Quadcopters, FPV and Bike Rides http://www.youtube.com/jbalatutube
My build log here http://endless-sphere.com/forums/viewto ... =6&t=55352
For some cool ebike talk join us on The Best ebike https://www.facebook.com/groups/193581737807033/
Tech talk TSDZ2 Opensource firmware viewtopic.php?f=30&t=93818&start=150

Rydon   10 W

10 W
Posts: 86
Joined: Aug 11 2016 5:26pm

Re: New "TSDZ2 Torque Sensor Central Motor"

Post by Rydon » Sep 28 2018 8:08pm

Hurricane1973 wrote:
Sep 28 2018 5:21pm
Hi everyone,
https://www.aliexpress.com/item/Bafang- ... 3c00wU5ZL3

I thought this cable might come in useful for connecting the lcd3 to the tsdz2. Good price too. Can anyone chime in on if it will work?
Some LCD3 displays like those for Sondor's bikes use that green 5 pin Higo connector so you can use that cable to extend the cable but unfortunately, the standard TSDZ2 does not use that connector so you still need to splice it in.

tomtom50   10 W

10 W
Posts: 98
Joined: Jun 18 2018 10:09am

Making a Cable for KT-LCD3

Post by tomtom50 » Sep 28 2018 10:24pm

KT-LCD3 is on the way, cables are here.

Following advice on the thread I ordered a HIGO B8 from e-bike-technologies.de

https://www.e-bike-technologies.de/inde ... -b8-detail

and a Bafang BBS 1T4 bus cable

https://www.amazon.com/gp/product/B07B7 ... UTF8&psc=1

Eyebyesickle proposed this pair, what I like about it is that it includes connectors for Bafang throttle and brake sensors and apparently those devices work. It has the a green 5-pin connector that I think will directly connect to the KT-LCD3.

It is the 8-pin connector on the Bafang cable that has to be changed. The Bafang cable 8-pin connector is male, same as the TSDZ2 motor cable. Cut off the male 8-pin connector, replace it with the female Higo B8, and I should be ready to go. Because I am not messing with the existing TSDZ2 cables I can go backwards if I want to.
B8-1.jpg
B8-1.jpg (57.5 KiB) Viewed 883 times
BBS 1T4 cable pic.jpg
BBS 1T4 cable pic.jpg (31.37 KiB) Viewed 883 times
I did not see a pin map of the Higo B8, so I made one
Higo B8 Cable Map.jpg
Can you guys point me to a post or something that shows the wire connection I need to make? I am hoping the Bafang cable is common enough so it is already mapped.

I will, after I make it, post an instructional about making a cable this way that to help others.

Thanks.

mctubster   100 mW

100 mW
Posts: 39
Joined: Feb 26 2018 6:21am

Re: Making a Cable for KT-LCD3

Post by mctubster » Sep 29 2018 5:02am

tomtom50 wrote:
Sep 28 2018 10:24pm
KT-LCD3 is on the way, cables are here.

Following advice on the thread I ordered a HIGO B8 from e-bike-technologies.de

https://www.e-bike-technologies.de/inde ... -b8-detail

and a Bafang BBS 1T4 bus cable

https://www.amazon.com/gp/product/B07B7 ... UTF8&psc=1
Thank you for your post. Exactly the way I was thinking of going to maintain backward compatibility / stock connectors.

Where did you end up getting the cables you need to flash the display and motor?

Regards

User avatar
gaber   1 W

1 W
Posts: 59
Joined: Sep 22 2017 8:56am
Location: Grand Rapids, MI

Re: Making a Cable for KT-LCD3

Post by gaber » Sep 29 2018 6:32am

mctubster wrote:
Sep 29 2018 5:02am
tomtom50 wrote:
Sep 28 2018 10:24pm
KT-LCD3 is on the way, cables are here.

Following advice on the thread I ordered a HIGO B8 from e-bike-technologies.de

https://www.e-bike-technologies.de/inde ... -b8-detail

and a Bafang BBS 1T4 bus cable

https://www.amazon.com/gp/product/B07B7 ... UTF8&psc=1
Thank you for your post. Exactly the way I was thinking of going to maintain backward compatibility / stock connectors.
I’m still grasping the cable side of this 100% and am excited to see this play out. I have everything (minus the above cables) on its way. Will be interested to see if there is a very clean way to do the install.
mctubster wrote:
Sep 29 2018 5:02am
Where did you end up getting the cables you need to flash the display and motor?
Take what I have to say with a grain of salt due to the above, but it seems like the speed sensor extension cable is the most straight forward option. I just had mine arrive yesterday from eco bikes. It wasn’t my favorite thing to buy ($$ for a cable) but if it saves me hours of time over a less straight forward approach it’ll be worth it.
sometimes you eat the bear, and sometimes, well, he eats you.

tomtom50   10 W

10 W
Posts: 98
Joined: Jun 18 2018 10:09am

Re: Making a Cable for KT-LCD3

Post by tomtom50 » Sep 29 2018 11:17am

mctubster wrote:
Sep 29 2018 5:02am

Where did you end up getting the cables you need to flash the display and motor?

Regards
I followed eyebyesickle instructional
https://www.eco-ebike.com/blogs/eco-cycles instructionals/tsdz2programmingfromscratch

"To make a TSDZ2 programming cable, you need a speed sensor extension cable - not just a spare speed sensor, because not all the wires coming from the motor/controller speed sensor 6 pin connector are carried through to the sensor itself."

https://www.eco-ebike.com/collections/t ... eed-sensor

Not a cheap cable but it worked.

I bought a 52V unit that had 48V settings, seems quite a few left the factory that way. In the end had to re flash with 52V files to get it right. No problems since.

tomtom50   10 W

10 W
Posts: 98
Joined: Jun 18 2018 10:09am

Re: Making a Cable for KT-LCD3

Post by tomtom50 » Sep 29 2018 11:23am

gaber wrote:
Sep 29 2018 6:32am
Take what I have to say with a grain of salt due to the above, but it seems like the speed sensor extension cable is the most straight forward option. I just had mine arrive yesterday from eco bikes. It wasn’t my favorite thing to buy ($$ for a cable) but if it saves me hours of time over a less straight forward approach it’ll be worth it.
I'm with you there. I also used the expensive cable, see above. It worked.

tomtom50   10 W

10 W
Posts: 98
Joined: Jun 18 2018 10:09am

TSDZ2 8-pin controller cable

Post by tomtom50 » Sep 29 2018 6:45pm

Here is a a HIGO B8 from e-bike-technologies.de
https://www.e-bike-technologies.de/inde ... -b8-detail
B8-1.jpg
B8-1.jpg (57.5 KiB) Viewed 771 times
1m long, female connector that fits into TSDZ2 8-pin connector

Using Casainho's chart and matching to the connector colors in the 1m Higo cable
https://github.com/OpenSource-EBike-fir ... 3-to-TSDZ2

I get this:
Higo B8 Cable Map 2.jpg
Can anyone confirm? I don't know if the colors in Casainho's chart (maybe he looked at wires at the controller inside the motor) match across the connector. I don't want to open up the motor to check.

billm   1 mW

1 mW
Posts: 12
Joined: Jul 01 2018 5:23pm

TSDZ2 Programming error

Post by billm » Sep 30 2018 2:46pm

Trying to follow instructions here to enable 52v support on my TSDZ2.

https://www.eco-ebike.com/blogs/eco-cyc ... 2#comments

Error : < PROGRAM MEMORY reading failed.
> Reading PROGRAM MEMORY area...
Error : Cannot communicate with the tool.
Wrong tool selection or check tool power supply or check that a previous session is closed.

After spending something like 10 hours (that I could have spent riding) getting a windows VM installed on my mac, and getting all the drivers to work inside the vm I get the error above when trying to communicate with the tsdz2. Stuck. Again. Any help is appreciated.

What is "the tool" specified in the message above? The eco-ebike link says to do this with the bike off? Is that correct? I believe my cable is correct, though the instructions there are unclear as well, and my st-link v2 doesn't look at all like the one on the webpage. I've unplugged the splitter to the speed sensor and plug the female end of the extension cable (which goes to my usb device) directly into the wire coming from the tsdz2.

billm   1 mW

1 mW
Posts: 12
Joined: Jul 01 2018 5:23pm

Re: New "TSDZ2 Torque Sensor Central Motor"

Post by billm » Sep 30 2018 3:08pm

OK well, the error above seems to have been due to usb driver issues on effing-windows. Past that, now I'm getting this:

> Reading PROGRAM MEMORY area...
Error : Cannot communicate with the device !
Check the 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 SWIM Clock Divider:
Try Now to SWITCH OFF and ON the application Power Supply while NRST Reset pin is forced low.

Error : < PROGRAM MEMORY reading failed.

This is the st-link I'm using:

https://www.amazon.com/DAOKI-ST-Link-Pr ... link&psc=1

Double checked the pinout, it seems correct. Except... VCC... split and connect at 2 points? What 2 points?
Last edited by billm on Sep 30 2018 4:11pm, edited 1 time in total.

billm   1 mW

1 mW
Posts: 12
Joined: Jul 01 2018 5:23pm

Re: Making a Cable for KT-LCD3

Post by billm » Sep 30 2018 3:45pm

Where did you get the "files" to reflash to 52v?

I've spent hours and hours and hours trying to get to this point. Right now I still can't talk to the device, but I'm guessing finding the correct files is going to be my next problem if I ever get past this one.
tomtom50 wrote:
Sep 29 2018 11:17am
I bought a 52V unit that had 48V settings, seems quite a few left the factory that way. In the end had to re flash with 52V files to get it right. No problems since.

User avatar
jbalat   10 kW

10 kW
Posts: 522
Joined: Nov 10 2012 11:50pm
Location: Melbourne, Australia

Re: New "TSDZ2 Torque Sensor Central Motor"

Post by jbalat » Sep 30 2018 5:13pm

See if you can find an old windows laptop, maybe borrow one from a friend. Are you using the stlink visual programmer STVP and selecting the x4 protocol. Have you watched any of my videos see at 3min 37 seconds regarding configuring.
https://youtu.be/zChf_2K8rW8
Use the pinout and guide here
https://github.com/hurzhurz/tsdz2/blob/ ... ramming.md
Please subscribe to my Youtube home page for Quadcopters, FPV and Bike Rides http://www.youtube.com/jbalatutube
My build log here http://endless-sphere.com/forums/viewto ... =6&t=55352
For some cool ebike talk join us on The Best ebike https://www.facebook.com/groups/193581737807033/
Tech talk TSDZ2 Opensource firmware viewtopic.php?f=30&t=93818&start=150

billm   1 mW

1 mW
Posts: 12
Joined: Jul 01 2018 5:23pm

Re: New "TSDZ2 Torque Sensor Central Motor"

Post by billm » Sep 30 2018 9:31pm

Thanks for the reply. Your video is super helpful. I'm using the same st-link, and my pin out looks identical as well. My cable is maybe 2.5 ft long, maybe that's too long?

It sure looks like the VM is seeing the stlink, and I have the software configured properly, but it just errors out instantly when I press the read button. But perhaps there's some issue with these f*cking piece of sh*t USB-C ports on this lemon of a 2018 mac? I've had nothing but trouble with them.

Sigh... I guess I'll have to figure out how to borrow a god damn windows pc. At this point it would have been cheaper, if going by my time alone, to just chuck this tzdz2 in the trash and by one that actually supports 52v.

User avatar
jbalat   10 kW

10 kW
Posts: 522
Joined: Nov 10 2012 11:50pm
Location: Melbourne, Australia

Re: New "TSDZ2 Torque Sensor Central Motor"

Post by jbalat » Sep 30 2018 10:18pm

Yeh that's too long my cable is only a couple of inches. Others have reported that long cables don't work.

I know what you mean. Mine is down at the moment with no assist. Hit a brick wall.
Please subscribe to my Youtube home page for Quadcopters, FPV and Bike Rides http://www.youtube.com/jbalatutube
My build log here http://endless-sphere.com/forums/viewto ... =6&t=55352
For some cool ebike talk join us on The Best ebike https://www.facebook.com/groups/193581737807033/
Tech talk TSDZ2 Opensource firmware viewtopic.php?f=30&t=93818&start=150

User avatar
eyebyesickle   10 kW

10 kW
Posts: 593
Joined: Apr 07 2015 9:28pm
Location: Nashville

Re: New "TSDZ2 Torque Sensor Central Motor"

Post by eyebyesickle » Sep 30 2018 10:21pm

Yeah, if I just plug in my programming cable it works, but if I plug in an extension to reach my bike from the laptop easily, then it doesn't work. Remove the extension cable, works again, so a long cable degrades the signal too much it would seem...
www.eco-ebike.com - USA Stock + Support
www.recycles-ebike.com - Manufacturer/Direct w/ USA Support

billm   1 mW

1 mW
Posts: 12
Joined: Jul 01 2018 5:23pm

Re: New "TSDZ2 Torque Sensor Central Motor"

Post by billm » Sep 30 2018 10:29pm

Woo!

Just saw these 2 replies, but before I quit for the evening I thought I'd remake the cable at about 6". That did it! Now I just feel embarrassed about getting frustrated. ;)

So following the instructions here:
https://www.eco-ebike.com/blogs/eco-cyc ... romscratch

I've rewritten line 00004000 to:

50 82 17 00 00 00 00 0C 00 00 00 00 00 00 00 00 00

That's it? My tsdz2 now supports both 48v and 52v batt? That's all I was looking to do.

User avatar
eyebyesickle   10 kW

10 kW
Posts: 593
Joined: Apr 07 2015 9:28pm
Location: Nashville

Re: New "TSDZ2 Torque Sensor Central Motor"

Post by eyebyesickle » Oct 01 2018 12:01am

You might need to flash fresh 52v profiles - I sent you the link. I dont know its worked for some people fine to manually edit, even someone the other day, but most people seem to have to flash a whole new file. You will know when you try it on a fully charged 52v. Keep in mind, the LVC for the 52v programming is around 45... so you will get cutoff on a 48v battery a tad early...
www.eco-ebike.com - USA Stock + Support
www.recycles-ebike.com - Manufacturer/Direct w/ USA Support

billm   1 mW

1 mW
Posts: 12
Joined: Jul 01 2018 5:23pm

Re: New "TSDZ2 Torque Sensor Central Motor"

Post by billm » Oct 01 2018 12:25am

Yep, I went ahead and flashed with the 52v profiles just to be sure. I can't thank you enough for offering up your knowledge. It's funny how quick and simple this all was once I had the correct pieces in place.

troebi   1 mW

1 mW
Posts: 16
Joined: Jul 27 2017 3:50pm
Location: South Germany

Re: New "TSDZ2 Torque Sensor Central Motor"

Post by troebi » Oct 01 2018 1:08am

Hi,

in the German forum the guys had also a problem with a too long cable between STM USB dongle and controller:
https://www.pedelecforum.de/forum/index ... 939/page-3

Regards

Bash1303   1 mW

1 mW
Posts: 11
Joined: Oct 01 2018 1:45am

Re: New "TSDZ2 Torque Sensor Central Motor"

Post by Bash1303 » Oct 01 2018 2:23am

Hello All,
Thank for a great effort from the Developer.
I am new to this forum and the open source firmware. I have the TSDZ2 36V. Downloaded and configered the firmware v13 on the KT LCD3 and motor several Times. I am not getting any response from the motor although i had one of the assist levels configered to around 6200w the max i could enter in the firmware. When the power boost is on i get boost respons but it dont feel as torque sensor motor.

I also tried the firmware v06 that jbalat demonstrated. This one i got it on and going on different assist levels.

I wounder IF you have any tips on how to get the V13 on and going?

EndlessCadence   100 W

100 W
Posts: 217
Joined: Aug 22 2018 4:31am

Re: New "TSDZ2 Torque Sensor Central Motor"

Post by EndlessCadence » Oct 01 2018 3:51am

Bash1303 wrote:
Oct 01 2018 2:23am
Hello All,
Thank for a great effort from the Developer.
I am new to this forum and the open source firmware. I have the TSDZ2 36V. Downloaded and configered the firmware v13 on the KT LCD3 and motor several Times. I am not getting any response from the motor although i had one of the assist levels configered to around 6200w the max i could enter in the firmware. When the power boost is on i get boost respons but it dont feel as torque sensor motor.

I also tried the firmware v06 that jbalat demonstrated. This one i got it on and going on different assist levels.

I wounder IF you have any tips on how to get the V13 on and going?
Please use the dedicated topic for questions about the custom firmware here: viewtopic.php?p=1415304#p1415304

Summary: There are some issues with V0.13. I would advise anyone to stick with version 0.12 (which works great! :D ) until we have fixed the issues.

EndlessScream   100 µW

100 µW
Posts: 7
Joined: Aug 28 2018 12:59am

Re: New "TSDZ2 Torque Sensor Central Motor"

Post by EndlessScream » Oct 01 2018 9:46am

I would like to flash my controller, but suprisingly my speed connector has only 4 pins (not 6), so I don't know how to connect ST Link (and I don't know if it is even possible this way).
I have measured voltage levels and I have identified 3 pins (ground, 6V for headlight and speed sensor input with pullup resistor to 5V).
Would it be possible program the controller using only ground pin and SWIM? I have read that connecting RESET pin (purple wire) is optional and power for the controller can be provided from the battery.
Last edited by EndlessScream on Oct 01 2018 1:44pm, edited 1 time in total.

User avatar
feketehegyi   1 W

1 W
Posts: 51
Joined: Jul 11 2018 6:18am

Re: New "TSDZ2 Torque Sensor Central Motor"

Post by feketehegyi » Oct 01 2018 1:10pm

billm wrote:
Sep 30 2018 3:08pm
OK well, the error above seems to have been due to usb driver issues on effing-windows. Past that, now I'm getting this:

> Reading PROGRAM MEMORY area...
Error : Cannot communicate with the device !
Check the SWIM cable connection and check all the needed pin connections on the SWIM connector.
I was simulating the read/write procedure on an STM8S105K4T6 development board last weekend. I had the same error message. This development board can be connected via micro usb to a 5v adapter, which solved in my test case the issue.
So, in my case it was meaning actually not enough power.
Probably the long cable causes loss in power it cannot tolerate.

User avatar
feketehegyi   1 W

1 W
Posts: 51
Joined: Jul 11 2018 6:18am

Re: New "TSDZ2 Torque Sensor Central Motor"

Post by feketehegyi » Oct 01 2018 2:08pm

billm wrote:
Sep 30 2018 9:31pm
It sure looks like the VM is seeing the stlink, and I have the software configured properly, but it just errors out instantly when I press the read button. But perhaps there's some issue with these f*cking piece of sh*t USB-C ports on this lemon of a 2018 mac? I've had nothing but trouble with them.
I see that your problem was the long cable, but just saw that you use a Mac like me. Well, I could actually compile the "stm8flash" and run it from terminal. Program memory flash works with it, natively from Mac terminal.
But I see so, that option byte flashing with "stm8flash" is incompatible. So, I use a Windows PC with ST Visual Programmer.

Bartman   100 mW

100 mW
Posts: 37
Joined: Feb 11 2018 2:38pm

Re: New "TSDZ2 Torque Sensor Central Motor"

Post by Bartman » Oct 01 2018 2:24pm

I'm not sure whether to post this on here or use the Motor Technology forum - have posted there originally.

I'm looking for help. I can't get my motor to give any assistance. I flashed the KTLCD3 to v.0.12, and my TSDZ2 to v0.12. The LCD3 gave a validation error, but I reflashed and it verified ok.

I wired up the LCD3 as per wiki and can configure it, and see the read speed settings from the wheel etc. I can read all the settings in section 9. I have configured it for 10 cells (36v) is section 1, set the max amps, wheelsize. i even reset it to defaults and tried again. I have no way of trying back the original 36v firmware as I stupidly did not make a copy so have no way of knowing if this is a hardware issue or not. in section 9 get a reading from parameter 2 ADC torque sensor, but only a 0 reading from the parameter 3 - Pedal torque sensor. Walk mode does not work. The wee man shows on the LCD but nothing happens. I'm thinking I have a hardware fault on the TSDZ2.

Can any help ? can anyone supply me with the original version of the firmware to flash with STlink ? so I can try the original TSDZ2 VLCD 5.

Thanks

Post Reply