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

Really impressed with the pro level you guys are handling the dev and release management of this - especially with it being in your spare time. Thanks for all your effort!
 
gaber said:
Really impressed with the pro level you guys are handling the dev and release management of this - especially with it being in your spare time. Thanks for all your effort!
Thanks! :D

I've added the issues I found to our issue list here: https://github.com/OpenSource-EBike-firmware/TSDZ2-Smart-EBike/issues
Feel free to add comments or information which can help with resolving or implementing these issues.

We're moving away from our previous repository. This means I will somehow move the issues from that repository (link) to the new one.

Casainho, can you disable the previous repositories? It can become confusing now there are more repositories...
 
Don't know if this helps but with the 500w limit I was able to get that up a little playing around with the phase advance angle. Higher is better but too high loses timing. This needs to be increased as motor speed or cadence increases for more power and higher cadence. At the moment phase angle does not change much with speed.
Btw while you’re at it please disable any tests that limit the speed like max motor erps, max cadence... the only real limit should be the power duty cycle which will be limited by motor load and your phase angle. After all you are “endless cadence” ;)
 
EndlessCadence said:
I have the following suggestions to be implemented very soon, I believe I can do this :D :
- From 9 to 5 assist levels default
- Revert the assist levels to simple factors (instead of "watts") as it was previously if this isn't too much work.
- Boost functionality toggle if possible, default off to reduce wear of the motor.
- Investigate 500W peak "limit"
- Prevent drag when pushing the bike backwards. It seems that we're still powering the motor coils. I think I need some help or experimenting here.
- Meanwhile my lighting parts will arrive, to be continued...
No problem for me about disabling boost, but I think users will find it strange to not have assist at startup, because at startup human power is zero because cadence is zero.

About the drag, it will take time to solve as if is wrong it may burn the motor controller, I am afraid. This issue is something is not urgent so I suggest we wait to have time to test it very well.

I didn't had t8me to see new repo but I trust in ypie work.
 
EndlessCadence said:
- Prevent drag when pushing the bike backwards. It seems that we're still powering the motor coils. I think I need some help or experimenting here.

i wonder if you can detect back emf. i'm guessing when you push the bike back the motor acts like a generator and will produce some current. if you can detect that then you could check that if no torque is applied then turn off the coils. you would then need to set a flag to turn the coils back on once torque is registered. ?
 
casainho said:
EndlessCadence said:
- Prevent drag when pushing the bike backwards. It seems that we're still powering the motor coils. I think I need some help or experimenting here.
About the drag, it will take time to solve as if is wrong it may burn the motor controller, I am afraid. This issue is something is not urgent so I suggest we wait to have time to test it very well.

You can easily aviod the drag by disabling the PWM outputs

Code:
TIM1_CtrlPWMOutputs(DISABLE);

and only enable it when power is wanted

Code:
TIM1_CtrlPWMOutputs(ENABLE);


but as casainho wrote, it's quite dangerous for the hardware, if you enable the PWM at the wrong moment :shock:
You have to make sure that you only enable it if erps = 0.

regards
stancecoke
 
Guys sorry for busting everyones chops :roll:
I was trying to use the wrong version lcd firmware with my motor thats why I wasw having all those issues. I actually needed version 0.2 which was luckily on my hard drive.
Now its working as before.. ok now I can concentrate on new things again !!!
 
EndlessCadence congratulations for the changes you've made I have now installed the ver. 0.13.1 also following the reset procedure recommended by you, and it immediately worked !!! I confirm that now set to 18A, powered at 35.80 the controller delivers 17.64 A, readings with WattsUp, and I confirm that the LCD3 displays the values ​​of Watt. For more details place the reviews on the Flexible OpenSource firmware on the Italian forum. http://www.jobike.it/forum/topic.asp?TOPIC_ID=76426&whichpage=1.
Hello thanks and have a good weekend.
 
I just finished installing everything, soldering, flashing and testing with version 0.12. Working great thank you guys for the wonderful job.
I have yet to test it properly to understand the assist levels, and the other features.

I had to search in different posts and wiki to find all the info that was needed, i can maybe help the project with a detailed guide to install from scratch, compiling info from jbalat videos, Wiki, and forum. This could be placed on the wiki for future users. I'm also able to translate it to french.

What do you think ?
 
Just installed and tested v0.13.1. It works like a dream :D .Thanks for a hard and creative work.
Cant stop smiling :D :D
 
EndlessCadence said:
- Revert the assist levels to simple factors (instead of "watts") as it was previously if this isn't too much work.
Think more about it, I think is not a good idea strategically because:
- there is no mean for that factor, while motor watts means energy
- users want motor watts related to pedal watts

A good plan would be for now to keep as it is and next develop the code for reading pedals watts (I did that before and I can recover the code on g8t history) and plug the 2 values and so finally users would set the assist level as a factor of pedal power.
 
nbdriver said:
I just finished installing everything, soldering, flashing and testing with version 0.12. Working great thank you guys for the wonderful job.
I have yet to test it properly to understand the assist levels, and the other features.

I had to search in different posts and wiki to find all the info that was needed, i can maybe help the project with a detailed guide to install from scratch, compiling info from jbalat videos, Wiki, and forum. This could be placed on the wiki for future users. I'm also able to translate it to french.

What do you think ?
Hear, hear! Having a complete wiki containing all information is high on my whishlist but no worries we'll sort this out. First I had to improve the release management, fix the most annoying bugs/issues then we'll focus on the documentation.

@everyone, thanks for the encouraging news!
 
jbalat said:
Don't know if this helps but with the 500w limit I was able to get that up a little playing around with the phase advance angle. Higher is better but too high loses timing. This needs to be increased as motor speed or cadence increases for more power and higher cadence. At the moment phase angle does not change much with speed.
Btw while you’re at it please disable any tests that limit the speed like max motor erps, max cadence... the only real limit should be the power duty cycle which will be limited by motor load and your phase angle. After all you are “endless cadence” ;)
LOL :D

I have a seriously hacked firmware in the making which has almost no limitations and most of the features were removed. Just to get bare motor assist working as good as possible. I will not release this version.

In my opinion the boost added a nice but quite complex bit of code. This is one of the parts I removed to reduce complexity while testing. Quite rude of me, sorry casainho :wink: A new release will still have boost believe me, but I will add a feature toggle for boost and other features.
 
zappan said:
EndlessCadence congratulations for the changes you've made I have now installed the ver. 0.13.1 also following the reset procedure recommended by you, and it immediately worked !!! I confirm that now set to 18A, powered at 35.80 the controller delivers 17.64 A, readings with WattsUp, and I confirm that the LCD3 displays the values ​​of Watt. For more details place the reviews on the Flexible OpenSource firmware on the Italian forum. http://www.jobike.it/forum/topic.asp?TOPIC_ID=76426&whichpage=1.
Hello thanks and have a good weekend.
Thanks! Do you mean you that the display showed more then 500W (around 644W peak?) ?
 
stancecoke said:
casainho said:
EndlessCadence said:
- Prevent drag when pushing the bike backwards. It seems that we're still powering the motor coils. I think I need some help or experimenting here.
About the drag, it will take time to solve as if is wrong it may burn the motor controller, I am afraid. This issue is something is not urgent so I suggest we wait to have time to test it very well.

You can easily aviod the drag by disabling the PWM outputs

Code:
TIM1_CtrlPWMOutputs(DISABLE);

and only enable it when power is wanted

Code:
TIM1_CtrlPWMOutputs(ENABLE);


but as casainho wrote, it's quite dangerous for the hardware, if you enable the PWM at the wrong moment :shock:
You have to make sure that you only enable it if erps = 0.

regards
stancecoke
Thanks for the information and warning. Thanks for saving my controller (for now) :D
 
casainho said:
EndlessCadence said:
- Revert the assist levels to simple factors (instead of "watts") as it was previously if this isn't too much work.
Think more about it, I think is not a good idea strategically because:
- there is no mean for that factor, while motor watts means energy
- users want motor watts related to pedal watts

A good plan would be for now to keep as it is and next develop the code for reading pedals watts (I did that before and I can recover the code on g8t history) and plug the 2 values and so finally users would set the assist level as a factor of pedal power.
Thanks I will do. I'm not simply changing this but I want to keep the discussion going which method is best. That's why I created an issue in our Github repository. If you have more information please add it there ;)

Btw, no offense but the current assist levels are also not really meaningful (2000W really?) or is it just me?
I agree with you, we should show the human power again. This shouldn't be too hard.
 
Alright guys, you aren't going to believe this. I did some testing with my hacked version as described above, it's finally the rocket it once was! The highest assist level now feels like the afterburner has been turned on :D
I'm not talking only about improved peak power but also the bike feels waaaay more responsive, I had forgotten that it ever felt that way!

I will add the features I've removed one by one and test in between.

Question: Is anyone using the max power feature? Section 2 "Max battery power screen" of the wiki. I'm not using this feature and think it's confusing as the max power can also be configured by setting the max amps in the configuration, I know this depends on the battery voltage. It's also another layer of complexity in the code. In my test version I had removed this feature.
 
EndlessCadence said:
zappan said:
EndlessCadence congratulations for the changes you've made I have now installed the ver. 0.13.1 also following the reset procedure recommended by you, and it immediately worked !!! I confirm that now set to 18A, powered at 35.80 the controller delivers 17.64 A, readings with WattsUp, and I confirm that the LCD3 displays the values ​​of Watt. For more details place the reviews on the Flexible OpenSource firmware on the Italian forum. http://www.jobike.it/forum/topic.asp?TOPIC_ID=76426&whichpage=1.
Hello thanks and have a good weekend.
Thanks! Do you mean you that the display showed more then 500W (around 644W peak?) ?

Yes :D , but I first had to set a higher value (700) than 500 in the "percentage battery charge status" menu, by combining the on-off key + the + key.
 
EndlessCadence said:
nbdriver said:
I just finished installing everything, soldering, flashing and testing with version 0.12. Working great thank you guys for the wonderful job.
I have yet to test it properly to understand the assist levels, and the other features.

I had to search in different posts and wiki to find all the info that was needed, i can maybe help the project with a detailed guide to install from scratch, compiling info from jbalat videos, Wiki, and forum. This could be placed on the wiki for future users. I'm also able to translate it to french.

What do you think ?
Hear, hear! Having a complete wiki containing all information is high on my whishlist but no worries we'll sort this out. First I had to improve the release management, fix the most annoying bugs/issues then we'll focus on the documentation.

@everyone, thanks for the encouraging news!

Ok, i understand that you prefer to do it by yourself. But of you need help feel free to ask :)

I also have Two more questions :

1. I flashed the motor with 3 cables connected : +5V, GND, SWIM and battery disconnected following these instructions : https://github.com/hurzhurz/tsdz2/blob/master/programming.md
I did not connect the RST cable marked as otionnal, it has worked, is it OK ? What is the use of the RST plug in the middle ?
Also i di only flash the program TAB not the DATA or Option TAB, do i need to flash all tabs ? It seems to work like this.

2. If i wan't to upgrade to 0.13.1 what is the exact procedure ? Do i need to reset something ? Or simply flash program tab over current firmware for the LCD3 and motor ?

Thank you
 
EndlessCadence said:
Question: Is anyone using the max power feature? Section 2 "Max battery power screen" of the wiki. I'm not using this feature and think it's confusing as the max power can also be configured by setting the max amps in the configuration, I know this depends on the battery voltage. It's also another layer of complexity in the code. In my test version I had removed this feature.
On the trails, I want to quick configure power and not amps. I want to have motor assisting me at a constant energy while I give the rest with my legs.
Also, maybe I would like to have torque sensor only as input instead of human power, because cadence can change a lot.

For city, I like to use assist levels only but for trails it is a very diferent ride style.

If you remove this feature, I will have to do a fork to keep my own code and features.
 
casainho said:
EndlessCadence said:
Question: Is anyone using the max power feature? Section 2 "Max battery power screen" of the wiki. I'm not using this feature and think it's confusing as the max power can also be configured by setting the max amps in the configuration, I know this depends on the battery voltage. It's also another layer of complexity in the code. In my test version I had removed this feature.
On the trails, I want to quick configure power and not amps. I want to have motor assisting me at a constant energy while I give the rest with my legs.
Also, maybe I would like to have torque sensor only as input instead of human power, because cadence can change a lot.

For city, I like to use assist levels only but for trails it is a very diferent ride style.

If you remove this feature, I will have to do a fork to keep my own code and features.
Thanks for your answer. No I won't remove anything for now. Just want to make sure anyone is using those features. No need for a fork ;)

I do think however that the firmware has too many features which sometimes are confusing, contradictive and not so easy to maintain. Those features sometimes even kill the basic functionality, this is where we are now. But I think this can be fixed by carefully adding feature toggles which are off by default. I'm thinking about adding basic and advanced configuration options.
 
Installed v0.13.1. this morning and did some testing this afternoon. It worked perfect for me!
I have the same about the watts It is very hard to get it above 500 watts.
 
casainho said:
EndlessCadence said:
Question: Is anyone using the max power feature? Section 2 "Max battery power screen" of the wiki. I'm not using this feature and think it's confusing as the max power can also be configured by setting the max amps in the configuration, I know this depends on the battery voltage. It's also another layer of complexity in the code. In my test version I had removed this feature.
On the trails, I want to quick configure power and not amps. I want to have motor assisting me at a constant energy while I give the rest with my legs.
Also, maybe I would like to have torque sensor only as input instead of human power, because cadence can change a lot.

For city, I like to use assist levels only but for trails it is a very diferent ride style.

If you remove this feature, I will have to do a fork to keep my own code and features.

Hard to understand what this setting is meant to do. If this allows you to quickly override the power using the off & plus keys then yes this is the most valuable feature to me. Please don’t remove it. Only I didn’t know it existed in the newer versions because the wiki wasn’t very descriptive (or I didn’t read it properly :shock:

I’m keen to see your new turbo features.. I’m back to my original turbo version myself which I have in eclipse I think it’s just a local fork of 0.2 I was working on, in the meantime I was just going to try and pull in some functions myself such as the battery reset when fully charged and eventually the temperature code once I get my new temp sensor in the mail. But I want you to impress me so I can stick with the new code :D

Btw very excited you are going back to assist multiplier instead of power. I remember Casainho had level 5 set to 9x woohoo!!
 
Hi Casainho and EC,

Great job with the code quality and new release process!
I would like to help with the development of the product as well. Seems you are quite loaded now and I have some spare time this week.
I have software dev experience, but for now I would be happy to help with the documentation since this could help me understand better how it works.

PS: my lcd arrives this week :)
 
Back
Top