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

Electric Motors and Controllers
perryscope   100 W

100 W
Posts: 106
Joined: Jan 06 2019 4:29pm
Contact:

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

Post by perryscope » Jul 13 2019 2:09pm

bruwie wrote:
Jul 13 2019 2:02pm
perryscope wrote:
Jul 13 2019 11:39am
I have flashed my Bafang 850C screen successfully and compared the data on the screen with the firmware bin file so i am 100% its correct. however i cannot get it to power up at all, it's been blank ever since. Can I check if there is no UART to the motor would you see anything on the screen to show an error or would it remain blank?

I am wondering if i have reversed my TX/RX connections from my early experiments, but before i hack my cable i wanted to be sure what should happen if there is no coms to the motor established.

I have been using STM32 St-Link https://my.st.com/content/my_st_com/en/ ... nk004.html windows tool to flash but it all worked as expected. but maybe I have done something wrong during the flash?
STM32 st-link.PNG
It works for me with STM32 ST-LINK Utility.
Thank you very much for the hint.
The ST Visual Programmer does not accept the firmware.
That's odd. But glad it's working for you. Would you mind uploading a screenshot of the stm32 st-link main window. Does it look like the bytes are correct for the .bin file. Also did you erase from stm32 st-link or was the screen already flashed?
Empowered people support rider and trustee
www.empoweredpeople.co.uk

bruwie   1 mW

1 mW
Posts: 13
Joined: Mar 02 2017 3:12pm
Location: Lower Saxony,Germany

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

Post by bruwie » Jul 13 2019 2:17pm

thineight wrote:
Jul 13 2019 1:59pm

Where is the 0.20 wiki? I'm curious to have a look at it in the meantime... :wink:
Thanks
Look here
https://github.com/OpenSource-EBike-fir ... iki/0.20.0
TSDZ2 36 Volt 350 Watt with motor temperature sensor, LCD3, Batterypack 36 Volt 23 Ah, no throttle and brakesensors

bruwie   1 mW

1 mW
Posts: 13
Joined: Mar 02 2017 3:12pm
Location: Lower Saxony,Germany

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

Post by bruwie » Jul 13 2019 3:02pm

perryscope wrote:
Jul 13 2019 11:39am

That's odd. But glad it's working for you. Would you mind uploading a screenshot of the stm32 st-link main window. Does it look like the bytes are correct for the .bin file. Also did you erase from stm32 st-link or was the screen already flashed?
Target Chip erase
Erase_Chip.jpg
Load bin file
Load_bin.jpg
Target program
Target_program.jpg
After flash
After_flash.jpg
TSDZ2 36 Volt 350 Watt with motor temperature sensor, LCD3, Batterypack 36 Volt 23 Ah, no throttle and brakesensors

perryscope   100 W

100 W
Posts: 106
Joined: Jan 06 2019 4:29pm
Contact:

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

Post by perryscope » Jul 13 2019 4:41pm

bruwie wrote:
Jul 13 2019 3:02pm
perryscope wrote:
Jul 13 2019 11:39am

That's odd. But glad it's working for you. Would you mind uploading a screenshot of the stm32 st-link main window. Does it look like the bytes are correct for the .bin file. Also did you erase from stm32 st-link or was the screen already flashed?
Target Chip erase
Yes those are the steps I followed but it looks like my 850C is only 256K bytes? I wonder if that's the difference?
850-C-256k.PNG
850-C-256k.PNG (47.21 KiB) Viewed 676 times
Empowered people support rider and trustee
www.empoweredpeople.co.uk

buba   10 kW

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

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

Post by buba » Jul 13 2019 5:34pm

fi7ippo wrote:
Jul 13 2019 11:14am
Hi Buba I saw the 0.20.0 wiki, wonderful, You have make a epic job :bigthumb:

Is it safe to compile and test?
Wow, thank you! Appreciate it!

I advice against testing it for now. Especially when I am so close to have a version that can be tested by all users. Would love your feedback when it is ready!

In my earlier versions I could change motor parameters during trips, directly from the LCD. I did this to test the limits of the system. One of many tests I wanted to do was to stress the blue gear bearings until they were totally destroyed. Did many, many startup tests and different checks. I was very successful in destroying the bearings in the blue gear. I do this so you do not have to. :wink: The version on my fork is far safer and close to finished but I still advice to wait.

I apologize for taking so long.


fi7ippo wrote:
Jul 13 2019 11:14am
I read a bit the code and maybe I don't understand well, but on

src/controller/adc.c says

64 // read ADC torque sensor value
65 uint16_t ui16_temp = UI16_ADC_10_BIT_TORQUE_SENSOR;
66
67 // filter the ADC torque sensor value and set to offset variable
68 ui16_filter(&ui16_temp, &ui16_adc_pedal_torque_offset, 9);

what is ui16_temp ?
We create a 16 bit unsigned integer called ui16_temp. It is a temporary variable where we store the 10 bit value of the torque sensor ADC.

Then that variable is passed to a function that filters the value and stores it in another variable called ui16_adc_pedal_torque_offset. The number "9" is the amount of filtering that is supposed to be done in the filter.

The variable, ui16_adc_pedal_torque_offset, is actually the resting torque value we have discussed previously in the thread.

Let me know if you want to know more or are curious of anything!


fi7ippo wrote:
Jul 13 2019 11:14am
I've not yet understand what is the difference in the new 4 type motor logic, (torque - pas - cadence - emtb) but I'll try when a beta will available
Basically:

Torque Assist = We look at the torque sensor value and convert that to a motor torque value. The harder we press the pedals the more torque we get from the motor. It is a linear correlation assuming your torque sensor is linear in the range you are riding. This works very similarly to the original firmware.

PAS/Cadence Assist = This is actually the standard riding mode on most electric bikes. Most electric bikes can only senses crank rotation. When the system senses crank rotation it will engage the motor so as to assist the user.

eMTB = This is a dynamic riding mode that works much like torque assist. But it adjusts the assist factor depending on the amount of torque applied and the wheel speed. You need more assistance when going faster and this is not linear. So this is why eMTB is dynamic and changes depending on circumstances.


fi7ippo wrote:
Jul 13 2019 11:14am
On the new wiki there is a new parameter scale on menu (9 Motor Controller Setup)

2 Motor acceleration 70%

What scale have the new parameter 2 Motor acceleration? Maybe 100% for 10A/s rump up or what?
It is difficult to explain but when using the torque sensor it has a natural time delay. This gives enough of a power ramp up that we only need to configure the possible available power and the rate of change of that possible power. I have tested this so much in many different versions it has resulted in a better current controller/ torque controller. Not PI yet but maybe in the future IF it is necessary. Anyway, the result is a very natural feeling and the system has become very responsive.


fi7ippo wrote:
Jul 13 2019 11:14am
Option 3 Pedal torque conversion factor - and 4 Weight on pedal is perfect, wow, wonderful work :thumb: :thumb:
I like it too! It is so simple and will be perfect for users that want to calibrate the torque sensor so the system can calculate the human power more accurately. Can also be used to check the accuracy, precision and range of the torque sensor. It is more natural and easier to understand and we instinctively have a feeling if something is not right or non-linear just by looking at the weight value.

Just measure with a scale or use some weights and you are set. Adjust until you are happy! Glad you liked it!


fi7ippo wrote:
Jul 13 2019 11:14am
I had some time to swap the torque sensor with a brand new untouched new one, and I can say that the new sensor have a lower range, rest 31-32 maximum about 74 and lower capacity (about 40kg) but I'll post a complete data in a few days!

Among other things I forgot to install the white Teflon thickness before the torque sensor, and I would not damage the sensor windings, so I will have to disassemble it again.
I have also noticed that without this thickness inside it all seems smoother than before when a rubbing noise was heard, I think I will try it without thickness for about fifty km.

Thank You Buba, have a nice day!
Yes, that seems to be very common. Most of the torque sensors start out with values around 30-40 when new. Nice of you to provide that data and information! This is exactly why this community is so great!

Thank you, fi7ippo!
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

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

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

Post by buba » Jul 13 2019 5:47pm

buba wrote:
Jul 13 2019 7:14am
casainho wrote:
Jul 13 2019 6:19am
hefest wrote:
Jul 12 2019 10:26pm
After some time with new version of firmware, it looks like the "no power" issue is still there, but not as pronounced as before.

I think I figured out the way to reproduce it, although not every time.

On red light, with brakes with sensors on and sitting on the bike with feet on the pedals. When I start, there is no power for few seconds and display is slowing 0 watts. With older version of firmware this was more frequent and it was taking more time.
That happens to me just like you describe, in v0.19.0.
Are you guys using Startup Boost? Does it happen with it off?

Have no power issue in the 0.20.0 development but am not using Startup Boost either. Did experience some slow starts in the 0.19.0 though.
hefest wrote:
Jul 13 2019 8:14am
I'm using startup boost yes. Will try with boost off once the weather allows.
casainho wrote:
Jul 13 2019 7:49am
I was not using Startup Boost when I got that issue.
Okay guys, this is hopefully solved in the next version!
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

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

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

Post by buba » Jul 13 2019 5:49pm

Popo15 wrote:
Jul 12 2019 10:42am
Thank you very much, Buba solved .. :bigthumb:;
Glad it was solved, Popo15! :bigthumb:
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

buba   10 kW

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

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

Post by buba » Jul 13 2019 6:03pm

thineight wrote:
Jul 13 2019 1:59pm
fi7ippo wrote:
Jul 13 2019 11:14am

Hi Buba I saw the 0.20.0 wiki, wonderful, You have make a epic job :bigthumb:
Where is the 0.20 wiki? I'm curious to have a look at it in the meantime... :wink:
Thanks
The super secret 0.20.0 wiki is far from finished but it is linked below :wink:

https://github.com/OpenSource-EBike-fir ... iki/0.20.0
GitHub: https://github.com/leon927
PayPal: leonstor at bredband.net

Kisazul   1 W

1 W
Posts: 53
Joined: Jun 18 2018 10:32pm

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

Post by Kisazul » Jul 14 2019 6:29am

Made repair sensor. Pasted a thin layer of PCB, and adjust the position of the sensor, set 25. Everything works great! Saved $ 100.
Attachments
IMG_20190714_213133.jpg
IMG_20190714_213330.jpg

AZUR   10 W

10 W
Posts: 97
Joined: Apr 05 2018 6:52am

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

Post by AZUR » Jul 14 2019 6:37am

Hi,

Can I buy the display at PSWPOWER, on Aliexpress?

Full colorful LCD P850C display.

At this link:

https://www.aliexpress.com/item/3266496 ... 3c00QCUMa1

Many thanks,

Azur

dameri   100 W

100 W
Posts: 118
Joined: Sep 20 2018 10:57am

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

Post by dameri » Jul 14 2019 8:00am

AZUR wrote:
Jul 14 2019 6:37am
Hi,

Can I buy the display at PSWPOWER, on Aliexpress?

Full colorful LCD P850C display.

At this link:

https://www.aliexpress.com/item/3266496 ... 3c00QCUMa1

Many thanks,

Azur
PSWPOWER: http://www.pswpower.com/ven.php?cargo.2016-5e-2eaj

casainho   1.21 GW

1.21 GW
Posts: 3592
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Jul 14 2019 10:17am

perryscope wrote:
Jul 13 2019 4:41pm
bruwie wrote:
Jul 13 2019 3:02pm
perryscope wrote:
Jul 13 2019 11:39am

That's odd. But glad it's working for you. Would you mind uploading a screenshot of the stm32 st-link main window. Does it look like the bytes are correct for the .bin file. Also did you erase from stm32 st-link or was the screen already flashed?
Target Chip erase
Yes those are the steps I followed but it looks like my 850C is only 256K bytes? I wonder if that's the difference?

850-C-256k.PNG
Please take a picture of the microcontroller to make sure it is another version from the ones I have, see here a picture showing

https://github.com/OpenSource-EBike-fir ... r-LCD-850C
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

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   1.21 GW

1.21 GW
Posts: 3592
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Jul 14 2019 10:17am

perryscope wrote:
Jul 13 2019 4:41pm
bruwie wrote:
Jul 13 2019 3:02pm
perryscope wrote:
Jul 13 2019 11:39am

That's odd. But glad it's working for you. Would you mind uploading a screenshot of the stm32 st-link main window. Does it look like the bytes are correct for the .bin file. Also did you erase from stm32 st-link or was the screen already flashed?
Target Chip erase
Yes those are the steps I followed but it looks like my 850C is only 256K bytes? I wonder if that's the difference?

850-C-256k.PNG
Please take a picture of the microcontroller to make sure it is another version from the ones I have, see here a picture showing:

https://github.com/OpenSource-EBike-fir ... r-LCD-850C

GD32F103RET6
This is a 32 bits ARM Cortex M3 that should be very similar to STM32F103.

GD32F103RET6 main characteristics:

Maximum Speed Up to 108MHz
Flash Memory: 512K
RAM: 64K
Package: LQFP64
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

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.

sabergo   100 µW

100 µW
Posts: 9
Joined: Feb 20 2019 1:46pm

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

Post by sabergo » Jul 14 2019 2:03pm

I've downloaded the proper software and files and exposed the programming pads. The pads are quite a bit narrower than the LCD-3 connectors. Are you soldering pins to the pads or just bending programming pins from the st link five wire into a narrower width? I was thinking to cut the corner out and hotglue pins to pads -- so that future flashing can be done without opening the case.

Wonderful work and thanks to all of the programmers.

casainho   1.21 GW

1.21 GW
Posts: 3592
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Jul 14 2019 2:38pm

sabergo wrote:
Jul 14 2019 2:03pm
I've downloaded the proper software and files and exposed the programming pads. The pads are quite a bit narrower than the LCD-3 connectors. Are you soldering pins to the pads or just bending programming pins from the st link five wire into a narrower width? I was thinking to cut the corner out and hotglue pins to pads -- so that future flashing can be done without opening the case.

Wonderful work and thanks to all of the programmers.
I am bending the connectors wires so I can solder on the pads. Would be nice if you guys can share pictures so I can update the wiki.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

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.

fi7ippo   10 mW

10 mW
Posts: 24
Joined: Aug 26 2018 2:29am

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

Post by fi7ippo » Jul 14 2019 5:54pm

dameri wrote:
Jul 14 2019 8:00am
AZUR wrote:
Jul 14 2019 6:37am
Hi,

Can I buy the display at PSWPOWER, on Aliexpress?

Full colorful LCD P850C display.

At this link:

https://www.aliexpress.com/item/3266496 ... 3c00QCUMa1

Many thanks,

Azur
PSWPOWER: http://www.pswpower.com/ven.php?cargo.2016-5e-2eaj
Hi guys does the P850C works with 14s 58,8v battery?
Thank You

casainho   1.21 GW

1.21 GW
Posts: 3592
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Jul 14 2019 6:09pm

fi7ippo wrote:
Jul 14 2019 5:54pm
dameri wrote:
Jul 14 2019 8:00am
AZUR wrote:
Jul 14 2019 6:37am
Hi,

Can I buy the display at PSWPOWER, on Aliexpress?

Full colorful LCD P850C display.

At this link:

https://www.aliexpress.com/item/3266496 ... 3c00QCUMa1

Many thanks,

Azur
PSWPOWER: http://www.pswpower.com/ven.php?cargo.2016-5e-2eaj
Hi guys does the P850C works with 14s 58,8v battery?
Thank You
Yes it does, I am running 2 of them on different bicycles with 14S3P battery packs.

I need to put this note on wiki.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

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.

perryscope   100 W

100 W
Posts: 106
Joined: Jan 06 2019 4:29pm
Contact:

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

Post by perryscope » Jul 15 2019 6:11am

casainho wrote:
Jul 14 2019 10:17am
perryscope wrote:
Jul 13 2019 4:41pm
bruwie wrote:
Jul 13 2019 3:02pm
perryscope wrote:
Jul 13 2019 11:39am

That's odd. But glad it's working for you. Would you mind uploading a screenshot of the stm32 st-link main window. Does it look like the bytes are correct for the .bin file. Also did you erase from stm32 st-link or was the screen already flashed?
Target Chip erase
Yes those are the steps I followed but it looks like my 850C is only 256K bytes? I wonder if that's the difference?

850-C-256k.PNG
Please take a picture of the microcontroller to make sure it is another version from the ones I have, see here a picture showing:

https://github.com/OpenSource-EBike-fir ... r-LCD-850C

GD32F103RET6
This is a 32 bits ARM Cortex M3 that should be very similar to STM32F103.

GD32F103RET6 main characteristics:

Maximum Speed Up to 108MHz
Flash Memory: 512K
RAM: 64K
Package: LQFP64

Looks to be a different PCB layout compared to your photo, and unfortunately there is something on the chip obscuring some of the lettering. This is an existing photo I had so i will take it apart later and try to remove the mark, I think its just black marker.
IMG_20181231_170152_small.jpg
IMG_20181231_170152_small.jpg (276.63 KiB) Viewed 473 times
Empowered people support rider and trustee
www.empoweredpeople.co.uk

casainho   1.21 GW

1.21 GW
Posts: 3592
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Jul 15 2019 7:44am

perryscope wrote:
Jul 15 2019 6:11am
Looks to be a different PCB layout compared to your photo, and unfortunately there is something on the chip obscuring some of the lettering. This is an existing photo I had so i will take it apart later and try to remove the mark, I think its just black marker.
That board uses the STM32F103RCT6, which has only 256 kbytes of flash memory (half of the GD32F103RET6
, that has 512 kbytes). Also STM32F103RCT6 runs at 72MHZ max frequency while GD32F103RET6 runs at max of 108MHz.

I think your LCD will not work. Can you please take more pictures of the case, reference, name on internet or such so we should avoid users buying that version??

I bought this from PSWPower (http://www.pswpower.com/ven.php?cargo.2016-5e-2eaj), can your please compare with the one you bought? can you share the link for the shop?
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

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.

perryscope   100 W

100 W
Posts: 106
Joined: Jan 06 2019 4:29pm
Contact:

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

Post by perryscope » Jul 15 2019 9:21am

casainho wrote:
Jul 15 2019 7:44am
perryscope wrote:
Jul 15 2019 6:11am
Looks to be a different PCB layout compared to your photo, and unfortunately there is something on the chip obscuring some of the lettering. This is an existing photo I had so i will take it apart later and try to remove the mark, I think its just black marker.
That board uses the STM32F103RCT6, which has only 256 kbytes of flash memory (half of the GD32F103RET6
, that has 512 kbytes). Also STM32F103RCT6 runs at 72MHZ max frequency while GD32F103RET6 runs at max of 108MHz.

I think your LCD will not work. Can you please take more pictures of the case, reference, name on internet or such so we should avoid users buying that version??

I bought this from PSWPower (http://www.pswpower.com/ven.php?cargo.2016-5e-2eaj), can your please compare with the one you bought? can you share the link for the shop?
I thought that may be the case. I did get this screen 2nd hand some time ago (dec 2018) as a spare for my BBS-02 setup so the original seller is unknown unfortunately, but I have tried to contact them in case that can share where they purchased it from. My guess is its an earlier version but it was described as a 'Bafang (Luna) 850C (DPC-14) Advanced colour display with USB' and it did indeed have the Luna Bafang firmware on, so I suspect it came from Luna Cycles originally.

Here is a photo of the case that may help other users avoid it.
IMG_20181231_174301.jpg
IMG_20181231_174301.jpg (235.76 KiB) Viewed 430 times
DP C14.UART
DPC14L0100021
V5.2 1609060400


Anyone know how to upload the original bafang firmware back on it ;)
Empowered people support rider and trustee
www.empoweredpeople.co.uk

sabergo   100 µW

100 µW
Posts: 9
Joined: Feb 20 2019 1:46pm

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

Post by sabergo » Jul 15 2019 11:02am

casainho wrote:
Jul 14 2019 2:38pm

I am bending the connectors wires so I can solder on the pads. Would be nice if you guys can share pictures so I can update the wiki.
I'll take pictures of the approach I take. Thanks!

casainho   1.21 GW

1.21 GW
Posts: 3592
Joined: Feb 14 2011 2:43pm

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

Post by casainho » Jul 15 2019 11:52am

perryscope wrote:
Jul 15 2019 9:21am
I thought that may be the case. I did get this screen 2nd hand some time ago (dec 2018) as a spare for my BBS-02 setup so the original seller is unknown unfortunately, but I have tried to contact them in case that can share where they purchased it from. My guess is its an earlier version but it was described as a 'Bafang (Luna) 850C (DPC-14) Advanced colour display with USB' and it did indeed have the Luna Bafang firmware on, so I suspect it came from Luna Cycles originally.

Here is a photo of the case that may help other users avoid it.

IMG_20181231_174301.jpg

DP C14.UART
DPC14L0100021
V5.2 1609060400


Anyone know how to upload the original bafang firmware back on it ;)
Ok, nice to know it is a DPC14, I will put a warning on wiki about that model, saying it does not work.

I would say there is no way to put the original firmware back as at least if it works as 850C, it has encrypted bootloader that you erased and I guess no one has that bootloader unless the manufacturer. The original firmware "is locked" on purpose so no one can do a backup and flash again.
Developer of the Flexible OpenSource firmware for EBike motor controllers (TSDZ2 and KT) and LCDs (KT-LCD3 and Bafang 850C color LCD).

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.

beardydave   1 µW

1 µW
Posts: 1
Joined: Jul 15 2019 1:42pm

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

Post by beardydave » Jul 15 2019 2:16pm

Hi! Sorry if this is the wrong place for this.

I have been very happily running v17 of the software for a while now (36v, PAS only) but recently started having issues where power reduces then goes to 0, whilst the centigrade 'c' in the bottom right hand corner of the display blinks. The display still shows torque inputs, but 0 motor watts. Seems to happen when battery is roughly half spent with about 36.5v left. Disconnecting and reconnecting the battery doesn't help, charging the battery does. Any ideas what might be going on?!

Thanks in advance!

andrea_104kg   100 W

100 W
Posts: 152
Joined: Mar 05 2018 5:51pm

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

Post by andrea_104kg » Jul 15 2019 2:28pm

I would like to buy a Teflon sheet to put in the torque sensor, what thickness does it take for you? 0.5 mm is too little?

bruwie   1 mW

1 mW
Posts: 13
Joined: Mar 02 2017 3:12pm
Location: Lower Saxony,Germany

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

Post by bruwie » Jul 15 2019 5:30pm

Hello,
I solved it this way.
The five-pole Bafang plug now goes to the JTAG.
Unfortunately I already sealed the display with silicone, otherwise I would have taken more pictures from the inside. Unfortunately I forget this again and again.
Connector.jpg
Connector.jpg (303.78 KiB) Viewed 349 times
I drilled a hole for the motor cable.
drill_hole.jpg
drill_hole.jpg (246.73 KiB) Viewed 349 times
The adapter should work for many firmware updates.
Adaptercable.jpg
Adaptercable.jpg (111.35 KiB) Viewed 349 times
TSDZ2 36 Volt 350 Watt with motor temperature sensor, LCD3, Batterypack 36 Volt 23 Ah, no throttle and brakesensors

Post Reply