Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Mikezzzz said:
I buy tsdz2 with open soft. ....
The OSF version could be interesting.
This because I advice yoy to read some manuals how to handle the display.
v 0.20.1B manuals
v 0.20.1C manuals

If the controller hardware is defective E03 is for the cadence sensor.
But I think in your case Turbo-level E03 has to do with some light settings which you can change.
How? See the manuals
 
There is a bug in this firmware where the motor keeps working even without pedaling or even when the power assist level is at 0 (off) - sort of like if the thumb throttle was stuck (but it is not). The restart of the controller (vlcd5) fixes it.
I'm not sure of the exact situation leading to the problem happening, but it happened on two separate bikes, flashed with same firmware (same settings as well).
Anyone experienced any similar problems?
 
InanZen said:
...
Anyone experienced any similar problems?
Here is this described too.
It could be the sensitivty of your torque sensor. Which torque adc range you have?
Do you have enabled the setting "assist without pedaling"?
Here this behaviour was too and he discovered that the torquesensor was touched by water and missing a support spring.
So the main reason could be something with the torquesensor, setting, calibration, range, defect
 
This is my 1st post.
I have now mounted the engine and have a question.
Has now mounted the engine TSDZ2 36v with coaster brake.
Original firmware 5
How do I get to the menu to read the pedal force?
Then needed when setting v20.1C
According to the manual:
5.5 Torque Signal Value Display (TE) - For Service Inspection Use Only
Press the Info and the Power buttons simultaneously for 10 seconds under ODO menu, then press only the Info button to show “ODO”, “TRIP”, “AVG”, “TIME”, “TE” (torque value) and “TE1” (initial torque value) respectively and circularly.
Under submenu "TE" or "TE1", press Info again to show the torque value, which is for service inspection use only.
How do I get to that menu?
 
Akita said:
...
How do I get to the menu to read the pedal force?
Then needed when setting v20.1C
.......
I think you confuse the extra settings of stock Firmware and calibrate torquesensor setting of OSF v0.20.1C
If you flash OSF these extra settings are gone and you need the manual of OSF how to calibrate the torquesensor.
Manuals v.0.20.1C

Display Manual :
Choice of torque sensor advanced
The “Torque sensor advanced” function, if enabled, optimizes the range of use of the torque sensor. Calibration required, see parameter configuration guide.
It is enabled/disabled at level 1, by setting E04 - TORQUE SENSOR ADV, lights button 2 + 2 + 2 times until E04 flashing.
Torque sensor ADC calibration.
In this menu position with E04 flashing, by pressing the lights button again (on), the ADC value of the torque sensor is displayed for 5 seconds, by pressing it again (off) the display time increases to 25 seconds, sufficient to obtain the ADC calibration values to be entered in the configurator.
The ADC value of the torque sensor without any push on the pedals in "Pedal torque ADC offset". 5
The ADC value of the torque sensor with the maximum thrust applied to the pedal (cyclist standing, on the right pedal in horizontal position) in “Pedal torque ADC max”.
To end the operation before the end of the time, change the level, or continue for the next calibration.
 
Elinx said:
Here is this described too.
It could be the sensitivty of your torque sensor. Which torque adc range you have?
Do you have enabled the setting "assist without pedaling"?
Here this behaviour was too and he discovered that the torquesensor was touched by water and missing a support spring.
So the main reason could be something with the torquesensor, setting, calibration, range, defect
I haven't measured the ADC values yet. But it doesn't sound like its that's the same problem. Regardless of the sensitivity of the sensor, the motor should not be running if power assist level is at Off.

This post (point 1) describes a similar problem. When it happened to me i was also using Turbo than when i stopped i noticed the motor trying to go - like it sometimes would at stop, but usually it tries to go, than stops when it senses it can't. This time it just kept trying even after i turned it to Off (power level).

"Assist without pedaling" setting is disabled, I've attached my configurator settings.
 

Attachments

  • TSDZ2_configurator_settings.ini
    643 bytes · Views: 46
InanZen said:
...
I haven't measured the ADC values yet.......
This post (point 1) describes a similar problem. .....
Measure (and calibrate) your torque adc settings. Then you know for sure if this could be a reason.
Also famichiki had a very sensitive torquesensor, with an very high min. point.
He has done for that a full hardware calibration.
The problem of famichiki was with v0.19 that has indeed a bug for some people, but that was repaired by mbrusa.

Later v0.20.1B is intensive developement for lcd3 by Buba, that had many changes and improvemenst which was made for stock display's by mbrusa again, like v0.20.1C too, which is a modification for all displays of the (again improved) BT version of mspider65.
So you can't compare this behaviour between the different OSF versions directly.
One thing outside OSF could be also a problem. A corrupted Option Byte.

What you can try too, is to flash the option byte only with ST link, with your backup or stock version.
This file will not be flashed anymore with latest OSF versions, so it will be untouched between different versions of OSF.
In the past this would solve the problem of a freezed controller, although it is not clear how this file gets corrupt.
 
Elinx said:
InanZen said:
...
I haven't measured the ADC values yet.......
This post (point 1) describes a similar problem. .....
Measure (and calibrate) your torque adc settings. Then you know for sure if this could be a reason.
Also famichiki had a very sensitive torquesensor, with an very high min. point.
He has done for that a full hardware calibration.
The problem of famichiki was with v0.19 that has indeed a bug for some people, but that was repaired by mbrusa.

Later v0.20.1B is intensive developement for lcd3 by Buba, that had many changes and improvemenst which was made for stock display's by mbrusa again, like v0.20.1C too, which is a modification for all displays of the (again improved) BT version of mspider65.
So you can't compare this behaviour between the different OSF versions directly.
One thing outside OSF could be also a problem. A corrupted Option Byte.

What you can try too, is to flash the option byte only with ST link, with your backup or stock version.
This file will not be flashed anymore with latest OSF versions, so it will be untouched between different versions of OSF.
In the past this would solve the problem of a freezed controller, although it is not clear how this file gets corrupt.

Does the controller or monitor need to be programmed with ST Visual Programmer without leaving the option byte programmed? That is, you cannot use the program all tabs method. Do I then have to program the program memory tab and data memory separately with the same firmware?
 
dameri said:
Elinx said:
...... solve the problem of a freezed controller,........[/b]
........Do I then have to program the program memory tab and data memory separately with the same firmware?
I never had to do this, because I never had problems, but as I understand flash OSF with Java Configurator and after that the stock OptionByte separately with STVP.

The earlier Option Byte discussion starts here
 
Hello everyone,

I just wanted to introduce myself, and my conversion. First off let me say a HUGE thank you to Emmebrusa and everyone else involved in developing the firmware, it really makes this little engine come alive, cadence is vastly improved, and the engine runs much quieter and smoother, It's very natural feeling. :D

IMG_20210501_125822.jpg

I flashed it yesterday, (an easy process for anyone that can follow instructions, even for digitally challenged persons such as myself) and went for a spin, I managed over 100km (mixed roads and gravel trails with 1000m elevation gain in power assist mode, using mostly tour and switching to sport for hills. For the return home I used Eco mostly with tour for extra help on hills (as I was afraid of the battery running out), I reckon I'd get even more range using these settings from the start. Battery is 48v 15.5Ah 5P13S Hailong with Samsung cells powering 48v 750w motor.

The bike is a charge plug 3 2014 steel framed road bike that I've been using to commute 20km round trip to work on for the past 5 years. The conversion went very smoothly, took about 3 hours with no hiccups, the battery even fits my bottle cage mounts,, with a ziptie up top to prevent rattle.
IMG_20210501_153529.jpg

I still have to tidy up the cable management :wink: and Next up is wider tyres, maybe 650b? Bafang right crank arm and temp sensor, maybe a triangle battery (for stealth) in the future. Is there any reason why I couldn't fit one low down in the triangle just above the Bottom bracket? I was going to get brake sensors but now don't feel it's necessary for my style of riding. I'm so so happy with how the engine feels now but I'll continue to experiment with settings. I'll give hybrid mode a go next, If i can figure out how to get there on the Vlcd-6 :lol: . Switching street mode and getting battery percentage and voltage to display is about the extent of my knowledge so far but I'll figure it out.

These are my Java config settings, everything else is default. It would be great if someone could let me know if anything looks off.

Screenshot 2021-05-02 092921.png

On that note; Is it possible to do the torque sensor calibration on the Vlcs-6?

Thank you so much again to everyone involved in developing the firmware and associated manuals. I had the most fun I've had in years yesterday and this little motor took me places I'd never dream of going under my own power. What a fun and liberating experience.

Bonus view from the top of Slieveboy in Ireland:

IMG_20210501_164144.jpg
 
Eoinywoney said:
........ I'll give hybrid mode a go next, If i can figure out how to get there on the Vlcd-6 :lol: . Switching street mode and getting battery percentage and voltage to display is about the extent of my knowledge so far but I'll figure it out.
......
On that note; Is it possible to do the torque sensor calibration on the Vlcs-6?
....
:bigthumb:
Yes, changing the options with stock display and so the Vlcd-6 too, is a considerable button dance that you have to practice before you understand how it works :wink:

The options can be changed with the "light on/off" button, which is for Vlcd6 a bit more complicated, because you have to push "down" button for 2 seconds.
It is al about the right timing and understanding the (blinking) E0x codes
I only can advice you to study the manual and practice that timing.

Switching between street/ofroad mode must be done at level 1 (eco) and is relative easy to do after starting the display.
After this you must push with vlcd6 "down" button 2 times till E02 is blinking
For measuring Torque ADCvalues, at level 1 too, you must push 6 times till E04 is blinking and after this again 1 time to see the torque values a longer time.

FYI: Hybrid mode is done at level 3 (sport) "down"button 4 times till E03 blinks.
 
How can I Choice of assistance mode från VLCD5 screen
6 types of assistance modes are available
Have read but can not find it.
 
Akita said:
How can I Choice of assistance mode från VLCD5....
I don't know what you have read, but the default assist mode you can choose with the Configurator.
For v.020.1C, if you also have enabled "set parameters at startup" :
You can choose a different assist mode on vlcd5, with a "power/light" button sequence and the right level setting.
level 1 offroad/boost
level 2 power/torque/cadence
level 3 emtb/hybrid/cruise

example:
Default Power assist, change to Hybrid assist and back
Choose level 3 (sport), push power/light button 2+2 times, wait for blinking E03, done
Back to Power assist, Display off and on for going to default settings again, or ...
Choose level 2 (tour), push power/light button 2 times, wait for blinking E02, done

If you want to keep the last setting as new default:
Choose level 0 (off), push power/light button 2+2+2 times, wait for blinking E04, done

See the Operating Manual
 
Is this the clutch I should use when copying?
https://empoweredppl.files.wordpress.com/2020/05/tsdz2-programming-cable-pinout-1.jpg
https://empoweredpeople.co.uk/2020/05/28/tongsheng-tsdz2-what-firmware-options-are-there/
On my ST-LINK number 3, the text is SWIW.
Is it the same as SWIM?
 
Setting configuration STVP
Hardware: ST-Link
Port: USB
Programming mode: SWIM
Device: Should I use STM8S105X4 or STM8S105X6
Here setting STM8S105X4
https://www.youtube.com/watch?v=zChf_2K8rW8
and here STM8S105X6
https://empoweredpeople.co.uk/2020/05/28/tongsheng-tsdz2-what-firmware-options-are-there/
Which is right?
 
I will only copy original firmware and then copy firmware v20.1C with JavaConfigurator.jar
Then only the STM8S105X4 setting works.
 
Akita said:
I will only copy original firmware and then copy firmware v20.1C with JavaConfigurator.jar
....
If you use the Java configurator, then the bat script will setup STVP ......X6 with a cmd command, so you don't need to setup STVP yourself. So no worries about that setting.

"STVP_CmdLine -BoardName=ST-LINK -ProgMode=SWIM -Port=USB -Device=STM8S105x6 -FileProg=main.ihx -FileData=data.ihx -verbose -no_loop -verif -no_warn_protect"

But if you want to backup or restore stock FW, you use STVP with graphical menu.
In that case you save and flash the three "ihx" or "hex" or "S19" files manually and use ........X4

If you flash OSF for lcd3/860C etc. you flash also manually such files and must use ......X6
 
Thank you so much Elinx, I think I'm starting to get the hang of navigating the Vlcd-6 menu a small bit. I've been reading through the forums on here quite a lot and your name seems to pop up a lot with very helpful and clear advice, thank you for that. It seems to be a very friendly and helpful community here. Which is reassuring when one is struggling with something... :? which leads me on to my next question... :lol:

My torque values are min 17 and max 27 (lights button 6 times and twice more when E04 is flashing. I then get error code E02 (torque sensor) if I flash these settings the motor won't start at all. It runs again after reverting back to my original settings. Is my torque sensor broken? This is my first ebike experience so I'm not sure I'd be able to "feel" it.

Such a low range implies a faulty sensor to me? or something else? I must admit I initially stood on the pedals vertically :oops:

time for a warranty replacement? or open it up? I didn't back up the FFW, can the FFW be flashed back to the motor?

Thank you so much again.
 
Eoinywoney said:
....
My torque values are min 17 and max 27 .... if I flash these settings the motor won't start at all. It runs again after reverting back to my original settings. Is my torque sensor broken? ....
....
I didn't back up the FFW, can the FFW be flashed back to the motor?
You must read all 3 digits, you have only 2. That is why the torquesensor isn't responsive anymore
So at least your torque values should be min. 170 and max. 279. (Ignore the point on display)
(In your case that last digit could be another value)
As you saw, you always can go back to the default values, by disabling the advanced calibrated setting in the java configurator

About the forgotten backup.....
You could download stock FW here.
Download program, data and option for your motor (36V or 48V)
Eventually, if needed, you can flash this manually with STVP
 
Ahhh ok I see, I'm an idiot, I ignored the decimal point. I'll try those values now. Glad it looks like I won 't have to return it now, was a bit worried there for a few hours.

Thanks again Elinx, it must be frustrating dealing with clueless idiots such as my myself all day, but hopefully one day I'll have learned enough to be able to pay it forward.
 
Elinx said:
Akita said:
I will only copy original firmware and then copy firmware v20.1C with JavaConfigurator.jar
....
If you use the Java configurator, then the bat script will setup STVP ......X6 with a cmd command, so you don't need to setup STVP yourself. So no worries about that setting.

"STVP_CmdLine -BoardName=ST-LINK -ProgMode=SWIM -Port=USB -Device=STM8S105x6 -FileProg=main.ihx -FileData=data.ihx -verbose -no_loop -verif -no_warn_protect"

But if you want to backup or restore stock FW, you use STVP with graphical menu.
In that case you save and flash the three "ihx" or "hex" or "S19" files manually and use ........X4

If you flash OSF for lcd3/860C etc. you flash also manually such files and must use ......X6
Thanks for your answers to me.
Very good.
 
Eoinywoney said:
.. I ignored the decimal point.
No, you didn't ignored the point, because you use the value before that point :)
If default settings work for you, than it can't be hardware.

Eoinywoney said:
..... it must be frustrating .....
If it was frustrating I didn't answer. Also I too have been a starter with Tsdz2 and OSF once.
Inside the Tsdz2 OSF Wiki and OSF manuals, you find all information you need, but sometimes a bit overwhelming.
 
Back
Top