Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Electric Motors and Controllers
Skirmish   10 mW

10 mW
Posts: 21
Joined: Mar 18 2021 11:22pm

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Skirmish » Apr 28 2021 7:55pm

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?

Elinx   1 kW

1 kW
Posts: 482
Joined: Aug 09 2019 6:58am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Elinx » Apr 29 2021 1:44am

Skirmish wrote:
Apr 28 2021 7:55pm
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.

Mikezzzz   1 µW

1 µW
Posts: 1
Joined: Apr 29 2021 12:14pm

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Mikezzzz » Apr 29 2021 12:27pm

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 (2.4 MiB) Viewed 495 times

Elinx   1 kW

1 kW
Posts: 482
Joined: Aug 09 2019 6:58am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Elinx » Apr 29 2021 1:15pm

Mikezzzz wrote:
Apr 29 2021 12:27pm
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

InanZen   10 µW

10 µW
Posts: 5
Joined: Apr 17 2021 5:48am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by InanZen » May 01 2021 4:01am

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?

Elinx   1 kW

1 kW
Posts: 482
Joined: Aug 09 2019 6:58am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Elinx » May 01 2021 5:07am

InanZen wrote:
May 01 2021 4:01am
...
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
Last edited by Elinx on May 01 2021 10:56am, edited 2 times in total.

Akita   10 µW

10 µW
Posts: 6
Joined: Apr 29 2021 10:20am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Akita » May 01 2021 5:39am

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?

Elinx   1 kW

1 kW
Posts: 482
Joined: Aug 09 2019 6:58am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Elinx » May 01 2021 6:22am

Akita wrote:
May 01 2021 5:39am
...
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.

InanZen   10 µW

10 µW
Posts: 5
Joined: Apr 17 2021 5:48am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by InanZen » May 01 2021 1:15pm

Elinx wrote:
May 01 2021 5:07am
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) Downloaded 7 times

Elinx   1 kW

1 kW
Posts: 482
Joined: Aug 09 2019 6:58am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Elinx » May 01 2021 2:42pm

InanZen wrote:
May 01 2021 1:15pm
...
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.

dameri   100 W

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

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by dameri » May 02 2021 1:51am

Elinx wrote:
May 01 2021 2:42pm
InanZen wrote:
May 01 2021 1:15pm
...
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?

Elinx   1 kW

1 kW
Posts: 482
Joined: Aug 09 2019 6:58am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Elinx » May 02 2021 3:07am

dameri wrote:
May 02 2021 1:51am
Elinx wrote:
May 01 2021 2:42pm
...... 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
Last edited by Elinx on May 02 2021 3:19am, edited 2 times in total.

dameri   100 W

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

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by dameri » May 02 2021 3:14am

Ok, thank you Elinx.

Eoinywoney   1 µW

1 µW
Posts: 4
Joined: May 02 2021 2:56am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Eoinywoney » May 02 2021 4:00am

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
IMG_20210501_125822.jpg (3.63 MiB) Viewed 304 times
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
IMG_20210501_153529.jpg (4.19 MiB) Viewed 304 times
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
Screenshot 2021-05-02 092921.png (90.13 KiB) Viewed 304 times
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
IMG_20210501_164144.jpg (2.42 MiB) Viewed 304 times

Elinx   1 kW

1 kW
Posts: 482
Joined: Aug 09 2019 6:58am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Elinx » May 02 2021 5:07am

Eoinywoney wrote:
May 02 2021 4:00am
........ 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.

Akita   10 µW

10 µW
Posts: 6
Joined: Apr 29 2021 10:20am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Akita » May 03 2021 10:21am

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.

Elinx   1 kW

1 kW
Posts: 482
Joined: Aug 09 2019 6:58am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Elinx » May 03 2021 11:00am

Akita wrote:
May 03 2021 10:21am
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

Akita   10 µW

10 µW
Posts: 6
Joined: Apr 29 2021 10:20am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Akita » May 04 2021 7:54am

Is this the clutch I should use when copying?
https://empoweredppl.files.wordpress.co ... nout-1.jpg
https://empoweredpeople.co.uk/2020/05/2 ... are-there/
On my ST-LINK number 3, the text is SWIW.
Is it the same as SWIM?

Elinx   1 kW

1 kW
Posts: 482
Joined: Aug 09 2019 6:58am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Elinx » May 04 2021 9:28am

Akita wrote:
May 04 2021 7:54am
.....
the text is SWIW.
Is it the same as SWIM?
Chinese typo I think :)

Akita   10 µW

10 µW
Posts: 6
Joined: Apr 29 2021 10:20am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Akita » May 05 2021 11:03am

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/2 ... are-there/
Which is right?

Elinx   1 kW

1 kW
Posts: 482
Joined: Aug 09 2019 6:58am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Elinx » May 05 2021 1:21pm

Akita wrote:
May 05 2021 11:03am
Setting configuration STVP
....
Which is right?
For flashing stock FW .....X4 (also for the backup of the stock FW)
For flashing OSF ......X6

Main OSF wiki
OSF Wiki for stock display

Akita   10 µW

10 µW
Posts: 6
Joined: Apr 29 2021 10:20am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Akita » May 05 2021 1:48pm

I will only copy original firmware and then copy firmware v20.1C with JavaConfigurator.jar
Then only the STM8S105X4 setting works.

Elinx   1 kW

1 kW
Posts: 482
Joined: Aug 09 2019 6:58am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Elinx » May 05 2021 2:41pm

Akita wrote:
May 05 2021 1:48pm
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

Eoinywoney   1 µW

1 µW
Posts: 4
Joined: May 02 2021 2:56am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Eoinywoney » May 05 2021 5:25pm

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.

Elinx   1 kW

1 kW
Posts: 482
Joined: Aug 09 2019 6:58am

Re: Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Post by Elinx » May 05 2021 6:01pm

Eoinywoney wrote:
May 05 2021 5:25pm
....
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

Post Reply