TSDZ2 mid drive with 860C, 850C or SW102 displays only -- Flexible OpenSource firmware (Casainho code only)

Danielwj said:
Has anyone yet tried to flash on of the
New 2020 versions of Tsdz2. I’m a little worried about ordering without knowing if it will work.

I got the 48v 750W version from ebay two weeks ago and can confirm that everything worked as it should. yes, i could not wait to void my warrenty :eek:

While installing the firmware on the motor, i had some struggles because my stlinkv2 could not talk to the motor. i got the white plastic one with blue ST logo. I have checked the wiki multiple times and watched the install youtube video, but no way. It turned out that i had to connect and power the display/motor for the flashing to work (found the hint here on the forums), only attaching the USB and powering the motor did nothing. maybe my stlink is kind of broken? i have measured between 0,2 and 3V AC 50hz between pin 1 and 3 (+5V / GND) on the stlink :shock:

another thing i notices that the street mode is not working in 0.8, it does not limit the speed or the watts (can ride 35km/h and can see 500 Watts going through). Assistance is enabled and displayed in orange, all other values are default. is this a known problem?

Thank you.
 
New firmware: TSDZ2 cadence increase from 90 to 120 RPM as also motor power "amplification" on this same high cadence

You guys get ready for the most advanced and powerful TSDZ2 firmware!!

The big new feature on this version 1.0.0 is the "amplification" of cadence and motor power in the range from 80 to 120RPM!! previous, the motor power would start to decrease at around cadence 80 and be zero at 90, meaning no motor assistance at all over cadence 90RPM. Now, you will get assistance all way up to cadence 120RPM.
Note that this considers a battery with the same voltage as the motor, like a 36V battery with a 36V motor or 48V battery with 48V motor. Even in the cases of using a 48V battery with 36V motor, the cadence is still increased up to 120RPM with most possible optimized efficiency.

This is the first time I made the version as 1.0.0 because all major features about TSDZ2 motor control are now implemented like FOC and Field Weakening. Also on the display side, I don't plan any new big changes.
There certainly features that can be added in future versions like 1.1.0 and polish the current ones, and I plan to do that.

Changelog from previous stable release v0.8.0:
- increase motor assistance as also pedal cadence up to 120RPM (previous limit was around 85RPM) and for this was need to:
-- UART communications frequency is increased twice to save the processing time needed to implement following points
-- increased PWM frequency from 15.6kHz to 19 kHz
-- implement Field Weakening
-- configuration to enable/disable Field Weakening as it brings a loss of efficiency at high cadence value over 90RPM, possible a loss of 25%
- added coast brake ADC sensitivity configuration: the TSDZ2 coast brake version should now fully work on this firmware version
- added configuration for cadence fast stop mode, which is enabled by default. Enable for regular bicycles and disable for some full suspension bicycles
- ebike control loop now runs at twice the frequency in the hope to make system a bit more responsive (tested by vshitikov)
- added Wh/km variable to be shown on custom fields and also on the graph

Download and follow the full instructions here: https://github.com/OpenSource-EBike-firmware/Color_LCD/releases/tag/860C_850C_SW102_v1.0.0-alpha.1
 
casainho said:
You guys get ready for the most advanced and powerful TSDZ2 firmware!!

Of course! I have tested it now - works like there was never a 90rpm limit! :flame:
Great Job!
 
Any option to have torque mode only in this release? I will try 1.0.0 when I build up my bike with gears (alfine 8 gear) but I still run the torque mode only fork on my single speed because it seems to give better Performance at low pedal rpm.
 
Casainho, was there a chance to fix the throttle bug? In 0.8 the bug was introduced, then it was purported to be fixed but it was still broken when i tested it. Im very eager to give all the new developments a try but lack of the throttle is a deal breaker. Open issue for the throttle bug - https://github.com/OpenSource-EBike-firmware/Color_LCD/issues/92. Thank you.

edit: if it will be of any help, i can offer to test it before releasing.
 
casainho said:
New firmware: TSDZ2 cadence increase from 90 to 120 RPM as also motor power "amplification" on this same high cadence

You guys get ready for the most advanced and powerful TSDZ2 firmware!!

- added coast brake ADC sensitivity configuration: the TSDZ2 coast brake version should now fully work on this firmware version

I'm very excited to try this next week, I am waiting a week just to see if there are any bugs before I install on my handcycle.

https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/Features-and-configurations-on-display

Reading the wiki I can't find where the adjustment is for the ADC?
Is it Min current ADC step?
 
Hi everyone,

I'm having a problem with the 850C display and TSDZ2 combo.
I've flashed the motor with firmware 0.51.0 and the display with 0.6.2
However when i power up the display seems stuck on a loading page saying 'keep pedals free and wait'
do i need to ride the bike for a bit to get it working?

Thanks,
Chris

see image of display here:
j11yDSC8tQ4j7G4J9

https://photos.app.goo.gl/j11yDSC8tQ4j7G4J9
 
Hello development team,
I have installed the current firmware version 1.0.0.

My components are:
TSDZ2 48V
battery: 14s
Display: Bafang 850C

I have the problem that the motor starts very late when starting pedaling. I have to pedal almost for some second, then the motor starts. The human power on the display is ca. 180W, but the motor power stays at 0 for a long time.
I have this problem when I start on a flat surface or when I'm going uphill. A start on the mountain is so almost impossible

The 2nd problem is when I'm starting uphill the motor with low gear ratio supports a few seconds but then switches off. The display stays on. If I keep pedalling, the motor starts again.
The cadence is ca. max 80.

What can be the reason for this behavior? Can I change any parameters?

I had the same behaviour with the previous version.

Thanks a lot!
 
OttawaEbiker said:
Hi everyone,

I'm having a problem with the 850C display and TSDZ2 combo.
I've flashed the motor with firmware 0.51.0 and the display with 0.6.2
However when i power up the display seems stuck on a loading page saying 'keep pedals free and wait'
do i need to ride the bike for a bit to get it working?

Thanks,
Chris

see image of display here:
j11yDSC8tQ4j7G4J9

https://photos.app.goo.gl/j11yDSC8tQ4j7G4J9

Have you double checked you have right firmwares? If you have example on display 0.6.2 and motor v0.50.0 display stucks.
 
Hi dameri,

Thanks for the response, appreciate it.
Yes I've checked that it's firmware 0.51.0, but I did find that file from someone's google drive as I was unable to find it in the official firmware archive. Maybe I have a bad copy? I am using the 48V version of TSDZ2, is the firmware specific to voltage?

There were no errors reading/writing the file using the ST Visual Programmer though.

Also note that the bike is on a stand, so no weight at all on the pedals, is that important?

Thanks,
Chris
 
another piece of info... the display is showing (at the bottom) this message:

Waiting TSDZ2 - (51.1v)

Is 51.1V a normal reading for a 48V system?
 
solved it!

I must have made a wrong move with program memory tab and data memory tab in the programmer, i download the stock firmware, rewrote all the tabs then reapplied the 0.51.0 OSF and the display boots normally.

yaye!
 
casainho said:
gatorsean said:
Hi casainho. I flashed the sw102-otaupdate-0.9.0.zip and the TSDZ2-v0.58.0.hex and get this error. Can you tell me which motor firmware to use as this is what was posted together on Github for the Beta.
I tough it would work. I will focus on next version and test that on my side.


I tried the new 1.0.0 alpha version today with SW102 and I still seem to have the same problem getting the e: brakes error. I notice that the DFU update seems to go fine and it says application loads successfully, however, when I turn on the display it says version 0.8.0. Is the correct version being uploaded to the release assets? I have no indication of a firmware upload failure and the nrfConnect logs look fine.

Any idea why sw102 cannot boot in the past couple of weeks with the updates?
 
gatorsean said:
casainho said:
gatorsean said:
Hi casainho. I flashed the sw102-otaupdate-0.9.0.zip and the TSDZ2-v0.58.0.hex and get this error. Can you tell me which motor firmware to use as this is what was posted together on Github for the Beta.
I tough it would work. I will focus on next version and test that on my side.


I tried the new 1.0.0 alpha version today with SW102 and I still seem to have the same problem getting the e: brakes error. I notice that the DFU update seems to go fine and it says application loads successfully, however, when I turn on the display it says version 0.8.0. Is the correct version being uploaded to the release assets? I have no indication of a firmware upload failure and the nrfConnect logs look fine.

Any idea why sw102 cannot boot in the past couple of weeks with the updates?

As you can see in the firmware folder, the last change to the SW102 folder has been made 20 days ago (when version 0.8.0 has been released): https://github.com/OpenSource-EBike-firmware/Color_LCD/tree/master/firmware
The stated error is due to the lack of communications between the new motor firmware and the incompatible display software.
As the communication frequency has been changed since, the latest motor firmware you can use currently with the SW102 is 0.57.0.
 
Martin555 said:
gatorsean said:
casainho said:
gatorsean said:
Hi casainho. I flashed the sw102-otaupdate-0.9.0.zip and the TSDZ2-v0.58.0.hex and get this error. Can you tell me which motor firmware to use as this is what was posted together on Github for the Beta.
I tough it would work. I will focus on next version and test that on my side.


I tried the new 1.0.0 alpha version today with SW102 and I still seem to have the same problem getting the e: brakes error. I notice that the DFU update seems to go fine and it says application loads successfully, however, when I turn on the display it says version 0.8.0. Is the correct version being uploaded to the release assets? I have no indication of a firmware upload failure and the nrfConnect logs look fine.

Any idea why sw102 cannot boot in the past couple of weeks with the updates?

As you can see in the firmware folder, the last change to the SW102 folder has been made 20 days ago (when version 0.8.0 has been released): https://github.com/OpenSource-EBike-firmware/Color_LCD/tree/master/firmware
The stated error is due to the lack of communications between the new motor firmware and the incompatible display software.
As the communication frequency has been changed since, the latest motor firmware you can use currently with the SW102 is 0.57.0.

From the github link you posted, I see updates in the common folder as recent as 22 hours ago...

The release says SW102 in the title and include a SW102 update file.

The description says "This version was developed for displays 860C, 850C and SW102 and for the TSDZ2 motor controller running the firmware v1.0.0-alpha.1 (TSDZ2-v1.0.0-alpha.1.hex) -- see below attached files."
 
gatorsean said:
Martin555 said:
gatorsean said:
casainho said:
I tough it would work. I will focus on next version and test that on my side.


I tried the new 1.0.0 alpha version today with SW102 and I still seem to have the same problem getting the e: brakes error. I notice that the DFU update seems to go fine and it says application loads successfully, however, when I turn on the display it says version 0.8.0. Is the correct version being uploaded to the release assets? I have no indication of a firmware upload failure and the nrfConnect logs look fine.

Any idea why sw102 cannot boot in the past couple of weeks with the updates?

As you can see in the firmware folder, the last change to the SW102 folder has been made 20 days ago (when version 0.8.0 has been released): https://github.com/OpenSource-EBike-firmware/Color_LCD/tree/master/firmware
The stated error is due to the lack of communications between the new motor firmware and the incompatible display software.
As the communication frequency has been changed since, the latest motor firmware you can use currently with the SW102 is 0.57.0.

From the github link you posted, I see updates in the common folder as recent as 22 hours ago...

The release says SW102 in the title and include a SW102 update file.

The description says "This version was developed for displays 860C, 850C and SW102 and for the TSDZ2 motor controller running the firmware v1.0.0-alpha.1 (TSDZ2-v1.0.0-alpha.1.hex) -- see below attached files."

I ran into the same problem, but the cause is just that casainho has only adopted the changes of the beta and alpha versions for the 850C/860C display, presumably as he is using one of those displays actively. I assume he will update the SW102 firmware as soon, as he releases a stable version (currently those are only for testing purposes).

I was also confused by the description of the release and also by the presence of sw102-otaupdate-1.0.0-alpha.1.zip, but if you take a look into one of his release scripts (see the link I've sent), you will find the following lines:
Code:
cd SW102
make -f Makefile clean
make -f Makefile generate_dfu_package VERSION=$VERSION
cp _release/sw102-otaupdate-xxx.zip $RELEASE_FOLDER/sw102-otaupdate-$VERSION.zip
So despite the files in folder SW102 haven't been changed, this compiled and created the file sw102-otaupdate-1.0.0-alpha.1.zip :wink:
 
Martin555 said:
I ran into the same problem, but the cause is just that casainho has only adopted the changes of the beta and alpha versions for the 850C/860C display, presumably as he is using one of those displays actively. I assume he will update the SW102 firmware as soon, as he releases a stable version (currently those are only for testing purposes).

I was also confused by the description of the release and also by the presence of sw102-otaupdate-1.0.0-alpha.1.zip, but if you take a look into one of his release scripts (see the link I've sent), you will find the following lines:
Code:
cd SW102
make -f Makefile clean
make -f Makefile generate_dfu_package VERSION=$VERSION
cp _release/sw102-otaupdate-xxx.zip $RELEASE_FOLDER/sw102-otaupdate-$VERSION.zip
So despite the files in folder SW102 haven't been changed, this compiled and created the file sw102-otaupdate-1.0.0-alpha.1.zip :wink:
Yesterday, we wanted to go ride and to not take more time from my family, I did not test on the SW102 and I don't know why it is failing... It should not. I just tested and I have the same issue. I will try to figure out tomorrow.

So, nice day yesterday in family and I used the version 1.0.0-alpha.1 on my bicycle, everything went well as expected:




 
Bad luck your son's tire puncture.

I had the 860C in use for the first time today. It is much better than the 850C. It is more adjustable, it’s style is modern and is better in the sun.
 
OttawaEbiker said:
Hi dameri,

Thanks for the response, appreciate it.
Yes I've checked that it's firmware 0.51.0, but I did find that file from someone's google drive as I was unable to find it in the official firmware archive. Maybe I have a bad copy? I am using the 48V version of TSDZ2, is the firmware specific to voltage?

There were no errors reading/writing the file using the ST Visual Programmer though.

Also note that the bike is on a stand, so no weight at all on the pedals, is that important?

Thanks,
Chris

You are wellcome.

When you start to install new firmware on the TSDZ2, you should always first clear the previous version. After connecting the st-link to your computer and opening the st visual programmer program, you should first press the program all tabs button to remove the previous firmware and then install the new version.
 
I found the issue with the build script, it was not cleaning old version on the local disk and build a new one. I updated the release with the new file but I was not able to test on SW102, can you guys see if it works?
 
dameri said:
Bad luck your son's tire puncture.

I had the 860C in use for the first time today. It is much better than the 850C. It is more adjustable, it’s style is modern and is better in the sun.

I'm grateful that casainho chose too support the 860C, it is much better than the 850C and I will be trying it in about a week or so.
 
jeff.page.rides said:
dameri said:
I had the 860C in use for the first time today. It is much better than the 850C. It is more adjustable, it’s style is modern and is better in the sun.
I'm grateful that casainho chose too support the 860C, it is much better than the 850C and I will be trying it in about a week or so.
After being using 850C, SW102 and 860C, clearly 860C is the winner because it has very good display quality, design and is the easiest to install our firmware. That is why I recommend it for the new users of our firmware.

I know SW102 could be easier to install and is smaller and the cheapest, but, none knows yet, if possible, how to install the firmware the first time without open it and solder wires.
Kevin did a good job (also on structuring the display firmware to hold the custom data fields) although was not possible to get it working... And Kevin seems to be busy with another OpenSource project about outdoors sports :)

An opensource hiking, pilot, skiing, Signal-App-extending GPS mesh communicator -- see here: https://www.meshtastic.org/
 
casainho said:
I found the issue with the build script, it was not cleaning old version on the local disk and build a new one. I updated the release with the new file but I was not able to test on SW102, can you guys see if it works?

Hello! Today I tried the new SW102 update file and it did update the display FW to 1.0.0. However, the problem remains and there is still no communication to the controller and the error is e: Brakes.
 

Attachments

  • 20200426_140147.jpg
    20200426_140147.jpg
    44.8 KB · Views: 1,162
Back
Top