TSDZ8 OSF (open source firmware)

I'll try it, but so far I've been riding in Power assist mode. So it's hard to compare directly.
Dont worry try it in power assist mode. Ive also just tried and it works perfectly smooth...
I've just added a little improvement to react more quickly to a full-stop / start.
New version can be downloaded here: Dropbox

I've just tested this version with several settings and it was running smootly across all modes. :)
I really hope this works as well on other motors...
 
Last edited:
Somehow I couldn't get rid of the Err2 message on the EKD01 display. Previously, on version 13.hex, I just turned the pedals and the message disappeared. Now it won't go away.
So today, to restore the feeling, I rode with the firmware ...test3.0... .hex.

I don't know if you shouldn't start a separate thread for the sake of clarity. Personally, I don't mind it like that.
 
Somehow I couldn't get rid of the Err2 message on the EKD01 display. Previously, on version 13.hex, I just turned the pedals and the message disappeared. Now it won't go away.
So today, to restore the feeling, I rode with the firmware ...test3.0... .hex.

I don't know if you shouldn't start a separate thread for the sake of clarity. Personally, I don't mind it like that.
Err2 on ekd01 is related to torque sensor.
I expect that when you power on, OSF measures the torque sensor with no load and check that is is within a specific range.
I have to look at the code to see how the range is calculated.

I checked fo version 0.1.20.
The ADC torque sensor at power on must be
- bigger than the offset value defined in javaconfigurator - 60
- lower than the offset value defined in javaconfigurator
 
Last edited:
I tried this with the version from Katana123.
With your version 13 the message disappeared when I turned and tapped the pedals.
With the 860C I use Calibration disabled.
With the EKD01 I use Calibration enabled. At least that was how I got the best results.
 
bigger and lower as the same?
if you enter 160 for instance, the torque sensor adc value must be between 100 and 160 at startup if i read this correctly...
Try increasing the adc offset by at least 5 and work your way up if it doesnt help.
I've also had issues having a too low value...
 
I used the value 10,
The Err2 message did not appear.
But to make it complicated, the message Err2 does not appear even if I put the value back to 0, like Katana1234.

1749316787908.png

I did a short ride with version 20 from Katana1234 in Power assist mode, with its configuration.
It seems to me that it works very well.
Taking into account the low power values in its configuration.
I have not ridden with versions higher than 13 EKD01 from Mstrens yet, I can't compare.

I noticed that the power indicator on the EKD01, which was not working before, is working.
 
I used the value 10,
The Err2 message did not appear.
But to make it complicated, the message Err2 does not appear even if I put the value back to 0, like Katana1234.

View attachment 371319

I did a short ride with version 20 from Katana1234 in Power assist mode, with its configuration.
It seems to me that it works very well.
Taking into account the low power values in its configuration.
I have not ridden with versions higher than 13 EKD01 from Mstrens yet, I can't compare.

I noticed that the power indicator on the EKD01, which was not working before, is working.
the value you've changed isnt even being used in the current version if i remember it correctly :D
but good to hear that it works well for you...
 
the value you've changed isnt even being used in the current version if i remember it correctly :D
...
1749317854070.png


it is not used, but is used for another purpose.

P.S.:
at least that's what I thought until now.
I also think that the value 0 for EKD01 corresponds to the value 20 for 860C.

Some are sometimes not used.
1749320245491.png
 
Last edited:
View attachment 371321


it is not used, but is used for another purpose.

P.S.:
at least that's what I thought until now.
I also think that the value 0 for EKD01 corresponds to the value 20 for 860C.

Some are sometimes not used.
View attachment 371323
In version 0.1.20, offset adj and angle adj are not used anymore in OSF TSDZ8.
range adj is used for another purpose than in TSDZ2 (see the readme section)

There is indeed some differences between javaconfigurator and 860C in the values that can be entered.
In javaconfigurator it is possible to enter negative values. Range is -20/+20. When put in the HEX file, javaconfigurator add 20 and so value becomes 0/40.
In 860C, it is not possible to enter negative values. So range is 0/40 and transmitted value to OSF is also in range 0/40.

Inside OSF, value is again set in range -20/20 for inernal processing.

I can understand that this can be confusing but it is the way javaconfigurator and 860C have been done (and I do not want to change those programs).
 
In 0.1.20, OSF uses pedal torque ADC range adjustment for another purpose. See readme section.
In some way it tries to reproduce what mbrusa could achieve with anothe parameter named pedal torque ADC angle adjustment (that I could not use for TSDZ8 for a reason that would be to difficult to explain here).

I am not sure many users experiment this concept in TSDZ2 but I implemented something similar in TSDZ8 because I expect it could be useful (to let the user increase/decrease the sensitivity at low pedal weigt compared to the one at high pedal weight).
Feel free to experiment with it and to report your feeling. It could be different from motor to motor depending on the characteristic of the torque sensor.
If it is not useful at all, I will remove this parameter from OSF TSDZ8.
 
Be aware that:

1) I have seen wrong schematics in the Internet for making the cable.
2) In my case, extension cable had few colors other than in the schematics. I used pinouts instead of colors.
Well I thought I had saved the various links that I'd found, and now can't find them Ugh. Anyway, the J-link arrived today, so I'm going to be making the cable connections from the extension cable to the J-link. Here's one of the diagrams I found online. Can anyone verify whether this is correct or not?
1749317822819.png
 
Well I thought I had saved the various links that I'd found, and now can't find them Ugh. Anyway, the J-link arrived today, so I'm going to be making the cable connections from the extension cable to the J-link. Here's one of the diagrams I found online. Can anyone verify whether this is correct or not?
View attachment 371324
I did not check it but it is the same as in the link I provided in the readme section.
I hope it is OK but I can't confirm it directly. Still take care that the colors of the wires could differ.
I recomend that you read the readme section because I wrote some important notes about using jlink (for Vref)
 
...
There is indeed some differences between javaconfigurator and 860C in the values that can be entered.
...
OK.
For completeness, please confirm 1 more difference:

1749322527651.png
Set assistance levels according to your needs. Values in percentages, maximum 500% (?).
For example (EKD01), applying 100 Watt to the pedals, with 260% assistance, the motor delivers 260 Watt.

For 860C applying 100 Watt to the pedals, with 254% assistance, the motor delivers 254x2 =508 Watt.
I know that the 100w human power value can be faked by shifting the step values.
 
OK.
For completeness, please confirm 1 more difference:

View attachment 371325
Set assistance levels according to your needs. Values in percentages, maximum 500% (?).
For example (EKD01), applying 100 Watt to the pedals, with 260% assistance, the motor delivers 260 Watt.

For 860C applying 100 Watt to the pedals, with 254% assistance, the motor delivers 254x2 =508 Watt.
I know that the 100w human power value can be faked by shifting the step values.
As far I can follow and understand the code of the different programs, you are right:
- In javaconfigurator you can enter as assistance a value up to 511. This value is transmitted in the Hex file. When OSF process the HEX file, the value is divided by 2 (so 511 become 255). When OSF calculates the electric power to provide, it calculates the human power and mutiplies it by the (dividedd) assistance and divides by 50. So if human power is 100w and assistance in java is 260, OSF calculates 100 * (260 /2) /50 = 260W

- for 860c, if you enter 254 in the display, the display transmits 254 to OSF as assistance parameter. OSF calculates the electric power with the recived assistance. So with 254 in the display, for 100W human power, OSF will calculate 100 * 254 / 50 = 508w
 
Well I thought I had saved the various links that I'd found, and now can't find them Ugh. Anyway, the J-link arrived today, so I'm going to be making the cable connections from the extension cable to the J-link. Here's one of the diagrams I found online. Can anyone verify whether this is correct or not?
View attachment 371324
It can work, but be aware that there can be internal wire color inconsistencies depending on the cable you buy. I had to reverse the orange & brown wire positions with mine, and I didn't have a purple wire. But I was able to figure it out with trial, error, and a little luck.
 
Thanks for the answer.
I still think that with the EKD01 I am allowed to achieve a higher maximum power value.
Because with the 860C we are limited to a maximum value of 1000W.
There is no such limitation with the EKD01. I have a support limit of 500W (511W?) at the 4th support level (per 100W of human power). Then we can still allow for a further increase for the 5th support level AFTER TURBO.
I am not even mentioning the BOOST mode, which in turn increases the power at certain moments.
 
Last edited:
Thanks for the answer.
I still think that with the EKD01 I am allowed to achieve a higher maximum power value.
Because with the 860C we are limited to a maximum value of 1000W.
There is no such limitation with the EKD01. I have a support limit of 500W (511W?) at the 4th support level (per 100W of human power). Then we can still allow for a further increase for the 5th support level AFTER TURBO.
I am not even mentioning the BOOST mode, which in turn increases the power at certain moments.
In both versions, the electric power is calculated by the same formula (human power * "assistance value" /50) and "assistance value" is defined as a field with 8 bits and so the max value is 255. This is valid also for the level AFTER TURBO.
I think that you can enter more that 511 in javaconfigurator as assistance but then you will get unexpected result. If you e.g. enter 600, the value will be divided by 2 (so become to 300) and later on will be saved in a 8 bits field. So 300 will become 300-256 = 44.
Ideally, javaconfigurator should check that entered value is within expected range but I this this is not done.

OSF limits also the power based on other parameters like motor power max, battery current max. I would have to check what are the max values that can be entered in 860C. There are also some limits that are hardcoded (in main.h) but they are the same for both version:
Code:
#define ADC_10_BIT_BATTERY_EXTRACURRENT                50  //  8 amps
#define ADC_10_BIT_BATTERY_CURRENT_MAX                143    // 23 amps // 1 = 0.16 Amp

#define ADC_10_BIT_MOTOR_PHASE_CURRENT_MAX            187    // 30 amps // 1 = 0.16 Amp

Edit:
I checked the code in 860C firmware and indeed the power is limitted to 1000W. Increasing it would require an (easy) change in 860C firmware (to be done by mbrusa). I expect that 1000W is still a realistic value for TSDZ8 to avoid damages.
 
Last edited:
Thanks for the answer.
I still think that with the EKD01 I am allowed to achieve a higher maximum power value.
Because with the 860C we are limited to a maximum value of 1000W.
There is no such limitation with the EKD01. I have a support limit of 500W (511W?) at the 4th support level (per 100W of human power). Then we can still allow for a further increase for the 5th support level AFTER TURBO.
I am not even mentioning the BOOST mode, which in turn increases the power at certain moments.
Please be aware that when using the EKD01 you have to use "BEFORE ECO" in order to have the correct power assist level order. I confused this setting until i checked the code yesterday and then changed my config.
If you are using "AFTER TURBO" your assist levels will look like this:
Display selected -> True motor level
1 -> 5
2 -> 1
3 -> 2
4 -> 3
5 -> 4

Use this setting to get the right order:
1749368810870.png

I don't understand why this is even a config parameter instead of being bound to the selected display. Maybe there are several displays with differently working firmwares out there?
 
Last edited:
...
If you are using "AFTER TURBO" your assist levels will look like this:
...
You're right.
I didn't notice that with EKD01 the first level was the strongest.
But the post itself wrote in general that there is a performance increase above level 4.
 
Hello,

Today I have done a test ride with 20 version of 860c on my regular test route with mountain climb. First I have to say that jerking not noticeable in most of situations, but I still managed to have jerking under certain circumstances.

One thing that is frustrating- I keep getting error E7 "Overcurrent". I usually get it when I climb the mountain with high support level (6, 7 etc) and when I switch the gear to smaller sprocket. I observe that during climb, motor current is in "red", showing 20-23 amps. Motor power is at "orange", showing 800-870 wats. So far I was never able to see motor power above 900 wats on display (I have set motor power to max 1000w and current to max 22a). I assume when changing a a gear when motor is already running at 20-23 amps- gives instant peak of current due to higher load and triggers Overcurrent error?

Any idea how to mitigate this error?

The next observation- with emtb mode and medium support (5) in mountain climb and peddling without big force- I got something similar to jerking, but this is somehow spread to 3 full pedal turn cycles. So for ca. 3 pedal turns motors pulls and then slows down. And then again pulls. When I increased the assistance to 7, the motor pulled smothly without such jerking.

Last observation- on flat road with high assistance (7) and in power mode (did not test in other). I have started from fully stopped with smallest cog and peddling slowly and with little force- the motor was jerking with every pedal turn.
 
Hello,

Today I have done a test ride with 20 version of 860c on my regular test route with mountain climb. First I have to say that jerking not noticeable in most of situations, but I still managed to have jerking under certain circumstances.

One thing that is frustrating- I keep getting error E7 "Overcurrent". I usually get it when I climb the mountain with high support level (6, 7 etc) and when I switch the gear to smaller sprocket. I observe that during climb, motor current is in "red", showing 20-23 amps. Motor power is at "orange", showing 800-870 wats. So far I was never able to see motor power above 900 wats on display (I have set motor power to max 1000w and current to max 22a). I assume when changing a a gear when motor is already running at 20-23 amps- gives instant peak of current due to higher load and triggers Overcurrent error?

Any idea how to mitigate this error?

The next observation- with emtb mode and medium support (5) in mountain climb and peddling without big force- I got something similar to jerking, but this is somehow spread to 3 full pedal turn cycles. So for ca. 3 pedal turns motors pulls and then slows down. And then again pulls. When I increased the assistance to 7, the motor pulled smothly without such jerking.

Last observation- on flat road with high assistance (7) and in power mode (did not test in other). I have started from fully stopped with smallest cog and peddling slowly and with little force- the motor was jerking with every pedal turn.
Overcurrent error is foreseen when current exceed 30A (in TSDZ8).
860C firmware has a parameter that alows to generate the error only when the current exceeds this limit during more than some delay. You can try:
- to increase this delay.
- set the delay on 0 which means that error is never generated.

About jerking, it is difficult to say what happens in practice.
In theory OSF use over more than 1 pedal rotation the same value of the torque sensor (the max of current and from previous rotation). Still if the cadence slows down significantly over the rotation, OSF uses the current torque sensor which could be lower. I could change the parameter related to "significantly" to avoid to fast decrease of power.
Still this concept had been added in 0.1.20 in order to get faster reaction when pressure decreases (this was asked by a user).
You can also try to decrease the deceleration and see if it help. This is a parameter you can change easily in 860C display
 
Back
Top