Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Thanks to @StanceCoke for making the new configurator design available and thanks to @Mbrusa for the updates. I am sure all the riders appreciate the excellent work you have done.

Cheers Emma

Yes we do! Thanks a lot StanceCoke and Mbrussa to put energy and time in this project :thumb:
 
mbrusa said:
maki1000 said:
Hi, sorry for my poor english. I downloaded the software via Java cofnfigulator from this link https://github.com/stancecoke/TSDZ2-Smart-EBike/find/master?q= I set my battery to 14s and minimum voltage 42v and set 48v for the engine. I changed nothing more. Unfortunately, I still have a problem with the info button, which hangs the display and nothing can be done.

https://youtu.be/QuN4Mf73NRU
The display broke?
Isn't it that you flashed with the display on?
The VLCD5 doesn't like this!


It was the extra handle to change the degree of assistance. After disconnecting it, everything returned to nomra.
 
Is there any way to make the turbo mode (4/4 bars) the default at startup?
My bike is super heavy and I'm riding turbo mode most of the time anyways. The display always starts at tour mode (2/4 bars).
 
Today, after switching on again showed only one piece of battery and the engine completely inoperative. I upload the firmware again. Luckily it happened at home. TSDZ2, VLCD5 Java 0.3.7 vM0.19.c
 
I would just like to say thank you to stancecoke for his great work and mrbusa i have been out on my bike for the first time in a long time due to lockdown.The bike works great while using there great software and firmwares.
Keep up the great work.
 
I'm a missing some? Cant find the file v0.20.0-beta.2 with the new configurator?
https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/releases
Here the latest is TSDZ2-v0.57.2? Had version 19 but yesterday had 2 times the xh18 and motor just shut off for no reason. During cycling, the first time it happened it also dropped to odo with 70km? So gonna try something else.
 
first of all
THANKS for this firmware. The reason I got TSDZ2 is obviously also price, and investing an additional $80 for a new LCD kind of defeats the purpose.

I noticed the boost mode is removed in this firmware. My wife misses the "push" she needs to get going from standstill with a loaded bike compared to the stock, and boost would give this back. Maybe there are other ways to do this, but I am looking for a specific startup boost, not a constant boost.

https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/TSDZ2-and-KT-LCD3-advanced-features-with-Flexible-OpenSource-firmwares#4_startup_power_boost


It must be hard to allow configuration of this without a proper LCD interface, however, could I just add the code back and hardcode some values in my firmware? Or are there other reasons it was removed in the code or could i just add it back?
 

Attachments

  • disabled.PNG
    disabled.PNG
    13.6 KB · Views: 1,529
Already in version 20 beta 1 for LCD3, buba had eliminated the boost function.
It can be replaced with the "motor acceleration" parameter. Increase very carefully!
Another possibility to have the push at the start is to enable "assist without pedal rotation".
What version of firmware are you using?
Motor? Battery? Display?
 
Hello Guys, I have the tsdz2 motor for more than one year now but was a bit disappointed in the software causing very strange behaviour sometimes. That's why I started searching and found the forum, in the meantime I have already flashed the latest firmware 20 beta1a with the vlcd5 display and was impressed how much smoother the motor performs.
However even after reading the 5 page manual for changing settings I am not able to change settings on the display, sorry but just don't fully understand how to.
I had first flashed it as streetmode at startup, but not able to get it into offroad, so always stuck in max speed of 25kmh.
I now have it flashed to start in offroad but rather would like street as default en change the mode with the display.
But in streetmode as I have the display in eco and press the light swith I see E02 flashing but the speed limit is not removed.
I know it's annoying for you as experts that I can't get this to work, but can someone point me in a direction of what I am doing wrong?
Furthermore thank you very much for all the effort you guys put in this firmware.
 
Wimpy747 said:
Hello Guys, I have the tsdz2 motor for more than one year now but was a bit disappointed in the software causing very strange behaviour sometimes. That's why I started searching and found the forum, in the meantime I have already flashed the latest firmware 20 beta1a with the vlcd5 display and was impressed how much smoother the motor performs.
However even after reading the 5 page manual for changing settings I am not able to change settings on the display, sorry but just don't fully understand how to.
I had first flashed it as streetmode at startup, but not able to get it into offroad, so always stuck in max speed of 25kmh.
I now have it flashed to start in offroad but rather would like street as default en change the mode with the display.
But in streetmode as I have the display in eco and press the light swith I see E02 flashing but the speed limit is not removed.
I know it's annoying for you as experts that I can't get this to work, but can someone point me in a direction of what I am doing wrong?
Furthermore thank you very much for all the effort you guys put in this firmware.

I have found that this can be accomplished when in ECO mode by pressing the 'Lights' button once to enter E02, and then pressing the 'Lights' button again, but only after setting the 'ENABLE_SET_PARAMETER_ON_STARTUP' to 1 in the 'Advanced settings' when flashing the controller.

Please someone else chime in if my advice is not correct.
 
emr said:
..., but only after setting the 'ENABLE_SET_PARAMETER_ON_STARTUP' to 1 in the 'Advanced settings' when flashing the controller.....
That is the correct setting if you want to switch between "street mode" or "offroad mode" in only one step.

It is possible to choose this "set parameter" setting (or "display data" setting) also in Off level (0) too.
After that you can choose in Eco level (1) "street mode" or "offroad mode". In that case you need two steps.
 
mbrusa said:
Already in version 20 beta 1 for LCD3, buba had eliminated the boost function.
It can be replaced with the "motor acceleration" parameter. Increase very carefully!
Another possibility to have the push at the start is to enable "assist without pedal rotation".
What version of firmware are you using?
Motor? Battery? Display?

Thanks Mbrusa! I was not aware of this.

I use the latest firmware from Stancecoke's git, 36V motor with 10s and vlcd5.
Acceleration of the bike is sufficient after it takes off- so i am afraid that increasing this is giving more aggressiveness over the entire power band, which is not required.

I might consider trying "assist without pedal rotation" - however can this even be enabled without brake sensor installed? (yes also the rider needs to be very careful with this). Maybe if i tune it with a low value that it is still relatively safe.
 
geekmystique said:
...
I might consider trying "assist without pedal rotation" - however can this even be enabled without brake sensor installed? (yes also the rider needs to be very careful with this). Maybe if i tune it with a low value that it is still relatively safe.
With the 20 beta 1, I have always used "assist without pedal rotation" enabled and without brake sensors.
You need to set ASSISTANCE_WITHOUT_PEDAL_ROTATION_THRESHOLD to 30 max and go safe.
 
mbrusa said:
You need to set ASSISTANCE_WITHOUT_PEDAL_ROTATION_THRESHOLD to 30 max and go safe.

Wow thanks ! That was it!
My guess is the stock firmware actually also pushed without rotation. With the treshold as 30 I tried to mess a bit, but the power delivery is coming smooth and doesn't cause unnatural acceleration just by relaxing the legs on the pedals.
 
emr said:
Wimpy747 said:
Hello Guys, I have the tsdz2 motor for more than one year now but was a bit disappointed in the software causing very strange behaviour sometimes. That's why I started searching and found the forum, in the meantime I have already flashed the latest firmware 20 beta1a with the vlcd5 display and was impressed how much smoother the motor performs.
However even after reading the 5 page manual for changing settings I am not able to change settings on the display, sorry but just don't fully understand how to.
I had first flashed it as streetmode at startup, but not able to get it into offroad, so always stuck in max speed of 25kmh.
I now have it flashed to start in offroad but rather would like street as default en change the mode with the display.
But in streetmode as I have the display in eco and press the light swith I see E02 flashing but the speed limit is not removed.
I know it's annoying for you as experts that I can't get this to work, but can someone point me in a direction of what I am doing wrong?
Furthermore thank you very much for all the effort you guys put in this firmware.

I have found that this can be accomplished when in ECO mode by pressing the 'Lights' button once to enter E02, and then pressing the 'Lights' button again, but only after setting the 'ENABLE_SET_PARAMETER_ON_STARTUP' to 1 in the 'Advanced settings' when flashing the controller.

Please someone else chime in if my advice is not correct.
Thats what I thought but does E02 have to steady or flashing at this point?
If I push again the display switches to E03..
 
Wimpy747 said:
emr said:
Wimpy747 said:
Hello Guys, I have the tsdz2 motor for more than one year now but was a bit disappointed in the software causing very strange behaviour sometimes. That's why I started searching and found the forum, in the meantime I have already flashed the latest firmware 20 beta1a with the vlcd5 display and was impressed how much smoother the motor performs.
However even after reading the 5 page manual for changing settings I am not able to change settings on the display, sorry but just don't fully understand how to.
I had first flashed it as streetmode at startup, but not able to get it into offroad, so always stuck in max speed of 25kmh.
I now have it flashed to start in offroad but rather would like street as default en change the mode with the display.
But in streetmode as I have the display in eco and press the light swith I see E02 flashing but the speed limit is not removed.
I know it's annoying for you as experts that I can't get this to work, but can someone point me in a direction of what I am doing wrong?
Furthermore thank you very much for all the effort you guys put in this firmware.

I have found that this can be accomplished when in ECO mode by pressing the 'Lights' button once to enter E02, and then pressing the 'Lights' button again, but only after setting the 'ENABLE_SET_PARAMETER_ON_STARTUP' to 1 in the 'Advanced settings' when flashing the controller.

Please someone else chime in if my advice is not correct.
Thats what I thought but does E02 have to steady or flashing at this point?
If I push again the display switches to E03..

This is what occurs for me...
  • Press power button
  • Wait for system to initialise (battery level displayed and speedo '00.0')
  • Press the Power/Lights button
  • Display shows E02 (not flashing)
  • Press the Power/Lights button again
  • Display shows E02 (flashing) if you wait a second or two the flashing stops and speedo returns to '00.0'
  • I then press the '+' level button to change to the desired level

Remember that for the above to work, that you need to either...
Set the 'ENABLE_SET_PARAMETER_ON_STARTUP' to 1 in the 'Advanced settings' when flashing the controller
OR
As Elinx advised...
Elinx said:
emr said:
..., but only after setting the 'ENABLE_SET_PARAMETER_ON_STARTUP' to 1 in the 'Advanced settings' when flashing the controller.....
That is the correct setting if you want to switch between "street mode" or "offroad mode" in only one step.

It is possible to choose this "set parameter" setting (or "display data" setting) also in Off level (0) too.
After that you can choose in Eco level (1) "street mode" or "offroad mode". In that case you need two steps.

Cheers Emma
 
Yesterday I flashed my 36V motor with 48V stock firmware and it worked well.

Today I want to try out OS firmware with VLCD5 display. I read the wiki and skimmed through the manuals. However, I didn't understand how to flash the controller. After running JavaConfigurator and pressing "Compile & Flash" will it automatically flash the controller if it's connected? Or it'll just update required files with the right config and I'll have to run ST Visual Programmer to load and write files from releases/20.1 folder?
 
Andrew707 said:
Yesterday I flashed my 36V motor with 48V stock firmware and it worked well.

Today I want to try out OS firmware with VLCD5 display. I read the wiki and skimmed through the manuals. However, I didn't understand how to flash the controller. After running JavaConfigurator and pressing "Compile & Flash" will it automatically flash the controller if it's connected? Or it'll just update required files with the right config and I'll have to run ST Visual Programmer to load and write files from releases/20.1 folder?

Did you see this Andrew ? https://github.com/stancecoke/TSDZ2-Smart-EBike/wiki
Really explains well how to do it. Just follow it step by step.
 
gomyles said:
Did you see this Andrew ? https://github.com/stancecoke/TSDZ2-Smart-EBike/wiki
Really explains well how to do it. Just follow it step by step.
Yes, I read it like 10 times. In general, this is a very good description, but it doesn't explain well what happens in step 7. Does it actually flash everything necessary (program, data, option memory) for you or you have to do it yourself manually and then step 7 just apply custom config to your already flashed controller?

Here's what I've tried so far:
- Connected everything as explained in main wiki page.
- Then downloaded the firmware hex file from here and flashed program memory tab (this step was in main wiki page too). On another occasion, I've tried to flash (program, data, option) tabs from releases folder instead. On third occasion, I didn't flash anything at all.
- Then went through steps 1-7 in the wiki. In JavaConfigurator selected my settings and pressed "Compile & Flash". So this is the part which is either not working for me or I'm doing something wrong. After pressing this button the opened command prompt only writes Cleaning files... and that's it. My assumption that it silently run everything necessary in the background. Or the process failed somewhere but didn't show me any error messages.

EDIT: As far as I understand JavaConfigurator just updates setting in the source code and then launches compile_20.bat which should compile the code and create some build artefacts and then program_20.bat is launched which actually does all the flashing.
So I've tried to run these two .bat files manually but looks like compile one just cleans something but doesn't do anything else. And then program_20.bat complains that it can't find files to write to controller's memory...

I'll try to install everything again on a Windows VM on my MAC. Hope it works...
 
This has been great. I love being able to change various parameters. 2 that I can't seem to find are:

increasing max rpm to 120-130 would be great, is it possible?

my biggest pet peeve is that I max out assist at around 1/4 my body weight being applied to the pedals. As if it was designed for a child.Still worlds better than the bafang for ability to maneuver trails, but it would be nice to get a torque calibrated to my weight. even keeping the same curve would be fine. I spent the last couple hours poking around regarding torque and there reallydoesn't appear to be a straight forward answer. A concise step by step is what I seek. Is there such a thing I overlooked? something like with the open source for bafang displays?
Thanks
Barrett
 
Andrew707 said:
gomyles said:
Did you see this Andrew ? https://github.com/stancecoke/TSDZ2-Smart-EBike/wiki .............
Yes, I read it like 10 times. In general, this is a very good description, but it doesn't explain well what happens in step 7. Does it actually flash everything necessary (program, data, option memory) for you or you have to do it yourself manually and then step 7 just apply custom config to your already flashed controller?

Here's what I've tried so far:
- Connected everything as explained in main wiki page.
Till here you did good

But then it goes wrong, because you got the FW with the link on the main wiki page and downloaded casainho's hex code
gomyles said:
- Then downloaded the firmware hex file from here and flashed program memory tab (this step was in main wiki page too). ........
You must not download a hex file, but the master code of stancecoke github chamnnel and then follow the guide.
With step 7
If you have connected the STlink V2 to the Tsdz2, the code will be compiled and flashed (program, data, option memory)

But there are some conditions that the bat file needed otherwise you must change something inside.
The programs SDCC and ST link must be in the root directory ( C:\SDCC\ and C:\STMicroelectronics\ ) of a Windows PC.
Because you run a VM inside a Mac, I don't know if the paths to these installed programs are right.
 
Elinx said:
You must not download a hex file, but the master code of stancecoke github chamnnel and then follow the guide.
With step 7
If you have connected the STlink V2 to the Tsdz2, the code will be compiled and flashed (program, data, option memory)

But there are some conditions that the bat file needed otherwise you must change something inside.
The programs SDCC and ST link must be in the root directory ( C:\SDCC\ and C:\STMicroelectronics\ ) of a Windows PC.
Because you run a VM inside a Mac, I don't know if the paths to these installed programs are right.
Thanks, so now I understood what I did wrong. First thing was manually flashing memory before running JavaConfigurator. Second thing was that I was using my work windows laptop and it has some restrictions which prevents running scripts from .bat files so that's why JavaConfigurator was failing to compile the code and invoke program_20.bat.
On my Windows VM on a MAC everything worked well since this VM is just a fresh windows with no restrictions.
 
Andrew707 said:
Elinx said:
You must not download a hex file, but the master code of stancecoke github chamnnel and then follow the guide.
With step 7
If you have connected the STlink V2 to the Tsdz2, the code will be compiled and flashed (program, data, option memory)

But there are some conditions that the bat file needed otherwise you must change something inside.
The programs SDCC and ST link must be in the root directory ( C:\SDCC\ and C:\STMicroelectronics\ ) of a Windows PC.
Because you run a VM inside a Mac, I don't know if the paths to these installed programs are right.
Thanks, so now I understood what I did wrong. First thing was manually flashing memory before running JavaConfigurator. Second thing was that I was using my work windows laptop and it has some restrictions which prevents running scripts from .bat files so that's why JavaConfigurator was failing to compile the code and invoke program_20.bat.
On my Windows VM on a MAC everything worked well since this VM is just a fresh windows with no restrictions.


Nicely done! Who would have guessed that the .bat files would be restricted. Glad to hear you got it down, congrats. Enjoy the new firmware!
 
Back
Top