Tsdz2 firmware open source adapted to vlcd5, vlcd6 and xh18

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
 
Anikea said:
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 >)
 
anonpleb said:
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.
 
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 :-(
 
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.
 
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
 
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
    103.4 KB · Views: 1,324
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:
 
Fl0 said:
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:
 
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.
 
anonpleb said:
Fl0 said:
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?
 
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
    92.3 KB · Views: 1,236
Kati-moa said:
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
    48.2 KB · Views: 1,200
  • gear2.jpg
    gear2.jpg
    32.4 KB · Views: 1,200
  • gear3.jpg
    gear3.jpg
    31.4 KB · Views: 1,200
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.
 
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
 
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 said:
..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...
 
anonpleb said:
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 🤞🏻
 
Just setup the new configurator but noticed there is no option for 52V. Is there a work around for this ?
Daniel
 
Ignor the last comment just realised that is motor type. Is there a good basic setup known to work well to start with ?
 
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?

93652730-6a6d6480-fa16-11ea-8c69-44c5fe4371ec.jpg


I took a picture off the screen. sorry...printscreen is not working...
Thank you:)
 
Adarsh881 said:
...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
 
Hi,

Check the SDCC Software is included in Windows %Path% variable :
 

Attachments

  • Path.JPG
    Path.JPG
    63.5 KB · Views: 1,011
Adarsh881 said:
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?

93652730-6a6d6480-fa16-11ea-8c69-44c5fe4371ec.jpg


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

Check where you have installed :-

STMicroelectronics\st_toolset.

If you have not installed it in Root C: then you will have to amend the following files in (C:\TSDZ2-Smart-EBike-1-master) :
 

Attachments

  • Bat files.JPG
    Bat files.JPG
    16.1 KB · Views: 2,591
Best to set up all this stuff directly on the c: drive that way it’s easier to get all the paths right.
 
I don't know if this is the right place to post this or not, but I just installed the Marcoq version of the open source and noticed a large increase in power consumed. On the original firmware the motor consumed 163WH in TURBO during a 15 mile ride. With the new software it consumed 240WH for the same 15 mile ride in TOUR.
Is this normal for open source software to use so much extra power?
 

Attachments

  • 2020-09-20 (2).png
    2020-09-20 (2).png
    66.6 KB · Views: 2,548
Back
Top