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

I would also like to know, from someone who has SW102 with a previous version of OSF, who had the problem of the display freezing while navigating the configuration menu, whether the problem is overcome with this new version.
I installed it on a SW102 and went a few times through all menus : no freeze ! With previous versions it would inevitably have happened sooner or later, so the problem seems solved indeed, thank you mbrusa :)

And now that I'm here, I'm having a little trouble : the voltage reading on the SW102 has become erratic : it changes every time I turn off and on the display, and values can be as much as 5V lower than actual. It recently happened, when I was using a previous version of the firmware.
I checked the battery and it seems fine. Is that a known controller or display issue ?
 
Help!

TSDZ2 does not shutdown after pressing the ON/OFF button.

The word "OFF" stays on the screen, and so now the only way to turn it off completely is to switch off or disconnect the battery. And then when the battery is reconnected, the display turns on immediately. Everything else is working fine so far.

The motor was working fine after flashing several versions of this firmware, but after flashing a version with the "Set parameters on Startup" and testing, that's when the problem began.

Using VLCD5 8 Pin

I have restored factory firmware and the problem persists and have also re-flashed this firmware and no change. The motor does work tough.

I don't see any damage to the cables that would hint a short.

Would the problem be the VLCD5?

Thanks in advance for the help.
Hello Five01,
I got same issue with my VLCD5.
As you I usually disconnect the battery before flashing.

What did you do to resolve it ?
Or somebody could help us to fix it ?
Should I flash VLCD5 screen ? but how and with what firmware ?

Thank you in advance for your answers.
 
Hello,
Old guy here, new to OSF, but have been using a TSDZ2 for about 4 years now.
First I want to say a massive Thank You to @mbrusa and any other wizards who have made this OSF possible. It's awesome!
I flashed my road/touring bike yesterday and love how it performs, but am having one intermittent issue which I'm hoping someone can help me solve, please?

Sometimes when I reach high speed, around 41km/h, the motor loses power briefly and intermittently. If I slow down or back off the pedals very slightly, the problem goes away, and I can usually then continue to accelerate above 41km/h. It doesn't always happen... sometimes I reach and exceed 41km/h without encountering the issue.

A few details on my parameters:
-Hybrid mode, max speed set to 55km/h
-Cadence is not excessively high (52T chainring, 11T sprocket).
-Lots of charge in the battery so minimum battery/cell voltages aren't the problem.
-No temp sensor installed (yet), so I don't think it's a thermal cut-out (I'm aware I'm taking a risk)
-It happens with or without Field Weakening enabled.
-I never experienced the issue prior to flashing the OSF

Is it maybe something to do with ADC settings (which I’m still trying to understand)?
Screenshots of my parameters below.... Thanks in advance for any help.
Scott

Capture1.JPG

Capture2.JPG

Capture3.JPG
 
Last edited:
I installed it on a SW102 and went a few times through all menus : no freeze ! With previous versions it would inevitably have happened sooner or later, so the problem seems solved indeed, thank you mbrusa :)
Very good.
And now that I'm here, I'm having a little trouble : the voltage reading on the SW102 has become erratic : it changes every time I turn off and on the display, and values can be as much as 5V lower than actual. It recently happened, when I was using a previous version of the firmware.
I checked the battery and it seems fine. Is that a known controller or display issue ?
Small differences (1-2%), may depend on the controller's ADC reading, they can be corrected with "Voltage cal. %".
Larger and unstable differences may depend on an incorrect value of the battery resistance.

Is the problem only with SW102 or also with 860C?
 
Sorry for maybe trivial question: Will stock UART SW102 from Bafang display work with 8 pin TSDZ2B (no OSF loaded both to the display and controller)? Considering 1T4 wiring harness is adapted to Tongsheng pinout.
 
Small differences (1-2%), may depend on the controller's ADC reading, they can be corrected with "Voltage cal. %".
Larger and unstable differences may depend on an incorrect value of the battery resistance.

Is the problem only with SW102 or also with 860C?
I tried changing the battery resistance value (using the estimated value displayed, and others) but it didn't help : the voltage indicated is always lower than the actual value, and fluctuates by several volts at each startup. Voltage measured directly on the battery is always steady.

I don't have a 860C to try. I have a VLCD5 laying around, but I would need to make an adapter or change the connector to be able to plug it in now. It's a bit of a pain, but at least it would help figuring if the problem comes from the controller or the display..
 
I have been using the mbrusa firmware for several years, it is very very good.
I currently use the vlcd6 display (6-pin connector) and everything works correctly.
There is a new display, the vlcd10, which is very similar.
Does anyone know if it works correctly with the mbrusa firmware?

Thank you.
 
I have been using the mbrusa firmware for several years, it is very very good.
I currently use the vlcd6 display (6-pin connector) and everything works correctly.
There is a new display, the vlcd10, which is very similar.
Does anyone know if it works correctly with the mbrusa firmware?

Thank you.
AFAIK it works as motor works and modes can be changed but I'm not sure it anything else works
 
First I'd like to thank mbrusa and other devs for the very good work.
I do use TSDZ2 (VLCD5/Throttle/Lights) with the stock firmware but I'd like to flash the opensource firmware.
So I made my cable according to the Wiki.

Here under linux is what gives the console:
# stm8flash -c stlinkv2 -p stm8s105?6 -s opt -r TSDZ_orig_opt.bin
Determine OPT area
STLink: v2, JTAG: v37, SWIM: v7, VID: 8304, PID: 4837
Due to its file extension (or lack thereof), "TSDZ_orig_opt.bin" is considered as RAW BINARY format!
Reading 128 bytes at 0x4800... OK
Bytes received: 128

# stm8flash -c stlinkv2 -p stm8s105?6 -r TSDZ_orig.bin
Determine FLASH area
STLink: v2, JTAG: v37, SWIM: v7, VID: 8304, PID: 4837
Due to its file extension (or lack thereof), "TSDZ_orig.bin" is considered as RAW BINARY format!
Reading 32768 bytes at 0x8000... OK
Bytes received: 32768

# stm8flash -c stlinkv2 -p stm8s105?6 -s eeprom -r TSDZ_orig_eeprom.bin
Determine EEPROM area
STLink: v2, JTAG: v37, SWIM: v7, VID: 8304, PID: 4837
Due to its file extension (or lack thereof), "TSDZ_orig_eeprom.bin" is considered as RAW BINARY format!
Reading 1024 bytes at 0x4000... OK
Bytes received: 1024

# echo "00 00 ff 20 df 00 ff 00 f00 ff 00 ff 00 ff" | xxd -r -p > option_bytes_pwm_n_channels_enabled.binf
# stm8flash -c stlinkv2 -p stm8s105?6 -s opt -w option_bytes_pwm_n_channels_enabled.bin
Determine OPT area
STLink: v2, JTAG: v37, SWIM: v7, VID: 8304, PID: 4837
Due to its file extension (or lack thereof), "option_bytes_pwm_n_channels_enabled.bin" is considered as RAW BINARY format!
15 bytes at 0x4800... OK
Bytes written: 15

So it seems the cable is alright.

But, because there is one of course ;), compiling and flashing gives:
...
sdcc: sdldstm8 -nf "../../bin/main.lk"
Copying firmware to release folder.
/home/pascal/emmebrusa/TSDZ2-Smart-EBike-1-20.1C.2-update-2/releases/TSDZ2-20.1C.2-2-.hex
Do you want to backup the firmware ? [y/N]y
Backup current firmware to /home/pascal/emmebrusa/TSDZ2-Smart-EBike-1-20.1C.2-update-2/releases/backup/TSDZ_orig_opt-20.1C.2-2-.bin
stm8flash -c stlinkv2 -p stm8s105?6 -s opt -r ../../bin/TSDZ_orig_opt.bin
Determine OPT area
STLink: v2, JTAG: v37, SWIM: v7, VID: 8304, PID: 4837
Due to its file extension (or lack thereof), "../../bin/TSDZ_orig_opt.bin" is considered as RAW BINARY format!
Reading 128 bytes at 0x4800... OK
Bytes received: 128
stm8flash -c stlinkv2 -p stm8s105?6 -r ../../bin/TSDZ_orig.bin
Determine FLASH area
STLink: v2, JTAG: v37, SWIM: v7, VID: 8304, PID: 4837
Due to its file extension (or lack thereof), "../../bin/TSDZ_orig.bin" is considered as RAW BINARY format!
Reading 32768 bytes at 0x8000... OK
Bytes received: 32768
stm8flash -c stlinkv2 -p stm8s105?6 -s eeprom -r ../../bin/TSDZ_orig_eeprom.bin
Determine EEPROM area
STLink: v2, JTAG: v37, SWIM: v7, VID: 8304, PID: 4837
Due to its file extension (or lack thereof), "../../bin/TSDZ_orig_eeprom.bin" is considered as RAW BINARY format!
Reading 1024 bytes at 0x4000... OK
Bytes received: 1024
Do you want to flash the motor ? [Y/n]Y
stm8flash -c stlinkv2 -p stm8s105?6 -w data_empty.ihx
Determine FLASH area
STLink: v2, JTAG: v37, SWIM: v7, VID: 8304, PID: 4837
Due to its file extension (or lack thereof), "data_empty.ihx" is considered as INTEL HEX format!
Address 4000 is out of range at line 1
make: *** [Makefile:112: clear_eeprom] Error 255

I've used the default 36V configuration with just 2 minor modifications:
- 630 W for my 17.5 Ah
- 2195 mm for my Schwalbe Marathon plus

Any idea would help.


EDIT: on this forum thread it appears I should pass -s eeprom to the script so that the full command would be: stm8flash -c stlinkv2 -p stm8s105?6 -s eeprom -w data.empty.ihx
Is that right ?

EDIT 2: so I've changed the ./src/controller/Makefile in the clear_eeprom section
and now it seems it's OK :D

Do you want to flash the motor ? [Y/n]y
stm8flash -c stlinkv2 -p stm8s105?6 -s eeprom -w data_empty.ihx
Determine EEPROM area
STLink: v2, JTAG: v37, SWIM: v7, VID: 8304, PID: 4837
Due to its file extension (or lack thereof), "data_empty.ihx" is considered as INTEL HEX format!
1024 bytes at 0x4000... OK
Bytes written: 1024
stm8flash -c stlinkv2 -p stm8s105?6 -w ../../bin/main.ihx
Determine FLASH area
STLink: v2, JTAG: v37, SWIM: v7, VID: 8304, PID: 4837
Due to its file extension (or lack thereof), "../../bin/main.ihx" is considered as INTEL HEX format!
30122 bytes at 0x8000... OK
Bytes written: 30122
All done !
 
Last edited:
Hello,
Old guy here, new to OSF, but have been using a TSDZ2 for about 4 years now.
First I want to say a massive Thank You to @mbrusa and any other wizards who have made this OSF possible. It's awesome!
I flashed my road/touring bike yesterday and love how it performs, but am having one intermittent issue which I'm hoping someone can help me solve, please?

Sometimes when I reach high speed, around 41km/h, the motor loses power briefly and intermittently. If I slow down or back off the pedals very slightly, the problem goes away, and I can usually then continue to accelerate above 41km/h. It doesn't always happen... sometimes I reach and exceed 41km/h without encountering the issue.

A few details on my parameters:
-Hybrid mode, max speed set to 55km/h
-Cadence is not excessively high (52T chainring, 11T sprocket).
-Lots of charge in the battery so minimum battery/cell voltages aren't the problem.
-No temp sensor installed (yet), so I don't think it's a thermal cut-out (I'm aware I'm taking a risk)
-It happens with or without Field Weakening enabled.
-I never experienced the issue prior to flashing the OSF

Is it maybe something to do with ADC settings (which I’m still trying to understand)?
Screenshots of my parameters below.... Thanks in advance for any help.
Scott

View attachment 343392

View attachment 343393

View attachment 343394
Hello, same probleme for me, the assistance stop to help me, i must slow down before it start again.
I return back to original firmware, no more probleme.
Must we calibrate torque?
 
No, if you do not calibrate the torque sensor there are no problems. At least not this kind.

Are you using hybrid mode?
And what chainring/ sprocket ratio?
Hello
In my case, 42/11. And i have the probleme is with power mode and hybride mode. I check this 2 modes.
 
In case you are asking me (about my post on Nov 27 - TSDZ2 OSF for all displays, VLCD5-VLCD6-XH18, LCD3, 860C-850C-SW102.):

Yes, I am using hybrid mode
52:11 (top gear) when I notice the intermittent issue.
So the problem occurs with a power close to maximum and at a low cadence, I don't think more than 60 rpm. It's correct?

I don't understand the cause, I will try in the same conditions if the problem occurs, but it will be a little difficult with my 30T chainring...
 
So the problem occurs with a power close to maximum and at a low cadence, I don't think more than 60 rpm. It's correct?

I don't understand the cause, I will try in the same conditions if the problem occurs, but it will be a little difficult with my 30T chainring...
Yes, you’re correct. Also, it goes away if/when I can push through the problem and increase cadence. Problem is intermittent… not always there.
I’m starting to wonder if there is a hardwired temperature or power/current limiter built into the TSDZ2 that is overriding your firmware.
 
Yes, you’re correct. Also, it goes away if/when I can push through the problem and increase cadence. Problem is intermittent… not always there.
I’m starting to wonder if there is a hardwired temperature or power/current limiter built into the TSDZ2 that is overriding your firmware.
@mbrusa it might help troubleshooting if you know I am a big/heavy guy… 103kg. Maybe I’m asking too much from the TSDZ2 and the real solution is I lose weight.
 
Hello
Question about power, in offroad mode, what power value Can i enter? IS it max power or average power ? For a 36v 250w motor can i use 500w or more? IS it link with battery or motor?
Tanks
 
Battery power max (W),
It is the maximum power that can be delivered by the battery in Watts, it depends on the capacity and type of cells.
It is also the motor power limit in offroad mode.
With a 36V 250W motor and 630Wh battery, I set the limits at 530W and 17A, both on street and offroad.
Consider that the motor can run for a few minutes at maximum power.
 
Hello everyone.
I am riding my bike 2 years by now with mbrusa software and i am very happily about it. However after the upgrade to 1.3 some time ago. When i start up the 860 display. The bike motor engages for a short pulse. Sometimes 2 pulses.
The pulses are not equal, sometimes it is a hard push and longer. Sometimes it is only very soft. This has to make me block every time the rear brake or my bike flies on the ground. Updating to 1.4 didn't work and downgrading also didn't work.
I used the searchfunction but didn't find something.
Anyone with the sale problem?

Thanks
 
I got new controller (old one still works but does not want to make a connection with ST-link v2) question is, can i update the controller to OSF as it is without installing it yet?
 
Hello, I need temperature sensor help please?
I’ve just installed a temp’ sensor (LM35DZ) following the wiki instructions for my 8-pin connector (VLCD5).
After I re-flashed the @mbrusa OSF to enable the temperature sensor, the temp display is fixed at 18.3 degrees. Everything else works fine.

I know the motor is heating up while riding (it’s warm to touch) but the temperature displayed doesn’t change from 18.3.
It’s a good quality LM35 and it tested good (95 degrees) with a 5V power supply, multimeter and steam before I installed it. I’m confident I wired it up right too.
Any suggestions please? Thanks
 
Hello, I need temperature sensor help please?
I’ve just installed a temp’ sensor (LM35DZ) following the wiki instructions for my 8-pin connector (VLCD5).
After I re-flashed the @mbrusa OSF to enable the temperature sensor, the temp display is fixed at 18.3 degrees. Everything else works fine.

I know the motor is heating up while riding (it’s warm to touch) but the temperature displayed doesn’t change from 18.3.
It’s a good quality LM35 and it tested good (95 degrees) with a 5V power supply, multimeter and steam before I installed it. I’m confident I wired it up right too.
Any suggestions please? Thank

Where did you buy the LM35? When you did not buy from a (very!) trusted (but currently totally overprized) semiconductor seller, your chances are about 100% that you received a non working fake LM35.
Since the chip shortage a couple of years ago the market is swamped by these fake ones. I do a test buy every 1/2 year on ebay since about 2 years and everytime I receive fake non working units. (Thanks to Paypal I get my money back.)
I do this, because I refuse to pay ~5$ for a chip that normally costs pennies.
Note: These fake chips can also draw too much current and can therefor also harm your controller…
 
Where did you buy the LM35? When you did not buy from a (very!) trusted (but currently totally overprized) semiconductor seller, your chances are about 100% that you received a non working fake LM35.
Since the chip shortage a couple of years ago the market is swamped by these fake ones. I do a test buy every 1/2 year on ebay since about 2 years and everytime I receive fake non working units. (Thanks to Paypal I get my money back.)
I do this, because I refuse to pay ~5$ for a chip that normally costs pennies.
Note: These fake chips can also draw too much current and can therefor also harm your controller…
I bought from a trusted legit overpriced retailer (not eBay) - RS Components in Australia.
As I said in my initial post, I tested the chip before installation and it was working as it should.
 
I bought from a trusted legit overpriced retailer (not eBay) - RS Components in Australia.
As I said in my initial post, I tested the chip before installation and it was working as it should.
Sorry - I missed the part about successful initial testing in your post. Then I don‘t have a clue other than faulty / wrong wiring to the MCUs ADC input? (I would not rely on wire colors, but trace to the correct pin on the controller)
 
Hello everyone.
I am riding my bike 2 years by now with mbrusa software and i am very happily about it. However after the upgrade to 1.3 some time ago. When i start up the 860 display. The bike motor engages for a short pulse. Sometimes 2 pulses.
The pulses are not equal, sometimes it is a hard push and longer. Sometimes it is only very soft. This has to make me block every time the rear brake or my bike flies on the ground. Updating to 1.4 didn't work and downgrading also didn't work.
I used the searchfunction but didn't find something.
Anyone with the sale problem?

Thanks
Never heard of such a problem.
A few questions to understand:
Have you calibrated the torque sensor?
Do you have throttle installed?
No errors displayed?
 
Back
Top