• Hello ES! We could use some help to get us past the finish line on building the new knowledgebase for the forum.
    Can you donate? Please see our fundraising page. Thank you!

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

Hello, I recently installed the OSF on my du250 (german variant of tsdz2 I believe), and it's been working fine except for one issue. All the values on the display are horribly inflated, e.g. speedometer shows a value of 60 something when going at 30, adc calibration values are 478 and 868, battery voltage is 88...

I've set the wheel value (on the screen) to the max possible, magnet count is at 1. Both of those settings influence the data values. Speed limit seems to not be affected by the speedometer value. Wheel circumference has been set in the java configurator.

Could this be an issue with the du250 or is it possible I did something wrong?
Did you perhaps set "Units type" to mph in the configurator?
You should also tell us what display you're using.
 
Did you perhaps set "Units type" to mph in the configurator?
You should also tell us what display you're using.
It's a 6 pin vlcd5. Both the configurator and display are kmh. Is it normal that changing the wheel size on the display changes how much the values are inflated?
 
No, this isn't normal.
The wheel size set on the display shouldn't affect the values displayed.
Is this a recent or very old display?
 
No, this isn't normal.
The wheel size set on the display shouldn't affect the values displayed.
Is this a recent or very old display?
Not sure what you mean by recent, but I do believe it's the original that came with this model. There isn't a lot of information on the sfm du250, but I did find an instruction manual on the sfm site for the du250 dating back to 2015, so very old I guess?

I don't know if this info will help, but I can tell you what the differences between the du250 and tsdz2 are (that I know of):
1. The speedometer plug is 4 pin, containing the 5v speedometer signal, ground, 6v light and an unknown pin.
2. There is a dedicated connector for programming containing 5v, ground, SWIM and presumably RST.
3. The maximum speed limit that can be set on the display is 35 kmh.
4. The hidden menu on the display does not show the software version.
5. There is no second hidden menu that displays the calibration value (ГE1) of the torque sensor. Viewing the OSF calibration works (walk assist at level 1), but the numbers are also inflated.

I can also post my backup of the original software if it'd be of any use.
 
After a long time I installed a new Tsdz2B after the old Tsdz2 can't be opened anymore without damage after 6 years.
I have problems to release the case. The small screws are too tight.
Inside is a bearing that has presumably fallen apart and therefore no longer functions.
Maybe I will try later again. For now I have mounted a new one, so with the summer coming I can use my bike again.

I have flashed OSF version: TSDZ2-Smart-EBike-1-20.1C.6-update-6, without problems and did the torque calibration the new way with walk assist.
Because it must be done with the XH18 display I start "assist 1" and by enabling walk assist the assist setting goes to "assist off". After release, I write down ADC offset and after pressing the pedal also ADC max. For the usual calibration this is working.

What I can't get working is to check and correct these ADC torque settings with display only.
If I start on assist 2 and enable walk assist, the display goes to assist 1, nothing happens after releasing.
If I start on assist 1, enable walk assist, the display goes to assist off, I see ADC offset after release, but never ADC max.

Am I doing it the right way with the XH18? Or should it perhaps be done differently?
 
Last edited:
Not sure what you mean by recent, but I do believe it's the original that came with this model. There isn't a lot of information on the sfm du250, but I did find an instruction manual on the sfm site for the du250 dating back to 2015, so very old I guess?

I don't know if this info will help, but I can tell you what the differences between the du250 and tsdz2 are (that I know of):
1. The speedometer plug is 4 pin, containing the 5v speedometer signal, ground, 6v light and an unknown pin.
2. There is a dedicated connector for programming containing 5v, ground, SWIM and presumably RST.
3. The maximum speed limit that can be set on the display is 35 kmh.
4. The hidden menu on the display does not show the software version.
5. There is no second hidden menu that displays the calibration value (ГE1) of the torque sensor. Viewing the OSF calibration works (walk assist at level 1), but the numbers are also inflated.

I can also post my backup of the original software if it'd be of any use.
And now I'm having another issue after a second test run... at the start of the ride I heard the motor spaz for a few seconds, then 20 minutes in the display shut off, the battery shut off and wouldn't turn back on. Literally the battery switch wasn't doing anything, there's an indicator when it's on and it refused to turn on. It did turn back on when I disconnected and reconnected the battery to the system.

And then 10 minutes later the engine spazzed and shut off again, a quick little on and off worked fine, but then whenever I'd attempt to ride, either immediately or after a minute or two I'd get E07, or E04 or the system shutting down again.

I'm worried I might fry/have fryed the system. Only difference between the first test run and the second test run is I switched to 18khz and I enabled lights.
 
E07 and E04 are caused by a high current, confirmed by the battery BMS tripping.
Are the motor and battery settings correct in the configurator?
You say you enabled the lights, but were they already installed with the stock firmware, or did you install them now?
Have you tried reflashing the stock firmware?

Regarding the display, I don't know what to say; it's probably not compatible.
For testing, I use an old VLCD5 from 2016, and it works fine.
 
After a long time I installed a new Tsdz2B after the old Tsdz2 can't be opened anymore without damage after 6 years.
I have problems to release the case. The small screws are too tight.
Inside is a bearing that has presumably fallen apart and therefore no longer functions.
Maybe I will try later again. For now I have mounted a new one, so with the summer coming I can use my bike again.

I have flashed OSF version: TSDZ2-Smart-EBike-1-20.1C.6-update-6, without problems and did the torque calibration the new way with walk assist.
Because it must be done with the XH18 display I start "assist 1" and by enabling walk assist the assist setting goes to "assist off". After release, I write down ADC offset and after pressing the pedal also ADC max. For the usual calibration this is working.

What I can't get working is to check and correct these ADC torque settings with display only.
If I start on assist 2 and enable walk assist, the display goes to assist 1, nothing happens after releasing.
If I start on assist 1, enable walk assist, the display goes to assist off, I see ADC offset after release, but never ADC max.

Am I doing it the right way with the XH18? Or should it perhaps be done differently?
Hi Elinx,
I think I'll have to reread what I wrote in the manuals.
With the XH18, all calibration operations must be performed at the 0-OFF level.
 
...
XH18, all calibration operations must be performed at the 0-OFF level.
Yes, I did read that and the usual callibration went without any problems, but I must start with assist-1 first.
By rotating the assist handle, the level goes to 0-OFF and I can calibrate the both ADC values. Starting right away with 0-Off does nothing

After inserting and reflashing these values with enabled all three calibration options, I tried the alternative recalibration from display only.
I do the same, but see just the ADC offset, never the ADC max.
Standing on the pedal doesn't help, so imho I can't check the drifting of the torque sensor anymore.
Maybe I do something wrong, that is why I ask.

Edit:
I read all calibration options over again. Could it be that before I check the torquesensor with alternative calibration, I must disable first "torque sensor adv." with L1-E04?

Manual;
How to activate WALK ASSIST
....
There are limitations due to the XH18 and maybe others displays, activating the walk assist button also
decreases the level, it is a defect of the displays that must be taken into account, the assistance of the set
level is not activated but the lower one. Not only that, but by activating the walk assist button at level 1-ECO,
you go to level 0-OFF and the motor stops, but not always. Sometimes it maintains the assistance of level 1,
it is a limit of the displays.
....
Warning: with VLCD5 and probably also with other displays, at level 0-OFF, Walk assist does not activate.
Perform the calibration procedure at level 1-ECO. In this case, the calibration must be started within 25
seconds of turning on the display.
Warning: by activating Walk Assist, some displays may decrease the level and not restore it, that is, from
level 1-ECO it goes to level 0-OFF and remains there, it will therefore be necessary to start the procedure at
level 2-TOUR which then goes to level 1-ECO, and so on for all subsequent steps.
....
Calibration of the ADC conversion factor of the torque sensor, estimated
...
Press the Walk assist button again and release it.
The values of “Pedal torque ADC offset” and “Pedal torque ADC max” are displayed alternately
Check if they match those obtained previously.
An estimated value of “Pedal torque adc step” is then calculated, “Estimated” is enabled and “Torque sensor

advanced” is disabled.
 
Last edited:
Yes, indeed, I remembered another similar case, which is why I looked into it further.
Now, if you want to try updating to the master version, it should work correctly even with the cut-off voltage set to 39V.
I also added the undervoltage error E01 (shared with the overvoltage error) to immediately understand the source of the problem, should it happen again.
Hi mbrusa, I tried your master.zip from April 13, 2026. I managed to discharge the battery down to 41 volts, and the motor didn't shut off. I had the cut-off limit set to 40 volts. I think you’ve solved the problem with the motor shutting down prematurely before the cut-off limit was reached. Thank you.
 
E07 and E04 are caused by a high current, confirmed by the battery BMS tripping.
Are the motor and battery settings correct in the configurator?
You say you enabled the lights, but were they already installed with the stock firmware, or did you install them now?
Have you tried reflashing the stock firmware?

Regarding the display, I don't know what to say; it's probably not compatible.
For testing, I use an old VLCD5 from 2016, and it works fine.
It's a 250 watt motor, albeit I did leave the default value of 500 for "motor power max". However I set the battery current max to 15 amps as that's the max continuous the battery is rated for (with 10 minutes of pulse up to 18, but i figured better safe than sorry). With the stock firmware I left it at the default 16 and never had issues. For reference the battery is 36v 13.6 Ah.

It is weird that the bms tripped with that limit in place. Is it possible that the heat could lead to a higher than allowed current draw? Seems like the issues only happened after the system got hot. I couldn't recreate them at home a few hours later (spinning the pedals with my hand and using cruise "throttle")

The lights I installed just before the issues, but they were off the whole time and when I came back I double checked if the pins were correct.

I flashed the old stock firmware and I'll be going on a longer ride in a few hours so I'll post an update with how that goes.
 
Yes, I did read that and the usual callibration went without any problems, but I must start with assist-1 first.
By rotating the assist handle, the level goes to 0-OFF and I can calibrate the both ADC values. Starting right away with 0-Off does nothing

After inserting and reflashing these values with enabled all three calibration options, I tried the alternative recalibration from display only.
I do the same, but see just the ADC offset, never the ADC max.
Standing on the pedal doesn't help, so imho I can't check the drifting of the torque sensor anymore.
Maybe I do something wrong, that is why I ask.

Edit:
I read all calibration options over again. Could it be that before I check the torquesensor with alternative calibration, I must disable first "torque sensor adv." with L1-E04?
Strange, I didn't think there were different versions of the XH18.
With the two I have, calibration can be done at level 0-OFF.
Whether "Torque sensor adv" is enabled or not is irrelevant for calibration purposes.

You copied and pasted the manual, leaving out the first part of the calibration "Torque sensor ADC calibration," which is required to proceed with the second part "Calibration of the ADC conversion factor of the torque sensor, estimated."
If the first part was successful and pushing the pedal gets the maximum value, you need to continue.
After releasing the pedal, activate Walk Assist again.
If your display doesn't activate Walk Assist at level 0, go back to level 1 and activate it. You'll see the two torque values, minimum and maximum, alternating on the display, as described in the manual.
 
Hi mbrusa, I tried your master.zip from April 13, 2026. I managed to discharge the battery down to 41 volts, and the motor didn't shut off. I had the cut-off limit set to 40 volts. I think you’ve solved the problem with the motor shutting down prematurely before the cut-off limit was reached. Thank you.
Great, thanks for the confirmation.
 
Strange, I didn't think there were different versions of the XH18.
....

You copied and pasted the manual, leaving out the first part of the calibration....
I had read it and done it as that, but with copy/past I was more focused on the XH18 behavior. I have tried over and over again, but mostly I see only ADC offset. But after many attempts the display became flashing between ADC offset and 01.6. This value isn't ADC max. I had measured before and insert in the Javaconfigurator.
When I try to recalibrate again, I can see the ADC offset only. After several attempts can see with pedal force ADC max too, which is the same as I measured after the first flash with all three calibration options disabled.

My problem is that I can't reproduce this when I want, I don't know what I'm doing wrong and if I see two values I can't understand the second one, because it isn't ADC max.
Because it is possible to see ADC max with pedal force sometimes I can still check the drift.
So that means, I don't have a real problem, but want to notify you about this behavior and try to understand what is wrong, the XH18 or my handling with it.
 
Last edited:
I don't understand where you could go wrong; the procedure is simple.

- Turn on the display
- At level 0
- Turn the lights on and off to enable "Set parameter" if disabled
- Activate Walk Assist
- When the offset value appears, release
- Press the pedals until the maximum value is reached
- Activate Walk Assist
- When the offset value appears alternating with the maximum value, release
- End

Watch the video.
 
.....
- Press the pedals until the maximum value is reached
....
Ohhh..... I see now what must be done for the right behavior.
Thanks for your patience and video, but seeing this step I understand everything what I did not understood before.

I was convinced that I had already performed this step during the previous calibration, which is why I skipped it every time and wanted to view the two ADC values immediately.

The reason why I did not see both values is that after the second use of walkassist, it actually displayed the two values, but by skipping this quoted relevant step only the ADC offset displayed alternately, which is ofcourse the same both times. Also pedal force will not work in that case and it looks that nothing happens.
 
Last edited:
It's a 250 watt motor, albeit I did leave the default value of 500 for "motor power max". However I set the battery current max to 15 amps as that's the max continuous the battery is rated for (with 10 minutes of pulse up to 18, but i figured better safe than sorry). With the stock firmware I left it at the default 16 and never had issues. For reference the battery is 36v 13.6 Ah.

It is weird that the bms tripped with that limit in place. Is it possible that the heat could lead to a higher than allowed current draw? Seems like the issues only happened after the system got hot. I couldn't recreate them at home a few hours later (spinning the pedals with my hand and using cruise "throttle")

The lights I installed just before the issues, but they were off the whole time and when I came back I double checked if the pins were correct.

I flashed the old stock firmware and I'll be going on a longer ride in a few hours so I'll post an update with how that goes.
After a test ride with the stock firmware and the light removed it's apparent some damage occurred.

The engine works inconsistently while pedaling. One moment it's working fine the next it stops working. Sometimes it doesn't start only for it to start working a full second after I stop pedaling, or it stops while im pedaling occasionally giving me bursts or power.

The bottom of the casing gets warm after a fairly short time, which I'm not sure used to happen before.

I'll be opening it up to see if there is anything loose or visible damage. Could use advice on spots to test with a multimeter to determine if anything got fried on the controller.
 
Hello everyone!
I have a few beginner questions
I have a tsdz2b 350w/36v with xh18 that I did the osf to the latest version. I use it on technical climbs and from what I've read, e-mtb or torque mode would be the most appropriate (with the old osf version, I used it in power mode).
After tests in e-mtb and torque mode I noticed that the motor only has power in the 4th assistance level, in the others it helps very little
And now the questions:
1 Does calibrating the torque sensor with the minimum and maximum value (when you press the pedal|) help solve the lack of power?
2 Does the calibration have to be done at every start?
3 Do the values on the calibration display have to be entered somewhere, such as java configurator?
4 When you save the new default values from the display, they also apply to the way the motor is set to start, e.g. e-.mtb or torque mode?
5 What settings should I use for steep climbs? speed is not that important

Thank you very much! :)
 
Calibration is necessary for torque sensors with limited range.
The procedure is described in the manuals.
Forget about eMTB and Torque modes; use Power mode, it's the best.
For technical climbs, the most important thing, before setting up, is to have a small chainring; I use a 30T on my bikes.
 
hello mbrusa, i experienced a problem when I try to compile files for a tsdz2b with the last build.
it works with an older ( configurator 4.3 firmware 20.1c.2-2)
i've update sdcc compiler to the latest version, restart my computer, but always same problem :


Cleaning files...
Done.

Build started...
mkdir -p ../bin
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt --out-fmt-elf --debug -o../bin/ ebike_app.c
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm
--peep-file peep.txt --out-fmt-elf --debug -o../bin/ common.c
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm
--peep-file peep.txt --out-fmt-elf --debug -o../bin/ torque_sensor.c
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt --out-fmt-elf --debug -o../bin/ uart.c
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt --out-fmt-elf --debug -o../bin/ pwm.c
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt --out-fmt-elf --debug -o../bin/ motor.c
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt --out-fmt-elf --debug -o../bin/ wheel_speed_sensor.c
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt --out-fmt-elf --debug -o../bin/ brake.c
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt --out-fmt-elf --debug -o../bin/ pas.c
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt --out-fmt-elf --debug -o../bin/ adc.c
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt --out-fmt-elf --debug -o../bin/ timers.c
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt --out-fmt-elf --debug -o../bin/ eeprom.c
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt --out-fmt-elf --debug -o../bin/ lights.c
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt --out-fmt-elf --debug -o../bin/ STM8S_StdPeriph_Lib/src/stm8s_iwdg.c
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt --out-fmt-elf --debug -o../bin/ STM8S_StdPeriph_Lib/src/stm8s_itc.c
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt --out-fmt-elf --debug -o../bin/ STM8S_StdPeriph_Lib/src/stm8s_clk.c
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt --out-fmt-elf --debug -o../bin/ STM8S_StdPeriph_Lib/src/stm8s_gpio.c
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt --out-fmt-elf --debug -o../bin/ STM8S_StdPeriph_Lib/src/stm8s_uart2.c
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt --out-fmt-elf --debug -o../bin/ STM8S_StdPeriph_Lib/src/stm8s_tim1.c
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt --out-fmt-elf --debug -o../bin/ STM8S_StdPeriph_Lib/src/stm8s_tim2.c
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt --out-fmt-elf --debug -o../bin/ STM8S_StdPeriph_Lib/src/stm8s_tim3.c
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt --out-fmt-elf --debug -o../bin/ STM8S_StdPeriph_Lib/src/stm8s_tim4.c
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt --out-fmt-elf --debug -o../bin/ STM8S_StdPeriph_Lib/src/stm8s_exti.c
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt --out-fmt-elf --debug -o../bin/ STM8S_StdPeriph_Lib/src/stm8s_adc1.c
sdcc -c -ISTM8S_StdPeriph_Lib/inc -I. -mstm8 -DSTM8S105 -Ddouble=float --std-c99 --nolospre --opt-code-speed --peep-asm --peep-file peep.txt --out-fmt-elf --debug -o../bin/ STM8S_StdPeriph_Lib/src/stm8s_flash.c
../bin\ebike_app.asm:11055: Error: <r> relocation error
../bin\ebike_app.asm:11947: Error: <r> relocation error
../bin\ebike_app.asm:12606: Error: <r> relocation error
../bin\ebike_app.asm:13195: Error: <r> relocation error
../bin\ebike_app.asm:13504: Error: <r> relocation error
../bin\ebike_app.asm:15575: Error: <r> relocation error
removing ../bin\ebike_app.rel
make: *** [../bin/ebike_app.rel] Error 1
Build error!!
do you have an idea of the problem ?
 
I don't know, try posting the /bin\ebike_app.asm file and I'll check.
To post it, it needs to be zipped.
 
Hi,
I’m trying to find the reason why my TSDZ2B is limited to a max speed of 40 km/h. I haven’t changed any settings; it just happened one day after doing some maintenance on the bike.

After checking various potential causes, I’m left with one: a decalibrated torque sensor. I have a few questions regarding this:
1. What are the typical symptoms of torque sensor issues?
2. Can I calibrate it using the 850C display?
3. Can I perform this procedure on the 850C with Emmebrusa OSF without connecting to the Java configurator? (My controller is damaged and is not being detected by the ST-Link v2).

thank you
 
It seems SDCC no longer likes some initializations.
Strange that it doesn't give me any errors; I've tried with both Windows and Linux and SDCC 4.5.0.
In any case, try replacing these two files, they're for version v20.1C.6-update-6.
Check if this is the version you have installed; otherwise, you'll find the link in the signature.
 

Attachments

  • v20.1C.6-update-6 fix.zip
    32.6 KB · Views: 9
Back
Top