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

casainho said:
But you process the input data twice than the output you generate for PWM, meaning it is useless to process twice, right?

Since the value calculated for ui8_interpolation_angle is different in the two cases there is an impact.
Since the calculated ui8_interpolation_angle is more precise, also applied phase voltage is more precise and this result in less current ripple.
 
mspider65 said:
casainho said:
But you process the input data twice than the output you generate for PWM, meaning it is useless to process twice, right?
Since the value calculated for ui8_interpolation_angle is different in the two cases there is an impact.
Ok, I am now looking from a different perspective. Later I will look at your implementation. Thanks.
 
Any feedback here is welcome. I already disassembled the sensor 4 times and I am out of ideas. :cry:

maximusdm said:
Hello,

I did a hardware calibration of the torque sensor. The sensor reads value and has not error, but it does not change on pedal press. Stays almost fix value. If i move the small black part with the magnet and hall sensor, the values change, but still on press nothing.
I opened the motor twice and I found not visual problems.
Why does the sensor value not change on force?
Also is there a way to simulate pedal force without installing it on motor? I read the wiki but is not very clear how to do it with 2 screwdrivers.

Thanks!
 
casainho said:
Some developers and users seem to found a solution for the lights issue - please download test firmware file here: https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/issues/139#issuecomment-699741653

If you have this issue, please test and give feedback.

I installed lightfix firmware version. I made short test ride and now assist works with lights on also after stopping and resuming pedalling :D . Did not found any issues. Many thanks to you. I will notice later if I'll find any issues...
 
More test on the boost with v1.0.0 firmware and SW102:
1. I doubled the assistance factor for BOOST function at the level I normally use (Level 9) I think it works I little bit better from standstill.
2. With Field weakening "disable", there is no boost with both "always" or "startup" option and it takes forever to get the assistance from the motor. However, the battery consumption with Field weakening "enable" is way more higher than "disable" or with marcod firmware, but the motor is more responsive.
 
Nfer said:
More test on the boost with v1.0.0 firmware and SW102:
1. I doubled the assistance factor for BOOST function at the level I normally use (Level 9) I think it works I little bit better from standstill.
2. With Field weakening "disable", there is no boost with both "always" or "startup" option and it takes forever to get the assistance from the motor. However, the battery consumption with Field weakening "enable" is way more higher than "disable" or with marcod firmware, but the motor is more responsive.
I solved the battery consumption by buying a 48v 20aH pack :)
 
jtsavola said:
casainho said:
Some developers and users seem to found a solution for the lights issue - please download test firmware file here: https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/issues/139#issuecomment-699741653

If you have this issue, please test and give feedback.

I installed lightfix firmware version. I made short test ride and now assist works with lights on also after stopping and resuming pedalling :D . Did not found any issues. Many thanks to you. I will notice later if I'll find any issues...

Today 60km ridden mostly lights on. No issues noticed...
 
casainho said:
I think I understand the root of this issue, and may be the same for the issue on lights not working. I think the issue is that the firmware is trying to control the current with a minimum value 0.156 amps with the same as the control step of 0.156 amps - I mean, the current min value should be an higher value like 1 amp, so there are 6 steps to control the current. Right now, I think that when PWM is 0 and will start to increase, the current value will bounce near zero before finally increase and that bounce is taking the undesirable time... I thin the solution may be to force the min current value to be like 1 amp.
I don't understand most of this, but am wondering if this is related to the later discussion on noise amplification.

casainho said:
I like the idea of low pass filter to try solve this issues, because low pass filter simple ignores fast changes / noise so will make possible to the PWM scale up, will keep ignoring the very first measures of battery current that will be for sure noisy / very small to represent something meaningful.

I reflashed the stock firmware and my daughter, who also rides my bike, commented on how the delay had disappeared. Unlike me, she's not very interested in the other data the OSF displays, and has asked that we keep the stock as she also had trouble with the way the delay of boost causes serious problems when shifting on a hill.

I wish I understood the coding better so I could help explore or make changes to fix this issue. I much prefer the OSF for both it's adaptability and improved information delivery, and really want to go back. This is a really admirable project and a brilliant piece of work.

I think I see in these most recent discussions that the cause of this one difficult issue may have finally been uncovered. Hope someone has the time to add this low pass filter or change that min. A setting or both or...?
 
nesdon said:
I wish I understood the coding better so I could help explore or make changes to fix this issue. I much prefer the OSF for both it's adaptability and improved information delivery, and really want to go back. This is a really admirable project and a brilliant piece of work.

I think I see in these most recent discussions that the cause of this one difficult issue may have finally been uncovered. Hope someone has the time to add this low pass filter or change that min. A setting or both or...?
Try this new version, although it solves the lights issue and hope it also improves your issue:

casainho said:
Some developers and users seem to found a solution for the lights issue - please download test firmware file here: https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/issues/139#issuecomment-699741653

If you have this issue, please test and give feedback.
 
casainho said:
Some developers and users seem to found a solution for the lights issue - please download test firmware file here: https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/issues/139#issuecomment-699741653

If you have this issue, please test and give feedback.

This is great thank`s for the link.
i just flashed it and it seem`s to work just fine :)
 
Heisenberg60 said:
This is great thank`s for the link.
i just flashed it and it seem`s to work just fine :)

Are you referring only to the lights issue, or do you think this improved the boost lag issue as casainho suggested it might?
 
New firmware version 1.1.0

I would like to get feedback on this new version about possible improvement on the startup delay, as the correction for the issue of the lights may also reduce the startup delay.

Changelog from previous stable release v1.0.0:

contribution of https://github.com/NicobobinusX:
-- corrected issue were lights were not working

contribution of https://github.com/casainho:
-- corrected issue were max battery current during Field Weakening were 1.5x higher

contribution of https://github.com/sisk22:
-- corrected issue were max battery current changes were not saved

contribution of https://github.com/bhelm:
-- added option to disable streetmode hotkey (default disabled)
-- disabling throttle also disables virtual throttle
-- added option to enable streetmode without hotkey

contribution of https://github.com/Kenny-54:
-- add two independent trip memories (A and B)

See how to install it here: https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/How-to-install-the-Flexible-OpenSource-firmware
 

Hello. what does the maximum power UP+Power option do? I turned it on but I don't see any difference.
 
Hi,

It may have been mentioned by now, but I see someone talking and it reminded to me, that OSF CAN BE FLASHED THROUGH MAC/APPLE COMPUTERS!

This has successfully been done by multiple users now. The first verified report coming from a user posting here, I beleive.

Mac Bootcamp, or other Emulator software makes it possible for NON-PC use.

I have seen alot of people ask this over time and was not sure if it has been made clear - I see GitHub still states that you need Windows, which I guess is technically true but most people don't realize you can run an emulator etc...
 
casainho said:
New firmware version 1.1.0

I would like to get feedback on this new version about possible improvement on the startup delay, as the correction for the issue of the lights may also reduce the startup delay.

Hi,

Thanks Casainho for the new firmware version.

Unfortunately I can't test the firmware right away because I have a hardware problem with my motor.
I am also presently running out of time to get the motor off the bike.
 
eyebyesickle said:
Hi,

It may have been mentioned by now, but I see someone talking and it reminded to me, that OSF CAN BE FLASHED THROUGH MAC/APPLE COMPUTERS!

This has successfully been done by multiple users now. The first verified report coming from a user posting here, I beleive.

Mac Bootcamp, or other Emulator software makes it possible for NON-PC use.

I have seen alot of people ask this over time and was not sure if it has been made clear - I see GitHub still states that you need Windows, which I guess is technically true but most people don't realize you can run an emulator etc...
I flash from Linux using stm8flash from the command line, I can never get the Windows java configuration or flasher to work.
 
Hi,

any news about the new "infineon" 2020 controller?

- does the stock firmware perform better than the previous one?
- is it still possible to dump the original firmware (no read protection) ?

Thank you.
 
When I've run Bootcamp and Parallels on my Mac in the past to emulate windows, I had to buy a copy of windows. Now, Microsoft allows one to download a Win 10 iso from their MS website and run it on Mac without activation. I've been using Bootcamp on my Macbook running all the Win apps needed to load the firmware on my TSDZ with no issues. The hardest part has been that the two OS read and write to different partitions, so file management has been confusing for me at times, but I'm now keeping all the TSDZ files on a USB drive.

Bootcamp came as an included utility with OSX, but I can only boot into either Win of MacOS, and have to reboot to switch, while Parallels allows one to switch back and forth without shutting down. When I was using this to run Solidworks a few years ago, I had a lot of trouble using it with Parallels but it ran OK with Bootcamp. However SW is a huge and hungry program, so with simple apps like the ST tool kit, it might work fine. Plus I was running Win 7 not 10.
 
nesdon said:
When I've run Bootcamp and Parallels on my Mac in the past to emulate windows, I had to buy a copy of windows. Now, Microsoft allows one to download a Win 10 iso from their MS website and run it on Mac without activation. I've been using Bootcamp on my Macbook running all the Win apps needed to load the firmware on my TSDZ with no issues. The hardest part has been that the two OS read and write to different partitions, so file management has been confusing for me at times, but I'm now keeping all the TSDZ files on a USB drive.

Bootcamp came as an included utility with OSX, but I can only boot into either Win of MacOS, and have to reboot to switch, while Parallels allows one to switch back and forth without shutting down. When I was using this to run Solidworks a few years ago, I had a lot of trouble using it with Parallels but it ran OK with Bootcamp. However SW is a huge and hungry program, so with simple apps like the ST tool kit, it might work fine. Plus I was running Win 7 not 10.

Good comments above re Windows 10 essentially for free for basic usage like this. Also consider Virtualbox (free) to virtualize Windows. Bootcamp can be complicated to setup
 
casainho said:
New firmware version 1.1.0

I would like to get feedback on this new version about possible improvement on the startup delay, as the correction for the issue of the lights may also reduce the startup delay.

Thanks a lot for this release. Will give the startup delay a good test this weekend. I was about to ask about high current reporting (but not consumption). Hopefully your current fix is something to do with seeing 24A current but only 550W actual battery draw (on 36V system) for example
 
eyebyesickle said:
Hi,

It may have been mentioned by now, but I see someone talking and it reminded to me, that OSF CAN BE FLASHED THROUGH MAC/APPLE COMPUTERS!

This has successfully been done by multiple users now. The first verified report coming from a user posting here, I beleive.

Mac Bootcamp, or other Emulator software makes it possible for NON-PC use.

I have seen alot of people ask this over time and was not sure if it has been made clear - I see GitHub still states that you need Windows, which I guess is technically true but most people don't realize you can run an emulator etc...
Yes, good idea to mention that option. For instance, I do not have Windows on my PC but I use a virtual machine to run Windows and install the software on the 860C display.

I just put a note on the page Steps for the installation or update, saying:

NOTE 2: when you need to install and use the various software tools, if they are not available to your computer operation system, you can try to use a virtual machine like Virtual Box - this will be a lengthy and hard process because you will probably need to learn how to install and use a virtual machine as also how to install and use a different operation system.
 
Finally I have the wireless firmware working!!

I did a very first version that only changes the assist level - I change the assist level on the GPS display, using the touch screen.

On the wireless firmware I setup the default settings for my ebike, like the wheel size, assist level factors, etc. Once I turn on the system, it is ready to work and I just need to change the assist level.

Next step is to start working on the Android app so it will be possible to change the settings and I will also start adding step by step the features like correct wheel speed, battery voltage, motor current, etc.
Any suggestions for the Android app? - maybe I should fork the TSDZ2-ESP32 Android app??: https://github.com/TSDZ2-ESP32/TSDZ2-ESP32-Main

And I also need to quick build the Nordic Bluetooth bootloader, as I will be testing the firmware on my ebike and I do not want to keep flashing the firmware with the STlinkV2.

And I think I will also add a switch to the wireless board, so it will work just like the Specialized ebikes, were we turn on/off the system on the battery pack (on our case, will be on the wireless board that will be installed near the battery case or in any other place we desire).

Here a picture of the wireless board connected to the TSDZ2 LCD connector:

image.png
 
Great job there Casainho, really great job... Can't wait to try this out (I need to go any purchase an NRF development stick)...
 
casainho said:

What about the sensor cables for the brakes? Will they be wired or wireless? If we have to run two cables to the front, may be it will be a good idea to have wired buttons for those of us that are not interesting in buying the GPS and want to use only the phone app.

What about the places with very strong radio interferences in the 2.4 GHz frequency range.
 
plpetrov said:
What about the sensor cables for the brakes?
Does anyone actually use brake sensors? I don't find the need for them on either of my tsdz2 bikes
 
Back
Top