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

But seems difficult yes because pedal is small
Hang the (inanimate) load from the pedal instead of putting it on top of the pedal. ;)
 
Hang the (inanimate) load from the pedal instead of putting it on top of the pedal. ;)
did basic methode (noweight then rider weight.) it works fine like this no need more complicated!

So with calibration torque offset is useless ? Torque mesured will be more wrong so power too if offset setted?
 
Last edited:
Hello,

I wanted to ask what is your experience with displays DZ40 and DZ41? I have DZ41 on tsdz2b with osf and seems to function, but allways shows error code.

I have used ChatGPT trouble shooting and got info that DZ40 and 41 are using not UART communication mode (for VLCD5/6, SW102, etc.), but CAN-bus mode.

Therefore the anwer was "DZ41 just forces the bike back onto Tongsheng’s stock CAN firmware, so flashing the UART-only OSF is a wasted effort—you won’t get OSF features. With a patched bootloader: you must also flash the CAN-bus build of OSF ".

Is there a can bus version of OSF? Could not find info on this?

Thank you in advance for help.
 
Hello,

I wanted to ask what is your experience with displays DZ40 and DZ41? I have both and was testing DZ40 on tsdz8 with stock firmware and connected throttle. Was confused that throttle does not work with DZ40, but it works fine with VLCD5 and VLCD6.

I have used ChatGPT trouble shooting and got info that DZ40 and 41 are using not UART communication mode (for VLCD5/6, SW102, etc.), but CAN-bus mode.

Therefore the anwer was "DZ41 just forces the bike back onto Tongsheng’s stock CAN firmware, so flashing the UART-only OSF is a wasted effort—you won’t get OSF features. With a patched bootloader: you must also flash the CAN-bus build of OSF ".

Does this menas that can-bus displays do not function OSF? Or is there a can bus version of OSF available? Could not find info on this?

Thank you in advance for help.
 
.....

Is there a can bus version of OSF? Could not find info on this?
...
There is no canbus version of Tongsheng.
So this question is redundant.

About the throttle
Imho only Vlcd5 support this directly (8pin connection)
For Vlcd6, XH18 (6pin) and mayby other stock displays, you need a splitter cable and 8pin motor side.
For OSF you have to make a choice to use throttle or temperature sensor.

If you have the 6pin motor side version, there is no connection for throttle and you have to open the motor to use the throttle output.
 
Last edited:
Hi. I've converted a Felt Broam gravel bike to a TSDZ2B 36v 540wh battery with vlcd6 display. I'd like to ask what would be the best OSF configuration for the Gravel - hybrid mode? What mode would be optimal? Of course I'm not interested in speed and power limits.
 
I'm not really understanding everything you wrote. Thanks for trying. If you can tell me step by step what I need to do to improve human pedal power reading accuracy, I'd appreciate that. If not, I am happy the way human pedal power behaves as is.

Rode the bike to get lunch today and got to 58 miles on the odo, 39.5V. Never reached that high a mileage before (48V 6 Ah battery). Usually 30 to 40 miles (on higher assist levels).
If you have already done the calibration by entering the values of
"Pedal torque ADC offset" (without weight) in 10.9 and "Pedal torque ADC max" (with your weight) in 10.10, also 3.0 = 1 "Calibrated" enabled.
That's enough.
 
Hello, thanks for all informations
Last week i install osf for kt lcd3 to tsdz2 board and lcd3. I observe lcd3 works fine, i made battery motor setups than shows battery voltage, adc values, torque values...But in every mode, motor and lights never work, also walk assistant not working, i know my controller card is ok, i tried orginal firmware, everything is working, can anyone help me,, want to use osf..thanks
The latest version for LCD3 is the one you find in signature v20.1C.4-3-LCD3, there are no further versions and there will be no further versions.
Have you flashed controller and display with these files?
With which display did you try the original firmware?
Do you know that there is an OSF version also for stock displays?
 
Question for cadence mode.

Hello i know i'm playing a lot with code and settings but i have a question on original code.
So my Firmware here is original (from mbrusa) and not modified.

for me Assistance in cadence saturate when at level 100 in setting.
To have progression in level i had to set lvl to 10 / 25 /50 / 254 (max for turbo)

My power is limited to 290W (norme EU let a margin of 1.115 from electric power to shaft of motor and real efficiency of motor is less of 0.85 but that's not the point).

When i check power on LCD at 100 of assistance i am at 290W. At 50 i'm not, it's less (normal). If i am level 254 i got 290W too (normal, it is saturated by battery max current).

I understand how is calculated torque_delta from RPM and assistance lvl, code is clear on this point.

Why this choice to saturate assistance near 100?

Why leaving 100 to 254 in a same level ? why not reparting all power between 0 and 254 (by for example adding battery_current_limit=battery_current_max*levelofassistance/levelofassistancemax ?)

I know torque calculation change (from a constant: the level of assistance)... but what i find strange is in default 36V settings, level 2 is 100 in cadence mode.

so default 36V give 250W nominal (290W) at level 2 and other mode give no gain of power?

Torque calculation from RPM is altered but why not altering max power too to get less current and preserve battery in lower level?

thanks
Yes it's true, the assistance levels in cadence mode use about half of the available scale, even less if you set the maximum power to 290W.
It's not a choice, it's a consequence of a quick modification.

You should know that from version 20-beta-1 where I started up to my previous version, with the assistance levels you set the duty cycle, whose maximum value reaches 255.
I didn't like the assistance, as the cadence increased the power decreased, but I never worried about this, because I considered it an emergency mode in case of a fault with the torque sensor.

With version v20.1C.6x I changed, the assistance levels set the current.
The modification seems to work well, certainly better than previous versions.
I used the raw adc value to avoid exceeding 255 by adding the proportional quota to the cadence.
But I can do differently and use the levels scale up to 255 as you pointed out.
I added it to the long list of things to do.
 
Hi. I've converted a Felt Broam gravel bike to a TSDZ2B 36v 540wh battery with vlcd6 display. I'd like to ask what would be the best OSF configuration for the Gravel - hybrid mode? What mode would be optimal? Of course I'm not interested in speed and power limits.
The best mode is Power assist, especially for gravel bikes and mountain bikes.
 
If you have already done the calibration by entering the values of
"Pedal torque ADC offset" (without weight) in 10.9 and "Pedal torque ADC max" (with your weight) in 10.10, also 3.0 = 1 "Calibrated" enabled.
That's enough.
I have done the first 2 items for sure. Pretty sure I also have 3.0=1 "calibrated" enabled. Just to be sure, I powered up the system to check but was met with a frozen display (see photo) where none of the 3 buttons work (pwr, up, dn). Throttle does not work either and there is no assist. Cannot change modes, assist levels etc. Long press of power button does not power display off.

Same thing happened a few days ago but somehow it resolved itself (I do not remember how or what I did). Now it seems to be stuck permanently. I've tried powering down the battery which shuts off the display. If I power up battery and display, it gets stuck on that page again.

Ay idea what caused this? Any suggestions on things to try to restore operation?

Motor has 1300 miles problem free till now.

Edit: Problems solved! The magnet on the brake cutout slowly went out of adjustment from adjusting brake cable. When brake cutout is enabled during power up, that's the display that comes up.

edit: repositioned magnet with DS foam tape and it's back to normal.

edit: Verified 3.0=1 "calibrated" is enabled

IMG_5306.jpeg
 
Last edited:
Yes it's true, the assistance levels in cadence mode use about half of the available scale, even less if you set the maximum power to 290W.
It's not a choice, it's a consequence of a quick modification.

You should know that from version 20-beta-1 where I started up to my previous version, with the assistance levels you set the duty cycle, whose maximum value reaches 255.
I didn't like the assistance, as the cadence increased the power decreased, but I never worried about this, because I considered it an emergency mode in case of a fault with the torque sensor.

With version v20.1C.6x I changed, the assistance levels set the current.
The modification seems to work well, certainly better than previous versions.
I used the raw adc value to avoid exceeding 255 by adding the proportional quota to the cadence.
But I can do differently and use the levels scale up to 255 as you pointed out.
I added it to the long list of things to do.
Cadence is good for bike vehicule to go to work: you can make effort or not as you want. If you are sick you can use your bike without effort pushing up assistance.

So you shouldn't consider it an emergency mode. It's just totally different.

The main problem is that max power reached isn't stable with battery voltage. It calculate a current.
we should maybe add a correction depending on battery voltage to maintain electric power as battery voltage decrease... (proportional).

I didn't well understood what you mean for the changes you made.

Setting assistance to 254 give you a function current=f(rpm) which goes faster to saturation (max battery intensity) than for example assistance at 100?
I assume maybe the phenomenal is amplified by the fact I have high rpm (80 110) )?

at lvl 10 (eco) I got up to 160w (bike doesn't accelerate like dumb but power is enough for an every day bike).

It's allready a little high and I use only 10/254 of capacity of setting of assistance.
 
I have done the first 2 items for sure. Pretty sure I also have 3.0=1 "calibrated" enabled. Just to be sure, I powered up the system to check but was met with a frozen display (see photo) where none of the 3 buttons work (pwr, up, dn). Throttle does not work either and there is no assist. Cannot change modes, assist levels etc. Long press of power button does not power display off.

Same thing happened a few days ago but somehow it resolved itself (I do not remember how or what I did). Now it seems to be stuck permanently. I've tried powering down the battery which shuts off the display. If I power up battery and display, it gets stuck on that page again.

Ay idea what caused this? Any suggestions on things to try to restore operation?

Motor has 1300 miles problem free till now.

Edit: Problems solved! The magnet on the brake cutout slowly went out of adjustment from adjusting brake cable. When brake cutout is enabled during power up, that's the display that comes up.

edit: repositioned magnet with DS foam tape and it's back to normal.

edit: Verified 3.0=1 "calibrated" is enabled

View attachment 370546

Hi mbrusa,

I am curious:

Is freezing the system when powering up with brake signal active intended or is that a bug? My TSDZ2 would have been bricked if I was not able to find the cause.
 
I am running one bike with the v20.1.C.2-update3 from April 2024 with a VLDC5. The other one is even earlier. I can power up with brakes active, If I power up with throttle on, bike takes off. I believe your software dares back to LCD3 days?
I'm running V20.1C.4-LCD3-update 3, 3/30/24. Interesting your's behaves differently!
 
Hi,
I'm encountering E04 (blocked motor) and have no support at all when pedaling. When using walk assist (enabled in hidden menu, pressing "-" for three seconds), sometimes there is a slight movement of the motor, but usually nothing.

I'm running OSF since 2.5 years (v20.1C.2-update-1) with no issues whatsoever. Today, during my commute, assist was intermittent and E04 appeared. The motor was rather warm to the touch (15 C outside temperature), but I seldom check the motor temperature so I cannot say if this is something unusual.

I'm not sure how to debug this further. I saw now there is a notice on github not to use v20.1C.2-update-2 or earlier releases. This worries me. Is my motor fried?
 
I did not try re-flashing it. Even if I did, it probably would not have fixed the problem unless the brake active signal is cleared. Bike would have no assist = bricked.
Is it software or hardware problem? Disconnecting brake sensor doesn't fix the problem ?
 
Hello,

I wanted to ask what is your experience with displays DZ40 and DZ41? I have DZ41 on tsdz2b with osf and seems to function, but allways shows error code.
It seems like DZ40/41 displays are not really supported in the OSF Firmware unless I missed something.
I am trying to find the datasheet, please let me know if it is available anywhere.
 
Hi mbrusa,

I am curious:

Is freezing the system when powering up with brake signal active intended or is that a bug? My TSDZ2 would have been bricked if I was not able to find the cause.
It is a hardware feature of the TSDZ2 controller.
If the brake sensors are active at power on, communication between the controller and the display is inhibited, nothing works.

With the stock displays (VLCD5, VLCD6, XH18) no message is displayed, it is not provided for in the displays and, since there is no communication, it is not possible to send it from the controller.
You can only notice it from the zero SOC bars and the fact that there is no assistance.

Some more recent stock displays, of Bafang origin, show err30, communication problem. But it is provided for in the display firmware.

The version for 860C displays being programmable, the message "Error brakes or comms" is provided.

With LCD3 no message is provided, the system stops at the boot screen.
In theory a message could be added, but I have no plans to continue development for this display.
Also, the memory is full, there is no space available for any changes.
 
Hi,
I'm encountering E04 (blocked motor) and have no support at all when pedaling. When using walk assist (enabled in hidden menu, pressing "-" for three seconds), sometimes there is a slight movement of the motor, but usually nothing.

I'm running OSF since 2.5 years (v20.1C.2-update-1) with no issues whatsoever. Today, during my commute, assist was intermittent and E04 appeared. The motor was rather warm to the touch (15 C outside temperature), but I seldom check the motor temperature so I cannot say if this is something unusual.

I'm not sure how to debug this further. I saw now there is a notice on github not to use v20.1C.2-update-2 or earlier releases. This worries me. Is my motor fried?
Yes, I do not recommend using version v20.1C.2-update-2 or earlier and, if possible, I recommend updating to the latest version.
But if you have not had any problems in 2.5 years, don't worry. Nothing is happening.
From what you wrote, E04 is the consequence of a mechanical problem with the motor. Difficult to identify the cause without disassembling it.
Is the bike pedalable with the motor off?
 
Cadence is good for bike vehicule to go to work: you can make effort or not as you want. If you are sick you can use your bike without effort pushing up assistance.

So you shouldn't consider it an emergency mode. It's just totally different.

The main problem is that max power reached isn't stable with battery voltage. It calculate a current.
we should maybe add a correction depending on battery voltage to maintain electric power as battery voltage decrease... (proportional).

I didn't well understood what you mean for the changes you made.

Setting assistance to 254 give you a function current=f(rpm) which goes faster to saturation (max battery intensity) than for example assistance at 100?
I assume maybe the phenomenal is amplified by the fact I have high rpm (80 110) )?

at lvl 10 (eco) I got up to 160w (bike doesn't accelerate like dumb but power is enough for an every day bike).

It's allready a little high and I use only 10/254 of capacity of setting of assistance.
I wrote that for me, the cadence mode is an emergency mode, but I don't mean that it should be for everyone.
Everyone uses it as they see fit.

Even if it's a mode that I don't use, it must work well, that's why I modified it, and I will continue if necessary.
Compared to previous versions, the level parameters have changed, before the values entered were proportional to the duty cycle, now they are proportional to the current.

I had also evaluated the option proportional to the power, then I decided on the current. There are pros and cons in both cases.
With low power, like you are using, the reference to the power is better.
With high power, when the battery is low, the reference to the current is better.
I will try to find a compromise, perhaps defining a maximum power in cadence mode.
 
Yes, I do not recommend using version v20.1C.2-update-2 or earlier and, if possible, I recommend updating to the latest version.
But if you have not had any problems in 2.5 years, don't worry. Nothing is happening.
From what you wrote, E04 is the consequence of a mechanical problem with the motor. Difficult to identify the cause without disassembling it.
Is the bike pedalable with the motor off?
Yes, the motor/bike works as if the battery is empty. I can pedal without issues and the motor makes no noise. Just before the assistance stopped working (a few seconds before), I felt/heard slightly increased vibrations/noise from the motor, higher than usual but no grinding or cracking that would indicate something breaking inside. I thought maybe the hall/torque sensor is broken, but walk assist doesn't work either. Does that exclude a broken hall/torque sensor?

I can open the motor and check if I know what to look for... I have no experience with e-bike motors but feel comfortable opening devices and poking around.
 
I just wanted to say thanks again - the newest f/w runs flawless on my & my wife's bike since a couple 100km's.
Also, parameters showing at startup and during 'lights on' are now consistent and correct.
Thank you @mbrusa !
 
Back
Top