Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

Electric Motors and Controllers
anonpleb   1 mW

1 mW
Posts: 19
Joined: Apr 28 2020 1:40pm

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

Post by anonpleb » Aug 31 2020 7:06am

Kati-moa wrote:
Aug 30 2020 5:50pm
Yes, it is easy but you need to use ST Visual Programmer. Connect up the ST-Link as normal and open the programmer (The JavaConfigurator is not needed or used). Select the Option Byte tab and what I do is 'Read' that tab to determine what is actually in the controller, change the byte from 0020 to 0028 and then 'program'.

It will write the change and verify. All done - good to go. However, until the Java Configurator is updated you will need to do this following each upload of SW, but is easy since everything is already connected.

Hope this fixes your problem
Hi,

Just when I thought I understood all this ......
Can you clarify the following :-

1. Option Byte = 20 Signifies OSF sotware is being used
2. Option Byte = 28 Signifies Stock is being used

If I have a new "Out of the box" motor and I program it with latest OSF software using Java Configurator, are you suggesting that I then have to use ST Visual Programmer to update Option Byte From 0020 to 0028. (If so could I use "STOCKOPTIONBYTE.S19" from
https://drive.google.com/drive/folders/ ... jMrpW2ZqvH).

If at some later time I use the Java Configurator to change some options I would have to change option byte manually again ?

Thanks Paul

Anikea   100 µW

100 µW
Posts: 7
Joined: Jun 11 2020 10:02pm

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

Post by Anikea » Sep 01 2020 1:33am

Hi,
I have a problem with the setting of the battery indicator in the firmware. I don't understand the limits there.

I interpret the following from the instructions:
Display xh18
2.9v or less = No notch
3.25 - 2.91 = 1 notch
3.55 - 3.26 = 2 notches
3.85 - 3.56 = 3 notches
3.95 = Minimum voltage to Display 4 notches.

What happens between 3.85 and 3.95 ?

Kati-moa   100 µW

100 µW
Posts: 9
Joined: May 26 2020 4:50am

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

Post by Kati-moa » Sep 01 2020 3:03am

Paul, to make it clear why I suggested to Badmotor that he use 28 rather than 20 was in response to the issue he was having with 'no throttle motors'. In my experience with these controllers I found anomalous or unusual behaviour in the way the motor ran. In particular, the motor/controller would randomly kick into a form of cruise mode, the odometer would freeze and it was not easy to regain control of the ebike even after turning off and then on would not fix it sometimes. However, problems went away once I changed the option byte.

Now it may not be a problem in your case and the controller will behave as expected, but this is a strategy if strange things occur. Both of my ebikes with OSF installed have responded positively to the change. And yes, if the change solves the problem it goes without saying the byte will have to be changed after every upload until those doing the development determine the right approach for the SW.

Ian

anonpleb   1 mW

1 mW
Posts: 19
Joined: Apr 28 2020 1:40pm

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

Post by anonpleb » Sep 01 2020 7:23am

Ian,

Interesting. I have had to reprogram over & over to get a set of parameters which facilitate Cruise control on my wifes bike.
Once it was working it seemed that any minor change made using Java front end would cause the Cruise control to screw up
making it start stop intermittently. I will try some of my Java front end settings which caused issues and reset Option Byte to 28
and see if it fixes issue.

Thanks
Paul

anonpleb   1 mW

1 mW
Posts: 19
Joined: Apr 28 2020 1:40pm

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

Post by anonpleb » Sep 05 2020 5:29am

Anikea wrote:
Sep 01 2020 1:33am
Hi,
I have a problem with the setting of the battery indicator in the firmware. I don't understand the limits there.

I interpret the following from the instructions:
Display xh18
2.9v or less = No notch
3.25 - 2.91 = 1 notch
3.55 - 3.26 = 2 notches
3.85 - 3.56 = 3 notches
3.95 = Minimum voltage to Display 4 notches.

What happens between 3.85 and 3.95 ?
The manual states :-

================
For All Displays
================
#define LI_ION_CELL_VOLTS_FULL 3.95
Minimum voltage value to display the complete battery charge status

================
For 4 bar Displays
================
// Cell voltage 3/4 (V)
#define LI_ION_CELL_VOLTS_3_OF_4 3.85
// Cell voltage 2/4 (V)
#define LI_ION_CELL_VOLTS_2_OF_4 3.55
// Cell voltage 1/4 (V)
#define LI_ION_CELL_VOLTS_1_OF_4 3.25

So if Voltage hits :-
3.25 then 1 bar displayed (3.25 - 3.54)
3.55 then 2 bar displayed (3.55 - 3.84)
3.85 then 3 bar displayed (3.85 - 3.94)
3.95 then 4 bar displayed (3.95 >)

Anikea   100 µW

100 µW
Posts: 7
Joined: Jun 11 2020 10:02pm

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

Post by Anikea » Sep 06 2020 12:03am

anonpleb wrote:
Sep 05 2020 5:29am

The manual states :-

================
For All Displays
================
#define LI_ION_CELL_VOLTS_FULL 3.95
Minimum voltage value to display the complete battery charge status

================
For 4 bar Displays
================
// Cell voltage 3/4 (V)
#define LI_ION_CELL_VOLTS_3_OF_4 3.85
// Cell voltage 2/4 (V)
#define LI_ION_CELL_VOLTS_2_OF_4 3.55
// Cell voltage 1/4 (V)
#define LI_ION_CELL_VOLTS_1_OF_4 3.25

So if Voltage hits :-
3.25 then 1 bar displayed (3.25 - 3.54)
3.55 then 2 bar displayed (3.55 - 3.84)
3.85 then 3 bar displayed (3.85 - 3.94)
3.95 then 4 bar displayed (3.95 >)
Thank you for your explanation, but then I do not understand what happens between 2.9v and 3.25v? Because I would interpret the manual that 0 notches (in my mind it is a red notch?) will display if the voltage is 2.9v and below, because 3.25v is not completely discharged?

The manual:
empty //Cell voltage empty (V) #define LI_ION_CELL_VOLTS_EMPTY 2.90 Voltage value to display the state of the completely discharged battery, 0 notches.

anonpleb   1 mW

1 mW
Posts: 19
Joined: Apr 28 2020 1:40pm

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

Post by anonpleb » Sep 06 2020 8:30am

I hadnt spotted that !
Maybe 1 bar is displayed for voltages between 2.91 - 3.54 and no bars for 2.90 and below ?
Certainly it is not very clearly documented :-(

ilu   100 W

100 W
Posts: 123
Joined: Oct 18 2019 10:51am

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

Post by ilu » Sep 08 2020 12:43pm

On the VLCD6 display the last bar starts to flash right before the battery is empty, so between 3.25 - 2.90 it shows 1 flashing bar.

Tunk   1 mW

1 mW
Posts: 10
Joined: Jun 14 2015 9:37am

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

Post by Tunk » Sep 08 2020 7:13pm

Hi, I have read all post and are still comfused whitch firmware I should try.
I want ny fatbike to be street legal for Norway. Max speed 25kmh. 250w nominal. That means that it can have more watt for å short time, but if it runs continuous With more than 250w in 1 hour it can be overheated or Broken.
I have the vlcd5 display.
Whitch st link should I by ?

Best regards
Tunk

anonpleb   1 mW

1 mW
Posts: 19
Joined: Apr 28 2020 1:40pm

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

Post by anonpleb » Sep 09 2020 10:56am

Hi,

I got mine from EEEBBBAAYY from Mercury Components £6.99 incl Postage :-

ST-Link STM8 STM32 v2 Programmer & Emulator 3.3V 5V Latest Firmware UK Seller.

And it works !

Instructions for programming TSDZ2 :-

https://github.com/emmebrusa/TSDZ2-Smart-EBike-1/wiki

You will need to specify your Battery Voltage 36v or 48v and battery cells no (10 For 36v 13 for 48V)
and Battery Capacity Wh = Battery Voltage * Battery amps eg 48 * 12 =576. Read manual on above link for further info
Attachments
Java Front End.JPG
Java Front End.JPG (119.34 KiB) Viewed 919 times

Fl0   1 µW

1 µW
Posts: 3
Joined: Sep 10 2020 8:09am

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

Post by Fl0 » Sep 10 2020 8:20am

Hi everyone!
I recently got a TDSZ2 VLCD5 500Wa 48v12Ah to bring my son uphill from the kindergarten. Installing the motor was an adventure and I sweated plenty (had to bring out the saw twice :roll: ) but it now works and I’m overall happy. However while I had zero experience with e-bikes I could tell this motor was not possibly giving me all it had. Doing some research online I found this board- woohoo! I’ve just ordered a STLINK V2 and I’m very excited to try and “flash” the motor. I have a couple of very dumb newbie questions that I’m hoping some kind soul can answer.
-do I need to flash both, the display and the motor? Will I need any other cable besides the stlinkv2?

-I’m planning to install the open source version. How do I know which file/version do I need?

-once I’m “in the system”, how do I know what “numbers” or “parameters” should I enter? I basically want the bike to start assisting right away and not after half a pedal, assist a little more and perhaps be a little more quiet.

-perhaps should I try one of the pre-made versions? How do I know which one to install?

-Edit to add: I’m scared of “frying” the motor. Are there settings I can install to avoid this, without having to add additional cables to the bike?

I’m not a computers person so I apologize for potential incorrect terminology... this is a big stretch for me, but I know it will be worth it! Anyone can recommend a very step by step fool proof guide or YouTube video that covers the motor and the display?

Thanks so much for any guidance! :bolt: :bolt:

anonpleb   1 mW

1 mW
Posts: 19
Joined: Apr 28 2020 1:40pm

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

Post by anonpleb » Sep 10 2020 2:16pm

Fl0 wrote:
Sep 10 2020 8:20am
Hi everyone!
I recently got a TDSZ2 VLCD5 500Wa 48v12Ah to bring my son uphill from the kindergarten. Installing the motor was an adventure and I sweated plenty (had to bring out the saw twice :roll: ) but it now works and I’m overall happy. However while I had zero experience with e-bikes I could tell this motor was not possibly giving me all it had. Doing some research online I found this board- woohoo! I’ve just ordered a STLINK V2 and I’m very excited to try and “flash” the motor. I have a couple of very dumb newbie questions that I’m hoping some kind soul can answer.
-do I need to flash both, the display and the motor? Will I need any other cable besides the stlinkv2?

-I’m planning to install the open source version. How do I know which file/version do I need?

-once I’m “in the system”, how do I know what “numbers” or “parameters” should I enter? I basically want the bike to start assisting right away and not after half a pedal, assist a little more and perhaps be a little more quiet.
I would NOT recommend having the assist start immediately - especially if you have a Toddler on board. Did you purchase the brakes with motor cut-off sensor ? Worthwhile if you ever experience problems with motor surging
-perhaps should I try one of the pre-made versions? How do I know which one to install?
See Link below for latest firmware

-Edit to add: I’m scared of “frying” the motor. Are there settings I can install to avoid this, without having to add additional cables to the bike?
If you mean will the STlink "Fry" the motor - No it uses only 5V from USB. If you mean will the extra power available from OSF fry motor - No, if you stick to conservative setting eg Amps =15 Total watts=500 Speed Limit 25Km. Also use bike gears to assist the motor when climbing hills.
I’m not a computers person so I apologize for potential incorrect terminology... this is a big stretch for me, but I know it will be worth it! Anyone can recommend a very step by step fool proof guide or YouTube video that covers the motor and the display?
https://github.com/emmebrusa/TSDZ2-Smart-EBike-1/wiki. Download the zip file it contains everything including PDFs showing all the settings and how to use them. They are not the best manuals so read them several times
Thanks so much for any guidance! :bolt: :bolt:

Goody5   100 µW

100 µW
Posts: 9
Joined: Aug 27 2020 8:31pm

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

Post by Goody5 » Sep 10 2020 5:59pm

Just loaded the OSF using the VLCD5 which is great by the way.

In reading the setup documentation regarding cadence and torque caibration, I am little confused about the “ADC conversion factor calibration”.

I actually notes in the documentation that it is not essential but would still like to understand it and set it.

It says the default value is 67 (which is in my config file before I flash it) but it comes up with 70 on my display. I also assume you have to lift the back wheel off the ground if you are activating the walk assist to get the correct reading.

Any info would be appreciated.

Fl0   1 µW

1 µW
Posts: 3
Joined: Sep 10 2020 8:09am

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

Post by Fl0 » Sep 10 2020 11:51pm

anonpleb wrote:
Sep 10 2020 2:16pm
Fl0 wrote:
Sep 10 2020 8:20am
Hi everyone!
I recently got a TDSZ2 VLCD5 500Wa 48v12Ah to bring my son uphill from the kindergarten. Installing the motor was an adventure and I sweated plenty (had to bring out the saw twice :roll: ) but it now works and I’m overall happy. However while I had zero experience with e-bikes I could tell this motor was not possibly giving me all it had. Doing some research online I found this board- woohoo! I’ve just ordered a STLINK V2 and I’m very excited to try and “flash” the motor. I have a couple of very dumb newbie questions that I’m hoping some kind soul can answer.
-do I need to flash both, the display and the motor? Will I need any other cable besides the stlinkv2?

-I’m planning to install the open source version. How do I know which file/version do I need?

-once I’m “in the system”, how do I know what “numbers” or “parameters” should I enter? I basically want the bike to start assisting right away and not after half a pedal, assist a little more and perhaps be a little more quiet.
I would NOT recommend having the assist start immediately - especially if you have a Toddler on board. Did you purchase the brakes with motor cut-off sensor ? Worthwhile if you ever experience problems with motor surging
-perhaps should I try one of the pre-made versions? How do I know which one to install?
See Link below for latest firmware

-Edit to add: I’m scared of “frying” the motor. Are there settings I can install to avoid this, without having to add additional cables to the bike?
If you mean will the STlink "Fry" the motor - No it uses only 5V from USB. If you mean will the extra power available from OSF fry motor - No, if you stick to conservative setting eg Amps =15 Total watts=500 Speed Limit 25Km. Also use bike gears to assist the motor when climbing hills.
I’m not a computers person so I apologize for potential incorrect terminology... this is a big stretch for me, but I know it will be worth it! Anyone can recommend a very step by step fool proof guide or YouTube video that covers the motor and the display?
https://github.com/emmebrusa/TSDZ2-Smart-EBike-1/wiki. Download the zip file it contains everything including PDFs showing all the settings and how to use them. They are not the best manuals so read them several times
Thanks so much for any guidance! :bolt: :bolt:
Wow awesome, thank you!! I get what you say about the pedal start. Maybe I could just ask it to start a millisecond earlier. Thanks for the link to the latest firmware! I’ll use that one.
Right now I have the amps on the vlcd5 settings at 32, I though it would give it more power. Should I lower it again?

anonpleb   1 mW

1 mW
Posts: 19
Joined: Apr 28 2020 1:40pm

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

Post by anonpleb » Sep 11 2020 1:41pm

Yes, I would definitely reduce Amps from 32 to 15/16.
The Open Sorce Firmware (OSF) Java Front end will only allow you to set a max of 17 Amps.
I suspect the Battery Managemment System (BMS) would ignore such a high setting of 32.
Again read the manuals which you will find in Emmabrusa.zip file in the "Manuals" Folder as shown below.
Attachments
Capture.JPG
Capture.JPG (107.55 KiB) Viewed 831 times

Badmotor   1 mW

1 mW
Posts: 19
Joined: Sep 09 2019 5:06am

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

Post by Badmotor » Sep 12 2020 7:47am

Kati-moa wrote:
Aug 30 2020 5:50pm
Yes, it is easy but you need to use ST Visual Programmer. Connect up the ST-Link as normal and open the programmer (The JavaConfigurator is not needed or used). Select the Option Byte tab and what I do is 'Read' that tab to determine what is actually in the controller, change the byte from 0020 to 0028 and then 'program'.

It will write the change and verify. All done - good to go. However, until the Java Configurator is updated you will need to do this following each upload of SW, but is easy since everything is already connected.

Hope this fixes your problem
Hi,

Thank you for the detailed explanation. I was just about to test it, but then I discovered that my brass gear has nearly shattered inside...

It appears that lithium grease has hardened due to low temperatures in the winter (we get down to -25C). Or maybe it got overheated from high power, since I tweaked the assist nearly to the max in the settings. Or maybe the metal wasn't high quality? Seems like it's not always that smart to replace the blue gear after all...
Attachments
gear1jpg.jpg
gear1jpg.jpg (92.37 KiB) Viewed 795 times
gear2.jpg
gear2.jpg (66.44 KiB) Viewed 795 times
gear3.jpg
gear3.jpg (62.65 KiB) Viewed 795 times

Badmotor   1 mW

1 mW
Posts: 19
Joined: Sep 09 2019 5:06am

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

Post by Badmotor » Sep 13 2020 3:01pm

And btw issue with the throttle wasnt fixed no matter if I changed optionbyte or not. I dont think it depends on that in my case. Ill try to report the issue to github.

HrKlev   100 W

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

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

Post by HrKlev » Sep 13 2020 3:37pm

Anyone wants to have a guess what went wrong with my controller? Lots of smoke and smell 😂

Almost went to 1000km (982). After a few km with level 0 assistance, I turned it back on and it released the smoke. No idea why, its been reliable until then...
IMG_13092020_223324_(1000_x_750_pixel).jpg
IMG_13092020_223324_(1000_x_750_pixel).jpg (220.84 KiB) Viewed 765 times
DIY lightweight mid drive with torque sensing build thread: viewtopic.php?f=6&t=107622

ElectricSprocket   10 mW

10 mW
Posts: 23
Joined: Oct 05 2016 3:48am
Location: Central Coast, NSW, Australia

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

Post by ElectricSprocket » Sep 13 2020 7:07pm

Posts like this make me love my blue gear (and the spare is also blue).
I wonder. Has anyone stripped a blue gear with open source firmware?
Badmotor wrote:
Sep 12 2020 7:47am
..I discovered that my brass gear has nearly shattered inside...

It appears that lithium grease has hardened due to low temperatures in the winter (we get down to -25C). Or maybe it got overheated from high power, since I tweaked the assist nearly to the max in the settings. Or maybe the metal wasn't high quality? Seems like it's not always that smart to replace the blue gear after all...

Fl0   1 µW

1 µW
Posts: 3
Joined: Sep 10 2020 8:09am

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

Post by Fl0 » Sep 15 2020 12:20am

anonpleb wrote:
Sep 11 2020 1:41pm
Yes, I would definitely reduce Amps from 32 to 15/16.
The Open Sorce Firmware (OSF) Java Front end will only allow you to set a max of 17 Amps.
I suspect the Battery Managemment System (BMS) would ignore such a high setting of 32.
Again read the manuals which you will find in Emmabrusa.zip file in the "Manuals" Folder as shown below.
Thanks so very much. Will do. The little device has arrive so today is flashing day!
Wish me luck 🤞🏻

danielson   10 mW

10 mW
Posts: 33
Joined: Aug 21 2019 1:45am

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

Post by danielson » Sep 17 2020 2:14am

Just setup the new configurator but noticed there is no option for 52V. Is there a work around for this ?
Daniel

danielson   10 mW

10 mW
Posts: 33
Joined: Aug 21 2019 1:45am

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

Post by danielson » Sep 17 2020 2:18am

Ignor the last comment just realised that is motor type. Is there a good basic setup known to work well to start with ?

Adarsh881   1 mW

1 mW
Posts: 16
Joined: Sep 18 2020 6:15pm

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

Post by Adarsh881 » Sep 18 2020 6:23pm

Hi.
I did everything what was written in the instruction manual but in the end it doesnt compile/flash when i click the button. Any ideas?

Image

I took a picture off the screen. sorry...printscreen is not working...
Thank you:)

Elinx   1 kW

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

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

Post by Elinx » Sep 19 2020 4:21am

Adarsh881 wrote:
Sep 18 2020 6:23pm
...I did everything what was written....
Have you installed SDCC and STVP directly in C:\
Default it must be installed there and not in "program files"
written here

anonpleb   1 mW

1 mW
Posts: 19
Joined: Apr 28 2020 1:40pm

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

Post by anonpleb » Sep 19 2020 5:09am

Hi,

Check the SDCC Software is included in Windows %Path% variable :
Attachments
Path.JPG
Path.JPG (76.06 KiB) Viewed 606 times

Post Reply