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

You are right about that, but realize that this Tsdz2 is missing the clutch on the maingear.
Also in the past all gears had straight tooth. (don't know, if that is still the case)
There is very long time when TSDZ2 has straight tooth. I think clutch in blue gear is better. I never have had problems on blue gear. I have two TSDZ2B's and those white gear bearings have last about 5 K km:s.
 
You are right about that, but realize that this Tsdz2 is missing the clutch on the maingear.
Also in the past all gears had straight tooth. (don't know, if that is still the case)
yes there are straight tooth on the coast/foot version so for transform in a "normal" version you must change the main gear and the blue gear axle
some people do it
 
That is correct as I have done it on a coaster unit which I got as NOS cheap, I also installed the OSF just in case there was a variation in the standard firmware.
 
A question...
where to buy a tsdz2b (36v) with the OSF compatible V1 controller??
I’m not sure now which controller PSWPower TSDZ motors have. Because I sent message to them and answer was: ”sorry, we are not sure”. What the hell, they do not know what they are selling. On PSWPower about site they say ”Our team are thinking CREATIVE! Always!” Not sound like that.

Are they starting to obey strict enforcement of the EU law in Germany because they have warehouse in Germany. I don’t think so from china company.

To be sure you have to try find some other china seller and by motor from there.

PSWPower sells also controllers but they do not say if it is V1 or V2.
 
I’m not sure now which controller PSWPower TSDZ motors have. Because I sent message to them and answer was: ”sorry, we are not sure”. What the hell, they do not know what they are selling. On PSWPower about site they say ”Our team are thinking CREATIVE! Always!” Not sound like that.

Are they starting to obey strict enforcement of the EU law in Germany because they have warehouse in Germany. I don’t think so from china company.

To be sure you have to try find some other china seller and by motor from there.

PSWPower sells also controllers but they do not say if it is V1 or V2.
I don't know if the V2 controller is on the 36V motors or only the 48V motors...
That's why I'm asking if anyone knows a seller who can confirm that he sells the motors in V1 version (36V)
 
.... anyone knows a seller who can confirm that he sells the motors in V1 version (36V)
Not a single seller can know which controller version is inside, but the V2 version had to do with EU regulations about max. power, speed, and throttle.
imho German Enerprof was the first and only one that sold and sell the V2 version and maybe now other EU sellers too.
But the international sellers didn't. PSW power didn't also, but no guarantees.
 
  • Like
Reactions: dgc
I have always ordered from Aliexpress or PSWpower and been OK. But did order a drive via Germany and yes it had a V2 controller but did have a V1 spare controller, at odd times these controllers come up very cheap on Aliexpress, so switched out the V2 and sold it on Ebay.
 
Out of interest I have emailed Tongsheng directly regarding the controller versions, have had a first response asking for more info which I think is a translation problem, so gone back to Tongsheng and wait a reply. I guess say German drives have the V2 controller and rest of the world has V1, but if Tongsheng run out of stock of the V1 they then fit V2 controller hence the luck of the draw condition.
 
I am not sure if they know what controllers are fitted to the TSDZ2(B) motors themselves

Hello,
Sorry for my late reply.
Could you tell me your e-bike's brand?
In addition, if you can, you can find a professional to help you take apart the motor to see the controller's parameters.
You only tell me the motor type, I can't help you to determine it, because some controllers are customized.
Thank you so much~
Have a nice day~

Best regards
Tongsheng

Address: Tongda Road 1875-8,Suzhou,215124,Jiangsu,China
Website: Suzhou Tongsheng Electric Appliances Co., Ltd. Motor Meter Controller
 
By the way there is also an update for the stock display version (Java Configurator).
It is a confirmation of the 6-beta-1 version with a few other changes.

Before the release I should do one last test over the weekend, but I don't know if I can do it, I already plan to try something else with 860C.
Or, if someone is available to try this is the link:
TSDZ2-Smart-EBike-1-master
I only need 2 confirmations that everything is ok and I proceed with the release.
Tried today, all good.
Version v20.1C.6 released

List of changes v20.1C.6
1 - Added PWM frequency choice, 18kHz or 19kHz.
2 - Added overcurrent error delay (E07).
3 - Fixed bugs in SOC auto calculation.
4 - Increased motor blocked check time (E04).
5 - Increased minimum rpm for motor reactivation (by dzid26).
6 - All errors are reset only by turning the display off.
7 - Optimizations (by dzid26).
8 - Bleeding edge Unit Testing (by dzid26).

Updated Parameter configurator guide
Updated Operating manual of display
 
A clarification regarding changelog 1 - Added PWM frequency choice, 18kHz or 19kHz.
It's a choice that has always been there in my versions, it had to be changed in the code.
Now I've added it to the configurator.
At 18 kHz there is better efficiency, at 19 kHz you reach a higher cadence.
If you want to save some Wh, choose 18 kHz, if instead you are interested in power at high cadence, choose 19 kHz.
On my mountain bike I use 19kHz, it happens during relaunches on trails to reach and exceed 110 rpm.
On the trekking bike, where I am more interested in battery life, I use 18 kHz.
 
As always: Thank you 🙏, @mbrusa !
(I‘ll have to wait a few weeks before I can test it, as I am away from my bike location)
One question: Which one was the default in prior firmware versions (i.e. the 6beta)? I mean 18 or 19 kHz?
 
If you want to save some Wh, choose 18 kHz, if instead you are interested in power at high cadence, choose 19 kHz.
Sorry, but what should be the physical explanation, why a higher PWM frequency should lead to a higher cadence?! Especially this neglectable increase from 18 to 19 kHz...
 
Sorry, but what should be the physical explanation, why a higher PWM frequency should lead to a higher cadence?! Especially this neglectable increase from 18 to 19 kHz...
I asked myself the question differently, why at 18 kHz you don't reach the same cadence that you reach at 19 kHz?
The answer I gave myself is this, probably the PWM interrupt that draws the sinusoid, is no longer able to follow the motor revolutions.
Confirmed by the fact that even at 19 kHz there is a limit, and it is 640 ERPS (116 rpm), while at 18 kHz the limit is 600 ERPS (109 rpm)..
You see that the maximum revolutions are proportional to the frequency.
At these values, the motor runs cleanly at constant power, beyond that it loses power and starts to stutter.

To complete the information, the best efficiency of the motor at 18 kHz is about +1%, tends to zero at maximum power, +2/3% with low powers.
 
Thank you. Casainho and me defined a maximum erps to get enough updates of the duty cycle per revolution to have a sinosoidal shaped current waveform in the very early phase of this STM8 project, several years ago. As far as I remember, we defined 40 updates per electrical revolution. But this was just a judge. I don't know, if this threshold still exists in the code ;)
 
Last edited:
By the way there is also an update for the stock display version (Java Configurator).
It is a confirmation of the 6-beta-1 version with a few other changes.

Before the release I should do one last test over the weekend, but I don't know if I can do it, I already plan to try something else with 860C.
Or, if someone is available to try this is the link:
TSDZ2-Smart-EBike-1-master
I only need 2 confirmations that everything is ok and I proceed with the release.
Been meaning to reply to this for a couple of weeks, but been hopelessly sidetracked...
So I successfully flashed 6-beta-1, but observed that the throttle had reduced acceleration compared with 2-update-2 (testing just with the back wheel lifted off the ground).
All parameters were essentially the same, smooth start disabled. I flashed again with increased motor acceleration but noticed no difference.

Next I tried with 1-master, as per above, all fine this time flashing but no throttle activity (definitely all boxes checked correctly)

So, I have again reverted to 2-update-2.
Thing is, I'm used to my throttle only bike I've had for several years, and want this one to still have 'full power' available at my thumb tip in case I need it.
It begs the question for me 'how is the throttle configured inside OSF ?'. I feel it ought to be constrained only by max current/battery power settings.
I don't wish to sound like I'm complaining...I think what's been done here is incredible and thanks !!
 
I don't have a throttle, but on the home trainer I use a virtual throttle that uses the same function as the real throttle, only the input is different.
When I started testing with the home trainer I increased the throttle acceleration ramp time, the start with the virtual throttle was too abrupt, the chain took a very strong hit.
So between the two versions, the maximum power is the same, I changed the acceleration to protect the transmission, it is softer in v20.1C.6.
If you prefer it more aggressive, you can try to increase "Motor accelerator", or if you are able to do it, set, in the main.h file,THROTTLE_DUTY_CYCLE_RAMP_UP_INVERSE_STEP_DEFAULT as in the v20.1C2-update-2 version.

There is also another difference in the latest version that concerns the throttle.
To avoid overheating of the motor when using the throttle, "Field weakening" is now disabled and the maximum rpm is lower, and therefore also the maximum speed of the bike (only in case "Fiend weakening" can activate).

A tip, if you prefer to use the old version, do not use v20.1C.2-update-2, but use v20.1C.2-update-3, it is safer.
Also keep in mind that the motor efficiency is 2/3% lower than the latest version.
 
Last edited:
I don't have a throttle, but on the home trainer I use a virtual throttle that uses the same function as the real throttle, only the input is different.
When I started testing with the home trainer I increased the throttle acceleration ramp time, the start with the virtual throttle was too abrupt, the chain took a very strong hit.
So between the two versions, the maximum power is the same, I changed the acceleration to protect the transmission, it is softer in v20.1C.6.
If you prefer it more aggressive, you can try to increase "Motor accelerator", or if you are able to do it, set, in the main.h file,THROTTLE_DUTY_CYCLE_RAMP_UP_INVERSE_STEP_DEFAULT as in the v20.1C2-update-2 version.

There is also another difference in the latest version that concerns the throttle.
To avoid overheating of the motor when using the throttle, "Field weakening" is now disabled and the maximum rpm is lower, and therefore also the maximum speed of the bike (only in case "Fiend weakening" can activate).

A tip, if you prefer to use the old version, do not use v20.1C.2-update-2, but use v20.1C.2-update-3, it is safer.
Also keep in mind that the motor efficiency is 2/3% lower than the latest version.
The questions I'd like to ask just grow and grow the more I get into it ! Ultimately it would require a full tutorial on the workings of the whole thing and no doubt for me to learn to code....so not for now
But...

So, I've looked at main.h (In notepad++) re the throttle ramp and they appear different.

for 2-update-2 line 33 : #define THROTTLE_DUTY_CYCLE_RAMP_UP_INVERSE_STEP_DEFAULT 98 // 80 at 15.625KHz

for 6-beta-1 line 79 : #define THROTTLE_DUTY_CYCLE_RAMP_UP_INVERSE_STEP_DEFAULT (uint8_t)(PWM_CYCLES_SECOND/78)

I think I've got my head around this at last and that to make 6-beta-1 the same as 2-update-2 I'd need to put

line 79 : #define THROTTLE_DUTY_CYCLE_RAMP_UP_INVERSE_STEP_DEFAULT (uint8_t)(PWM_CYCLES_SECOND/194) ?? as in 19047/194 = 98

am I right ?

I'm curious to know....is there a /what is the relationship between the acceleration ramp and motor torque ?

I've been trying to glean more info on the TSDZ2 torque curve anyway, but it seems scarce...(Index of /pliki/TSDZ2/POWER/ is the best I've found)

last one...what is the relevance of THROTTLE_DUTY_CYCLE_RAMP_UP_INVERSE_STEP_MIN ?

I couldn't use 2-update-3 because the throttle didn't work....

Thanks for all the info, I'll bear it all in mind.
 
That's right, you need to replace the line
#define THROTTLE_DUTY_CYCLE_RAMP_UP_INVERSE_STEP_DEFAULT (uint8_t)(PWM_CYCLES_SECOND/78)
with
#define THROTTLE_DUTY_CYCLE_RAMP_UP_INVERSE_STEP_DEFAULT (uint8_t)(PWM_CYCLES_SECOND/194)

THROTTLE_DUTY_CYCLE_RAMP_UP_INVERSE_STEP_DEFAULT is used to calculate the acceleration time with the throttle, starting from rest up to 4 km/h.

THROTTLE_DUTY_CYCLE_RAMP_UP_INVERSE_STEP_MIN is used to calculate the acceleration time with the throttle, at 25 km/h and above.

For speeds between 4 km/h and 25 km/h, the acceleration time is calculated proportionally to the speed, and is between the DEFAULT and MIN values.
 
Got OSF on SW102 (great compact display!) and EKD01 (simple,for wife's bike). Amazing software! Many thanks to Casainho, Mbrusa and all authors.
I've been experiencing some "issues" with battery calibration only - my battery (17.5Ah (Samsung)) at 100% charge, the display only shows 67-70%. Even when the display shows 0% I can still ride for another 20-25km. However, I think I've figured it out, thanks to your instructions.

Now, I only have these questions left:
  1. I'm a bit confused about the assist levels: the Java OSF configurator seems to have 4 assist levels, but my SW102 display shows 5 (or 9 levels), EKD01 shows 5.
  2. Also, I'm planning to update my TSDZ2B firmware from 20.1C.2 to 20.1C.6. Do I need to update the SW102 display firmware (sw102-otaupdate-20.1C.5-1-860C) as well, or is it only necessary to update the motor firmware?
  3. In the instruction (EN-Parameter_configurator_guide-TSDZ2-v20.1C.6.pdf) the parameter "Motor power max (W)" is missing, but it is present in the Java configurator 20.1C.6. I understand that it was removed because the power is set by the parameter "Battery current max (A)?".
    Because, essentially, it's the same thing... ? I'm also not quite sure what will happen - if I set "power max" to 600W, but 10A on the battery (which corresponds to a power of no more than 500W)? And, vice versa, what's the point of setting 15A on the battery if I limit "power max" to, for example, 500W?
Sorry if my questions are a bit silly)) but I would really like an explanation, even a brief one.
Any advice would be greatly appreciated. Thanks!"

p.s. this might be useful for the developers: on the EKD01 display, the menu button is very close to the "-" button, and the Walking mode often accidentally triggers the menu. This makes it difficult to turn off quickly, as the wheel continues to rotate if you release the "-" button.
 
1 - Version v20.1C.2 did not handle the fifth level, v20.1C.6 does. For EKD01 there is an update in the testing phase, if you want to try it is in the Master version.

2 - If SW102 is with Tonsheng protocol it does not need to be updated, only the motor needs to be flashed, with the Java configurator version.

3 - It is the same parameter moved to the "Motor setting" section where it is more correct.
"Motor power max (W)" and "Battery current max (A)" overlap, but can have different functions.
"Battery current max (A)" is important to safeguard the battery. The maximum current that the battery can deliver must be set, it depends on the capacity and type of cells. It can also be used to limit the motor current, but it must be lower than the maximum current of the battery.
"Motor power max (W)" is used to limit the motor power. The current limit is calculated and compared with the previous parameter. The lowest value is used.

For example, with a 36V motor, I set 500W and 17A, the current limit with a charged battery is 500W/40V=12.5A, with a discharged battery 500W/29V=17A. Voltage values considering the drop.
With these settings I do not notice any difference in performance between a full battery and a discharged battery.
Be careful though, not all batteries are able to deliver 17A at 29V!
Furthermore, 500W cannot be continuous, the motor overheats.

4 - Regarding EKD01, from your description I understood that pressing the - (minus) button activates Walk assist, if you accidentally also press the Menu (on/off) button, the settings menu is activated.
In this condition, releasing the buttons does not deactivate Walk assist.
To deactivate it, you must exit the settings menu or turn off the display.
Did I understand correctly?
If so, there is nothing that can be done, it is a bug in that display, it should be reported to the manufacturer.
 
Back
Top