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

I've had two other identical reports: with VLCD6, the SOC isn't displayed when it's below about 80%.
I haven't identified the cause, but it probably isn't related to the display type, but rather to the battery voltage.
I modified the SOC calculation function.
The previous calculation, which was a bit complicated, was based on the voltages of the bars.
I replaced it with the function used on 860C displays, which is based on a predefined table.
I hope this solves the problem.
If you'd like to try it and let me know if it works, thanks.

https://github.com/emmebrusa/TSDZ2-Smart-EBike-1/archive/refs/heads/master.zip
 
For me now it works. Tested on a VLCD6, speed shows again right after turning the lights on. Thanks!
 
Hey,
i bought the dz40 .. but with the wrong connectors :rolleyes:. itś the one compatible with bafang...

Does anyone know if it is possible to solder the vlcd5 cable? Can I use the color coding of the cables as a guide, or is that rather pointless?
Thanks!
sw102-tsdz26pin-1.png

it should be possibe to solder the cable. As you can not flash a dz40, you need the version for the vlcd5/vlcd6 displays with the java configurator. I did solder cables because i buy 860c for bafang, cause they are cheaper Here. But now, I prefer sw102, cause they are even cheaper and smaller. On my TSDZ8, I did it the other way: I soldered the bafang male connector to the 1T4 cable, so i can buy bafang displays and use them without further soldering. I would not touch the vcld5 cable, better to keep it for testing purposes. Instead buy a speed sensor cable and use it for getting the connector.
 
Last edited:
Remember you want the 860C UART version and not the 860C CAN version, UART has the green 5 way round connector and the CAN(bus) has a green 5 way triangular connector. I have spliced various connectors into the TSDZ2(B) display cables with out any problems, key thing know the pin-outs of the wires and after soldering recheck with a multi-meter. Note, the reason I say check after soldering is because I have used a couple of 6 way "extension" cables before where there was a variation in the colours, one from Aliexpress and the other from Amazon.
 
Hello. Id like to ask whether is possibile to buy compatible with OSF versions of TSDZ2B motor?
Ive read somewhere that exist versions with incompatible controllers.
 
Hello. Id like to ask whether is possibile to buy compatible with OSF versions of TSDZ2B motor?
Ive read somewhere that exist versions with incompatible controllers.
I never heard about incompatible versions. I have 2 different versions. One with a brake/Shiftsensor cable coming out of the controller, the other without that cable coming out.. Both a flashable. The shiftseonsor is practical because near the motor is a good place for mounting a shiftsensor. The one without the cable is also able for mounting a shiftsensor. But in this case, I had to split the cable an solder a bit.
 
Hello. Id like to ask whether is possibile to buy compatible with OSF versions of TSDZ2B motor?
Ive read somewhere that exist versions with incompatible controllers.
Can you buy TSDZ2B with OSF already installed? Probably not. I think it's important to know how to load the firmware because it does change, and you may want the newer versions, In addition, with the VLDC5, you have to reload the firmware to adjust performance settings, Some of the other displays allow it to be changed in the display, but those installs require programming the displays too,

Yes, there are two different controller models. One is primarily sold by Euro distributors and is not programmable. The other is sold by chinese sellers and is programmable. If you ask them. they probably won't give you an answer.

Not being in Poland, I cannot advise you on which online seller to use. Perhaps some Euro posters can advise.
 
Thank you.
I have ordered one from China and i'll check. Is there any quick way to check which controller version i have?
 
As I have said elsewhere we have the V1 controller which is programmable and the V2 which is not, I have found that so far I have ordered controllers from China and they tend to be V1's whereas from Germany for example they tend to be V2's, so countries requiring tight controls on e-bike speeds will go for the V2 controller. My "brand new" TSDZ2B which came as a return to stock damaged unit, controller fault, bought cheap as spares, ended up fitting a controller I had a spare from China which was a V1 as I had already programed it, mid-drive running on my 29er. A while back did check with tongsheng-electric and did not a straight answer from them, so I just brought a few controllers from Aliexpress when they had their sales on, along with a couple of spare TSDZ2 main gear assemblies. This is a photo of the two types which I found on Facebook, which agrees with the controllers I have got from Aliexpress, so far so good.

1764971919778.png
 
Last edited:
I've experienced a couple of anomalies with my TSDZ2B which has been flashed with the latest version of the OSF. I'd be curious to know if anyone else has had a similar event.

When starting off from rest, I have had either an error code E02 (Torque sensor) or error code E03 (Cadence sensor).

This has only happened very rarely and is immediately resolved simply by switching off / on again to restore power. Usually, it only happens once on a ride.

Over a period of about 700 miles, the TE value of my Torque sensor has changed slightly from 126 to 129, so it has been quite stable.

Normally, I only use power levels 1 or 2 and rarely more than that. The error code seems to be generated regardless of power setting.

Obviously, this not a major issue, but I just wondered if anyone else had experienced similar faults or could suggest a cause?
 
The "E03 cadence sensor" error is very rare.
Note that E03 only occurs if, with heavy pedal pressure for 25 seconds, no cadence sensor pulse is received.
However, a fault in the torque sensor that causes error E02 could also display error E03 after 25 seconds of not pedaling.
If the problem occurs rarely, it becomes difficult to pinpoint the cause.
Try checking TE1; it should always be zero with no pedal pressure.
 
Thanks mbrusa for your response. I appreciate that intermittent faults are notoriously difficult to identify.

Thinking about it, the error has only ever happened after waiting for a while at traffic lights (probably for more than 25 seconds). I have brake cut-outs fitted so I assumed the motor would not register or react to any pressure on the pedals with the brakes applied, but perhaps this isn't the case.

My TE1 value has remained at 0 and it does respond immediately to pressure on the pedal. The TE value has also remained stable, so I hope there is no issue with the torque sensor itself.

The motor is still working well, so not a major concern and you are probably correct regarding the 25 second 'time-out'.
 
Of course, if you press the pedals for more than 25 seconds without moving them, the E03 error appears.
The brake sensors don't interrupt the check time, but they should.
Another improvement to add!
 
mbrusa - just for information, I tried sitting on the bike pressing lightly on the pedals with the brakes held on. As you advised, after 25 seconds the E03 error message appeared, so your diagnosis was completely accurate!
 
Hi mbrusa, is it possible for the firmware to create some kind of debug log about its operation? I have a tsdz2 48V 750W motor, and when the battery voltage drops to around 46.5V, the motor suddenly shuts down. The display continues to function normally, showing the speed, and the buttons work, but the motor stops working. I then have to shut down the entire system and restart it. Then I can drive maybe 500 m and the motor shuts down again. I measured the battery voltage and it is stable, there is no voltage drop due to degradation and increased internal resistance. I have firmware TSDZ2-v20.1C.6-update-4 VLCD5. With the original Tongsheng firmware, this error does not occur. I believe that the tsdz2 custom control program fails in certain situations, but I don't know how to confirm this.
 
View attachment 381342

it should be possibe to solder the cable. As you can not flash a dz40, you need the version for the vlcd5/vlcd6 displays with the java configurator. I did solder cables because i buy 860c for bafang, cause they are cheaper Here. But now, I prefer sw102, cause they are even cheaper and smaller. On my TSDZ8, I did it the other way: I soldered the bafang male connector to the 1T4 cable, so i can buy bafang displays and use them without further soldering. I would not touch the vcld5 cable, better to keep it for testing purposes. Instead buy a speed sensor cable and use it for getting the connector.
Do you happen to know if the wire colors match for the vlcd5 keypad? I'd like to connect it in parallel with the vlcd6 (I don't like the large display) since the keys are large enough to use when you're off-road.1000135488.jpg
 
Hi mbrusa, is it possible for the firmware to create some kind of debug log about its operation? I have a tsdz2 48V 750W motor, and when the battery voltage drops to around 46.5V, the motor suddenly shuts down. The display continues to function normally, showing the speed, and the buttons work, but the motor stops working. I then have to shut down the entire system and restart it. Then I can drive maybe 500 m and the motor shuts down again. I measured the battery voltage and it is stable, there is no voltage drop due to degradation and increased internal resistance. I have firmware TSDZ2-v20.1C.6-update-4 VLCD5. With the original Tongsheng firmware, this error does not occur. I believe that the tsdz2 custom control program fails in certain situations, but I don't know how to confirm this.
So, if I understand correctly, above 46.5V there's no problem; below that, the motor stops after 500 meters, and I assume without an error code. Is that correct?
Does this also happen with a low assistance level (ECO)?
Battery specifications, cell type, and number of parallels?
Post the configuration .ini file here.
 
So, if I understand correctly, above 46.5V there's no problem; below that, the motor stops after 500 meters, and I assume without an error code. Is that correct?
Does this also happen with a low assistance level (ECO)?
Battery specifications, cell type, and number of parallels?
Post the configuration .ini file here.
Hello, mbrusa, these problems have never occurred at voltages above 46.5V. Below about 46.5V, I can drive about 500 m and the motor stops, with no error code on the display. The display can still be operated normally. The more the voltage drops, the more often I have to restart the system. This also occurs when driving on flat terrain with ECO level.
Battery configuration 13S5P, cells LG MJ1. I measured it with a multimeter while driving and there is no sudden drop in voltage.
ini file attached, thank You!
 

Attachments

  • 20251101-110021CET.ini
    838 bytes · Views: 5
Okay, battery capacity is very good and parameters are correct.
So I can only speculate.
There are only two errors that disable assistance and cannot be reported on the display.
1 - communication interruption between controller and display, but you wrote that the speed is displayed, so that's not the cause.
2 - voltage drop below the shutdown value, which is 9 volts lower than the voltage cut-off, in your case 30 volts (39 - 9).
Warning: the voltage measured by the controller does not come directly from the battery; it's the Vin that comes from the display.
You probably have a problem with the display/controller connector that's causing a voltage drop, or you have a problem with the display or the controller.
Try setting "Battery voltage cut-off" to 29, just to confirm that my hypothesis is correct.
 
Some clarification is needed.

The v20.1C.6-beta-1 version is now tested and stable.
I recommend everyone to use this one, it is more performant and efficient than the previous v20.1C.2-update-3.
Use v20.1C.2-update-3 only if you have problems in the compilation that you can't solve (remember that you need SDCC 4.4.0 or higher).
Do not use v20.1C.2-update-2 or earlier!
In this regard I also added a note on GitHub.


If with v20.1C.6-beta-1 the throttle does not work it is only a problem of settings in the configurator.

View attachment 365940
Brake sensor must be enabled.
Optional ADC in, set to Throttle.
Throttle mode to Unconditional, or to another option you prefer.
The same in the "Street mode" section if you want to use it in that mode.


TE and TE1 with OSF have a different meaning than the stock firmware.
- TE, adc value without pedal push. To be entered in “Pedal torque ADC offset”.
- TE1, pedal torque delta, the value without pedal push is zero, it increases with pedal push.
The value to be entered in “Pedal torque ADC max”, is the maximum value (obtained with the rider standing, on the right pedal in a horizontal position) added to the TE value”, so “Pedal torque ADC max” = TE1 + TE.
To complete the calibration it is necessary to enable "Calibrated", enable "Estimated", enable "Torque sensor adv".
In your case with “Pedal torque ADC delta” = 167 you have a very good torque sensor. By enabling the calibration, at the same level you will notice a decrease in assistance, but it will be better distributed on the 4 levels.


Calibration of the torque sensor is recommended, but becomes necessary if the value of “Pedal torque ADC delta” is low.
There are two calibrations, with different purposes.
The first to obtain the values of "Pedal torque ADC offset" and "Pedal torque ADC max", with the weight of the rider on the pedals and is used to balance the assistance on the 4 levels.
The second to obtain the values of "Pedal torque ADC step" or "Pedal torque ADC step advanced", these parameters, in addition to balancing the assistance on the 4 levels, are mainly used to correctly calculate the human power to be displayed.
Enabling "Estimated" calculates an estimated value of these parameters, less precise than the one obtained with the calibration with weight, but suitable for the purpose.
For those who also want to do this calibration precisely, it is not necessary to physically put a weight, a luggage scale is enough.

hi .. i have to come back to this.

i wanted to do the calibration today. i read out te and te1, in my case 192 te and 173 te1, configured ADC offset with 192, ADC max with 365.
The result was a very weak support of the motor. Even when i set the assistant levels up to 500% ...

I guess i also dont understand the mechanism behind. the delta between offset and max will always be dependend on the riders weight - means the heavier the less sensitivity and support?

maybe someone can clear things up for me.
Thanks!
 
hi .. i have to come back to this.

i wanted to do the calibration today. i read out te and te1, in my case 192 te and 173 te1, configured ADC offset with 192, ADC max with 365.
The result was a very weak support of the motor. Even when i set the assistant levels up to 500% ...

I guess i also dont understand the mechanism behind. the delta between offset and max will always be dependend on the riders weight - means the heavier the less sensitivity and support?

maybe someone can clear things up for me.
Thanks!
According to the procedure, this may not be correct, but when determining the TE1 parameter, I do not use my full weight on the pedal. I press the pedal only as hard as I know I will press it while riding.
 
...

I guess i also dont understand the mechanism behind. the delta between offset and max will always be dependend on the riders weight - means the heavier the less sensitivity and support?
...
No, the torque sensor hardware setting isn't equal for all sensors. It could be more or less sensitive and also there is no linearity.
By software calibrating you correct this sensitivity for zero and maximum achievable value by software, so all sensors should have the same respons for the force on the pedals.

If the torque sensor has a very low range from zero to max., it could behave more like an on/off switch after calibration, which isn't really desirable.
In that case you need to do a hardware calibration by unmounting the torquesensor.
 
Last edited:
hi .. i have to come back to this.

i wanted to do the calibration today. i read out te and te1, in my case 192 te and 173 te1, configured ADC offset with 192, ADC max with 365.
The result was a very weak support of the motor. Even when i set the assistant levels up to 500% ...

I guess i also dont understand the mechanism behind. the delta between offset and max will always be dependend on the riders weight - means the heavier the less sensitivity and support?

maybe someone can clear things up for me.
Thanks!
A range of 173 is very good.
In Power mode, setting the level to 500% should easily reach maximum power.
It probably depends on other settings.
It's also difficult to evaluate "very weak motor support" without knowing how many watts you're getting.
Try posting the configuration ini file, and I'll check.
 
A range of 173 is very good.
In Power mode, setting the level to 500% should easily reach maximum power.
It probably depends on other settings.
It's also difficult to evaluate "very weak motor support" without knowing how many watts you're getting.
Try posting the configuration ini file, and I'll check.

i set the level to 500% just to check, normally i´m fine with 250 at level 4. but with the calibrated sensor i wasn´t able to reach the same output. maybe i pushed too hard to reach a range of 173?!

Attached the .ini. Thanks for your effort!
 

Attachments

  • ark_exprmtl_2701_TS - Kopie.ini
    819 bytes · Views: 5
Back
Top