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

I have the latest OSF installed.

Just installed some integrated lighting (head and tail light). Now, when I activate the lights (holding down the +), the motor rarely engages. Sometimes it randomly will, but usually not. Any ideas what's going on?
 
CatfishMan said:
I have the latest OSF installed.

Just installed some integrated lighting (head and tail light). Now, when I activate the lights (holding down the +), the motor rarely engages. Sometimes it randomly will, but usually not. Any ideas what's going on?

See few pages backwards. No fix yet...
 
To anyone who has SW102 and firmware v1.0.0
Does your lights turn on?

* checked with 2 controllers
* checked cables

And still wondering what's wrong :roll:
Please help :cry:
 
dameri said:
jtsavola said:
CatfishMan said:
I have the latest OSF installed.

Just installed some integrated lighting (head and tail light). Now, when I activate the lights (holding down the +), the motor rarely engages. Sometimes it randomly will, but usually not. Any ideas what's going on?

See few pages backwards. No fix yet...

Have you tried this? https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/issues/139#issuecomment-678766584

Unfortunately my skills are very limited. I can follow step by step guide but that's it 😃
 
I was experimenting with the start up boost feature. I usual have the torque sensor "Assist w/o pedal rotation" enabled so I get immediate assist. Enabling the boost feature seems to deactivate it and I am back to pedaling alittle before assist kicks in. No difference if the boost setting is on startup or alwsys. Bummer.
 
lasercat said:
To anyone who has SW102 and firmware v1.0.0
Does your lights turn on?

* checked with 2 controllers
* checked cables

And still wondering what's wrong :roll:
Please help :cry:

I am using the lights from the tsdz2 set with v1 and SW102 and work perfectly
 
Swannking said:
I was experimenting with the start up boost feature. I usual have the torque sensor "Assist w/o pedal rotation" enabled so I get immediate assist. Enabling the boost feature seems to deactivate it and I am back to pedaling alittle before assist kicks in. No difference if the boost setting is on startup or alwsys. Bummer.
Startup boost logic seems to be reversed, set it to disabled then it should work and take into account the duration and fade values.
 
jtsavola said:
dameri said:
jtsavola said:
CatfishMan said:
I have the latest OSF installed.

Just installed some integrated lighting (head and tail light). Now, when I activate the lights (holding down the +), the motor rarely engages. Sometimes it randomly will, but usually not. Any ideas what's going on?

See few pages backwards. No fix yet...

Have you tried this? https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/issues/139#issuecomment-678766584

Unfortunately my skills are very limited. I can follow step by step guide but that's it 😃

Here is a very good guide https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/Development (I think that is step by step :D). It has quite a lot to do when you have to install many programs. The help was originally made for OSX, but should also work on Linux and Windows. Personally, I use Linux and I managed quite easily even though I have no experience with programming.

I try next week if I manage with Windows at work if I have spare time.

I will get a new light https://herrmans.eu/products/front-lights-4147/e-bike-10035/h-black-pro-e/hopefully next week and there may be a problem with the engine.

Then I can to test if the new hex file which I made works with TSDZ2.

I have now lights which came with the TSDZ2. The head light is very poor and tail light stop working at all. I think there is problem with internal connections. TSDZ2 works with these lights with no problem.
 
TSDZ2 torque sensor human power accuracy

I was always interested in measured TSDZ2 pedal power / torque sensor accuracy. I do not have a pedal power meter for comparison but recently I bought the Stryd running power meter and I did a comparison between between both this values.

When I ride my EBike I feel good when pedaling giving about 300W of my human power and I always see my heart rate on my watch on or the bicycle GPS display - I know very well what are the usual values of my heart rate for that 300W of my pedal human power.

While running with the power meter, I saw that 300W was for about the same heart rate of 250W measured by the TSDZ2 torque sensor. Although the Stryd is known on the community as the best running power meter, it is not possible to validate the values it provides. Also, running is very different than cycling. I can't say TSDZ2 pedal power / torque sensor accuracy is good or not but I was very surprised positively and I am very happy with it!!

Note that this tests were done with firmware V1.0.0 and with TSDZ2 calibrated torque sensor.

The graph of run power and heart rate:
image.png


In future, on the wireless TSDZ2 Ebike standard, the TSDZ2 pedal human power will also be sent to the watch or GPS display and will be recorded the same way as on that graph.

I am interested on knowing the power I provide pedaling because I have days where I cycle and run and I would like to know the power / fitness level I can provide on this sport activities.
 
dear Casainho :mrgreen: ...I MADE IT!!! thank you! successfully flashed the 850C and the motor .
I solved the problem connecting to the lcd by building a boot loader myself! everything is good!
MY QUESTION :?:
A si said I come from the java graphic configurator porting of the Opensource firmware and I'm setting now the parameters directly from 850C lcd (thanx to Casainho!)....BUT some parameters I cannot find...for example this was my configuration (52v battery):

Schermata 2020-08-10 alle 16.12.33.png

is there a "parallelism guide" to match settings from that firmware to this, so the motor will response as I already experimented on the configurator?

THANX!!!

casainho said:
electroriderIT said:
a little update after some tests.
- with display connected to tsdz2 the display powers on, no problem.
- nothing has changed the way the software does not recognize the programmer.

-I checked all 5 wires soldered on the display and they seem to be ok. I also desoldered GND cable from display and checked all other 4 pins with the multimeter to find some problems. the other 4 pins with cables soldered are NOT shortened each other..should be good that way.... When I solder back the GND cable if I test GND with other pins, some are in continuity , but also that should be good due to the connections of the display board (right?)

- so everything "connection side" seems fine but I get these errors ( depending on the combination that I use to workaround , in the software jtag, swd, hard reset etc..al the options in stm32 st link software)
Schermata 2020-08-31 alle 13.06.41.png
Schermata 2020-08-31 alle 13.06.17.png
- A curious detail: downloaded the firmware st link update software and it recognize and updates the firmware...BUT then in the stm32 st link software NOTHING!
Schermata 2020-08-31 alle 13.05.41.png
Schermata 2020-08-31 alle 18.48.49.png
Is possible your display is not working anymore, it could be damaged for some reason in the process, this kind of things happen.
 
Hi,

Since Casainho is talking about Human Power, here is a Video that I made and that I intended to share with the Forum later.

The objective is to compare the values of the Firmware fields.

I tried to be as long as possible with PWM = 100 (maximum)

The bike has pedals with a Power and Cadence sensor.
Power is taken from both pedals. They are the Assioma Favero DUO.

The battery has a BMS with bluetooth interface.

GPS is the Garmin 1030

TSDZ2 with Casainho V 1.0.0 Firmware.
With the torque sensor calibration.
With Thermal Pad and Temperature sensor.

Due to communication delays, the human power and cadence values appear delayed in Garmin in relation to the values that appear on the TSDZ2 Display.

The same happens with the battery current on the smartphone.

In conclusion, the Video shows that the values presented by TSDZ2 / Casainho_Firmware are quite accurate.


[youtube]EOEXupuQgUE[/youtube]
 
HughF said:
Swannking said:
I was experimenting with the start up boost feature. I usual have the torque sensor "Assist w/o pedal rotation" enabled so I get immediate assist. Enabling the boost feature seems to deactivate it and I am back to pedaling alittle before assist kicks in. No difference if the boost setting is on startup or alwsys. Bummer.
Startup boost logic seems to be reversed, set it to disabled then it should work and take into account the duration and fade values.

I tried to run more test. I have the boost function disabled all along. I reset the multipler for level 1 under the boost menu to a equivalent of level 8. If it is true about the logic reversal, with the boost function disabled,
it should give me a boost level equal to level 8 while I am running level 1 assist. Not so.
 
casainho said:
TSDZ2 torque sensor human power accuracy

I was always interested in measured TSDZ2 pedal power / torque sensor accuracy. I do not have a pedal power meter for comparison but recently I bought the Stryd running power meter and I did a comparison between between both this values.

When I ride my EBike I feel good when pedaling giving about 300W of my human power and I always see my heart rate on my watch on or the bicycle GPS display - I know very well what are the usual values of my heart rate for that 300W of my pedal human power.

While running with the power meter, I saw that 300W was for about the same heart rate of 250W measured by the TSDZ2 torque sensor. Although the Stryd is known on the community as the best running power meter, it is not possible to validate the values it provides. Also, running is very different than cycling. I can't say TSDZ2 pedal power / torque sensor accuracy is good or not but I was very surprised positively and I am very happy with it!!

Note that this tests were done with firmware V1.0.0 and with TSDZ2 calibrated torque sensor.

The graph of run power and heart rate:
image.png


In future, on the wireless TSDZ2 Ebike standard, the TSDZ2 pedal human power will also be sent to the watch or GPS display and will be recorded the same way as on that graph.

I am interested on knowing the power I provide pedaling because I have days where I cycle and run and I would like to know the power / fitness level I can provide on this sport activities.

Hi Casainho, if you deliver 300w continuously then you might not need an ebike!
 
Finally got some project time, remade my motor cable and now running v1.0 on a 860c.

Kudos to casainho ... A huge amount of work that all of the community appreciate.

Some comments that others may have ideas or opinions on.

Torque mode ... Not sure it is working for me. The power application seems very similar / the same to power mode. Eg.when I am starting off I have a lot of weight on the pedals, ie lots of torque, but the motor only gives a small amount of power / torque when compared to torque mode on V0.20

Can't say I noticed a big difference in overrun between v0.20 and V1.0

Other than the light issue, seems very solid. Cheers!
 
vshitikov said:
Hi Casainho, if you deliver 300w continuously then you might not need an ebike!
For me my EBike is a way of transportation and sometimes I need to go very fast and without sweating as possible. Also, since I do other sports, EBike is very nice for active recovery / low intensity and long workouts, like saving my legs after a run of 2 hours. EBike is a good complement to my life :)

Like this weekend, where I went to beach and return with it but I did run and swim on the ocean. Note that I give 300W when I am not tired and the motor gives 600W, so, I get a big boost from using the motor, makes a big difference, like I go and return from beach in at least half of the time I would do alone:
cycling-running-swimming.jpg
 
Regarding my previous doubts.....
Here in the picture the parameters that I would like to put in relations from mbrusa release and fantastic Casainho one :mrgreen: ...

Can you help me understand precisely what they correspond on Casainho firmware? I'm uncertain ... :roll:

foto1.jpg

ALSO:

  • "Current Ramp" on Casainho how relates on that?


  • HOW MANY assist levels do you use? I feel that 20 are too many for me.... I'm more use to 4 to 9 but I can get used to them :mrgreen: ...ANYWAY if I set the assist levels to 5.....should I also change the scale or it sets automatically with the new levels numbers?
for example if in 20 levels I have 100% of power on the 20th level, I I put 5..will I have 100% on the fifth ? I hope that makes sense


:mrgreen:


Thank you for helping!



electroriderIT said:
dear Casainho :mrgreen: ...I MADE IT!!! thank you! successfully flashed the 850C and the motor .
I solved the problem connecting to the lcd by building a boot loader myself! everything is good!
MY QUESTION :?:
A si said I come from the java graphic configurator porting of the Opensource firmware and I'm setting now the parameters directly from 850C lcd (thanx to Casainho!)....BUT some parameters I cannot find...for example this was my configuration (52v battery):

Schermata 2020-08-10 alle 16.12.33.png

is there a "parallelism guide" to match settings from that firmware to this, so the motor will response as I already experimented on the configurator?

THANX!!!

casainho said:
electroriderIT said:
a little update after some tests.
- with display connected to tsdz2 the display powers on, no problem.
- nothing has changed the way the software does not recognize the programmer.

-I checked all 5 wires soldered on the display and they seem to be ok. I also desoldered GND cable from display and checked all other 4 pins with the multimeter to find some problems. the other 4 pins with cables soldered are NOT shortened each other..should be good that way.... When I solder back the GND cable if I test GND with other pins, some are in continuity , but also that should be good due to the connections of the display board (right?)

- so everything "connection side" seems fine but I get these errors ( depending on the combination that I use to workaround , in the software jtag, swd, hard reset etc..al the options in stm32 st link software)
Schermata 2020-08-31 alle 13.06.41.png
Schermata 2020-08-31 alle 13.06.17.png
- A curious detail: downloaded the firmware st link update software and it recognize and updates the firmware...BUT then in the stm32 st link software NOTHING!
Schermata 2020-08-31 alle 13.05.41.png
Schermata 2020-08-31 alle 18.48.49.png
Is possible your display is not working anymore, it could be damaged for some reason in the process, this kind of things happen.
 
Could someone be so kind as to point me to the link to the firmware files to flash onto sw102 and my new motor? I've looked all around on Github and I must be missing something because I cannot find the latest files...

EDIT: It is here: https://github.com/OpenSource-EBike-firmware/Color_LCD/releases/tag/860C_850C_SW102_v1.0.0

2ND EDIT: Can't find the initial bootloader to flash onto the SW102 with an STLink...
 
HughF said:
Could someone be so kind as to point me to the link to the firmware files to flash onto sw102 and my new motor? I've looked all around on Github and I must be missing something because I cannot find the latest files...

EDIT: It is here: https://github.com/OpenSource-EBike-firmware/Color_LCD/releases/tag/860C_850C_SW102_v1.0.0

2ND EDIT: Can't find the initial bootloader to flash onto the SW102 with an STLink...

https://github.com/OpenSource-EBike...he-bootloader-and-firmware-on-SW102-using-SWD
 
cityboy19 said:
HughF said:
Could someone be so kind as to point me to the link to the firmware files to flash onto sw102 and my new motor? I've looked all around on Github and I must be missing something because I cannot find the latest files...

EDIT: It is here: https://github.com/OpenSource-EBike-firmware/Color_LCD/releases/tag/860C_850C_SW102_v1.0.0

2ND EDIT: Can't find the initial bootloader to flash onto the SW102 with an STLink...

https://github.com/OpenSource-EBike...he-bootloader-and-firmware-on-SW102-using-SWD
Actually, the link to find the bootloader from the programming page takes you round and round in circles, the file you need is "sw102-full-0.19.11.hex" (version number may vary, but that is the latest I found) from the following repo:

https://github.com/OpenSource-EBike-firmware/SW102_LCD_Bluetooth/releases/tag/0.19.11

That hex file can be flashed using the instructions as per the Wiki, then the latest sw102-otaupdate-1.0.0 can be uploaded using nRFConnect or nRFToolbox (I use the latter).

Hope that helps...
 
Hi all,

Just getting the build env up on Windows ...

I'm guessing I am missing some library's ... I followed the dev environment setup guide, but it is not clear to me how the sdcc libraries are included. Could this be related to the error below in bold

d:/dev/gnu arm embedded toolchain/9 2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld.exe: startup_stm32f10x_md.o: in function `LoopFillZerobss':
(.text.Reset_Handler+0x26): undefined reference to `SystemInit'
d:/dev/gnu arm embedded toolchain/9 2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../arm-none-eabi/bin/ld.exe: (.text.Reset_Handler+0x2a): undefined reference to `main'
collect2.exe: error: ld returned 1 exit status
 
Hello Guys, I am a bit lost.

I have been successfully using 1.0.0 ever since it was released and all of a sudden i am getting an "error brakes" message at startup.

What is the most likely explanation?

I can only say 2 things:

1)I have a break sensor that worked fine so far. After this message i have disconnected the cable but the error message persists.

2) On sunday, when the error message occured for the first time, the situation was the following:

I had ridden the bike successfully for 20 minutes, then parked it, and had a coffee nearby with friends. I then went back to the bike in order to get some stuff and at this occasion i wanted to bring it closer to where i was actually sitting with them. So I biked the 100 meters without turning anything on, and parked it by the coffee place. When i then wanted to start it again, i got this message, and i am getting it ever since.

I have disconnected the display cable and reconnected it, i have disconnected the motor and reconnected it...nothing makes a change...

any ideas? many thanks in advance, Andy.
 
andyme said:
Hello Guys, I am a bit lost.

I have been successfully using 1.0.0 ever since it was released and all of a sudden i am getting an "error brakes" message at startup.

What is the most likely explanation?

I can only say 2 things:

1)I have a break sensor that worked fine so far. After this message i have disconnected the cable but the error message persists.

2) On sunday, when the error message occured for the first time, the situation was the following:

I had ridden the bike successfully for 20 minutes, then parked it, and had a coffee nearby with friends. I then went back to the bike in order to get some stuff and at this occasion i wanted to bring it closer to where i was actually sitting with them. So I biked the 100 meters without turning anything on, and parked it by the coffee place. When i then wanted to start it again, i got this message, and i am getting it ever since.

I have disconnected the display cable and reconnected it, i have disconnected the motor and reconnected it...nothing makes a change...

any ideas? many thanks in advance, Andy.

Hi Andy,

I have experienced similar situation in the past but with a different error message. I do not remember well but something like COMMS failure. No any disconnection, even of the battery would clear it.
For me the magic that works is the following. Switch off the system using the power button of the display. After that turn it back on, wait to boot and show the standard screen with the widgets and the error at the bottom. Then change the assist level only and turn it off and on again. Et voilà, the problem is solved.

Your error message however is different. On which screen you see it? One the first boot one or on the one that comes after. How long you wait to get it? Immediately or after a period of time? In case it appears on the first boot screen after a delay, this means you have no communication with the displays. Could be problem with a connector, cable or the display itself.

I reported back than my findings to Casainho. For me the problem started to appear less often with the latest software releases. However it was never completely resolved. I can still reproduce it and the only way to clear it remains the one described above.

Last Sunday I realized also that I am in the group that can not use their motor together with the bike’s lights, when directly connected to the motor controller.

I remember also Casainho mentioning some bug fixes introduced after the 1.0 release. However no further information nor new version on GitHub.

Regards,

Plamen
 
andyme said:
Hello Guys, I am a bit lost.

I have been successfully using 1.0.0 ever since it was released and all of a sudden i am getting an "error brakes" message at startup.

What is the most likely explanation?

I can only say 2 things:

1)I have a break sensor that worked fine so far. After this message i have disconnected the cable but the error message persists.

2) On sunday, when the error message occured for the first time, the situation was the following:

I had ridden the bike successfully for 20 minutes, then parked it, and had a coffee nearby with friends. I then went back to the bike in order to get some stuff and at this occasion i wanted to bring it closer to where i was actually sitting with them. So I biked the 100 meters without turning anything on, and parked it by the coffee place. When i then wanted to start it again, i got this message, and i am getting it ever since.

I have disconnected the display cable and reconnected it, i have disconnected the motor and reconnected it...nothing makes a change...

any ideas? many thanks in advance, Andy.
The TX/RX cable for the display, may be broke.
 
#
#
Situation - I feel some delay in the engine's response.


Hi all,

First of all, I would like to thank you again for the excellent work that Casainho has done. It is certainly the result of a lot of work and effort.

Secondly, the problems I detected are difficult to feel on flat terrain. It is necessary to carry out tests on inclined roads, at least with more than 6% inclination.

However, the problem also appears on flat terrain, however the kinetic energy makes it impossible to notice it. If you are interested I can publish a video where this situation is very visible.

My goal is to share this information with the forum to see if we can overcome this situation together

I have been doing tests and videos for about a month to try to understand the problem. I haven't even cycled because of the tests.

From now on I don't think I can get any more information that will allow me to better understand the problem.

However, as I already have the test environment ready, if you want I can do more tests. Just tell me what you need. I also have more videos made with other levels of assistance.

What I can't do is try to improve the engine's firmware because I don't do software development.

Problem description

When I cycle on sloped roads, with at least 6% slope, what I feel is that in certain situations, if I stop pedaling 1 or 2 seconds and then start again, the engine only responds after I have been awhile push and rotate the pedals, 1 or 2 seconds. The engine response is neither effective nor immediate as soon as I start pedaling. I feel some delay in the engine's response.

So I tried to understand how the FOC engine management system works.

From what I learned the main variable that allows controlling the engine power, using the FOC management system, is the PWM.

At a given level of assistance (AL), in the FOC management system, with PWM = 0 the engine power is 0.
With PWM equal to 100 the motor power is the maximum.
My objective, in the tests I carried out, is to have the PWM = 100 constant as long as possible, in each AL, and to see the motor current behavior. I also checked Human Power.
In the lower ALs, maximum engine power cannot be reached because we are requesting too little engine power. Therefore, PWM = 100 cannot be reached. The power we are asking for from the engine is less than the maximum power and as such we have not reached PWM = 100.
(maybe I'm not 100% correct, but I shouldn't be too far from reality, I hope so)


TSDZ2 Motor, Firmware and Battery Description

The motor is 48V. The Chainring is 42 teeth and the cassette is 11-50.
The battery is 15S, with a maximum voltage of 63V and a nominal voltage of 54V. The battery can discharge a maximum of 35A (peak). Continuously, it can discharge 20A. The battery BMS is configured to be able to achieve a maximum discharge of 40A (Peak).
The firmware settings (V1.0.0) are as follows:
- Assist Levels are the default as in the image below.
- With the calibrated torque sensor
- Startup Boost - Disable
- Temperature sensor installed
- Cadence fast stop - No (disable)
- Current battery - 20A
- Motor current - 30A
- Motor Control - Power
- Current ramp - 10
- Min current ADC Step - 6
- Field Weakening - Disable
- Street Mode disable
- Assist w / o pedal rot - disable
- Without brake sensor
- Battery resistance - 380 (I can't measure the resistance with this version of Firmware)

With these Current settings (BMS current, Firmware Battery Current and Motor Current), I am not imposing any limitations on the TSDZ2 / Firmware.

ALevels.jpg

Test Description

The videos were mostly made on a ramp of about 750m and with a maximum slope of 9%, as shown in the figure.
Elevation Profile.jpg

Whenever possible I try to reach PWM = 100
In the video, Level 13 Human Power, which I present below is visible that when I start pedaling again after a stop of about 1s the engine does not start immediately when I start pedaling. In some situations it is only after 1.8 seconds that the engine starts. This situation can be observed at 1: 25s of this video.

In the table, I present below, you can see the delays detected in the assistance levels 9, 11 and 13. The table shows the time of the occurrence.
Motor Current and Human Power are the fields shown on the displays in each Video.

Power Delay V3.jpg

The videos are shot with a GOPRO at a speed of 30 frames per second.
On youtube you can watch the video in slow motion.

At the end of each video you can see the graphics of the battery and motor current as well as the Human Power.
I also use the free Windows VideoPAD software, by NCH Software. With this software I can see the video images frame by frame.

[youtube]xnIuSR0pMes[/youtube]

[youtube]0QzXlVxvNFk[/youtube]

[youtube]xosa4rvcS7c[/youtube]



[youtube]GAUzipgIwoc[/youtube]



Conclusions:

1 - No, I had any problem being permanently with PWM = 100, at least above the level AL = 9. In the other lower ALs I haven't tested it yet.
There is no problem from level 9 to 20 in maintaining the PWM = 100. It is easy to maintain a constant engine speed. It is necessary to pay attention to the value that reaches the temperature in order not to burn the engine. Even at level 20, the motor current in the peaks only reached 19Amp.
2 - The battery current, in the firmware graphics, reaches 35A.
So I suggest that the battery current limit is higher than the 20 that can be configured in this version of the FW.
3 - The delays related to power, as described, in AL 9 are not very noticeable. But at level 11 they already have high values.
4 - With the current version V1.0.0 and from now on, when I am going to do mountain bike rides, with steep slopes and with terrain with obstacles, I will use the AL until 9 (10?). I will not use the upper levels.

Thanks
 
Back
Top