Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Electric Motors and Controllers
mbrusa   100 W

100 W
Posts: 101
Joined: Dec 11 2019 12:13am

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

Post by mbrusa » May 02 2020 3:25am

Hi everyone
I decided to release the new version, I would have liked to try it a little more, okay, from Monday I can do it.
However, two months locked at home have served to fix many small details of the firmware (changelog.txt) and to complete the Java Parameter Configurator of Stancecoke that I thank.
I posted the new version on GitHub, I hope it all works.

https://github.com/emmebrusa/TSDZ2-Smart-EBike-1
Last edited by mbrusa on May 05 2020 11:29am, edited 1 time in total.
Flexible OpenSource firmware for TongSheng TSDZ2 motor and VLCD5 VLCD6 XH18 displays
https://github.com/emmebrusa/TSDZ2-Smart-EBike-1

User avatar
stancecoke   100 kW

100 kW
Posts: 1204
Joined: Aug 02 2017 2:56pm

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

Post by stancecoke » May 02 2020 6:45am

mbrusa wrote:
May 02 2020 3:25am
I posted the new version on GitHub
Thank you! :thumb:

Unfortunately, you did not use the github fork function, so the link to the original project of casainho was lost.
Please, can you copy the wiki of my repo to yours, then I can delete my repo.

regards
stancecoke

mbrusa   100 W

100 W
Posts: 101
Joined: Dec 11 2019 12:13am

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

Post by mbrusa » May 02 2020 10:11am

stancecoke wrote:
May 02 2020 6:45am
mbrusa wrote:
May 02 2020 3:25am
I posted the new version on GitHub
Thank you! :thumb:

Unfortunately, you did not use the github fork function, so the link to the original project of casainho was lost.
Please, can you copy the wiki of my repo to yours, then I can delete my repo.

regards
stancecoke
Hi stancecoke
It's important? Can you explain what it means?
Too hard to use GitHub I need knowledge that I don't have.
I'll explain how I did it, so you tell me where I went wrong and if I can fix it.
I had cloned your repository locally and made the changes.
GitHub account created.
With GitHub Desktop, at the bottom left, above the "Commit to master" button there was "Create fork", I did this.
On github.com in my account, I found a copy of your repository without my changes.
Ok, I said to myself, now I have to update it.
With GitHub Desktop, clicking on "Commit to master" displays a warning, I don't remember the details, summarizing "you don't have permission".
Who was to give me permission? I have searched with google I have not found an answer.
Then I did otherwise. In my GitHub account I created another repository, a clone of yours.
With GitHub Desktop copied locally and modified the files.
With this, "Commit to master" it works without asking for authorizations.
I deleted the repository done with "Create fork".

Then there is another thing I don't understand, when I edit a file, the changes are highlighted locally.
In the remote repository, with "Commit to master" the file is updated, but the changes are not highlighted. What should I do? Thanks.

I have copy the wiki, if you can check it, thanks.
Flexible OpenSource firmware for TongSheng TSDZ2 motor and VLCD5 VLCD6 XH18 displays
https://github.com/emmebrusa/TSDZ2-Smart-EBike-1

mbrusa   100 W

100 W
Posts: 101
Joined: Dec 11 2019 12:13am

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

Post by mbrusa » May 02 2020 2:37pm

Stancecoke there is news, I tried to click on "fork" in github.com, my account was opened and I found another "TSDZ2-Smart-EBike-1" repository, it is the one I had deleted "forked from stancecoke / TSDZ2- Smart-EBike ", is this what you meant?
Now I have copied it locally and can be updated with GitHub Desktop.
I do not understand anything any more.
Flexible OpenSource firmware for TongSheng TSDZ2 motor and VLCD5 VLCD6 XH18 displays
https://github.com/emmebrusa/TSDZ2-Smart-EBike-1

Elinx   100 W

100 W
Posts: 233
Joined: Aug 09 2019 6:58am

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

Post by Elinx » May 02 2020 4:07pm

mbrusa wrote:
May 02 2020 3:25am
Hi everyone
I decided to release the new version, ............
:bigthumb:
Thank you for the work you have done

User avatar
stancecoke   100 kW

100 kW
Posts: 1204
Joined: Aug 02 2017 2:56pm

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

Post by stancecoke » May 03 2020 4:20am

mbrusa wrote:
May 02 2020 2:37pm
click on "fork" in github.com, my account was opened and I found another "TSDZ2-Smart-EBike-1" repository
Yes, that was exactly the right way to fork a repo :thumb:
Now, you can see your fork in the overview of the main project:
https://github.com/emmebrusa/TSDZ2-Smar ... rk/members
mbrusa wrote:
May 02 2020 10:11am
but the changes are not highlighted
The changes are shown at github, if you click on the ID of the commit
https://github.com/emmebrusa/TSDZ2-Smar ... its/master

https://github.com/emmebrusa/TSDZ2-Smar ... 156f220edb

regards
stancecoke

mbrusa   100 W

100 W
Posts: 101
Joined: Dec 11 2019 12:13am

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

Post by mbrusa » May 03 2020 8:19am

Thanks stancecoke.
How many things I have yet to learn ...
I still ask you for advice, now I have two repositories
"TSDZ2-Smart-EBike" and "TSDZ2-Smart-EBike-1".
Can I delete "TSDZ2-Smart-EBike" and rename "TSDZ2-Smart-EBike-1" so that existing links still work?
Or what is better to do?
Thanks again.
Flexible OpenSource firmware for TongSheng TSDZ2 motor and VLCD5 VLCD6 XH18 displays
https://github.com/emmebrusa/TSDZ2-Smart-EBike-1

User avatar
stancecoke   100 kW

100 kW
Posts: 1204
Joined: Aug 02 2017 2:56pm

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

Post by stancecoke » May 03 2020 11:53am

mbrusa wrote:
May 03 2020 8:19am
Can I delete "TSDZ2-Smart-EBike" and rename "TSDZ2-Smart-EBike-1"
Perhaps the links have to be updated, but it's the best way, I think.

Don't forget to copy the wiki to the new repo before deleting the old :-)

regards
stancecoke

HrKlev   100 mW

100 mW
Posts: 46
Joined: Dec 06 2019 10:24am

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

Post by HrKlev » May 04 2020 1:47am

Hi

First off - excuse my noobness, I am just starting to look into this. I have a TSDZ2 on a MTB I use for trail riding, and I like it very much. I have the VLCD6 display, and I would like to keep it because I like the simplicity of it. Two things I am missing from my TSDZ2 is assistance when the pedals are not moving (useful for getting back in the saddle during techical studd in the woods) and higher cadence. I can see that the first issue with assistance without movement will be fixed if I use this firmware, so that is good news. I am running a 36V motor on a 36V battery. Have anyone tested the experimental mode and have some results of what the max cadence will be? I see that the firmware for the 650/860 displays are able to get the cadence up to 120-130rpm, is this possible on this firmware? I would like to keep the VLCD6 if possible....

One more question - I see in the manual that it is referred to light and walk assist button a lot. The VLCD6 only has assist +/- and power button. How do I manouver around in the menu's using the VLCD6?

Elinx   100 W

100 W
Posts: 233
Joined: Aug 09 2019 6:58am

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

Post by Elinx » May 04 2020 4:07am

HrKlev wrote:
May 04 2020 1:47am
........... experimental mode and have some results of what the max cadence will be? I see that the firmware for the 650/860 displays are able to get the cadence up to 120-130rpm, is this possible on this firmware?.....
...The VLCD6 only has assist +/- and power button. How do I manouver around in the menu's using the VLCD6?
For the last question you normally have to look in the original diplay manual. I don't have a vlcd6, but if I read that manual, the lights button is "long press down"

About the higher cadence option in v 0.201b. That option is already a long time inside the OSfirmware and does work well, but a bit primitive. You can go to about 120rpm, but with a loss of motorpower. The only advantage is that you don't feel a wall if you reach a cadence above 80 rpm.
In the latest OSF version for 850C the higher cadence option is improved with field weakening, so the motor hold the power too with a higher cadence. This means that a higher current flows through the motor, which compensates for the loss of power.

The code is to find with a comparision inside github.
You will find five changed files, but in comparision with the same files inside v0.201b the overview is missing how to change these. Maybe an experienced programmer can see how that must be done.

HughF   100 W

100 W
Posts: 114
Joined: Jan 23 2020 6:13pm

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

Post by HughF » May 04 2020 4:39am

If you want a simple display, I would ditch the VLCD6 and go for SW102 - it is a very nice display and supports all modern versions of the firmware, the new code by Casainho that has excellent high cadence performance and the fork by r0mko which is a torque sensor only version and works well if you want maximum assistance without pedal rotation.
Single speed 700c frame, 36v TSDZ2, 13s battery, SW102 display
Genesis iOiD Alfine8 Hard tail MTB, soon to be TSDZ2, SW102 display

HrKlev   100 mW

100 mW
Posts: 46
Joined: Dec 06 2019 10:24am

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

Post by HrKlev » May 04 2020 5:55am

Elinx wrote:
May 04 2020 4:07am
For the last question you normally have to look in the original diplay manual. I don't have a vlcd6, but if I read that manual, the lights button is "long press down"

Ouch, Dont know how I have managed to believe it was power+down for 2 seconds to turn on and off backlight. It was always tricky, so I didnt lok forward to trying to hit the two buttons simultaniously 3 times in a row. Its easier now that I just have to press down, lol :oops:

I think I will give it a try when my stlink arrives, and upgrade the display later if I want to go further. Thanks for your answers!

User avatar
stancecoke   100 kW

100 kW
Posts: 1204
Joined: Aug 02 2017 2:56pm

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

Post by stancecoke » May 04 2020 6:41am

I've deleted my fork now, so mbrusas fork is listed direcly under the main project now.
https://github.com/OpenSource-EBike-fir ... rk/members

As a big fan of direct drive hub motors, I won't contribute to this project any more :D

regards
stancecoke

Elinx   100 W

100 W
Posts: 233
Joined: Aug 09 2019 6:58am

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

Post by Elinx » May 04 2020 6:54am

HughF wrote:
May 04 2020 4:39am
... ditch the VLCD6 and go for SW102 - it is a very nice display and supports all modern versions of the firmware, ......
Offcourse you are right about the SW102. Only one problem you haven't mentioned and that is you can't flash the OSF on the SW102 without breaking it, because you have to bypass the bootloader the first time.
Personally I find that a NoGo and I don't like the larger 850C-860C.
If there is a flash solution like the 850C, with a bootloaderbox, then it becomes interesting to buy a sw102.

A great advantage of mbrusa's version for default displays is, that the only thing you have to do is buy a cheap ST link, connect it to the speedsensor connector and flash the OSF. No hussle with wiring.
OK, you can't have the latest version of OSF, but v0.20b1 is great too, compared to the stock FW.

And a last (minor) advantage.
If you don't like the OSF, it is easy to go back to stock FW, the same way, because you don't have to change the display.

So for trying OSF for the first time, this version is imho the best and easiest.

stancecoke wrote:
May 04 2020 6:41am
the main project now...............
.... I won't contribute to this project any more :D ...
Many thanks for support and hosting the firmware and your input. :bigthumb:

build mb.20beta1.B of mbrusa:
https://github.com/emmebrusa/TSDZ2-Smart-EBike-1
Last edited by Elinx on May 05 2020 7:42am, edited 3 times in total.

mbrusa   100 W

100 W
Posts: 101
Joined: Dec 11 2019 12:13am

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

Post by mbrusa » May 05 2020 6:49am

Hi Elinx
This is the link to my new repository, fork of the casainho repository.
https://github.com/emmebrusa/TSDZ2-Smart-EBike-1
The previous one will no longer be updated.
I also added the link in signature.

I read "the higher cadence option by field weakening", very interesting.
I will have to make a comparison between versions 0.19 and 20beta1, and between the latest version of casainho with this modification and the previous one without.
I think I'm looking at us.
Not immediately, because after two months locked in the house, this is the first week of normal life, the priorities are other.
Flexible OpenSource firmware for TongSheng TSDZ2 motor and VLCD5 VLCD6 XH18 displays
https://github.com/emmebrusa/TSDZ2-Smart-EBike-1

Elinx   100 W

100 W
Posts: 233
Joined: Aug 09 2019 6:58am

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

Post by Elinx » May 05 2020 7:57am

mbrusa wrote:
May 05 2020 6:49am
......
The previous one will no longer be updated.
I also added the link in signature.

I read "the higher cadence option by field weakening", very interesting..........
I think I'm looking at us.
Not immediately, because after two months locked in the house, ............
Hi mbrusa.
A bit confusing, because they look the same, but I changed the link in the previous post too.

About improved higher cadence option by field weakening.
Thanks for looking at it.
Take your time and enjoy the "normal life" again.

Waynemarlow   1 kW

1 kW
Posts: 357
Joined: Jul 09 2016 7:22am
Location: Bucks, England

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

Post by Waynemarlow » May 05 2020 10:44am

The FOC would be a " nice to have " to finish off the LCD3 path, I have to say I like the LCD3 particularly in how clear it is in any sunlight and any viewing angle, enough that I'm loath to move over to the SW102 I have had sitting in my desk since Xmas.

But hey, if you are out of jail so as to speak, enjoy it :thumb:

bwb   10 mW

10 mW
Posts: 20
Joined: Jun 23 2019 7:07am

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

Post by bwb » May 10 2020 8:14am

OSF with standard display is already a long time on my radar (jobike.it), but as non IT specialist a bit above my capabilities.
I am currently using 20beta1 with LCD3 and love it.
With the thread opened here, I gained confidence and have installed mb.20beta1.b on my wife’s bike (36v - VLC5 - brake sensors - throttle). Installation of the OSF with the configurator went very smoothly by simply following the instructions. The bike drives better and makes less noise than with stock sw.
The thing is that I am struggling to just simply put the lights on and off (it worked with stock sw), despite several configuration tries.
Is there a way/configuration so that the “display data” (with the E02, E…) never pops up? OSF success on my wife’s bike will rely on simple display usage (without the special data settings and making changes).
Thanks to everybody (to many to name) who makes this wonderful OSF in all it flavors available to many people.

mbrusa   100 W

100 W
Posts: 101
Joined: Dec 11 2019 12:13am

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

Post by mbrusa » May 10 2020 9:52am

If you do not want to display the data when the lights are turned on, disable "Auto display data with lights on".
If you don't want to change the parameters, disable "Set parameters on startup".
However when the lights come on, E02 will always be displayed for 5 seconds.
Flexible OpenSource firmware for TongSheng TSDZ2 motor and VLCD5 VLCD6 XH18 displays
https://github.com/emmebrusa/TSDZ2-Smart-EBike-1

bwb   10 mW

10 mW
Posts: 20
Joined: Jun 23 2019 7:07am

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

Post by bwb » May 10 2020 11:47am

mbrusa wrote:
May 10 2020 9:52am
If you do not want to display the data when the lights are turned on, disable "Auto display data with lights on".
If you don't want to change the parameters, disable "Set parameters on startup".
However when the lights come on, E02 will always be displayed for 5 seconds.
Rechecking the lights by reverting to factory sw (putting back the 3 original tabs) wasn't successful: no lights, no motor, however that's not so important for the moment.
Flashing again with the 20beta1.B did bring back a working bike :D , except for the lights.
These are the settings I used:
Image
Image
Image
The E02 comes up indeed each time I press the light button, also the back light lights up.
Could there be a setting that is still not OK?

mbrusa   100 W

100 W
Posts: 101
Joined: Dec 11 2019 12:13am

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

Post by mbrusa » May 10 2020 1:15pm

The settings are fine, the fact that the display lighting is activated and E02 is displayed means that the lighting command is ok.
Did the lights work before? Isn't it a cabling problem?
Flexible OpenSource firmware for TongSheng TSDZ2 motor and VLCD5 VLCD6 XH18 displays
https://github.com/emmebrusa/TSDZ2-Smart-EBike-1

7lucky7   100 µW

100 µW
Posts: 9
Joined: Apr 04 2020 10:52am

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

Post by 7lucky7 » May 11 2020 2:15pm

Hi this is my first time flashing with this firmware.

Firstly thanks to everyone for all the great work. I was mainly after the higher cadence assistance but look forward to a bit of tinkering

I've got the 250w 36v motor version but have a few little questions. i've attached a screenshot of the settings i was intending to flash.

1- under battery power max (am i right to set this to 250w given i have the 250w version of the motor, i've also read in burst it can draw more so should i set it higher?)
2 - how high have people been on the power assist mode - turbo setting. default is 300 but it says up to 500. has anyone been up this high. i assume its more likely to do damage or overheat. (is this number just analogous to watts???)
3 - are these power assist modes similar to the ones in the factory settings ? (just so i can have an idea about what i should expect vs factory settings)
test settings.JPG
test settings.JPG (249.63 KiB) Viewed 404 times

Elinx   100 W

100 W
Posts: 233
Joined: Aug 09 2019 6:58am

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

Post by Elinx » May 11 2020 4:34pm

7lucky7 wrote:
May 11 2020 2:15pm
...
I've got the 250w 36v motor version but have a few little questions..........
1. --This motor has a hardware limited current of 18A (750Wmax. full batterie), but a lower current is better for less heat.
You have setup 16A max. current, with lowest batterie Voltage of 30V, 30x16= 480W max.
250W is the nominal power for continuous use, but that is only a factory controller-setting with stock FW.
The motor is exactly the same as the 36V-350W tsdz2. Meaning 12A continous current is possible, but 10A is advisable.
So if you setup max. power to 480W, you will have the same power with full batterie with 42V (current 11,5A)
In that case you have always 480W max. with discharging of the batterie (42V>>30V)
Normally you don't need the max. power or only some short time.

2. -- For powerassist keep in first place the default settings. They are tested and evaluated.
This are percentages of your own power. So 300 means 300% more power, but never more as the max power you have setup with 1.
Only if you can give less power yourself then experiment with a higher setting or if you find the assist too much, lower these values.
It also depends of the use of the bike (road, mtb or cargo).

3. -- You can't easy compare the OSF assist modes with factory settings, because the powercurve in every mode is another one.
The best what you can do is setup first the basic settings and try the bike first.
If you are satisfied your done, otherwise go experimenting with other settings.
Flashing is easy if you have setup your ST-link
Last edited by Elinx on May 12 2020 7:10am, edited 1 time in total.

emr   1 W

1 W
Posts: 55
Joined: Apr 22 2018 5:37am

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

Post by emr » May 11 2020 5:54pm

mbrusa wrote:
May 03 2020 8:19am
Thanks stancecoke.
How many things I have yet to learn ...
I still ask you for advice, now I have two repositories
"TSDZ2-Smart-EBike" and "TSDZ2-Smart-EBike-1".
Can I delete "TSDZ2-Smart-EBike" and rename "TSDZ2-Smart-EBike-1" so that existing links still work?
Or what is better to do?
Thanks again.
Hi MBrusa. Great job on the OSF and configurator.

The link to the 'wiki' on your 'https://github.com/emmebrusa/TSDZ2-Smart-EBike-1' page no longer works...

Code: Select all

See the wiki for instructions
https://github.com/stancecoke/TSDZ2-Smart-EBike/wiki

Elinx   100 W

100 W
Posts: 233
Joined: Aug 09 2019 6:58am

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

Post by Elinx » May 12 2020 12:59am

emr wrote:
May 11 2020 5:54pm
.....

The link to the 'wiki' ..........page no longer works...
...
That is because stancecoke has removed his tsdz2 repo
And mbrusa forgot to copy that wiki to his repo.
So hopefully is that wiki somewhere and can add mbrusa this to his active repo

edit: Wiki is visible again
Last edited by Elinx on May 12 2020 7:15am, edited 3 times in total.

Post Reply