Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Thank you Elinx for youre explanation and it helped me to understand the parameter changing . :thumb:
It was my own stupid fault to "forgot "changing max speed in offroad mode to 45 kmh :wink:
I did test the new firmware and feld really good!
Great work Embrusa :bigthumb:
 
cejean said:
... understand the parameter changing ....
Yes, at first you think that pushing instead of waiting change the parameter.
But if you know that you must wait, handling the settings with the display is a lot easier.
 
Question, even with the opensoftware from here, there is no way of setting the 45km/h limit higher?

I aim putting the Tongsheng in a velomobile and when I pull a race, I go over 55km/h. Would be nice to still have support over 45km/h.
 
TimV said:
Question, even with the opensoftware from here, there is no way of setting the 45km/h limit higher?

I aim putting the Tongsheng in a velomobile and when I pull a race, I go over 55km/h. Would be nice to still have support over 45km/h.

U can go as high as u want, mine is maxed out at 60km/u but it depends on the gearing if u reach it.
 
TimV said:
.... there is no way of setting the 45km/h limit higher?...
With OSF the only limit will be the max. current the motor can handle.
For 36V this current must be lower than for 48V motor.
The Voltage is free to choose. (the absolute controller limit is 18A/ 63V)
For 36V motor you can use for example 48V battery without a problem and for 48V motor a 52V battery.
 
Elinx said:
TimV said:
.... there is no way of setting the 45km/h limit higher?...
With OSF the only limit will be the max. current the motor can handle.
For 36V this current must be lower than for 48V motor.
The Voltage is free to choose. (the absolute controller limit is 18A/ 63V)
For 36V motor you can use for example 48V battery without a problem and for 48V motor a 52V battery.

I dont need huge power. Just enough to support me. I have bought the 36V 350W version. I have a lot of 36V ebike batteties with a dead bms. So only need to invest in a bms. I want to keep it as simple as posible. And will not buy another screan. I will use the fork and reflash the stock software like described here.
https://github.com/emmebrusa/TSDZ2-Smart-EBike-1/wiki
 
Ride today, finally after much bad WX and other stuff getting in the way. Really nice, never got above level 2, level 1 mostly running easily 18mph, going through top 4 gears for hills. 62c high temp.

Really great, not sure I want to change anything at this point.

Thanks to all who put in the time to make this a fun and great project! Really good job.
 
For making the programming cable. I only find sources in china that have the Tongsheng speed sensor extension cable. 1 to 3 months shipping. It looks like the bafang/8fun pogramming cable is the same connection. Will that work or not? Do I still need to hack that cable up and buy a st link?

(Or what is the name of that extension cable or sources in Europe?)

Thanks
 
TimV said:
For making the programming cable. I only find sources in china that have the Tongsheng speed sensor extension cable.

Any of the STLinks from Ebay are fine, just always use a long USB extension cable and keep the ST Link to speed sensor wires no longer than say 200mm.

You don't actually need a speed extension cable as not all are fully wired on each pin and most won't work. Easiest and simplest solution is use the wires that come with the ST Link. Take the black plastic cover off at motor end and just manually push each wire onto the speed sensor male connector pin, its only 3 wires and takes but a few minutes. I cover the exposed connector with heat shrink just to make sure I'm not touching other pins than intended.

https://www.youtube.com/watch?v=S2SRKu6-Qyw
 
My opinion, buy a 4 $ speedsensor cable for example on Ali, cut it and weld it to TSlinks.
No trouble anymore to put the connector on the right pin.
Specially for People who need glasses like i do. :wink:
 
Hi Ebike Tech Gurus,
Hope you can help,I am fairly new to ebike industry based in Melbourne but keen to learn and experiment.I have some experience fiting bafang kits but wanted to experience with TSDZ2 kits
I bought TSDZ2 programming cables from eco-bike, and I tried to configure stock firmware as per the steps
https://www.eco-ebike.com/blogs/eco-cycles-instructionals/tsdz2-motor-firmware-programming
I connected ST-LINK to USB port on laptop and connected the plug the 6 pin female end into the TSDZ2 Motor Speed Sensor Port ,
The motor is configured 48v from factory, idea is to configure it to 52v to support 52v batteries. I expected it to be straight forward! but getting below issue.image (1).pngimage.png

As per the instructions I wouldnt be able to proceed to write 52v files without reading the option byte from the motor right.
Any help or guidance is much appreciated on how to trouble shoot.wondering if the new TSDZ2 are write protected? or is it something to do with the cable ? :( ,, or am I doing something wrong?
Any help or guidance or mentoring is much appreciated and obliged.
 
I’ve had a similar problem over the years and never really fully got to the bottom of it. Try the following if you have one of the older controllers. I’m not fully sure how to differentiate between the new and old controllers, perhaps if someone can chime in, I think the German forum knows the secret :D

On the options byte tab at the top is a read out protection tab where you can set it to protected. Toggle that a couple of times and try to read each time. Sometimes it seems to waken things up.

Of late with the communication error I found that programming at 3 volts seems to help. Again not sure why as I’ve used 5 volts forever and then suddenly I started getting a comms error and tried using 3 volts and it seems to work.
 
Waynemarlow said:
...... how to differentiate between the new and old controllers,... I think the German forum knows the secret ...
On the German forum they advice to measure between GND and Swim.
With the old controller you should measure 5V
With the new controller you should measure 0V
6pinTSDZ2.jpg
 
Hi!

Finally got around to installing this firmware yesterday, it has made a nice difference to the performance of my bike (somewhat higher cadence, even with a 48v motor on a 48v battery, and more power - top speed on flats went up by maybe 4km/h); thanks to everyone involved :)

However, I am now trying to address a problem with shifting:
I use integrated gear hubs (previously a Sturmey RX-RK5, now a Rohloff) and find I have to wait too long before the motor stops, and miss some shifts due to this.

It would therefore be nice to be able to instantly cut power when easing off the pedals for a shift (even without having a gear sensor).

1/ Is there some setting which would already achieve this? Activating the coaster brake setting, perhaps? 'cadence fast stop', from the non-stock-display version of the firmware seems promising too; any thoughts on this?

2/ If not, I could work on it; however, I may need a few pointers ( pun half-intended :p ) - is there some... reference regarding the structure of the code?
Regarding how it should work:
- Pedal torque, which decreases to (almost) zero twice per rotation, might not be ideal, though I can imagine a very short delay workaround.
- However, if my understanding is correct, the motor also has a cadence sensor? In which case, a quick decrease in pedalling cadence could be interpreted as an instruction to immediately stop assisting, i.e. as soon as enough decrease is detected, and before the pedals are fully stopped.
- Note to self: will cutting motor power be good enough, or should a very short burst of reverse power be applied, in order to fully cut assist torque?

Cheers!


EDIT:
Found PWM_DUTY_CYCLE_RAMP_DOWN_INVERSE_STEP_* parameters in main.h - I'll try setting them down to 1 tomorrow and see what happens.

EDIT2: Confirmed; simply setting PWM_DUTY_CYCLE_RAMP_DOWN_INVERSE_STEP_DEFAULT to 10 results in much faster ramp down and essentially eliminates mis-shifts for me! Now I just have to improve cooling, increase current limits, and feed battery voltage through a DC boost converter :twisted:
 
Hi,

Does anyone know if the VLCD6 connection cable is the same as VLCD5?

The colors of the image wires, I think are for the VLCD5.

The image has the cable that connects to the controller (6 wires). I think this is the cable that connects to the VLCD5.

Controler 6 wires.jpg

I got this image from Casainho's github.

https://github.com/OpenSourceEBike/TSDZ2_wiki/wiki/Wire-KT-LCD3-to-TSDZ2

The VLCD6 I have has the cable cut. And the 6 wires in the cable have the same color as the wires in the image.

Thanks
 
Thanks for this updated firmware. Finally putting my mess of TSDZ2 parts back together with VLCD5 and it seems to work correctly.

On my strange TSDZ2(from an 850c aliexpresss kit) controller i inherited, Temperature sensor has to to go Red(+5) Black(Ground), Blue(Throttle). Not sure if anyone has had to deal with figuring out this strangeness before.

To test the temperature sensor i found I had to connect the motor hall sensor wire and torque sensor connector. I Programmed the controller for 40c max temperature. Then I used a lighter under the temperature sensor to get E06 to display on screen when heated up. If you don't connect the hall sensor/torque sensor the screen will show 1 battery bar, and no response from temperature sensor.

Curious what the max temperature people are running without damage. I think I previously had mine set to 90c.
 
I've got an 8-pin version of the motor (VLCD5 with throttle) and I've been trying to figure out how to connect the STLinkV2 but I can't find any diagrams for the 8-pin version (all guides show only the 6-pin version).

Does anyone have the information about flashing the 8-pin motor?
 
For flashing the motor you need to use the speedsensor cable from the motor. For flashing the vlc5 screen you need to use the connector where you plug in the extra buttonconnector on the screen with power, i button and + and -.

You dont use the cable between motor and screen.
 
Oh i see, thank you for the information TimV :thumb:

Edit: I've successfully flashed the firmware and already the motor assist is a lot smoother than the default levels. Just need to tweak the settings a bit and it'll be perfect. (It did take me quite a while to decode the instructions from Operating manual of display though :))
 
InanZen said:
I've got an 8-pin version of the motor (VLCD5 with throttle) and I've been trying to figure out how to connect the STLinkV2 but I can't find any diagrams for the 8-pin version (all guides show only the 6-pin version).

Does anyone have the information about flashing the 8-pin motor?
For OSF with vlcd5 you need only to flash the controller. You don't need to flash the vlcd5, so don't use the 8-pin connector.
As TimV said, for controller use the connector of the speedsensor..
Connect 3 wires of the ST V2 link to this connector and go.
 
kw1980 said:
Hi,

I fixed the problem,

the memory got corrupted when disconnected the vlcd while STVP was running and usb connected.

Followed tips about motor no response at wiki and restored original fw. It didnt work until changed voltage pin from 5v to 3.3v in usb. Added the reset pin to connection and rewrited original option bytes tab. After that restored memory and program backups and now all is ok.

I saved my ass, it is my girl's bike. :D

I will try OSF next week with more time and calm instead late night at work day.
Thanks for this info, I had the same problem just now, when I could read the data from the motor (in ST Visual Programmer) but couldn't program the Program Memory (Error : Problem while trying to Reset swim and device. Apply a Power On Reset).

Restoring Data Memory and Option Byte from original backups fixed the problem.
 
To change between road / off-road modes and back again what are the procedures with the VLCD5?

Can you change off-road -> road mode with a button combination?
Does removing the display from the cradle and replacing it cause the motor to return to its default mode?
 
Skirmish said:
To change between road / off-road modes and back again what are the procedures with the VLCD5?
....
Does removing the display .... return to its default mode?
OffRoad- Road > level 1- light, light or,
if you start your display: ON..........ON....ON

With stock display the controller is programmed with the configurator, so with changing the display, these settings stay unchanged.
 
I buy tsdz2 with open soft. I mess up with vld5 conf in panel and i am stuck with e03 (foto atach). I dont have cable what can i do? :roll:
 

Attachments

  • IMG_20210429_191127.jpg
    IMG_20210429_191127.jpg
    209.5 KB · Views: 1,338
Back
Top