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

marcoq said:
buba said:
Demion said:
I noticed ADC torque sensor calibration min value fluctuates +-5 each start.
Is there downside to increase sample count twice, for example, to 32? As I understand each reading is only 10ms.

Solved in the coming 0.20.0 :) It calibrates perfectly every time.

Wonderful work Buba!! :D :D :D

Thank you, marcoq! :D

------------------------------------------

And while I am already posting, here is a quick update to the community:

* Just need to add the sinewave approximation Casainho has done on his branch and then we are good to go! Will then take a ride and validate everything.

* Have created a wonderful filter that is used for all sorts of things. Works great and no attenuation.

Below are some pictures of the riding mode symbols as I thought it would be fun to share. Was such a long time ago I implemented them and also tried the 0.19.0 that I have forgotten all these minor things. Sorry for the picture quality. Anyone want a custom symbol? :wink:

eMTB
eMTB2.jpg
eMTB.jpg



Power Assist - The standard mode we have always used in the previous versions:
PowerAssist.jpg



Torque Assist - Similar to the original firmware but the big difference is that it controls the actual motor torque. The original TSDZ2 firmware has a simplified motor control.
TorqueAssist.jpg



Cadence Assist
CadenceAssist.jpg



This is in the configuration menu. The symbols are not displayed when riding, except the eMTB symbol if enabled. You choose between Power, Torque and Cadence Assist in the configuration menu. eMTB Assist can be enabled in any riding mode simply by increasing the assist level until the "E" is shown.
 
buba said:
mauri_78 said:
Hi all, i have noted that removing the battery the trip counter is resetted... Is possible to store trip counter in eeprom for next versions? Sometimes is useful to park the bike without the battery that can be removed for charging... would be nice if trip counter wouldn't be resetted in this situation...
Thanks in advance

There are three distance measurements:

- Odometer (saved in EEPROM)

- Trip (saved in EEPROM)

- Distance since power on (not saved in EEPROM)

This means that all except one are saved in the EEPROM if you power down the system with the ONOFF button. Only the "distance since power on" is reset every time. Let me know if something is not working and we will fix it!
Hi Buba, thank you very much for your work!
I have removed the battery from my bike and i have noted that when you remove the battery the trip counter is resetted.
To be more precise when you remove the battery and then you reconnect it the trip counter indicate 1km.
I'm running 0.19.0 version.

Maurizio
 
mauri_78 said:
buba said:
mauri_78 said:
Hi all, i have noted that removing the battery the trip counter is resetted... Is possible to store trip counter in eeprom for next versions? Sometimes is useful to park the bike without the battery that can be removed for charging... would be nice if trip counter wouldn't be resetted in this situation...
Thanks in advance

There are three distance measurements:

- Odometer (saved in EEPROM)

- Trip (saved in EEPROM)

- Distance since power on (not saved in EEPROM)

This means that all except one are saved in the EEPROM if you power down the system with the ONOFF button. Only the "distance since power on" is reset every time. Let me know if something is not working and we will fix it!
Hi Buba, thank you very much for your work!
I have removed the battery from my bike and i have noted that when you remove the battery the trip counter is resetted.
To be more precise when you remove the battery and then you reconnect it the trip counter indicate 1km.
I'm running 0.19.0 version.

Maurizio
You need to be careful that before remove the battery you must turn off the LCD or the last values will not be saved. Maybe this can be the issue??
 
Hi casahino,
thank you for you rapid response!
Yes probably i have made this mistake!
For sure i will make more tests, but i think that you are in right!
best regards

Maurizio
 
It is the same mistake that I always make, then I realized that the km always remained 500km .... while I had exceeded 1200km ...

:( :(
 
andrea_104kg said:
For me the symbol are ok! it's exceptional your work!

Agree with Andrea, the work you've done lately is impressive buba!
 
buba said:
One big update coming tonight or early tomorrow! :wink:

https://github.com/leon927/TSDZ2-Smart-EBike/tree/testing-pwm-acc

Great job Buba, I look forward to try it.
 
Good news and bad news! :wink:

The bad news is that all users must do a total reset when installing the 0.20.0. But for the coming updates this will hopefully not be necessary and might be the last time you need to reconfigure the entire system. Will do my best to not force anyone to reconfigure in the future. But this was such a rewrite that it was necessary.

The good news is that it is possible to download the 0.20.0 Alpha 1.0 from my Google Drive! :bolt:

I know it is still behind my original time line but believe me... it was worth it! For anyone tired of waiting I hope it will be worth the wait.

We now have the possibility to improve a lot of things from user feedback and I have looked forward to this for a long time! This version is very good for showing of the changes so we can base our discussions on something. All riding modes will be improved in one way or another but we will get to that when it is time.

There are some things to fix on the KT-LCD3 but those are esthetic issues. I have prioritized other things so we can have a version out for testing as soon as possible. One example is that some controller data will update very quickly. Such as the wattage, cadence etcetera. Will later filter this so it is much nicer in the coming Alpha.

Please be certain that everything is reset before installing 0.20.0. We do not want any surprises. So when installing the 0.20.0 make sure to erase everything! If not sure how to do that please ask and I will try to help!

Be extra careful and mindful that this update is extreme. GitHub puts it at almost 5000 lines of code and this number will be passed before a stable release... Almost constant development and testing for over a month. So be ready to brake, switch the battery off or whatever it takes to be safe. Double check that the e-brakes work and do everything possible to ensure a safe testing environment. And once again please make sure to reset everything!

I call it the Alpha 1.0 version as I think the official releases from the project GithHub page should be called Beta.

Below is the wiki that still needs more updating but should work fine for now. Read it carefully when configuring.
https://github.com/OpenSource-EBike-firmware/TSDZ2_wiki/wiki/0.20.0-(DEVELOPMENT)-%7C-KT-LCD3-%7C-TSDZ2-%7C-Manual

Here is my Google Drive:
https://drive.google.com/open?id=1CPGT-V1ZX7FCzfhgbrPMYfbYtY4_JH2R
 
I will update the 0.20.0 wiki and also the cadence sensor tutorial as soon as possible. Will work with that the entire day. Would like to make a video tutorial for the cadence sensor calibration but will probably make a simple text tutorial at first, just to have something for the early adopters.

Anyway, more to come in the coming hours!
 
Buba, please make sure you write down the necessary info on how to correctly perform the reset you require.
Thanks!!
 
thineight said:
Buba, please make sure you write down the necessary info on how to correctly perform the reset you require.
Thanks!!

What I would recommend is to program all zeros before loading the alpha. Here is user Rafe explaining what he usually does:

Rafe said:
buba said:
- Scroll through the configuration menu and make sure everything is set as desired
- Make a total reset so the default values are loaded and then configure as desired

What I do and it works well for me is when I first start ST visual programmer it automatically presents pages of all zeros for both the programme memory and data memory, then I simply programme each tab with the zeros so nothing remains of the previous firmware. Then I write the new version into the programme memory.

Please let me know if I can make anything more clear! All feedback is welcome, thineight!

EDIT:

Step 1: Connect either the TSDZ2 or the KT-LCD3.

Step 2: Open the ST Visual Programmer.
Step1.png

Step 3: Program all tabs with zeros as ST Visual Programmer will open with all zeros as default.
Step2.png

Step 4: You have now completely erased the saved data and program memory and can continue to upload any firmware you wish to use.
 
Hello all! I am having this weird issue while trying to run the open source firmware.

I made a video about it here: https://youtu.be/TCxoKsTYjUI

I tried swapping RX/TX. Did not work. I tripled check all connections and flashed both the motor and KT LCD3 three times to make sure. I used 0.19.

Still I am having the problem. I can power on/off the unit but all I see is zeros everwhere... i cannot activate the motor or get any kind of info about it or the battery (52v).

What am I missing here?
 
vjvj said:
Hello all! I am having this weird issue while trying to run the open source firmware.

I made a video about it here: https://youtu.be/TCxoKsTYjUI

I tried swapping RX/TX. Did not work. I tripled check all connections and flashed both the motor and KT LCD3 three times to make sure. I used 0.19.

Still I am having the problem. I can power on/off the unit but all I see is zeros everwhere... i cannot activate the motor or get any kind of info about it or the battery (52v).

What am I missing here?

I hope I can help! Try this:

Step 1: Go to the Configuration Menu

Step 2: Go to the "Reset to default settings"

Step 3: When the screen is blank, hold the ONOFF button for a couple of seconds.

Step 4: Release the ONOFF button

Step 5: Try to power on the system

If this does not work try to load all zeros when programming the display. See one post above for more info. And then see if it works. If not, try to reset to defaults once again after programming all zeros.
 
buba said:
vjvj said:
Hello all! I am having this weird issue while trying to run the open source firmware.

I made a video about it here: https://youtu.be/TCxoKsTYjUI

I tried swapping RX/TX. Did not work. I tripled check all connections and flashed both the motor and KT LCD3 three times to make sure. I used 0.19.

Still I am having the problem. I can power on/off the unit but all I see is zeros everwhere... i cannot activate the motor or get any kind of info about it or the battery (52v).

What am I missing here?

I hope I can help! Try this:

Step 1: Go to the Configuration Menu

Step 2: Go to the "Reset to default settings"

Step 3: When the screen is blank, hold the ONOFF button for a couple of seconds.

Step 4: Release the ONOFF button

Step 5: Try to power on the system

If this does not work try to load all zeros when programming the display. See one post above for more info. And then see if it works. If not, try to reset to defaults once again after programming all zeros.

Thanks for the reply. It is WORKING now! Yeah!

So strange that i had to reset. I did not changed anything.
 
vjvj said:
Thanks for the reply. It is WORKING now! Yeah!

So strange that i had to reset. I did not changed anything.

I am happier than you are! :D

It was not your fault. You actually reported a common bug with the EEPROM code. This has been with us for as long as I can remember. It is actually due to this bug I tell users to program all zeros. But will have a solution for the 0.20.0.

Thank you, vjvj, for bringing this to the thread!

----------------------------------

I have removed the Alpha 1.0 from my Drive and will rewrite the EEPROM code starting from scratch. So we can solve this once and for all. Will be finished within one hour and have the 0.20.0 Alpha 2.0 ready as soon as possible.
 
buba said:
I have removed the Alpha 1.0 from my Drive and will rewrite the EEPROM code starting from scratch. So we can solve this once and for all. Will be finished within one hour and have the 0.20.0 Alpha 2.0 ready as soon as possible.

Hi Buba, great work! :thumb:

My motor is really more quiter than 0.19.0 with same configuration.
The acceleration is much smoother, the power seems much better modulated. It looks like a new engine :D

Take a look to backward resistance, is present in Alpha 1.0 and...
Odometer says over 6000km
In Odometer I cannot view selection 8 (temp sensor)

I've done a few km but in my opinion the only missing thing is the "startup without pedal rotation". Once You use that with ebrakes you are not happy to go back

Really cool, thank you!
 
fi7ippo what type of assist have you used, power, torque or cadence?
I have only read the manual ad i have not understand if it's possible to do a mix mode.... es. level 1-4 power mode, 5-6 torque, 7-8 cadence and 9 emtb
 
andrea_104kg said:
fi7ippo what type of assist have you used, power, torque or cadence?
I have only read the manual ad i have not understand if it's possible to do a mix mode.... es. level 1-4 power mode, 5-6 torque, 7-8 cadence and 9 emtb

I've tested the torque mode. I think single mode + emtb at the end!
A trick for cadence calibration: You must lock the crank to the crown so that the motor rotates the pedals during calibration
 
fi7ippo said:
buba said:
I have removed the Alpha 1.0 from my Drive and will rewrite the EEPROM code starting from scratch. So we can solve this once and for all. Will be finished within one hour and have the 0.20.0 Alpha 2.0 ready as soon as possible.

Hi Buba, great work! :thumb:

My motor is really more quiter than 0.19.0 with same configuration.
The acceleration is much smoother, the power seems much better modulated. It looks like a new engine :D

Really cool, thank you!

Hello fi7ippo! Appreciate the good feedback!



fi7ippo said:
buba said:
I have removed the Alpha 1.0 from my Drive and will rewrite the EEPROM code starting from scratch. So we can solve this once and for all. Will be finished within one hour and have the 0.20.0 Alpha 2.0 ready as soon as possible.
Take a look to backward resistance, is present in Alpha 1.0 and...
Odometer says over 6000km
In Odometer I cannot view selection 8 (temp sensor)

All this is due to the EEPROM bug. I am trying to solve this once and for all. If you want to remove all those "bugs" try this:

Step 1: Go to the Configuration Menu, Basic Setup

Step 2: Go to the "reset to default settings"

Step 3: Hold the UP button until the counter goes to 10, the screen will become blank.

Step 4 (important): Hold the ONOFF button firmly for a couple of seconds, do not accidentally click.

Step 5: After a couple of seconds you can release the ONOFF button and then power up the system as usual.

Step 6: You will have a working clean install and no more bugs!



fi7ippo said:
I've done a few km but in my opinion the only missing thing is the "startup without pedal rotation". Once You use that with ebrakes you are not happy to go back

Seems we will have to fix that :wink:
 
andrea_104kg said:
fi7ippo what type of assist have you used, power, torque or cadence?
I have only read the manual ad i have not understand if it's possible to do a mix mode.... es. level 1-4 power mode, 5-6 torque, 7-8 cadence and 9 emtb

Sadly, for now, you need to select between Power, Torque and Cadence Assist!
 
fi7ippo said:
andrea_104kg said:
fi7ippo what type of assist have you used, power, torque or cadence?
I have only read the manual ad i have not understand if it's possible to do a mix mode.... es. level 1-4 power mode, 5-6 torque, 7-8 cadence and 9 emtb

I've tested the torque mode. I think single mode + emtb at the end!
A trick for cadence calibration: You must lock the crank to the crown so that the motor rotates the pedals during calibration

Impressive that you managed to calibrate without me getting around to provide more documentation and explanations! Wanted to provide some info earlier today but have spent all my time rewriting and testing the EEPROM firmware and bug.

That is a great tip. I usually take a zip tie and temporarily lock the pedal arms to the crank so the motor can rotate the pedals at a constant RPM. Will show this procedure as soon as possible. But again, very cool that you managed and solved it!
 
Back
Top