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

#new button logic - to exit the submenu once the value is set the long press of on/off button is required however I think just a short press would be enough.
Now by exiting submenu with the long press I have ended occasionally two levels higher than initially wanted as well it takes more time to configure parameters.

#Default values after flashing - due to initial issues with lcd3 flashing I decided to erase program and configuration memory before applying the beta7. I would expect that after first start all the default values will be set but it didn't happen and I had to reconfigure all the parameters manually. So when and how the default values are being initialized ?

Overall I am very happy with beta7, many thanks to all involved and especially to buba for solving the flashing 1 issue !
 
I managed today to take a small fall with the bike and the result is that I no longer get any assistance. I get startup boost and after 0w.
I run debug mode on menu 12:
- i get speed read correctly
- i get torque on pedal and adac
- i get cadence read
- human power is always 0 !

Please help with some ideas. :)
 
maximusdm said:
I managed today to take a small fall with the bike and the result is that I no longer get any assistance. I get startup boost and after 0w.
I run debug mode on menu 12:
- i get speed read correctly
- i get torque on pedal and adac
- i get cadence read
- human power is always 0 !

Please help with some ideas. :)
If torque sensor and cadence are working, them you probably have some bad configuration like max power or max current, or min battery voltage.
 
Hi Casainho, is there a way to get the crank arms not to spin when the motor is on ?

The cyc x1pro does that, you can have motor power while human is coasting/relaxing.
 
casainho said:
maximusdm said:
I managed today to take a small fall with the bike and the result is that I no longer get any assistance. I get startup boost and after 0w.
I run debug mode on menu 12:
- i get speed read correctly
- i get torque on pedal and adac
- i get cadence read
- human power is always 0 !

Please help with some ideas. :)
If torque sensor and cadence are working, them you probably have some bad configuration like max power or max current, or min battery voltage.

To be honest, I do not get it. What has a fall on right side has to to with the power setting? Of course I can fully reset the software.
Why I have initial startup boost and then no power? Boost is torque only based so sensor should be ok.
I remember that when I lifted the bike the only thing on the lcd was power at 30w.
 
maximusdm said:
To be honest, I do not get it. What has a fall on right side has to to with the power setting? Of course I can fully reset the software.
Why I have initial startup boost and then no power? Boost is torque only based so sensor should be ok.
I remember that when I lifted the bike the only thing on the lcd was power at 30w.
I can imagine for some reason that you touched the buttons and max power was configured for a very low value as 25W and so you will get nothing.
 
It makes perfect sense! This is why I saw on the LCD only the power blinking on 20 or 30 w.
I fell at almost 5km/h :))
 
casainho said:
maximusdm said:
I managed today to take a small fall with the bike and the result is that I no longer get any assistance. I get startup boost and after 0w.
I run debug mode on menu 12:
- i get speed read correctly
- i get torque on pedal and adac
- i get cadence read
- human power is always 0 !

Please help with some ideas. :)
If torque sensor and cadence are working, them you probably have some bad configuration like max power or max current, or min battery voltage.
Max power was at 25w. Thank you!
 
dameri said:
buba said:
What version of the firmware did you upgrade from? Please try it out more and let me know if you have a bug!

I had v0.19.0-beta6. I'm not developer but I can test new versions and if they not work I can tell you what is wrong.
As I said afterwards beta7 is working fine. New logic is "hard to learn" to old man.

Thank you buba reading testers reports.

Also quoting is not my best shots.

Thank you for your reply and sorry for my delayed one!

Hope the new logic is growing on you and you have become comfortable with it! There will be a new beta with bug fixes and improvements coming soon. Would love to hear feedback!


elfnino said:
#new button logic - to exit the submenu once the value is set the long press of on/off button is required however I think just a short press would be enough.
Now by exiting submenu with the long press I have ended occasionally two levels higher than initially wanted as well it takes more time to configure parameters.

Good note! I have decreased the time needed to hold the button. Much faster now but still not a click. I strongly believe it is best to have two different button events/actions for different menu actions so as to have a clear logic. I truly recommend this and would love that you test the new faster logic in the next beta as it should be better!


elfnino said:
#Default values after flashing - due to initial issues with lcd3 flashing I decided to erase program and configuration memory before applying the beta7. I would expect that after first start all the default values will be set but it didn't happen and I had to reconfigure all the parameters manually. So when and how the default values are being initialized ?

The default values should be initialized whenever you install the firmware for the first time or whenever you reset to defaults in the configuration menu. Let me know if something does not work!


elfnino said:
Overall I am very happy with beta7, many thanks to all involved and especially to buba for solving the flashing 1 issue !

Thank you!
 
New beta is coming soon!

Have listened to feedback from the community and tried to solve everything in the best possible way. Besides the bug fixes there are overall improvements and optimizations for size and speed in both the controller and display firmware.

Will test everything a bit more today and tomorrow to validate all the changes and bug fixes. Will submit the pull request as soon as this is done. The goal is to have no more bugs in this next beta so we can create a stable release.

After the stable release the entire community can switch to version 0.19.0.
 
May I ask if a couple of users can take a look at the Advanced Technical Data under sub menu 2, ADC Pedal Torque Sensor, and report what the resting value is. I am curious of the values from the torque sensor in different systems. This might be used later in the development to make the system more responsive, with more error codes to let the user know if something is wrong and maybe even calibrate the system better with a sensor model.

If possible and willing please have the pedal arms horizontal, i.e. parallel to the ground, and then turn on the system and let it calibrate with no force applied. Go to the Configuration Menu and then Advanced Technical Data under sub menu 2, ADC Pedal Torque Sensor and report the resting value.

Bonus: set the assist level to zero before you enter the Configuration Menu and give moderate force on the pedals. You can also ride the bike if it is easier. The motor will not engage as the assist level is set to zero. Report the highest value you see but do not use excessive force, only moderate force similar to normal operation.

Thank you all!
 
casainho said:
maximusdm said:
To be honest, I do not get it. What has a fall on right side has to to with the power setting? Of course I can fully reset the software.
Why I have initial startup boost and then no power? Boost is torque only based so sensor should be ok.
I remember that when I lifted the bike the only thing on the lcd was power at 30w.
I can imagine for some reason that you touched the buttons and max power was configured for a very low value as 25W and so you will get nothing.

Casainho and others, should there be an error code when user has the assist level or assist multiplier set to anything other than zero and motor power limit set to zero and also tries to ride the bike. Maybe only displayed for a short duration such as 5-10 seconds?

I ask this because I think there have been many cases where people have accidentally set/started with the power limit to zero with the assist level greater than zero and wondered why the motor does not work. The error code would help resolve some confusion. There is already an error code table in the 0.19.X wiki where it could be explained.

Just putting it out there. Would love some input. Very simple and only a couple lines of code so could include it in the next beta if this is something useful.
 
I had this exact issue, flashed the beta as my first version and max motor power and all assist were set at 0, thought I had shorted something and fried my motor as I got no assist. (the wiki said default assist values were good for most users)

Maybe set the default to 250W legal mode just to see if the motor is working after you flash everything.

Also one value in the diagnostics menu is not working, think it's pedal torque, it always shows 0, is this a bug?
 
buba said:
Casainho and others, should there be an error code when user has the assist level or assist multiplier set to anything other than zero and motor power limit set to zero and also tries to ride the bike. Maybe only displayed for a short duration such as 5-10 seconds?
I think the default value does not help, if it was something like 1000 watts, then this would not be an issue.

Also, when the power limit is hit, there is not indication to user and that should no be an error message. Maybe short blink power field like 20% of time off, like 200 ms off and 800 ms on.
 
buba said:
May I ask if a couple of users can take a look at the Advanced Technical Data under sub menu 2, ADC Pedal Torque Sensor, and report what the resting value is. I am curious of the values from the torque sensor in different systems. This might be used later in the development to make the system more responsive, with more error codes to let the user know if something is wrong and maybe even calibrate the system better with a sensor model.

If possible and willing please have the pedal arms horizontal, i.e. parallel to the ground, and then turn on the system and let it calibrate with no force applied. Go to the Configuration Menu and then Advanced Technical Data under sub menu 2, ADC Pedal Torque Sensor and report the resting value.

Bonus: set the assist level to zero before you enter the Configuration Menu and give moderate force on the pedals. You can also ride the bike if it is easier. The motor will not engage as the assist level is set to zero. Report the highest value you see but do not use excessive force, only moderate force similar to normal operation.

Thank you all!

I will do that tomorrow. Now battery and man is loading from 54 kms ride. Beta 7 is working fine.
I think I will also get used to new logic.
 
buba said:
If possible and willing please have the pedal arms horizontal, i.e. parallel to the ground, and then turn on the system and let it calibrate with no force applied. Go to the Configuration Menu and then Advanced Technical Data under sub menu 2, ADC Pedal Torque Sensor and report the resting value.

Bonus: set the assist level to zero before you enter the Configuration Menu and give moderate force on the pedals. You can also ride the bike if it is easier. The motor will not engage as the assist level is set to zero. Report the highest value you see but do not use excessive force, only moderate force similar to normal operation.

Thank you all!

Hello Buba, here my results.
Pedals horizontal, no force applied - menu 9 - submenu 2 : reading --> 48/49
Zero assist and easy ride with hard gear on flat garage: reading --> 70-71
Zero assist with soft gear on garage ramp: reading --> 78

Hope this helps.
 
Buba, I guess we spoke about this some time ago, but I do not remember the conclusion.
Regarding the walk assist, it is beneficial to have a sort of "lock" of the walk assist in order not to require the DOWN button to be pushed constantly. In fact it is hard not to slip off with the finger on a steep hill.. and the walk assistance will stop.

In fact when the "lock" is active the walk assist is started just holding the DOWN button and after you can release it, the bike will keep on walking beside you. Simple press on UP or DOWN button (or brake if magnetic sensors are installed) will stop the walk assistance.
This logic is applied also on marcoq fork for the stock display and it works very well.
Do you think we have chance to have it on the LCD3 display or the memory is over?

Thanks
 
thineight said:
Buba, I guess we spoke about this some time ago, but I do not remember the conclusion.
Regarding the walk assist, it is beneficial to have a sort of "lock" of the walk assist in order not to require the DOWN button to be pushed constantly. In fact it is hard not to slip off with the finger on a steep hill.. and the walk assistance will stop.

In fact when the "lock" is active the walk assist is started just holding the DOWN button and after you can release it, the bike will keep on walking beside you. Simple press on UP or DOWN button (or brake if magnetic sensors are installed) will stop the walk assistance.
This logic is applied also on marcoq fork for the stock display and it works very well.
Do you think we have chance to have it on the LCD3 display or the memory is over?

Thanks
I strongly disagree with this because walk assist as it is now is very dangerous. I even didn't told to my son when he had to push his bicycle hardly on mountain because it is dangerous: very fast and strong start and possibly high speed. You can't know the speed until you start so it is always a guess.
 
casainho said:
buba said:
Casainho and others, should there be an error code when user has the assist level or assist multiplier set to anything other than zero and motor power limit set to zero and also tries to ride the bike. Maybe only displayed for a short duration such as 5-10 seconds?
I think the default value does not help, if it was something like 1000 watts, then this would not be an issue.

Also, when the power limit is hit, there is not indication to user and that should no be an error message. Maybe short blink power field like 20% of time off, like 200 ms off and 800 ms on.

Okay good, in short, no error code necessary. If it becomes a problem later on we can set the default power to 250 watts as suggested by btslo and/or write a function that flashes the power reading if at power limit as you suggested.


dameri said:
buba said:
May I ask if a couple of users can take a look at the Advanced Technical Data under sub menu 2, ADC Pedal Torque Sensor, and report what the resting value is...
Thank you all!

I will do that tomorrow. Now battery and man is loading from 54 kms ride. Beta 7 is working fine.
I think I will also get used to new logic.

:D That sounds great! Hope you charge up nicely! :bolt: Thank you!


thineight said:
Hello Buba, here my results.
Pedals horizontal, no force applied - menu 9 - submenu 2 : reading --> 48/49
Zero assist and easy ride with hard gear on flat garage: reading --> 70-71
Zero assist with soft gear on garage ramp: reading --> 78

Hope this helps.

I really appreciate that you took the time to do the tests! :)

Thanks, thineight!


thineight said:
Buba, I guess we spoke about this some time ago, but I do not remember the conclusion.
Regarding the walk assist, it is beneficial to have a sort of "lock" of the walk assist in order not to require the DOWN button to be pushed constantly. In fact it is hard not to slip off with the finger on a steep hill.. and the walk assistance will stop.

In fact when the "lock" is active the walk assist is started just holding the DOWN button and after you can release it, the bike will keep on walking beside you. Simple press on UP or DOWN button (or brake if magnetic sensors are installed) will stop the walk assistance.
This logic is applied also on marcoq fork for the stock display and it works very well.
Do you think we have chance to have it on the LCD3 display or the memory is over?

Thanks

I understand completely.

Let me list some improvements planned for the Walk Assist function long ago:

* Acceleration of power. Walk Assist in its current state should always be activated when already walking as it has a very high acceleration. But with a "soft start" function it will be really smooth even from a complete stand still.

* Closed feedback loop controlling the motor rotation. This feedback loop would ensure more consistent operation and would ensure same speed regardless of state of charge. The wheel speed could also be used but it is not advisable due to the low resolution and inertia.

* Power limit safety. This limit would cut or lower the power in certain situations where it is necessary. Ensuring user safety and protection of the drive train.

* Locked Walk Assist. This would be the aforementioned functionality of locked Walk Assist with no button press. This would operate until user presses a button, the brakes or if there are abnormal levels of resistance, or lack thereof, in the system.

* No Load Cuttoff. If the user falls or the wheels are in the air the system would deactivate.

I have no problems with walk assist as it is now because I am familiar with the power levels I set. It is slower and smoother than the original firmware implementation. But could be even better with the mentioned improvements.

We can definitely look at this after the stable 0.19.0 and then make the Walk Assist even better for the next version. Then we could also implement the "no-button" Walk Assist if it ends up being really safe!


casainho said:
thineight said:
Buba, I guess we spoke about this some time ago, but I do not remember the conclusion.
Regarding the walk assist, it is beneficial to have a sort of "lock" of the walk assist in order not to require the DOWN button to be pushed constantly. In fact it is hard not to slip off with the finger on a steep hill.. and the walk assistance will stop.

I strongly disagree with this because walk assist as it is now is very dangerous. I even didn't told to my son when he had to push his bicycle hardly on mountain because it is dangerous: very fast and strong start and possibly high speed. You can't know the speed until you start so it is always a guess.

Sad to hear you feel that it is that dangerous. The default values on the lower assist levels should be really, really, slow. And all other values can be lowered and adjusted to fit any bike and weight. But I agree that there are improvements to be made. Such as those I mentioned above.
 
buba said:
casainho said:
buba said:
Casainho and others, should there be an error code when user has the assist level or assist multiplier set to anything other than zero and motor power limit set to zero and also tries to ride the bike. Maybe only displayed for a short duration such as 5-10 seconds?
I think the default value does not help, if it was something like 1000 watts, then this would not be an issue.

Also, when the power limit is hit, there is not indication to user and that should no be an error message. Maybe short blink power field like 20% of time off, like 200 ms off and 800 ms on.

Okay good, in short, no error code necessary. If it becomes a problem later on we can set the default power to 250 watts as suggested by btslo and/or write a function that flashes the power reading if at power limit as you suggested.
I think this is a problem already because it did happen to a few users that reported but they had no clue. The quick and simple way is simple to keep a value that disables the limitation as also makes hard to disable the system with a mistake of just 1 or 2 clicks of down button when changing max power by mistake. To make this, just change default value from 0 to 1000.
 
casainho said:
I think this is a problem already because it did happen to a few users that reported but they had no clue. The quick and simple way is simple to keep a value that disables the limitation as also makes hard to disable the system with a mistake of just 1 or 2 clicks of down button when changing max power by mistake. To make this, just change default value from 0 to 1000.

Will change the default value! :thumb:
 
thineight said:
Regarding the walk assist, it is beneficial to have a sort of "lock" of the walk assist in order not to require the DOWN button to be pushed constantly. In fact it is hard not to slip off with the finger on a steep hill.. and the walk assistance will stop.
So this user says the finger slip on a steep hill and this is the real issue.

When the finger slips for a long period of time means users probably is not anymore in control of the bicycle and then motor should stop. If it is for a short period like 1 second, then it can slip because of the vibrations due to the irregularity of the terrain however user still his in control. I think we just need to filter out quick button releases of less then 1 second or such.

Let's assume the user did fall on top of the bicycle and a leg is touching the rear wheel -- should walk assist work with that lock and grind the user leg until the user can recover, wake up, and disable the lock? And what if the user has long hair and fall with head on the wheel and the hair rolls on the wheel/spokes/sprocket, can the user ever recover or will die?
 
casainho said:
thineight said:
Regarding the walk assist, it is beneficial to have a sort of "lock" of the walk assist in order not to require the DOWN button to be pushed constantly. In fact it is hard not to slip off with the finger on a steep hill.. and the walk assistance will stop.
So this user says the finger slip on a steep hill and this is the real issue.

When the finger slips for a long period of time means users probably is not anymore in control of the bicycle and then motor should stop. If it is for a short period like 1 second, then it can slip because of the vibrations due to the irregularity of the terrain however user still his in control. I think we just need to filter out quick button releases of less then 1 second or such.

Have previously tried button debounce. But with the debounce together with the communication time it was too unsafe and slow during certain situations. This is why I removed it before I submitted the Walk Assist Pull Request long ago. But now the communication is much faster so it might operate better.

casainho said:
Let's assume the user did fall on top of the bicycle and a leg is touching the rear wheel -- should walk assist work with that lock and grind the user leg until the user can recover, wake up, and disable the lock? And what if the user has long hair and fall with head on the wheel and the hair rolls on the wheel/spokes/sprocket, can the user ever recover or will die?

I understand your concern and in this case there is a fine line between really safe and potentially unsafe. Most of the scenarios you mentioned would be greatly or completely removed with the previously mentioned improvements. But there is still a chance that something might go wrong. Especially if you have long hair.

buba said:
* Acceleration of power. Walk Assist in its current state should always be activated when already walking as it has a very high acceleration. But with a "soft start" function it will be really smooth even from a complete stand still.

* Closed feedback loop controlling the motor rotation. This feedback loop would ensure more consistent operation and would ensure same speed regardless of state of charge. The wheel speed could also be used but it is not advisable due to the low resolution and inertia.

* Power limit safety. This limit would cut or lower the power in certain situations where it is necessary. Ensuring user safety and protection of the drive train.

* Locked Walk Assist. This would be the aforementioned functionality of locked Walk Assist with no button press. This would operate until user presses a button, the brakes or if there are abnormal levels of resistance, or lack thereof, in the system.

* No Load Cuttoff. If the user falls or the wheels are in the air the system would deactivate.

What I think is best for now, as I said before, is to focus on the stable 0.19.0. Then improve Walk Assist and try to make it as safe as possible. With watertight logic, able to sense all kinds of abnormal scenarios.
 
Ok casainho, I understand your concerns with the walk assist. The safety controls mentioned by buba or the "button bounce check" would potentially solve the problem, because as it is now is very hard sometimes to push the bike uphill. :thumb:

Regarding the startup power and speed I guess marcoq managed these issues in a different way (if I remember correctly he coded this feature first) and the bike starts to move very soft, you can really feel the ramp.
I do not understand why you mention that the bike can start at high speed/power as the values are set quite low for the various assistance levels, perhaps I miss some tips in the coding itself.
Just for information, the "auto" walk assist on marcoq soft was implemented only for level 1, higher levels still use the original logic.

All in all, at the moment this is an improvement that does not take priority 1.. let's focus on the stable 0.19 first.
Thanks a lot
 
thineight said:
I do not understand why you mention that the bike can start at high speed/power as the values are set quite low for the various assistance levels, perhaps I miss some tips in the coding itself.
I am being using walk assist mainly on mountains. I found that a value of PWM duty cycle we set for walk assist on a flat terrain is very different from the one on mountains -- we need a very high value on mountains and if we use that value on flat, by mistake or just because we need first to try to see if it is ok or not, the bicycle will simple go off very fast and that is dangerous.

When I had to use walk assist on a steep stairs (or big rock), because on uneven of the stairs, I had wheel running very fast sometimes to just after run at the speed I need -- when the wheel loses traction momentarily, will run at very fast dangerous speed. And when it gains traction again, the energy on the wheel from being rotating such fast, gives a strong pulse of force forwards and all this makes hard and dangerous to keep on control of the bicycle.

I think walk assist is a must to have and I prefer to have as it is however I know it is dangerous and for that reasons I don't want my 9 years old son to use it.

I think it must have a speed and power controllers as also soft start. As user, I want to configure the speed and max power(currently max power is like 900 watts on walk assist!!). For steep hills and dangerous terrain I would go with low speed like 4 or 3 km/h. For the power I would configure some low value like max of 200 watts and usage will depend on the weight of the bicycle, if I pull myself on the handle bar and the inclination.
 
Back
Top