My Cargo bike build.

guerney

Esteemed Pedelecer
Sep 7, 2021
11,531
3,277
stvp is in the STM folder, so have altered the Path to read correctly.
The cmd is slow at loading all the script but yes it is the same as #367 reads.
One can and is able to make config changes without the motor connected and can save those changes as .ini files, to complete the final process one has to connect the motor controller and then pre select the required .ini file. They are stored in the config repositary.
Do you get the command box and cannot connect with "the tool" message? If so, I think it's go go go time!
 

Nealh

Esteemed Pedelecer
Aug 7, 2014
20,981
8,565
61
West Sx RH
That's the one major difference between the BBS & the TSDZ programming tools,
the TSDZ one can do it all without a proper motor controller connection and save as many files as one likes.
 

Nealh

Esteemed Pedelecer
Aug 7, 2014
20,981
8,565
61
West Sx RH
Do you get the command box and cannot connect with "the tool" message? If so, I think it's go go go time!
Yes as I said it reads the same as #367.

Tab 1. TSDZ2 Parameter config
This is the default pane. The .ini file is top RHS in the pane, notice the box for saving .ini files is the experimental heading.
DSCF1357.JPG


Altering the configurator and clciking the compile & flash box , it saves the new .ini file in the experimental pane of the configurator & at the same time a cmd box opens and starts listing the Cmd lines. I have loaded 2x .ini files in the experimental box.
One can see at the bottom of the Cmd the errors of not communictaing with the tool and programming failed, which is correct as I haven't got the st tool connected.
The files though remain saved in the .ini file for future uploading, it mean one can play without having to keep connecting the motor contorller until ready.
DSCF1379.JPG


This pic is one I have already saved to .ini file which is saved in the experimental folder with the default commit from Github.
The files are dated and one can change the file name to suit something more intelligible.
DSCF1378.JPG

The .ini files are permanent until deleted, when connecting to the motor controller one simply presses the compile & flash having selected the .ini required.
 
Last edited:

guerney

Esteemed Pedelecer
Sep 7, 2021
11,531
3,277
Yes as I said it reads the same as #367.

Altering the configurator and clciking the compile & flash box , it saves the new .ini file in the experimental pane of the configurator & at the same time a cmd box opens and starts listing the Cmd lines.


This pic is one I have already saved to .ini file which is saved in the experimental folder with the default commit from Github.
The files are dated and one can chnage the file name to suit somehting more intelligible.
I have no idea what you need to do from this point on with the configurator, but it sounds like the PC side is working and ready to flash. You'll never find me if it goes wrong ;)
 

guerney

Esteemed Pedelecer
Sep 7, 2021
11,531
3,277
:eek:
 

Nealh

Esteemed Pedelecer
Aug 7, 2014
20,981
8,565
61
West Sx RH
I renamed the .ini file I made with the date and battery series and cell in use.
 

Nealh

Esteemed Pedelecer
Aug 7, 2014
20,981
8,565
61
West Sx RH
The configurator does the same as the Bafang one, one makes all the necessary parameter changes then hits the compile & flash. The difference being the OSF config for TSDZ2 allows the user to modify and save files to flash later but the Bafang one doesn't If I remember correctly.
 

guerney

Esteemed Pedelecer
Sep 7, 2021
11,531
3,277
The configurator does the same as the Bafang one, one makes all the necessary parameter changes then hits the compile & flash. The difference being the OSF config for TSDZ2 allows the user to modify and save files to flash later but the Bafang one doesn't If I remember correctly.
I could be mistaken but I think the Bafang configuration tool only writes over selected portions of the firmware on the controller with different values, not as comprehensive a hack job.
 

Nealh

Esteemed Pedelecer
Aug 7, 2014
20,981
8,565
61
West Sx RH
So for any one wishing to go OSF for TSDZ2 with a stock display and with first hand exp of the pitfalls I would say go, go, go for it.
BELOW IS MY IDIOTS GUIDE TO INSTALLING.
The only real issue is the the PC op system and whether it accepts the Java Runtime (jre) as this was really the main stumbling block for me. The geeky terms and practice of programming (even minor ones like this throws up), one soon can get the hold of it after a few days of trial and error.
My 2020 W10 laptop refused to install it , yet my smashed but still working 2015 slow W10 Notepad happily installed it.

1. An ST -Link (dongle) needs to be simply made and wired correctly. Quite easy to do but wires must be short so no longer then 17cm from end of ST-Link to end of tsdz speed wire connector. The total wire length in between being a max 11cm, an st -link is needed and a spare tsdz2 speed sensor cable to cut up.
Go to page #1 and post #11 to see my diagram.


This is for Windows as I have no exp of other systems.

1A. If not loaded use a free down load of Notepad++ from https://notepad-plus-plus.org/
Download to the Download folder and then open it to install on the pc, it doesn't matter where as it will auto run when needed.

2. The most important bit Download Java jre and check it is loaded and running on your pc. Download from Download Java for Windows
Simply down load it and all the other Downloads when it comes to it, in to your PC's Download folder. From the Download folder copy it to C:, once done open & install it to your pc.
To check it is installed correctly use the magnifying glass/search box, located bottom lhs of the screen. Type in Cmd and then simply open the Command Prompt app, a new Black box will open. In the box a curser flashes next to your C:\ user name. Simply type java after your name and then press the enter key on the rhs of the querty board, if all is well then a pleatherer of text will start printing. Once this has finished press the enter key agian for your user name and cursor to flash again, type java _version ( after java there is a space then the under score dash line) and it should confirm the version.
Once this is done close the Cmd Prompt box.

3. Download SDCC from Download Small Device C Compiler from SourceForge.net in to your Download folder.
In Local disk C:\ make a new folder called STMicroelectronics, from Downloads copy the SDCC to the STM folder.
Open the SDCC in the STM folder to install it in your PC via the install wiazard, during the install a box will appear with add to PATH (make sure the box precceding the PATH is ticked).
It will read; Add to path [Tick] Add C:\Program Files\SDCC\bin to PATH or C:\STMicroelectronics\bin to PATH.

4. Download the ST Visual Developer/STVD -stm8 from STVD-STM8 - ST Visual develop IDE for developing ST7 and STM8 applications - STMicroelectronics . One has to supply the email for a reply link to allow the free down load. Again download to pc Download folder.
From the PC Download folder simply copy it to the folder C:\STMicroelectronics.
In the STMicroelectronics right click the en.stvd-stm8.zip folder and select extract all (tick the show all files box) in the new pane delete any wording that follows C:\ STMicroelectronics (in the destination box). The files will then extract to single ones in the STMicroelectronics folder.
Whilst in the C:\STM folder open the sttoolset_pack42.exe and install via the wizrard which auto runs. Ignore the acrobat box, accept the terms and leave the standard tools box as is.
Now let the wizard go thru half a dozen process's quite quickly.

5. Download the latest TSDZ2 OSF commit from GitHub - emmebrusa/TSDZ2-Smart-EBike-1: TSDZ2 Open Source Firmware adapted to VLCD5-VLCD6-XH18 displays
In the GitHub simply left click the Green Code box and select the Download ZIP.
Down load to Downloads folder or direct to C:
When folder is in C: right click and extract the zip folder to a folder of the same name minus the ZIP on the end. I found it best to keep the folder name exactly the same as the commit version rather then use the master name.
Once extracted one will see a list of files and folders, here we have to make sure the path is correct for JAR to open properly. Select the 'src' folder and open it, then select the 'controller' folder and open it. In the 'controller 'folder right click the 'compile_and _flash folder (it may say .bat) after it and select the 'Edit with Notepad++'. In here copy/re-type the text from page #10 & post #182 exactly (the last entry box).

Once all this is done open the C:\TSDZ2 folder not the zipped one and open the JavaConfigurator.jar file and the tsdz2 configurator screens should open.

You are the ready to make the parameter changes.
 
Last edited:

guerney

Esteemed Pedelecer
Sep 7, 2021
11,531
3,277
Looking at the "EN-Parameter_configurator_guide-TSDZ2-v20.1C.2.pdf" located in the \manuals folder of the firmware zip... the parameters are many.
 

Nealh

Esteemed Pedelecer
Aug 7, 2014
20,981
8,565
61
West Sx RH
Most of the changes are pretty simple ones and only minoe adjustments.
Tab 1. is general parameters.
Is mainly battery details, display type, measuring units, speed & wheel size settings.
One can set the battery lvc so it can over ride the actual battery and use the controller lvc.
I have set the lvc in the config to 39v or 3.25v per cell for my 12s battery, one can select the battery series usedand current.

Tab2.
Is all about the assistance type and adjusting the power levels, one can select the assistance type to use via the display.

Tab.3
Is adv settings.
These entail setting the voltage level for when the battery bars dissapear, selecting data to show on the display.

In Tab.2 if one wants to remain 250w max output then one enables the street pwr mode, if one wishes to have more power one disables it.
 

guerney

Esteemed Pedelecer
Sep 7, 2021
11,531
3,277
I've never bricked a device by manual firmware update, it's all gone smoothly despite worries. Apart from a Xiaomi wireless security camera from China, which refused to work without "The latest firmware update", because it detected it was being used outside China. I had no choice but to allow it to update automatically, after which it refused to work because "This device cannot be used outside China Mainland". And there was no way to roll it back. I've refused to buy any Xiaomi devices since! Another time, a motherboard BIOS firmware eating virus ate my beloved dual 866 PIII CPU socket Supermicro motherboard, but every time I have updated firmware manually, it's gone well. If you've done your due diligence, it's just time to bite the bullet and make it happen.
 

guerney

Esteemed Pedelecer
Sep 7, 2021
11,531
3,277
...and there was that time when the Bafang USB programming lead has a broken wire, but other than that, no issues.
 

guerney

Esteemed Pedelecer
Sep 7, 2021
11,531
3,277
As mentioned earlier: "Simon" - last post on this page - had an alarming problem after flashing the firmware on his TSDZ2, so it's not without risk!

 
Last edited:

guerney

Esteemed Pedelecer
Sep 7, 2021
11,531
3,277
Personally, I'd choose the firmware most widely reported as being problem free. Whichever version that happens to be.
 

guerney

Esteemed Pedelecer
Sep 7, 2021
11,531
3,277
Looking at the date of the post which "Simon" made, ie March 6, 2022, I think it's likely he was usingthe latest firmware, not the version before. Annoyingly, he doesn't say which version he used. I'd use the version before the latest version - just in case - but that's me.

Official firmware by big companies gets checked by many different people and teams before release - if as you mentioned, the original programmer of this OSF has now abandoned this project because of reliability issues and she was working largely alone, personally I'd be cautious of the newest release, just in case. Unless the version prior had horrible issues.
 

Nealh

Esteemed Pedelecer
Aug 7, 2014
20,981
8,565
61
West Sx RH
A 1.20.1C.3 was released experimentally and then shelved as it had issues with stock displays but was ok with lcd3.
The current 1.20.1C.2 was released then withdrawn last year whilst some bugs were sorted out then it was finally realeased again for proper this April. It is now the go to version replacing the previous versions 1C.1, 1C & 1B .
The latest 1C.2 has 19 smaller improvements over the last one.

These guys are pretty thorough and only release a new commit for use once it has been well tested and have no qualms about withdrawing them if they do prove iffy in use.
 
Last edited:

Nealh

Esteemed Pedelecer
Aug 7, 2014
20,981
8,565
61
West Sx RH
The progress and versions are continual collaboration between several programmers on the GitHub scene and also ES, some hand over the baton to others once they have taken it as far as they can or venture into other projects, currently emmebrusa is the main baton holder and is in Italy.
 

Nealh

Esteemed Pedelecer
Aug 7, 2014
20,981
8,565
61
West Sx RH
As mentioned earlier: "Simon" - last post on this page - had an alarming problem after flashing the firmware on his TSDZ2, so it's not without risk!

Back in March it wouldn't have been the latest released commit so likely 1.20.1C.1.
 

Related Articles

Advertisers