Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Electric Motors and Controllers
Elinx   100 W

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

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

Post by Elinx » Mar 08 2020 4:09am

The mbrusa version 0.20beta1a for default displays (vlcd5, vlcd6 and xh18) you can find:
On the github of StanceCoke
The starting guide you can find there too.
Also the manuals for configuration and display

The English translated manuals of the configurator and how to handle the display:
EN-Configurator -TSDZ2-mb.20beta1.A.pdf
(877.33 KiB) Downloaded 80 times
EN-Manual_display operation-TSDZ2-mb.20beta1.A.pdf
(581.83 KiB) Downloaded 113 times

Ashrambo has made an Spanish translation of the configuration file on his blog

Basicly the mbrusa version is the same as latest Buba's build v0.20b for KT lcd3, but some advantages are missing (for now) or a bit more complicated because of the use of these default displays.
Mbrusa is currently working on an improved version of the firmware, in which a number of things should be improved, such as the calibration of the torque and cadence sensor, the overrun and the operation of the display.
You can find more detailed information on the Jobike forum
Some of mbrusa's improvements you can see on Youtube too

obcd   100 W

100 W
Posts: 138
Joined: Jul 16 2019 3:45pm

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

Post by obcd » Mar 08 2020 5:30am

Is this code already having the latest overrun fixes described on the jobike.it forum or do we have to wait a little longer for that?

thineight   100 W

100 W
Posts: 228
Joined: Oct 05 2018 3:53am

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

Post by thineight » Mar 08 2020 8:20am

To date the available code does not include the overrun improvement. It is a porting from the Buba's v.20
MTB KTM Ultra 29" - City bike DAYTONA 28"

Elinx   100 W

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

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

Post by Elinx » Mar 08 2020 8:34am

obcd wrote:
Mar 08 2020 5:30am
Is this code already having the latest overrun fixes...
... do we have to wait a little longer for that?
No, in the version I linked, the overrun is not yet solved.
You have to wait for the new version.

obcd   100 W

100 W
Posts: 138
Joined: Jul 16 2019 3:45pm

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

Post by obcd » Mar 08 2020 8:47am

If I remember reading correctly, the overrun fix is only in the motor.c file.

Would it be possible to post that one for those unpatient (like me)

I understand it needs some testing before it can go mainstream. Just (very) curious what has changed.

chri27.5   10 mW

10 mW
Posts: 33
Joined: Jan 25 2019 9:46am

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

Post by chri27.5 » Mar 09 2020 1:51am

Ciao a tutti,
Sto testando le ultime modifiche con Mbrusa, ci siamo quasi, bisogna aspettare ulteriori test per rendere definitive le modifiche.
Non ha senso rilasciare versioni che potrebbero causare problemi nell'utilizzo, spero che voi capite e pazientate ancora un pochino, vi posso assicurare che mbrusa è una grandissima persona e sta lavorando con passione e convinzione a migliorare il software per tutti voi.

Elinx   100 W

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

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

Post by Elinx » Mar 09 2020 2:11am

chri27.5 wrote:
Mar 09 2020 1:51am
Ciao a tutti,
Sto testando le ultime modifiche con Mbrusa, ci siamo quasi, bisogna aspettare ulteriori test per rendere definitive le modifiche.
Non ha senso rilasciare versioni che potrebbero causare problemi nell'utilizzo, spero che voi capite e pazientate ancora un pochino, vi posso assicurare che mbrusa è una grandissima persona e sta lavorando con passione e convinzione a migliorare il software per tutti voi.
Translation:
chri27.5 wrote:
Mar 09 2020 1:51am
Hello to all,
I'm testing the latest changes with Mbrusa, we're almost there, we have to wait for further tests to make the changes final.
It makes no sense to release versions that could cause problems in use, I hope you understand and be patient a little longer, I can assure you that mbrusa is a great person and is working with passion and conviction to improve the software for all of you.
Ciao chri27.5
I can imagine that you don't want to release a complete new version of the firmware that isn't tested, but the question was if it is possible to publish the "overrun code" only from motor.c.
On Jobike I read this code could be used in the KT-lcd3 version too. In that case it is possible people ad this code by theirself and on their own responsibility.
Because mbrusa don't use github, we can't see the explicit changes with the code.

mbrusa   1 W

1 W
Posts: 52
Joined: Dec 11 2019 12:13am

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

Post by mbrusa » Mar 10 2020 2:28am

Elinx wrote:
Mar 09 2020 2:11am
Ciao chri27.5
I can imagine that you don't want to release a complete new version of the firmware that isn't tested, but the question was if it is possible to publish the "overrun code" only from motor.c.
On Jobike I read this code could be used in the KT-lcd3 version too. In that case it is possible people ad this code by theirself and on their own responsibility.
Because mbrusa don't use github, we can't see the explicit changes with the code.
Ciao Elinx
Comprendo le aspettative create con la pubblicazione del video ed era mia intenzione anticipare il rilascio della modifica "overrun" e non attendere la versione completa, che anche quando terminata, richiederà un ulteriore tempo per l'aggiornamento dei manuali.
I test pratici si concentrano nel fine settimana, se c'è qualcosa che non va, sfortunatamente devo aspettare il successivo.
Nulla cambierebbe con GitHub, non rilascerei mai software senza prima fare i test che ritengo necessari. È il mio modo di fare.
Ancora un po' di pazienza ...

Translation:
Hi Elinx
I understand the expectations created with the publication of the video and it was my intention to anticipate the release of the "overrun" modification and not wait for the full version, which even when finished, will require additional time for updating the manuals.
Practical tests are concentrated on the weekend, if there is something wrong, unfortunately I have to wait for the next one.
Nothing would change with GitHub, I would never release software without first doing the tests that I consider necessary. It is my way.
A little more patience ...

chri27.5   10 mW

10 mW
Posts: 33
Joined: Jan 25 2019 9:46am

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

Post by chri27.5 » Mar 11 2020 3:28pm

Hello,
today I tried the Mbrusa modification to fix the overrang on lcd3.
I must say that it works very well, I posted a video made with the phone, obviously it is not the best, but the arrest is clearly visible.

https://youtu.be/r3RW_21sJTc

Ciao,
oggi ho provato la modifica Mbrusa per sistemare l'overrang su lcd3.
Devo dire che funziona benissimo, ho postato un video fatto con il telefono, ovviamente non è il massimo, però si vede bene l'arresto.

mbrusa   1 W

1 W
Posts: 52
Joined: Dec 11 2019 12:13am

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

Post by mbrusa » Mar 12 2020 10:14am

motor.c file for open source TSDZ2 mb.20beta1.A for original displays VLCD5 VLCD6 XH18, with overrun modification.
I also have the new full version ready, but before releasing it I have to do more tests and update the manuals.
motor.c-TSDZ2-mb.20beta1.A-fix_overrun.zip
(8.1 KiB) Downloaded 18 times
It must be copied to the src\controller folder to replace the previous one.

mbrusa   1 W

1 W
Posts: 52
Joined: Dec 11 2019 12:13am

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

Post by mbrusa » Mar 12 2020 11:54am

Sorry the previous file is wrong, this is the right one.
motor.c-TSDZ2-mb.20beta1.A-fix_overrun.zip
(8.07 KiB) Downloaded 33 times

User avatar
stancecoke   100 kW

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

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

Post by stancecoke » Mar 12 2020 12:16pm

mbrusa wrote:
Mar 12 2020 11:54am
this is the right one.
Thank you, mbrusa! :thumb:
I've updated the github repo:
https://github.com/stancecoke/TSDZ2-Sma ... b0692614a2

regards
stancecoke
Last edited by stancecoke on Mar 12 2020 12:20pm, edited 1 time in total.

mbrusa   1 W

1 W
Posts: 52
Joined: Dec 11 2019 12:13am

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

Post by mbrusa » Mar 12 2020 12:19pm

:bigthumb:

Elinx   100 W

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

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

Post by Elinx » Mar 12 2020 12:46pm

mbrusa wrote:
Mar 12 2020 10:14am
motor.c file for open source TSDZ2 mb.20beta1.A for original displays VLCD5 VLCD6 XH18, with overrun modification.
..........
:bigthumb: :bigthumb:
Thanks mbrusa for your efforts

mbrusa   1 W

1 W
Posts: 52
Joined: Dec 11 2019 12:13am

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

Post by mbrusa » Mar 13 2020 3:02am

A question to those who use the throttle.
Does it still work with fix overrun?

revher   10 mW

10 mW
Posts: 21
Joined: Dec 19 2019 5:14pm

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

Post by revher » Mar 14 2020 4:26am

mbrusa wrote:
Mar 12 2020 11:54am
...this is the right one.
motor.c-TSDZ2-mb.20beta1.A-fix_overrun.zip
Thank you mbrusa. I tested it yesterday on about 5 km in central city, with the gear shift sensor on the way in and without it (unplugged) on the way back. It is hard to see huge differences now with an internal gear hub (I have a Nexus coaster brake 8 speed). It means that your improvements in order to shorten the overrun are very nice.
  • I will try it on another bike (a new Vermont Jersey pedelec) in a few days.
    • For this new bike, I already ordered a Bafang gear sensor and extension cables in order to build the Bafang 3 pins <=> Tongsheng 6 pins cable. But on the Vermont, the second Y branch is not free to plug the gear sensor and is used by the lights. This was not the case with my Bocas (2005) which had a dynamo hub.
    • And I don't know how to easily plug the 4 things on the 3 branches of the Tongsheng 6 pins Y:
      - output 3 pins male from the TSDZ2;
      - Tongsheng speed sensor (Y 6 pins female);
      - lights (6 pins male) and
      - Bafang gear sensor (special cable with a 6 pins male).
    • This new pedelec is still untouched with its original Tongsheng TSDZ2 firmware and used every day by a son and her daughter at the back, so we have to be careful. But with mbrusa improvements I am confident in trying the Open source firmware by just flashing it.

      Also, it is very easy to revert to the originals. I will tell you.
  • With the new motor.c, concerning the differences between with or without the gear sensor, I noticed that with the gear sensor, one advantage was that when accelerating fast after a green light, it was easy to change gear from 1 to 5 without stopping pedaling. With former motor.c, it was worst if I stopped pedaling for changing gear because of the overrun. With the new motor.c every thing is easier but I need to practice more to appreciate if having a gear sensor is still an important improvement (in a city) or not.
  • An other concern was if the speedometer was altered by the gear sensor connected to the same wires as the speed sensor: it is not altered at all, even if changing gear permanently.
Cheers,

Revher

sp1n4d0   100 µW

100 µW
Posts: 9
Joined: Jun 13 2019 6:49pm

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

Post by sp1n4d0 » Mar 14 2020 6:44am

mbrusa wrote:A question to those who use the throttle.
Does it still work with fix overrun?
Walk assist isn't working with VLCD6.
Thanks for your work, the motor is running super smooth!
Last edited by sp1n4d0 on Mar 15 2020 6:25am, edited 1 time in total.

mbrusa   1 W

1 W
Posts: 52
Joined: Dec 11 2019 12:13am

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

Post by mbrusa » Mar 15 2020 3:31am

sp1n4d0 wrote:
Mar 14 2020 6:44am
mbrusa wrote:A question to those who use the throttle.
Does it still work with fix overrun?
Walk assist isn't working with VLCD6.
Thanks for your work, the motor it's running super smooth!
Thanks for the report, I had doubts about the throttle, but also the walk assist and the cruise are in the same conditions, the motor with the pedal stopped does not work. I will fix the bug and release the update later in the day.

mbrusa   1 W

1 W
Posts: 52
Joined: Dec 11 2019 12:13am

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

Post by mbrusa » Mar 16 2020 3:06am

Here is the "fix overrun" update in the TSDZ2-mb.20beta1.A version, for the original displays.
The files to be replaced are 3, ebike_app.c, motor.c, motor.h
I had not considered the riding modes with stationary pedals, which consequently do not work.
Now "fix overrun" is disabled in WALK ASSIST, CRUISE, THROTTLE mode and for the next version also CADENCE SENSOR CALIBRATION MODE.
TSDZ2-mb.20beta1.A-fix_overrun_update.zip
(27.66 KiB) Downloaded 27 times
for sp1n4d0
Can you confirm the correct working? Thank you.

User avatar
stancecoke   100 kW

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

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

Post by stancecoke » Mar 16 2020 5:09am

mbrusa wrote:
Mar 16 2020 3:06am
Here is the "fix overrun" update in the TSDZ2-mb.20beta1.A version, for the original displays
I've updated the github repo, it would be fine, if you would spend half an hour to learn how to use github! :wink:
Only two clicks are needed in eclipse (or other IDEs) to commit and push the changes to github!

https://github.com/stancecoke/TSDZ2-Sma ... 6ded5a19fd

regards
stancecoke

sp1n4d0   100 µW

100 µW
Posts: 9
Joined: Jun 13 2019 6:49pm

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

Post by sp1n4d0 » Mar 16 2020 3:46pm

mbrusa wrote:Here is the "fix overrun" update in the TSDZ2-mb.20beta1.A version, for the original displays.
The files to be replaced are 3, ebike_app.c, motor.c, motor.h
I had not considered the riding modes with stationary pedals, which consequently do not work.
Now "fix overrun" is disabled in WALK ASSIST, CRUISE, THROTTLE mode and for the next version also CADENCE SENSOR CALIBRATION MODE.
TSDZ2-mb.20beta1.A-fix_overrun_update.zip
for sp1n4d0
Can you confirm the correct working? Thank you.
Yes, now it's fine, thank you!

Atrihalov   1 mW

1 mW
Posts: 19
Joined: Nov 14 2017 1:30am

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

Post by Atrihalov » Mar 17 2020 4:56am

Good to all. I asked for version 20, but when I turn on the error E02, how to look at the values, or until the sensor is replaced, it does not move.

bingo5   10 mW

10 mW
Posts: 20
Joined: Jul 04 2019 12:37am

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

Post by bingo5 » Mar 17 2020 9:21am

Hi,

is it possible that the temperature sensor does not work in the current release? I have tested different settings yesterday and today and reflashed x times, but it does not work for me.

With the last marcoq firmware and 20 °C temperature limit set, the motor stops (error code E06) as soon as I warm it up a bit with the hot air dryer (room temperature is ~12 °C).. With the current version ( https://github.com/stancecoke/TSDZ2-Sma ... 6ded5a19fd ) the motor does not stop even after 5 minutes of warming.

In the same way the display (displaya data = 0) shows me 0.00 °C temperature.

My settings are:
#define ENABLE_THROTTLE 0
#define ENABLE_TEMPERATURE_LIMIT 1

and

// motor temperature limit (sensor required)
#define MOTOR_TEMPERATURE_MIN_VALUE_LIMIT 15
#define MOTOR_TEMPERATURE_MAX_VALUE_LIMIT 20

Update://

Now I have tested the first 0.20 version directly from mbrusa ( viewtopic.php?f=30&t=98281&start=750#p1527187 ) and here everything works. I don't know if it is due to the overrun fix or some other change (e.g. outsourcing advanced.cfg).

I would like to use the last hour of sunshine for a round of cycling now :) Thanks to all.

mbrusa   1 W

1 W
Posts: 52
Joined: Dec 11 2019 12:13am

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

Post by mbrusa » Mar 17 2020 11:20am

Hi bingo5
Fix overrun has nothing in common with temperature control.
Can you post the config.h and advanced.h files?
I don't have a temperature sensor but I had tried in simulation.

ilu   10 mW

10 mW
Posts: 34
Joined: Oct 18 2019 10:51am

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

Post by ilu » Mar 17 2020 11:46am

bingo5 wrote:
Mar 17 2020 9:21am
In the same way the display (displaya data = 0) shows me 0.00 °C temperature.

My settings are:
#define ENABLE_THROTTLE 0
#define ENABLE_TEMPERATURE_LIMIT 1
I had this same problem with v0.20beta1a from Github. But it was the first time I installed the sensor so I thought the fault was somewhere in the connections I made (directly to controller board) even though I could not point out where. The temp sensor itself was giving accurate readings to voltmeter and the soldered joint to board seemed fine and on the right spot compared to the installation guide in the FAQ.

Post Reply