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

Electric Motors and Controllers
redwater   10 mW

10 mW
Posts: 24
Joined: Oct 18 2019 12:36pm

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

Post by redwater » Dec 31 2019 6:34am

One more thing, on boot screen is example 50,7V , but on main screen is 51,3V (0,6V above). On multimeter is 50,7V.

Best regards, and happy new year 2020 !!!

michih.   100 mW

100 mW
Posts: 39
Joined: Nov 11 2018 8:33am

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

Post by michih. » Dec 31 2019 6:47am

redwater wrote:
Dec 31 2019 6:34am
One more thing, on boot screen is example 50,7V , but on main screen is 51,3V (0,6V above). On multimeter is 50,7V.

Best regards, and happy new year 2020 !!!
Yes, the volt display is incorrect

Mfg Michael

User avatar
izeman   100 GW

100 GW
Posts: 5048
Joined: Jun 21 2011 8:25am
Location: Vienna, Austria
Contact:

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

Post by izeman » Dec 31 2019 12:34pm

elfnino wrote:
Oct 15 2019 6:45am
No problem this is my final well working set up using "step up buck" instead of ebike buttery as power source..
The colors should match with bafang display cable

bafang extension cable - I recommend male to male (one end for bootloader box other for connecting display with TSDZ2)
https://www.aliexpress.com/item/32861639327.html

USBtoUART adapter - recomend this type as other was sensitive to AC power supply of laptop
https://www.aliexpress.com/item/32288431622.html

Step Up buck - DC booster
https://www.aliexpress.com/item/32807600304.html
I tried that method today, and the pictures are a bit misleading. The USB adapter has those red lines on it which made me think what they meant. Then i saw that it was a c&p form the vendor site, and there is no need to mod the adapter ;)
I tried two different adapters to power the dc/dc boost converter and none of them was able to power it. The 5V line fluctuates and the converter won't ouput a stable voltage.
Am i correct in thinking that that's how it's supposed to work? The TTL adapter is meant to power the boost converter? If that's the case it ain't work here :(

redwater   10 mW

10 mW
Posts: 24
Joined: Oct 18 2019 12:36pm

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

Post by redwater » Dec 31 2019 1:45pm

izeman wrote:
Dec 31 2019 12:34pm
elfnino wrote:
Oct 15 2019 6:45am
No problem this is my final well working set up using "step up buck" instead of ebike buttery as power source..
The colors should match with bafang display cable

bafang extension cable - I recommend male to male (one end for bootloader box other for connecting display with TSDZ2)
https://www.aliexpress.com/item/32861639327.html

USBtoUART adapter - recomend this type as other was sensitive to AC power supply of laptop
https://www.aliexpress.com/item/32288431622.html

Step Up buck - DC booster
https://www.aliexpress.com/item/32807600304.html
I tried that method today, and the pictures are a bit misleading. The USB adapter has those red lines on it which made me think what they meant. Then i saw that it was a c&p form the vendor site, and there is no need to mod the adapter ;)
I tried two different adapters to power the dc/dc boost converter and none of them was able to power it. The 5V line fluctuates and the converter won't ouput a stable voltage.
Am i correct in thinking that that's how it's supposed to work? The TTL adapter is meant to power the boost converter? If that's the case it ain't work here :(
Try XL6019.
Image

Works excellent, or get power from battery directly.

casainho   10 GW

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

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

Post by casainho » Dec 31 2019 1:48pm

redwater wrote:
Dec 31 2019 1:45pm
Try XL6019. Works excellent, or get power from battery directly.
If so, can you guys please share pictures and more details? I would like to add to the wiki as this is highly valueable.
- 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.

redwater   10 mW

10 mW
Posts: 24
Joined: Oct 18 2019 12:36pm

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

Post by redwater » Dec 31 2019 2:02pm

casainho wrote:
Dec 31 2019 1:48pm
redwater wrote:
Dec 31 2019 1:45pm
Try XL6019. Works excellent, or get power from battery directly.
If so, can you guys please share pictures and more details? I would like to add to the wiki as this is highly valueable.
Ok. I make, and share more pictures tomorrow. It is chip parts from e-store (allegro.pl in Poland, its like ebay), USB-UART, and DC-DC XL6019 converter.

diagonti   100 µW

100 µW
Posts: 7
Joined: Jan 01 2020 2:17am

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

Post by diagonti » Jan 01 2020 2:37am

Happy New Year!

I've been reading this forum for quite a while, first time poster though - holidays have given me the opportunity to dive in and replace the LCD (now 850C) and firmware on my TSDZ2.

I can't seem to get the 850C LCD to power on without holding down the power button. Am I doing something wrong?

Holding down the power button shows a successful negotiation between the controller and LCD, firmware versions are displayed - however, the screen appears stuck there. It never progresses to any other screen, and releasing the power button powers off the display. Pressing the other buttons appears to have no effect.

Image

850C Firmware Version: 0.6.1
TSDZ2 firmware: 0.50.0

Both downloaded from here: https://github.com/OpenSource-EBike-fir ... 50C_v0.6.1

Voltage measured with a multimeter between ground and blue/brown join is 50.4V, and between ground and red/orange join is 48.6V while the button is held down, 2.13V when not. The LCD reports around 48.2V before the text is replaced with the TSDZ2 firmware version.

I've double-checked my wiring in accordance with the wiki. I've tried powering from both battery and a bench power supply, and I get the same results. I've tried unplugging the battery and letting it all sit for a bit, no avail there either. I've also tried re-flashing the firmware on each. Hoping I've made a simple mistake somewhere?

Thanks for all the work on this project done by all, and for your suggestions in advance.

redwater   10 mW

10 mW
Posts: 24
Joined: Oct 18 2019 12:36pm

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

Post by redwater » Jan 01 2020 4:41am

My cables:

ST-Link

Image

Image


USB-UART , I remade this cable to direct power from baterry, because I burn DC-DC converter (my fault, short circuit :bolt: :flame: ):

Image

Image


DC-DC Converter was XL6019:

link to auction: https://allegro.pl/oferta/xl6019-przetw ... NjJkN2M%3D

Image

Ride with new firmware:

https://www.youtube.com/watch?v=UHYABA_ ... -whzJ73blA

User avatar
izeman   100 GW

100 GW
Posts: 5048
Joined: Jun 21 2011 8:25am
Location: Vienna, Austria
Contact:

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

Post by izeman » Jan 01 2020 1:19pm

Thank you. I tried to build that as well, and maybe failed totally 8) :roll:
Maybe also take a look here, and contribute: viewtopic.php?f=2&t=97083&p=1519258#p1519258

redwater   10 mW

10 mW
Posts: 24
Joined: Oct 18 2019 12:36pm

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

Post by redwater » Jan 01 2020 2:50pm

izeman wrote:
Jan 01 2020 1:19pm
Thank you. I tried to build that as well, and maybe failed totally 8) :roll:
Maybe also take a look here, and contribute: viewtopic.php?f=2&t=97083&p=1519258#p1519258
850C plug:

Image

VIN - orange
Rx - white <--- Tx from UART
+26-54V - brown
Tx - green <--- Rx from UART
GND - black

Colours from 850C cable ofcourse.

famichiki   100 W

100 W
Posts: 130
Joined: Jul 12 2019 9:00am

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

Post by famichiki » Jan 02 2020 4:01am

casainho wrote:
Dec 28 2019 5:38am
I prepared a google file and I am sharing it so it is easier for everyone make the graphs. You will only need to edit own measured values on the tables:
The official normal torque signal range is 50-105 when viewed using the service menu of stock firmware on a VLCD5 display. How do you think these translate to the values you are seeing?

casainho   10 GW

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

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

Post by casainho » Jan 02 2020 4:53am

famichiki wrote:
Jan 02 2020 4:01am
casainho wrote:
Dec 28 2019 5:38am
I prepared a google file and I am sharing it so it is easier for everyone make the graphs. You will only need to edit own measured values on the tables:
The official normal torque signal range is 50-105 when viewed using the service menu of stock firmware on a VLCD5 display. How do you think these translate to the values you are seeing?
I am just interested to see the graphs from other users that use the same firmware version.
- 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.

casainho   10 GW

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

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

Post by casainho » Jan 02 2020 4:57am

diagonti wrote:
Jan 01 2020 2:37am
I've double-checked my wiring in accordance with the wiki. I've tried powering from both battery and a bench power supply, and I get the same results. I've tried unplugging the battery and letting it all sit for a bit, no avail there either. I've also tried re-flashing the firmware on each. Hoping I've made a simple mistake somewhere?
Looking at the picture, seems you have a recent version of 850C that has the sensor light installed hence that visible small hole on center bottom as also a better LCD.

Maybe your 850C hardware part the holds the voltage after power on is burned. Or maybe you are not powering correctly, check again the wires.
- 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.

User avatar
izeman   100 GW

100 GW
Posts: 5048
Joined: Jun 21 2011 8:25am
Location: Vienna, Austria
Contact:

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

Post by izeman » Jan 02 2020 5:16am

redwater wrote:
Jan 01 2020 2:50pm
VIN - orange
Rx - white <--- Tx from UART
+26-54V - brown
Tx - green <--- Rx from UART
GND - black

Colours from 850C cable ofcourse.
Thanks. And Vin/Orange is same voltage as Brown wire? And for programming, does it need Orange or Brown wire to be powered? It's hard to see from pictures.

diagonti   100 µW

100 µW
Posts: 7
Joined: Jan 01 2020 2:17am

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

Post by diagonti » Jan 02 2020 6:13am

casainho wrote:
Jan 02 2020 4:57am
Maybe your 850C hardware part the holds the voltage after power on is burned. Or maybe you are not powering correctly, check again the wires.
Thank you for your reply. Do you know what component within that may be, so I can determine a testing procedure? I assume a transistor somewhere, hopefully user-replaceable but probably within an IC somewhere... I haven't yet cracked the casing, but that's probably the next step.

I have triple checked the wiring, torn it all down again and started from scratch, same behavior. Can you confirm the voltage I should be seeing on the orange (VIN) lead should be approximately the battery voltage, and not regulated to something lower? If they are the same, should there be any continuity between orange and brown?

Suspecting I need a new LCD, but any further insights are appreciated - I have no baseline of expected behavior for this device. If I recall correctly, this is how it functioned before flashing the firmware too, I could only get the yellow splash screen on by holding down the power button whilst running from a bench power supply, I assumed it required further negotiation to 'stay on' - can't confirm for sure now though.

Thanks again!

casainho   10 GW

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

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

Post by casainho » Jan 02 2020 6:46am

diagonti wrote:
Jan 02 2020 6:13am
casainho wrote:
Jan 02 2020 4:57am
Maybe your 850C hardware part the holds the voltage after power on is burned. Or maybe you are not powering correctly, check again the wires.
Thank you for your reply. Do you know what component within that may be, so I can determine a testing procedure? I assume a transistor somewhere, hopefully user-replaceable but probably within an IC somewhere... I haven't yet cracked the casing, but that's probably the next step.

I have triple checked the wiring, torn it all down again and started from scratch, same behavior. Can you confirm the voltage I should be seeing on the orange (VIN) lead should be approximately the battery voltage, and not regulated to something lower? If they are the same, should there be any continuity between orange and brown?

Suspecting I need a new LCD, but any further insights are appreciated - I have no baseline of expected behavior for this device. If I recall correctly, this is how it functioned before flashing the firmware too, I could only get the yellow splash screen on by holding down the power button whilst running from a bench power supply, I assumed it required further negotiation to 'stay on' - can't confirm for sure now though.

Thanks again!
Did you do something that could burn the board? usually users make the mistake to use wrong connection cables or wire connections.

I have a few boards burned with the same symptoms and I could never repair them.
- 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.

User avatar
izeman   100 GW

100 GW
Posts: 5048
Joined: Jun 21 2011 8:25am
Location: Vienna, Austria
Contact:

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

Post by izeman » Jan 02 2020 7:36am

diagonti wrote:
Jan 02 2020 6:13am
I have triple checked the wiring, torn it all down again and started from scratch, same behavior. Can you confirm the voltage I should be seeing on the orange (VIN) lead should be approximately the battery voltage, and not regulated to something lower? If they are the same, should there be any continuity between orange and brown?
I guess that's a very important question which I see answered NOWHERE. I'm happy to update the WIKI with the information i gathered and with the pit falls to avoid after I have all this solved. It's way to easy to burn the display and send $50 to the junk.

diagonti   100 µW

100 µW
Posts: 7
Joined: Jan 01 2020 2:17am

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

Post by diagonti » Jan 02 2020 8:37am

casainho wrote:
Jan 02 2020 6:46am
Did you do something that could burn the board? usually users make the mistake to use wrong connection cables or wire connections.

I have a few boards burned with the same symptoms and I could never repair them.
Not that I am aware of - I'm usually pretty good with paranoid checking of everything prior to applying any power - but of course, anything is possible. If you've seen the same symptoms, I will assume I require a new display.

User avatar
izeman   100 GW

100 GW
Posts: 5048
Joined: Jun 21 2011 8:25am
Location: Vienna, Austria
Contact:

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

Post by izeman » Jan 02 2020 9:32am

What setup do you guys recommend for UPDATING both, the display and the controller?
Following the WIKI, it's recommended to cut off the connector of the 850C, and hardwire it to an extension wire that fits to the TSDZ2's original plug hardness? So you need an extension wire and cut that to the correct length, so one end is soldered to the display and the other end (female connector) fit's to the TSDZ2's male connector.
And then you need a second extension wire cut in two pieces. One piece to update the display (eg via bootloader mode) and the other one to update the controller (via STLink).
So far correct? Or is there a better way?

commutebybicycle.com   1 µW

1 µW
Posts: 2
Joined: Jan 02 2020 5:01pm

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

Post by commutebybicycle.com » Jan 02 2020 5:14pm

Hello everyone! I'm new to Endless Sphere and this is my first post! :)

I was wondering if anyone has tested the 860c display with the current firmware (v0.19 and/or beta v0.20 - it is still 'beta', right?).

I am interested in purchasing a TSD-Z2, but want to wait since the 860c has additional features that might be very useful in the future versions of the firmware (esp the 4th button) and I also understand the 860c is brighter and easier to read in sunlight which is critical for sunny California! (and I hear it is better in other ways as well)

obcd   100 W

100 W
Posts: 137
Joined: Jul 16 2019 3:45pm

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

Post by obcd » Jan 02 2020 5:27pm

Isn't the motor controller firmware initially updated using the plug that goes to the speed sensor (and also has the light signal) ?
It's also possible to set a configuration bit that allows updating the motor controller firmware using the serial port that connects to the display. It's using the motor controller bootloader.
So you basically need a speed sensor extension cable for the tsdz2 to be ble to program it. There also exist "splitter cables" that have an extra plug for the bicycle light, but most of those don't have the pin connected that is needed to program the motor controller.
And, if I read everything correctly, there is a difference in the tsdz2 display plug with and without throttle connections.

Rydon   100 W

100 W
Posts: 252
Joined: Aug 11 2016 5:26pm

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

Post by Rydon » Jan 02 2020 10:20pm

diagonti wrote:
Jan 02 2020 8:37am
casainho wrote:
Jan 02 2020 6:46am
Did you do something that could burn the board? usually users make the mistake to use wrong connection cables or wire connections.

I have a few boards burned with the same symptoms and I could never repair them.
Not that I am aware of - I'm usually pretty good with paranoid checking of everything prior to applying any power - but of course, anything is possible. If you've seen the same symptoms, I will assume I require a new display.
It is probably not the display. The display stays on the splash screen when it can't communicate with the motor controller. Check rx and tx to be sure they are not reversed. Also, check simple things like brake sensors.

Rydon   100 W

100 W
Posts: 252
Joined: Aug 11 2016 5:26pm

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

Post by Rydon » Jan 02 2020 10:29pm

izeman wrote:
Jan 02 2020 9:32am
What setup do you guys recommend for UPDATING both, the display and the controller?
Following the WIKI, it's recommended to cut off the connector of the 850C, and hardwire it to an extension wire that fits to the TSDZ2's original plug hardness? So you need an extension wire and cut that to the correct length, so one end is soldered to the display and the other end (female connector) fit's to the TSDZ2's male connector.
And then you need a second extension wire cut in two pieces. One piece to update the display (eg via bootloader mode) and the other one to update the controller (via STLink).
So far correct? Or is there a better way?
Best to use the green higo female connector on the 850C as is. It is the same connector on the SW102. If you have an 8 pin male higo connector on your controller, you can get a harness that adapts the TSDZ2 8 pin male to either of those displays from Electrify Bike Co. It essentially adapts the TSDZ2 to Bafang style displays, throttles and brake cutoffs.

redwater   10 mW

10 mW
Posts: 24
Joined: Oct 18 2019 12:36pm

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

Post by redwater » Jan 03 2020 3:29am

izeman wrote:
Jan 02 2020 5:16am
redwater wrote:
Jan 01 2020 2:50pm
VIN - orange
Rx - white <--- Tx from UART
+26-54V - brown
Tx - green <--- Rx from UART
GND - black

Colours from 850C cable ofcourse.
Thanks. And Vin/Orange is same voltage as Brown wire? And for programming, does it need Orange or Brown wire to be powered? It's hard to see from pictures.
When programming VIN (orange ) is disconnetcted.

diagonti   100 µW

100 µW
Posts: 7
Joined: Jan 01 2020 2:17am

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

Post by diagonti » Jan 03 2020 5:43am

Rydon wrote:
Jan 02 2020 10:20pm
It is probably not the display. The display stays on the splash screen when it can't communicate with the motor controller. Check rx and tx to be sure they are not reversed. Also, check simple things like brake sensors.
Thank you for your reply. The display successfully determines the firmware version of the controller - tx/rx do not appear to be switched. Brake sensors are not currently connected for simplicity - do I need to pull this to +5v or GND for the display/controller to init? Obviously the 850C does not directly connect to the brake sensors.

Post Reply