TSDZ8 OSF (open source firmware)

I may need to start over. When I used the command line, it pauses for a second then spits out a bunch of errors pointing to what looks like lines in the code.
I'm another step further, I can feel success is coming soon. I got the configurator up and running and generated a settings file and loaded it. I'm still getting ERR2 on the EKD01 display, so back to where I started, but I feel I'm getting closer. More reading.

Can someone confirm that the J-flash tool and the configurator function separately (don't interact with each other except for through files)? I'm just trying to get a fundamental understanding on how these tools work.
 
Last edited:
usually, you simply download the whole GitHub repo, then double click the JavaConfigurator.jar and thats it.
The / is not allowed in a filename because it represents a subdirectory. I really think such issues should be moved to another thread...
Thank you for that information. I was looking in the wrong place, but now all is good.
 
I'm another step further, I can feel success is coming soon. I got the configurator up and running and generated a settings file and loaded it. I'm still getting ERR2 on the EKD01 display, so back to where I started, but I feel I'm getting closer. More reading.

Can someone confirm that the J-flash tool and the configurator function separately (don't interact with each other except for through files)? I'm just trying to get a fundamental understanding on how these tools work.
When you select TSDZ8 as motor type in javaconfigurator, the javaconfigurator generates a HEX file but do not upload it to the controller. This HEX file contains only the values filled in the edit fields.
This Hex file has to be uploaded separately in the controller using J-flash.

This is different from what happens for TSDZ2. For TSDZ2, javaconfigurator creates a text file with the config and then automatically starts to recompile OSF using this config and also automatically upload the firmware (so not just the config) in the controller.
 
... I'm still getting ERR2 on the EKD01 display ...
Slowly increase the value of Pedal torque ADC offset (no weight) until the Err2 message disappears. Sometimes it is enough to turn the pedals to another position and the Err2 message disappears, because this value changes depending on the rotation of the pedals. For example, like this in my case:

1749629492422.png
 
I was getting err 30. It was only when I merged the first hex with the configuration hex in the j flash and uploaded them, the motor was running . But with no throttle and the motor was getting ridiculously hot on the touch.
 
I was getting err 30. It was only when I merged the first hex with the configuration hex in the j flash and uploaded them, the motor was running . But with no throttle and the motor was getting ridiculously hot on the touch.
I also got error 30. Cannot figure what I am doing wrong.
 
Slowly increase the value of Pedal torque ADC offset (no weight) until the Err2 message disappears. Sometimes it is enough to turn the pedals to another position and the Err2 message disappears, because this value changes depending on the rotation of the pedals. For example, like this in my case:

View attachment 371512
I think I've got the mechanics figured out as far as creating the configuration and using the JFlash to flash the configurations now. Getting a lot of practice, with the trial and error tweaking the offset. However, I've increased it incrementally up to the max allowed and the error still persists.
 
How to read the Pedal Torque ADC offset value on VLCD5?
VLCD5 v5.1
Settings sequence: ODO display, press info+power until display "Serv" (2-3 seconds). Then info, info,...

Torque sequence: TRIP display, press info+power until display ""Serv" (2-3 seconds). Then info, info,...
 
The repository on github contains now 3 versions:
- V00.01.20 that uses my ogic based on max torque per rotation
- V00.01.25 that uses mspider logic based on average per rotation
- V00.01.20 that uses katana logic based on average of 40 last torque (still torque with big difference with previous value having more priority to increase reactivity)
Hello, has anyone tested all three versions and has any information about them?
Which settings work well?
 
Slowly increase the value of Pedal torque ADC offset (no weight) until the Err2 message disappears. Sometimes it is enough to turn the pedals to another position and the Err2 message disappears, because this value changes depending on the rotation of the pedals. For example, like this in my case:

View attachment 371512

I think I've got the mechanics figured out as far as creating the configuration and using the JFlash to flash the configurations now. Getting a lot of practice, with the trial and error tweaking the offset. However, I've increased it incrementally up to the max allowed and the error still persists.
I expect that when using EKD01, you can't display the ADC torque offset (no weight). I would have to as mbrusa to find a way to display on EKD01.
When you do not get access to ADC torque values, the first point would be to check that you controller is still OK.
One easy way to do it is to upload the original firmware (or one of the 2 versions avalable on facebook).
If the motor runs with the original firmware, the controller is still OK. If not, it could be that one component that drive the torque sensor is damage. This can occurs when the controller is powered simultaneously by the battery AND by the J_Link (via the PC).
When torque driver is damaged, the ADC values provided by the torque sensor are very low (much less than 100).
OSF gives the err2 (on EKD01) when the value returned by torque sensor is out of range during the first 3 sec after a power on. During those 3 sec you have to avoid pressing on the pedal. To avoid Err2, the torque sensor must provide a value that is:
- greater than the offset your specify in javaconfigurator minus 60
- lower than the offset your specify in javaconfigurator.

Usually for TSDZ8 the ADC torque offset (no load) is between 150 and 200.

As EKD01 does not display the ADC torque value (I think) , you have to use another way to find it.
You can
- try with another display (like VLCD5)
- use ucprobe: This is a program that allows to display all internal data in the microprocessor. Still to use it without damaging the controller, you have to take care that your Jlink does not provide power to the controller. The controller must be powered ONLY by the battery. I can explain further how to use ucprobe if you want.
 
Hello, has anyone tested all three versions and has any information about them?
Which settings work well?
You can start trying the settings given by katan1234. Still ADC torque Offset (no weight) has to be based on the value provided by your motor. The value seems to differ between 150 and 200 motor by motor.
For version V20, look at the ADC torque value with no weight for different positions of the pedal and take the max +10
For the other, take the mid value +10.

Adjust also the assistance level to your preferences
 
Error30 is not provided by OSF. I presume it is a code generated by the display itself. Perhaps it is explained in the manual of the display.
error 30 on ekd always appears after uploading hex, most often disappears after switching on and off again, it can also happen that it disappears after uploading 2 hex generated from java cfg. Sometimes it also happened that it was necessary to generate new hex with other settings (it is also important to have the latest version of java configurator) because some caused such an error. You also have to pay attention whether in the first table the version tsdz8 is selected and not tsdz2 because then it definitely will not work.
 
... I've increased it incrementally up to the max allowed and the error still persists.
You need to find a suitable value from a certain range.
For me, this correct value was 195.
It does not mean that all higher values will be usable
Today I tried what you probably do:
for Pedal torque ADC offset (no weight) I used a much higher value of 250, error Err2.
Then I used a lower value of 165, error Err2.
Then I used my correct value of 195 again, no error.

So it is possible that you had originally set a higher value.
For problems with running .jar files, install the jarfix tool.

P.S.:
For orientation, if you have set a higher value, it is possible to start the system by pressing the pedal with appropriate force. Turn it off again, try again with a different force on the pedal until Err2 disappears.
 
Last edited:
Error30 is not provided by OSF. I presume it is a code generated by the display itself. Perhaps it is explained in the manual of the display.
as far as i remember err30 is showing up when the display does not receive uart packages within a certain timeout.
so basically when the communication between display and motor is corrupted for whatever reason.
 
I expect that when using EKD01, you can't display the ADC torque offset (no weight). I would have to as mbrusa to find a way to display on EKD01.
When you do not get access to ADC torque values, the first point would be to check that you controller is still OK.
One easy way to do it is to upload the original firmware (or one of the 2 versions avalable on facebook).
If the motor runs with the original firmware, the controller is still OK. If not, it could be that one component that drive the torque sensor is damage. This can occurs when the controller is powered simultaneously by the battery AND by the J_Link (via the PC).
When torque driver is damaged, the ADC values provided by the torque sensor are very low (much less than 100).
OSF gives the err2 (on EKD01) when the value returned by torque sensor is out of range during the first 3 sec after a power on. During those 3 sec you have to avoid pressing on the pedal. To avoid Err2, the torque sensor must provide a value that is:
- greater than the offset your specify in javaconfigurator minus 60
- lower than the offset your specify in javaconfigurator.

Usually for TSDZ8 the ADC torque offset (no load) is between 150 and 200.

As EKD01 does not display the ADC torque value (I think) , you have to use another way to find it.
You can
- try with another display (like VLCD5)
- use ucprobe: This is a program that allows to display all internal data in the microprocessor. Still to use it without damaging the controller, you have to take care that your Jlink does not provide power to the controller. The controller must be powered ONLY by the battery. I can explain further how to use ucprobe if you want.
Removing the battery was probably why I needed to take a break after about 30 attempts. I loaded up the Facebook firmware and went for a 20 mile ride afterwards. I may have a flaky torque sensor. I had an issue right at the beginning of my ride on a short 18% hill, riding throttle only, pulling 1344W, and the ERR2 popped up. I cycled the display and didn’t have any issues after that. I went out again later and no issues. Only happened once in around 250 miles on the motor. With the stock firmware, the same short hill took a bunch of pedaling effort, so the FB stuff made a pretty big improvement while testing the motor on the hills, and the motor case is lukewarm after torturing it for a good while. (I think I’ll add a temp sensor before I ever get the OSF working lol).
The facebooks stuff works pretty well. I have a friend that bought the Tsdz8 and my neighbor is thinking about one, so I’ll let them use the hardware so at least it gets used, if not for the OSF, for loading the FB stuff. Having fun riding now, so I’ll pick the OSF tinkering back up at some point after I fix/rebuild my other bike. Thanks for all of the help. At least I have a bike that works better than before now,
 
You need to find a suitable value from a certain range.
For me, this correct value was 195.
It does not mean that all higher values will be usable
Today I tried what you probably do:
for Pedal torque ADC offset (no weight) I used a much higher value of 250, error Err2.
Then I used a lower value of 165, error Err2.
Then I used my correct value of 195 again, no error.

So it is possible that you had originally set a higher value.
For problems with running .jar files, install the jarfix tool.

P.S.:
For orientation, if you have set a higher value, it is possible to start the system by pressing the pedal with appropriate force. Turn it off again, try again with a different force on the pedal until Err2 disappears.
This is probably why I need to take a break and just go in increments of 1 and try every value. Does 194 or 196 result in the error on your motor?
 
... Does 194 or 196 result in the error on your motor?
I haven't tried it like this, but no.
I also have an 860C display and I know the torque sensor range values (they are horizontal in the pedal positions front and back).
My values are from 156 to 190.
Therefore, my value in the javaconfigurator is slightly larger than 190, i.e. 195.
Try steps 10 and 5.
You don't need to install a different configuration file every time. Turn off and try with a different paddle rotation, or slightly load the pedal when turning it on.
 
An other day I tested version 023 (afterwards i noticed that version was not available anymore). When stop pedalling motor start assist automatic. Again start pedaling and motor is working quite normally,

But again when stop pedaling motor start assist automatic. I didn’t any changes to 860C display. Just flashed back version 015 and motor is working fine.

My torque sensor varies from 174 to 180.
 
I haven't tried it like this, but no.
I also have an 860C display and I know the torque sensor range values (they are horizontal in the pedal positions front and back).
My values are from 156 to 190.
Therefore, my value in the javaconfigurator is slightly larger than 190, i.e. 195.
Try steps 10 and 5.
You don't need to install a different configuration file every time. Turn off and try with a different paddle rotation, or slightly load the pedal when turning it on.
Thanks for the tips. I'll try again next week. Do you know if this is a motor issue or a display issue?
 
... Do you know if this is a motor issue or a display issue?
Unless it turns out to be a bug in the firmware, it will be an issue with the user.
Interestingly, the firmware TSZ8_750W_test3.0_20240802.hex does not know this problem, it works well with every engine.
Maybe at the cost of sensitivity.
I feel that with this FB FW you need to pedal harder.
 
Unless it turns out to be a bug in the firmware, it will be an issue with the user.
Interestingly, the firmware TSZ8_750W_test3.0_20240802.hex does not know this problem, it works well with every engine.
Maybe at the cost of sensitivity.
I feel that with this FB FW you need to pedal harder.
I'm happy with it so far. I have an upward (downward?) sloping driveway, so starting uphill, I get assist right away, so no problem starting on an uphill grade. It's definitely less effort than the stock stuff. I feel like tinkering with it again will be a rainy day project.

I'm focusing on getting a really good 14S battery to replace the junk 13S, now that I tried the motor with 14S of lipos. I didn't think this motor had a wheelie in it, but it has a surprising amount of torque when there's no voltage sag. Level 5 before is 3 now, and level 5 now is fairly peppy.

I think if more EKD01 user start testing the firmware, more folks may experience the issue, and things will get sorted out over time, so now I'm in no hurry.
 
I haven't tried it like this, but no.
I also have an 860C display and I know the torque sensor range values (they are horizontal in the pedal positions front and back).
My values are from 156 to 190.
Therefore, my value in the javaconfigurator is slightly larger than 190, i.e. 195.
Try steps 10 and 5.
You don't need to install a different configuration file every time. Turn off and try with a different paddle rotation, or slightly load the pedal when turning it on.
I think EDK01 does not have a menu to display the ADC torque value (on the opposite to VLCD5).
This could be an issue when you try to know the values to enter in javaconfigurator.
Still javaconfigurator allows you to select some more data to be displayed. If you select "6" in one of the display advance settings, you can see the ADC torque value.

This can be usefull for other displays too because e.g. in VLCD5 it is not always easy to access to the TE menu with key combinations.
 
Hi everyone !

I'm totally new on this forum, i find it while searching on OSF. I daily use an eBike with a torque sensor (Shimano E6100).

I'm currently buying parts for my new cargo bike ("Le Petit Porteur" frame) and i don't want a Bafang because i really like the torque sensor feeling on my actual bike.

So TSDZ8 seems the way to go, and all your efforts to improve the firmware are awesome ! I want to participate to test / improve. I'm not developer but works in IT.

I read the previous posts and 3 threads about OSF on TSDZ8, but want a last advise before buying the motor :

What is the best screen to buy ? I was looking for the EKD01, recommended by the seller and cheap, but from what i read it looks like the 860C is more versatile for testing / debug of OSF fw ?

Is this repo the good one for flashing the display and use it with an OSF TSDZ8 ? GitHub - emmebrusa/TSDZ2-Smart-EBike-860C: TSDZ2 Open Source Firmware adapted to 860C display

Thanks for your advises !
 
Back
Top