TSDZ2 OSF for all displays, VLCD5-VLCD6-XH18, LCD3, 860C-850C-SW102.

Hi all. Yesterday I decided to try the new version and disable the advanced torque sensor calibration function. Because after stopping in the cold, I received error E02 every time. As long as the engine was warm or the outside temperature was above 10 degrees, everything worked fine. But yesterday things got really bad: When I tried to use the latest version of the configurator, I received an error. Then I tried to check the operation of St-link using St visual programmer and I finally turned the motor into a brick. I realized that my cable was working and after some time I was able to restore the motor using St visual programmer. But the configurator still doesn't work. When I try to program it gives an error: process_begin: CreateProcess(C:\Users\y\Desktop\TSDZ2\TSDZ2-Smart-EBike-1-20.1C.
2-update-3\tools\cygwin\bin\sh.exe, C:/Users/y/Desktop/TSDZ2/TSDZ2-Smart-EBike-1
-20.1C.2-update-3/src/controller/../../tools/cygwin/bin/sh.exe -c "echo \"Cleani
ng files...\"", ...) failed.
make (e=216): Error 216
make: *** [clean] Error 216
Cleaning failed!!
Press any key to continue . . .

I have an old laptop with Windows 32. Could this be the problem? And how to restore the configurator (at least the old version)?
Thanks.
 
I have an old laptop with Windows 32. Could this be the problem? And how to restore the configurator (at least the old version)?
Thanks.
Why not reload it into your PC again? All the old configurator versions are still available. Windows 3.2? Wow. I remember when 3.0 was released in 1991. That's when I started using it, although I did a lot in DOS,
 
Why not reload it into your PC again? All the old configurator versions are still available. Windows 3.2? Wow. I remember when 3.0 was released in 1991. That's when I started using it, although I did a lot in DOS,
I don’t quite understand you: What exactly are you suggesting to reinstall?
 
I’m trying to set odometer to a specific value = 2720 miles. It is stuck on 1689.4 miles. I can set value to zero and that value holds on the display, but if I change to 2720 the display reverts back to 1689.4 everytime. Any ideas appreciated…
 
If it won't compile on your laptop, you probably have a bad file.

The whole software environment. Whichever version you need.
I have several older versions and they used to compile and load. But since yesterday, all the old versions also stopped working. The same error occurs on all versions. This probably started after the latest version was launched.
 
Hi mbrusa;
what a strange coincidence that I downloaded in just these 2 minutes were it was availabe!

Anyhow - I found the reason why I get the errors - and the reason might be of general interest:

Short version: Although everything else of your opensource firmware compile & flash works on a 32Bit Windows system, the clean.bat file calls a 64Bit variant of a program - which obviously does not work on 32Bit Windows Systems and throws the stated error. (It is sh.exe and its dlls. They are located in C:\TSDZ2-Smart-EBike-1-20.1C.2-update-2\tools\cygwin\bin)

I am using an old Windows 32Bit Tablet for putting your firmware on my motors - as it is less clumsy than dragging a Laptop in the garage to work on the bike with it. Maybe some others also use an old 32Bit Windows system and maybe because of the missing clean sequence in the start of the compilation, this group of people gets sometimes inconsistent Motorbehavior.

So, I installed the latest 32Bit Cygwin Version on my tablet and added/replaced all needed files in the ...TSDZ2-Smart-EBike-1-20.1C.2-update-2\tools\cygwin\bin folder with the respective 32Bit files frm the cygwin install.
Now compile works without problems - also the latest one which you pulled again. (That one has some additional 64Bit only files which I replaced)
I zipped the "new" bin folder together and attatch it:
View attachment 327320

Hopefully, you can use these to replace the 64Bit files in your TDSZ2 Githubs, so this can help other users with 32Bit Windows.
(The 32Bit Versions should work for 32 and 64Bit Systems)

By the way: This problem was there since "ever" - I even checked the Kunteng OpenSource development - it was already there!)
Looks like I'm facing the same problem. I already replaced the bin folder from your download, but it didn't work. I'm trying to install a version of cygwin for 32 bit Windows 7, but I haven't been able to download anything workable yet. Please tell me step by step what needs to be done to fix it?
 
I can have a closer look in the next days, but in general mbrusa fixed it a while ago already and included everything needed: There is a zip file with the 32bit stuff included.
 
Yesterday I tried to install the entire set of programs on another laptop with Win 10. Everything works there. But the problem in my old work computer with Win 7/32 remains. I tried reinstalling St Visual prog., but it didn't help. There are probably some records or files on the computer that interfere with correct compilation. I hope that someone will tell me where to look for them and what to delete.
 
Today I turned off the torque sensor calibration feature and parked the bike outside. The temperature outside is 6.5 degrees. And after 2 hours of inactivity, I turned on the bike and did not see code 02. But why does it appear when torque sensor calibration is enabled? I think I know the answer. the problem is the lack of adaptation. I wrote about this before on this forum, but some took my words as an insult to the developers. But nevertheless the problem exists. In one of my specialties, I configure programmable control systems for sports car engines. Because of this, I have experience and know a little more about engine calibration than most people. From my experience, I know that no two engines are alike (let alone three, etc.). The same applies to TSDZ2 engines. They are all different and have a significant spread in sensor parameters and gaps between parts in the mechanical part. From this we can conclude that a static torque sensor calibration algorithm cannot give a stable result. The existing algorithm does not take into account the possibility of NORMAL changes in the output data of the torque sensor due to the effect of temperature on the mechanical components of the motor. It is not right. Because the correct algorithm should allow natural changes in parameters, in a certain, pre-known range of values, and at the same time not lead to an emergency shutdown (as happens now when error 02 occurs). I don’t want to offend anyone and I hope that my thoughts can be useful to someone.
 
....The same applies to TSDZ2 engines. They are all different and have a significant spread in sensor parameters and gaps between parts in the mechanical part. From this we can conclude that a static torque sensor calibration algorithm cannot give a stable result. ...
I read this and see you enabled/disabled the calibration.
But have you done the calibration too (zero weigt and max weight on the pedals)? Which two values do you have measured?
Without calibration the standaard range is 160, but practical most range values are around 100 to 120.

Because the spread you mention is exactly the reason why a static calibration of the exact torque range could improve the results of it.
Stock firmware or no calibrated OSF (disabled) measure the no pressure value on the pedal and have the same range for all torque sensors. So an insensitive sensor (small range) will give less support. But a small calibrated range from an insensitive sensor can give an on/off feeling.
With calibration enabled and a difference with expected values can give error 02. imho the risk this can happen with a small range and temperature drift is reasonable.
That is why I'm curious to your measured values.
 
I read this and see you enabled/disabled the calibration.
But have you done the calibration too (zero weigt and max weight on the pedals)? Which two values do you have measured?
Without calibration the standaard range is 160, but practical most range values are around 100 to 120.

Because the spread you mention is exactly the reason why a static calibration of the exact torque range could improve the results of it.
Stock firmware or no calibrated OSF (disabled) measure the no pressure value on the pedal and have the same range for all torque sensors. So an insensitive sensor (small range) will give less support. But a small calibrated range from an insensitive sensor can give an on/off feeling.
With calibration enabled and a difference with expected values can give error 02. imho the risk this can happen with a small range and temperature drift is reasonable.
That is why I'm curious to your measured values.
Yes, of course I calibrated the torque sensor. And the bike worked well all last season. Then winter came. This year's first trip out of a warm garage ended with error 02. My wife went to the store, but was unable to return with the engine running. The same situation happened last year with my friend's bike. which he built for his son: I installed custom firmware for him and calibrated the torque sensor. This was at the beginning of the season. But already at the beginning of December he brought me a bike with the problem of error 02. I live in Estonia and it can be quite cold here. We usually ride bikes until december and the temperature outside can be around 0 degrees. Me and most of my friends have factory ebikes. Because this Chinese shit TSDZ2 cannot withstand any loads of an adult. Therefore, it can only be used by women with a compact build and children. In the three years I've used this motor, I've replaced two controllers, one motor, and two blue gears. This is a fiasco! Because on my bike with a Bosch engine, I only replaced chains, cassettes and brake pads. And these constant problems with breakdowns and error codes that block the motor completely make the cheapness of a TSDZ2 bike completely meaningless. I'm ashamed of my wife. because she can’t get to the store and back without incident. I decided to buy her a factory bike. What you are doing here is great! I once also wrote code for Arduino at night and got pleasure from this process. But unfortunately, I can state that you have reached a dead end. Because your manual torque sensor calibration algorithm is not working properly. The correct algorithm should itself adapt to the minimum and maximum values over a certain period of time. This is called adaptation. Then no manual settings will be required at all. Well, you can manually enter the allowed minimum and maximum possible values. But under no circumstances am I asking you to do this! Because it's your hobby. Please excuse me for being emotional)
 

Attachments

  • tsdz2.jpg
    tsdz2.jpg
    220.8 KB · Views: 19
You need to do a hardware calibration of the torque sensor.
The ADC delta is 300-230=70. That's way too small. The ADC no weight should ideally be in the 70-100 range.
I had a torque sensor with a small ADC delta too, around 60. After a hardware calibration it went to 160 and the overall response of the motor was way smoother, especially at low speed/low cadence.
 
your manual torque sensor calibration algorithm is not working properly. The correct algorithm should itself adapt to the minimum and maximum values over a certain period of time....
Your torquesensor isn't the best, so these values are close to each other. That is the reason you aren't satisfied with the performance of it.
Have you measured the zero and max. values again after you had seen the error 02?
Because if the new measured zero value is drifted above the earlier inserted max. value (300) you get that e02.
This isn't a shortcoming of OSF, but of your weak torquesensor.

Some dynamic adaption could improve this a little, but it can't overcome the weakness of the sensor, because the range will not increase, but imho it will decrease even more, because of the non linearity of the range. So the performance of the Tsdz2 will be less too, but you won't see e02 anymore.
Imho I don't know what will be better.

If nothing is broken a hardware calibration could help. With hardware calibration you move the hall sensor a tiny bit to get a better zero value, so you sensor will increase to a better range.

The Tsdz2 is a cheap motor and the hardware is far from perfect, but relative easy serviceable.
You can also replace the entire torquesensor, which is eassier, but that is no guarantee that it will be better if the torque range is also low.
 
Last edited:
Your torquesensor isn't the best, so these values are close to each other. That is the reason you aren't satisfied with the performance of it.
Have you measured the zero and max. values again after you had seen the error 02?
Because if the new measured zero value is drifted above the earlier inserted max. value (300) you get that e02.
This isn't a shortcoming of OSF, but of your weak torquesensor.

Some dynamic adaption could improve this a little, but it can't overcome the weakness of the sensor, because the range will not increase, but imho it will decrease even more, because of the non linearity of the range. So the performance of the Tsdz2 will be less too, but you won't see e02 anymore.
Imho I don't know what will be better.

If nothing is broken a hardware calibration could help. With hardware calibration you move the hall sensor a tiny bit to get a better zero value, so you sensor will increase to a better range.

The Tsdz2 is a cheap motor and the hardware is far from perfect, but relative easy serviceable.
You can also replace the entire torquesensor, which is eassier, but that is no guarantee that it will be better if the torque range is also low.
I don't want to change the sensor or do any hardware calibrations. I just want to disable the algorithm for monitoring the sensor, the appearance of error 02 and blocking the motor. How to do it? I take full responsibility for any consequences upon myself. And you don’t need to tell me that disabling error 02 is very dangerous, etc. Just tell me how to disable it? This is a very simple question that I have asked before. Thank you in advance.

P.S. There is only one reason why my wife still has this bike: She often rides it to the store and leaves it next to the store while she goes shopping. A branded bicycle can be stolen. And it will be almost impossible to find him later. But this tsdz2 homemade product is unlikely to interest thieves. Tsdz2 has no other advantages..
 
I don't want to change the sensor or do any hardware calibrations. I just want to disable the algorithm for monitoring the sensor, the appearance of error 02 and blocking the motor......
You have disabled the calibration already to remove the E02, you have said. Because the hallsensor and magnet are outlined, so the range is decreased you can't do nothing more than accept that or line up the hall sensor again, by a hardware calibration.

If you want to disable the torque sensor completely you must enable cadence mode. L2-E04 (Level 2- 6 pushes on light button)
Try it first before you made it default with L0-E04 (Level 0 - 6 pushes)
If you just want to ignore the E02 error do L4-E04 (Level 4 - 6 pushes), but that can't be default.
I personally don't know how to change the code to make this default also.
 
if you have problems after Winter it's possible you have got water inside and nylon bearing might get rusty
 
You have disabled the calibration already to remove the E02, you have said. Because the hallsensor and magnet are outlined, so the range is decreased you can't do nothing more than accept that or line up the hall sensor again, by a hardware calibration.

If you want to disable the torque sensor completely you must enable cadence mode. L2-E04 (Level 2- 6 pushes on light button)
Try it first before you made it default with L0-E04 (Level 0 - 6 pushes)
If you just want to ignore the E02 error do L4-E04 (Level 4 - 6 pushes), but that can't be default.
I personally don't know how to change the code to make this default also.
I don't want to completely disable the torque sensor. I would like to enable the advanced calibration options again because with it the bike
rides better. But what stops me is the possibility of error 02 appearing again. Therefore, in order to eliminate the possibility of blocking the motor, I want to COMPLETELY disable the diagnostic function of the Chinese torque sensor. Under no circumstances do I want to see a message with code 02 on the screen. Even if smoke is coming out of the engine at that moment, I still don’t want to see code 02!
I don’t understand why the one who wrote the code doesn’t want to reveal this great secret - How to permanently disable everything related to error 02? And you don't need to persuade me
change the sensor, or do something else so that my bad motor becomes like another good motor in which the idiotic error 02 does not occur.. I just want to turn off this diagnostic and close the issue..
 
Hello, I'm currently using JavaConfigurator's OSF with VLCD5 LCD.
I'm trying to change it to SW102 LCD, but it's not working.
I used cyzorp's video as a reference.
I think I was able to flash the LCD firmware and controller.
As I don't have an Android device, I used an iPhone device to update the Bluetooth, and I think it was successful.
However, an "e:brake" error occurs and it does not work.
Does anyone know?IMG_2688.PNGIMG_2689.PNGIMG_2690.PNGstvp.jpgIMG_2692.jpg
 
In the manual, Advanced Technical Data 11.5 Motor speed in ERPS, the description says:

"This value is the instantaneous rotational speed of the
motor. The ERPS value can be divided by eight (8) to
get the motor shaft revolutions per second. Or it can
multiplied with 7.5 to get the motor shaft revolutions per minute, RPM."

Just tried this: With rear wheel in the air, engaged throttle, got a reading of 650. Multiply by 7.5 = 4875 RPM
I thought my motor is a 4000 RPM unit per the sticker. Is the extra 875 RPM due to field weakening?
 
Feel free to have a go if I've missed something.
I've got Casianho's last OSF version currently installed on my TSDZ2 using an 850C display which I got a couple of years ago from eco-ebike in the states. When it boots up it reports Ver. 1.1.0 although the motor firmware is apparently 1.1.2.
But all good, works well - with a few small issues, like having to go in and reset the battery usage about 50% of the time and inability to completely turn off start-up assist. But I use it a lot and have put a few thousand k's on it. During that time I've added the cooling plates around the motor, extra heat sinks, changed the nylon wheel and the even motor - when the output shaft sheared (Wrong gearing on new/old bike I think)
Anyway, thought I'd try the latest emmebrusa version. Keen on trying hybrid mode and all that. Also hoping I can completely turn off startup mode and get an accurate battery reading.
The question is: Do I have to separately flash the ..850C.. bootloader.bin file? If, so can I do it through the same port that I use to flash the motor firmware or do I need another cable to flash the bin onto the display? Kind of think I do - but hoping not.
I setup the old VLCD05 display - used the java configurator to flash that. Seemed to work. But the battery display was way, way out. Plus the display is horrible.
Any pointers are welcome.
 
Hello, I'm currently using JavaConfigurator's OSF with VLCD5 LCD.
I'm trying to change it to SW102 LCD, but it's not working.
I used cyzorp's video as a reference.
I think I was able to flash the LCD firmware and controller.
As I don't have an Android device, I used an iPhone device to update the Bluetooth, and I think it was successful.
However, an "e:brake" error occurs and it does not work.
Does anyone know?View attachment 351390

The "brakes" message at power on, in addition to indicating any activated brake sensors, also indicates a lack of communication between the motor controller and the display. Have you tried reversing TX and RX?
 
The rated speed of 4000 RPM is achieved at rated voltage when the motor delivers rated power.
The no-load test is not significant, the firmware speed limit is always reached which in OSF is 650 ERPS, regardless of field weakening.
Thanks! What RPM is the motor at its peak torque and efficiency. Will go for a test ride with the ERPS on the display.
 
Back
Top