Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Electric Motors and Controllers
Elinx   1 kW

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

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

Post by Elinx » May 24 2020 11:00am

stancecoke wrote:
May 24 2020 5:21am
..... you can access every single commit on github........
Thanks for that. I wasn't aware of this before

HrKlev   100 W

100 W
Posts: 130
Joined: Dec 06 2019 10:24am

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

Post by HrKlev » May 24 2020 4:31pm

So I tried the advanced torque and cadence setup today, and the calibration went smoothly just like described in the manual. However, when setring the cadence sensor in advanced, the motor got quite laggy, and would not keep up at all above 80-90 rpm. I ended up with a value of 362, and tried it two times with same result. Not a big deal, I just put it in normal mode, and ut works great. But it got me curious, though... Wondering if someone has the same result? What can be the problem?

I might flash my other tsdz2 bike with the OSF later this week, so Ill se if that one behaves the same.
Lightweight hub motor as mid drive build thread: viewtopic.php?f=6&t=107622

mbrusa   100 W

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

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

Post by mbrusa » May 25 2020 5:11am

revher wrote:
May 24 2020 6:07am
...
What I have learned is that I can't have a foot on any pedal when booting because of the pedal sensor (torque sensor) which is calibrating at each reboot. It is true with the original firmware and I think that it is still valid with the OSF. And this is the reason why a too long boot is not good. Also, you explained earlier that in order to switch the lights on or off, you had to check a long process again (similar to a boot?). And definitely the boot of the version A is shorter.
...
Revher, you're too hasty in the conclusions.
Do you prefer and do you recommend using the previous version only because the startup procedure is longer in the new one?
It's just the display of the% battery!
Have you read the list of new features and fixes?
Do you prefer to give up these improvements?

Now the time to start will be 1 second longer, in addition to 5 for battery% display, 6 seconds instead of 5! I don't understand where the problem is.
The calibration time of the torque sensor at power on is 3 seconds, it is the same as the previous version and that for the LCD3.
After 3 seconds you can start pedaling, you don't have to wait for 6.
However, the display time of the percentage at startup can be decreased.
The parameter is "Time to menu items", you can set 40 (4 seconds), maybe even 30, with XH18 you can do it.
Attention, the access time to the parameters also changes, the time within which the light button must be pressed the second time.
revher wrote:
May 24 2020 6:07am
I think that for a newbie, the Stancecoke Configurator is easier to manage. Having a unique config.h instead of advanced.h is not a problem. But the basic settings should be basic.
In addition, there are 3 steps in the current configurators (both): Configure, Build and Flash. They could be separated by three different buttons because only the Configure is crucial for a GUI.
An important step, at least for me, concerns the backup of the firmware which is either the original or the latest flashed firmware. It could be backup with the time/stamp written within the file name (like for the time-stamps.ini files).

And also, only the main.ixh should be flashed, not the EEPROM etc.
...
Here too I don't understand you, it is not mandatory to check and / or modify all the parameters, everyone is free to do what he wants.
The minimum basic settings required are highlighted in red, haven't you noticed?

I do not agree. I too had thought of three buttons, but then I realized that the choice of stancecoke for a single button is the best. Putting a single "Flash" button involves saving a compiled file for each .ini file.
I don't even need a "Configure" button, if you really need an ini or ihx file, just press "Compile & Flash" without connecting ST-Link.
Flashing main.ihx is not enough, data memory (eeprom) must also be deleted.

Regards
Flexible OpenSource firmware for TongSheng TSDZ2 motor and VLCD5 VLCD6 XH18 displays
https://github.com/emmebrusa/TSDZ2-Smart-EBike-1

revher   100 mW

100 mW
Posts: 36
Joined: Dec 19 2019 5:14pm

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

Post by revher » May 25 2020 6:18am

mbrusa wrote:
May 25 2020 5:11am
...
Flashing main.ihx is not enough, data memory (eeprom) must also be deleted.

Regards
Hi, thank you mbrusa for your long comment and also all the work you did. No time to answer yet, sorry.

Concerning the flashing of main.ihx only which is the Casinho procedure in his original Makefile (_linux and _windows), I am not competent at all. Therefore, I asked a few times on this forum where these two files "option_no_prot.ihx" and "data.ihx" (which is empty) came from. How are they built? This is mandatory for a GPL license. What are their use? But it remained not clearly answered as far as I know.

Thus,I deduced, perhaps wrongly, that these two files (flashed simutaneously with file main.ihx, in the program_20.bat file for example) concerned only Windows specific STVP_CmdLine!

And I tried to use the simple smt8flash (operational in Makefile_linux and commented in Makefile_windows) and it always works.

Help! Casainho, Stancecoke, Mbrusa and all competent people, please tell us what is experimental, what works and add some explanations it into the wiki (Casainho's wiki or Mbrusa's wiki).

Regards,

Revher

revher   100 mW

100 mW
Posts: 36
Joined: Dec 19 2019 5:14pm

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

Post by revher » May 25 2020 12:11pm

mbrusa wrote:
May 25 2020 5:11am
revher wrote:
May 24 2020 6:07am
...
Also, you explained earlier that in order to switch the lights on or off, you had to check a long process again (similar to a boot?). And definitely the boot of the version A is shorter.
...
...
Now the time to start will be 1 second longer, in addition to 5 for battery% display, 6 seconds instead of 5! I don't understand where the problem is.
The calibration time of the torque sensor at power on is 3 seconds, it is the same as the previous version and that for the LCD3.
After 3 seconds you can start pedaling, you don't have to wait for 6.
However, the display time of the percentage at startup can be decreased.
The parameter is "Time to menu items", you can set 40 (4 seconds), maybe even 30, with XH18 you can do it.
Attention, the access time to the parameters also changes, the time within which the light button must be pressed the second time.
...
Thank you mbrusa for quantifying the startup times of version B, 6 seconds, compared to version A, 5 seconds. It's a 20% increase, which might be ok if there are no other additional delay. And my additional question related to the need or not to not put your foot on the pedals when you turn on the lights because I observed, and you confirmed it, that it is not immediate and that again the controller passes by displaying the percentage of the battery etc. This additional time also exists with version A, but it is shorter.
I put my question differently: can we turn the lights on and off while driving or should we stop and not put any weight on the pedals as for a first start. With my first bike, I had a dynamo in the front hub and didn't need the engine to turn on the lights.

Unfortunately, I currently don't have any more the bike with the lights which is now by my son and can't do tests on it.

Concerning the "Time to menu items" which could be reduced to 3 seconds, I think that I will be able to test it on a third TSDZ2 motor which just arrived from Germany; but I am waiting for the battery in order to set it. It is Winora coaster brake 7 speeds internal gear hub with a hub dynamo in front. I don't know if the reduction of the "Time to menu items" to 3 seconds could be made on the version A.

Regards,
Revher

mbrusa   100 W

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

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

Post by mbrusa » May 26 2020 2:23am

revher wrote:
May 25 2020 12:11pm
Thank you mbrusa for quantifying the startup times of version B, 6 seconds, compared to version A, 5 seconds. It's a 20% increase, which might be ok if there are no other additional delay. And my additional question related to the need or not to not put your foot on the pedals when you turn on the lights because I observed, and you confirmed it, that it is not immediate and that again the controller passes by displaying the percentage of the battery etc. This additional time also exists with version A, but it is shorter.
I put my question differently: can we turn the lights on and off while driving or should we stop and not put any weight on the pedals as for a first start. With my first bike, I had a dynamo in the front hub and didn't need the engine to turn on the lights.
...
It will be the translator, I still don't understand what problems you have at power on.
But how did you get this doubt about the lights?
Obviously they can be turned on even while driving, we would miss it!
Flexible OpenSource firmware for TongSheng TSDZ2 motor and VLCD5 VLCD6 XH18 displays
https://github.com/emmebrusa/TSDZ2-Smart-EBike-1

revher   100 mW

100 mW
Posts: 36
Joined: Dec 19 2019 5:14pm

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

Post by revher » May 26 2020 4:37am

Thank you, so the 20% additional time of version B compared to version A, concerns only the initial boot, and it can reduced after testing that "Time to menu items" set to 40 (4 seconds), maybe even 30 will work with the display (XH18 you said, it will).
Thank you again Mbrusa for your work and explanations, regards, Revher.

vlvuk   1 mW

1 mW
Posts: 11
Joined: Nov 09 2019 3:53am

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

Post by vlvuk » May 26 2020 8:14am

Hello all.

I posted my question in parallel topic but without answer, so I try to ask here.

I have new motor 48V 750W built in December 2019, I ran about 50 km (it was several trips across snow forest) and once I found my motor not working neither from pedals, neither from throttle.

First, I replaced throttle knob to similar one and it started working as it should without problem.
Then I checked Technical parameters and found no response from cadence censor, seems it also dead.
This censor located in controller and has 4 wire: red, black, blue and yellow.

Does anyone know and can explain what kind of hall sensor is it? Usually hall sensors use 3 wire (positive, negative, signal) but as I found in some cases uses 4 wire censors (positive, negative, direction, cadence) - is it our case? I will appreciate for any advice.

I have ordered several different hall censors and will try to fix it - if no success I will order new controller, but it is stupid at least to not try.

Other question - if Torque mode will be working with broken cadence sensor? If yes, I will just change mode.

Thanks to all in advance!

Waynemarlow   1 kW

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

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

Post by Waynemarlow » May 26 2020 3:54pm

Some times its just easiest and best place to simply bin a bad component and buy a new one, the cost of development of a new component will far exceed the replacement.

HrKlev   100 W

100 W
Posts: 130
Joined: Dec 06 2019 10:24am

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

Post by HrKlev » May 27 2020 5:53am

I installed the OSF on my FS bike yesterday, and found after trying to calibrate the torque sensor that right and left pedal is really different. When calibrating with the right pedal I got 80 range and 87 step, and the left one I got 120 range and 56 step. Both of the methods resulted in waaaay to high human power calculations, so the motor gave way too much assistance with the standard values.

I ended up using the biggest scale (120) and the average for step (72). This resulted in something that seemed like a plausible human watt calculations, and I fine-tuned the assistance levels to get the desired assistance.

Im writing this because I found a method that worked for me, but also because Im curious what others do? Anyone else with different readings from left and right pedal?

And I REALLY enjoy this OSF. The high cadence mode combined with the power mode motivates me so much more to just keep spinning. I found that I prefer the power mode over the EMTB mode even on the most gnarly trails. Cant wait to see if we get field weakening into this OSF version as well :)
Lightweight hub motor as mid drive build thread: viewtopic.php?f=6&t=107622

matschi140   10 mW

10 mW
Posts: 24
Joined: May 27 2019 1:18am

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

Post by matschi140 » May 27 2020 8:49am

Hello guys,

I have several bikes converted with the tsdz2 motor and i really love it. Also one bike with the full OSF and 850C display.
Now i would like to try it on the stock VLCD6 display. I can connect to the speedsensor plug, but the configurator does not change anything. Can someone help me pls how to do it?

Thanks!

revher   100 mW

100 mW
Posts: 36
Joined: Dec 19 2019 5:14pm

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

Post by revher » May 27 2020 11:44am

Elinx wrote:
May 24 2020 11:00am
stancecoke wrote:
May 24 2020 5:21am
..... you can access every single commit on github........
Thanks for that. I wasn't aware of this before
As Stancecoke said, you can easily access every single commit from the GitHub.com web site. However, it seems that to get a snapshot of the whole directory at a particular commit in order to download a zip file, you need the command line on your cloned directory (I may be wrong because if I know very well cvs, I am new to git). It could also be done if the maintainer, Stancecoke (and now Mbrusa), had already "tagged" the last version before deleting the jar files and the fork.

Unfortunately, there are very few tags on the git repository ($ git tag), the last one being v0.20.0-beta.1 (7950fb3) from leon, commited on 2019-09-20 by casainho.
Thus Stancecoke or Mbrusa, I think that it could be a good idea, to tag intermediate versions because a lot of work have been by marcoq and mbrusa and stancecoke mainly, and people might be interested in downloading the zip of these versions without entering the git syntax.

However, in the absence of the use of 'stable' intermediate versions like the last commit of the "mb.20beta1.A" version, I explained (on the wiki) how one can, not only find where this version ended, but also how we can make a branch on a local repository (before pulling it on GitHub which requires permissions or a fork and a pull request). If someone skilled in git, could verify the page (please edit directly the wiki), I will appreciate.

Regards,

Revher

Suggy   10 mW

10 mW
Posts: 23
Joined: Mar 06 2020 6:57am

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

Post by Suggy » May 28 2020 4:16am

Hi Can someone help me with one setting on the new firmware please.
I am having great results with the motor and have it to a place were I am happy with.
But I have noticed on my display when I first switch it use to give me the percentage of battery life but now it always gives me a reading of 99.9 even if the battery is half full. I have installed the firmware with the mph setting and also have the display set at mph. Any suggestions most welcome thanks.

mbrusa   100 W

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

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

Post by mbrusa » May 29 2020 2:21am

HrKlev wrote:
May 27 2020 5:53am
I installed the OSF on my FS bike yesterday, and found after trying to calibrate the torque sensor that right and left pedal is really different. When calibrating with the right pedal I got 80 range and 87 step, and the left one I got 120 range and 56 step. Both of the methods resulted in waaaay to high human power calculations, so the motor gave way too much assistance with the standard values.

I ended up using the biggest scale (120) and the average for step (72). This resulted in something that seemed like a plausible human watt calculations, and I fine-tuned the assistance levels to get the desired assistance.

Im writing this because I found a method that worked for me, but also because Im curious what others do? Anyone else with different readings from left and right pedal?

And I REALLY enjoy this OSF. The high cadence mode combined with the power mode motivates me so much more to just keep spinning. I found that I prefer the power mode over the EMTB mode even on the most gnarly trails. Cant wait to see if we get field weakening into this OSF version as well :)
Well, I'm glad you like it.
There is a difference between the left and right pedal, but I have never heard so much.
As a reference for the calibration value "Pedal torque adc range" I used the pedal right.
For "Pedal torque adc step" it is better to average between the two pedals as you did.
Yes "Power assist" is very pleasant to use, even in combination with "Cadence sensor advanced mode".
Also try enabling "Start-up without pedaling" with "Assist wthout pedaling threshold" set between 10 and 20 and "Pedal torque adc offset adjustment" between 5 and 10, it helps a lot in starting.
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: 133
Joined: Dec 11 2019 12:13am

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

Post by mbrusa » May 29 2020 2:31am

Suggy wrote:
May 28 2020 4:16am
Hi Can someone help me with one setting on the new firmware please.
I am having great results with the motor and have it to a place were I am happy with.
But I have noticed on my display when I first switch it use to give me the percentage of battery life but now it always gives me a reading of 99.9 even if the battery is half full. I have installed the firmware with the mph setting and also have the display set at mph. Any suggestions most welcome thanks.
If you mean that after a short ride, by turning the display off and on again, the battery will still reset to 99.9%, you need to increase the "Reset soc percentage" value, by default it is 4.05, try 4.10 or 4.15.
Flexible OpenSource firmware for TongSheng TSDZ2 motor and VLCD5 VLCD6 XH18 displays
https://github.com/emmebrusa/TSDZ2-Smart-EBike-1

jeff.page.rides   100 W

100 W
Posts: 216
Joined: Aug 13 2019 10:16am

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

Post by jeff.page.rides » May 29 2020 3:34pm

So yesterday I flashed my VLCD5 with the latest firmware. I really like the java configurator it's a one-stop-shop, no text files needed as was the last time I flashed it. I have an older 6 pin VLCD5 and it worked fine the last time I flashed it. But this time the screen display goes out but the motor keeps working, but you can't adjust any settings. So if I turn off and back on the battery the display comes back on. I can do all my adjustments but as soon as the display goes off it continues working but you're stuck in wherever you were when it went out.
Does anyone have any idea what would be causing the display to go out and the motor continues working?
Thanks!
:bigthumb:

I haven't tried it yet but in the Java Configurator, I just notice that there's a display working on and a display always on. I had it set at display working on and so when I would stop it would stop but not come back on so I'm going to reflash it with display always on and see if that fixes the problem.

josafrik   10 mW

10 mW
Posts: 20
Joined: Aug 27 2019 1:26pm

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

Post by josafrik » May 30 2020 5:03am

Can the st-link be permanently installed on the bike? I have soldered the cables to both the hardware and the st-link, and with very short cables, it has been the only way in which I have no communication problems with the software STVP

matschi140   10 mW

10 mW
Posts: 24
Joined: May 27 2019 1:18am

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

Post by matschi140 » May 30 2020 5:09am

I managed to flash the Motorcontroller. How can i flash the display? I connected throgh the speedsensor cable.

Thanks

w0utje   1 mW

1 mW
Posts: 13
Joined: Jan 12 2020 3:02am

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

Post by w0utje » May 30 2020 5:44am

U don't need to flash the display with the stock display's.

Elinx   1 kW

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

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

Post by Elinx » May 30 2020 7:13am

matschi140 wrote:
May 30 2020 5:09am
How can i flash the display? ........
One of the advantages is you don't need to flash the stock display, but only the controller.
If you have flashed the controller, you can use OSF right away.

For handling the display you need the Display operation manual
Because the OSF operation has changed from the stock FW operation.

matschi140   10 mW

10 mW
Posts: 24
Joined: May 27 2019 1:18am

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

Post by matschi140 » May 30 2020 2:20pm

Elinx wrote:
May 30 2020 7:13am
matschi140 wrote:
May 30 2020 5:09am
How can i flash the display? ........
One of the advantages is you don't need to flash the stock display, but only the controller.
If you have flashed the controller, you can use OSF right away.

For handling the display you need the Display operation manual
Because the OSF operation has changed from the stock FW operation.
Ok, then it its ok, bit i cant get the configurator to connect, or is there a special way to change the settings with tge configurator?

Elinx   1 kW

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

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

Post by Elinx » May 30 2020 6:04pm

matschi140 wrote:
May 30 2020 2:20pm
..........bit i cant get the configurator to connect, or is there a special way to change the settings with tge configurator?
You can't change settings afterwards with the configurator wihout flashing.
I don't understand what you have done. Before, you said you have flashed the contoller already.
For that you need the configurator, because you must setup at least some basic settings, before you hit the button "compile & flash"

It is possible to flash with the cmd line too by running one of the bat files.
But then you flashed the default settings, that couldn't be the best, or even wrong, for your tsdz2.
If it isn't possible to run the java configurator I think you haven't installed the Java Runtime Environment.
If that is the case, I advice you to start reading the wiki and after that the configurator manual to understand the configurations.

If you read back some pages you can find some more answers on almost the same question.

matschi140   10 mW

10 mW
Posts: 24
Joined: May 27 2019 1:18am

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

Post by matschi140 » May 31 2020 5:49am

Elinx wrote:
May 30 2020 6:04pm
matschi140 wrote:
May 30 2020 2:20pm
..........bit i cant get the configurator to connect, or is there a special way to change the settings with tge configurator?
You can't change settings afterwards with the configurator wihout flashing.
I don't understand what you have done. Before, you said you have flashed the contoller already.
For that you need the configurator, because you must setup at least some basic settings, before you hit the button "compile & flash"

It is possible to flash with the cmd line too by running one of the bat files.
But then you flashed the default settings, that couldn't be the best, or even wrong, for your tsdz2.
If it isn't possible to run the java configurator I think you haven't installed the Java Runtime Environment.
If that is the case, I advice you to start reading the wiki and after that the configurator manual to understand the configurations.

If you read back some pages you can find some more answers on almost the same question.
ok thanks elinx, i got it now and it works!!

i can flash settings that i set in configurator, just it seems my display is not showing things as it should.

when i press the light button, it shows E02 when i di a double klick it goes to E03 then normally as the manual says if i press tge light button one time, it should show the battery Voltage, correct?

but when i do it just shows 0.00kmh

am i doing anything wrong?!

Elinx   1 kW

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

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

Post by Elinx » May 31 2020 10:17am

matschi140 wrote:
May 31 2020 5:49am
....
when i press the light button, it shows E02 when i di a double klick it goes to E03 then normally as the manual says if i press tge light button one time, it should show the battery Voltage, correct?....
It all depends what you have setup by default and what you try to do, modify parameters or display data.
prameter_data.jpg
prameter_data.jpg (7.21 KiB) Viewed 367 times
displaydata.jpg
displaydata.jpg (21.51 KiB) Viewed 367 times

jeff.page.rides   100 W

100 W
Posts: 216
Joined: Aug 13 2019 10:16am

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

Post by jeff.page.rides » Jun 02 2020 4:53pm

jeff.page.rides wrote:
May 29 2020 3:34pm
So yesterday I flashed my VLCD5 with the latest firmware. I really like the java configurator it's a one-stop-shop, no text files needed as was the last time I flashed it. I have an older 6 pin VLCD5 and it worked fine the last time I flashed it. But this time the screen display goes out but the motor keeps working, but you can't adjust any settings. So if I turn off and back on the battery the display comes back on. I can do all my adjustments but as soon as the display goes off it continues working but you're stuck in wherever you were when it went out.
Does anyone have any idea what would be causing the display to go out and the motor continues working?
Thanks!
:bigthumb:

I haven't tried it yet but in the Java Configurator, I just notice that there's a display working on and a display always on. I had it set at display working on and so when I would stop it would stop but not come back on so I'm going to reflash it with display always on and see if that fixes the problem.
So changing the display to always-on kept the display always on. But if you turned off the power on the display it wouldn't turn back on unless you shut off the power at the battery and then turned it back on.
Is this just my system and if so how do I fix it? or are others having the same problem, then it's a bug?

Post Reply