Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make PAS ignore pedal rotation during Walk Assist #126

Closed
majonessyltetoy opened this issue May 18, 2023 · 7 comments
Closed

Make PAS ignore pedal rotation during Walk Assist #126

majonessyltetoy opened this issue May 18, 2023 · 7 comments
Milestone

Comments

@majonessyltetoy
Copy link

majonessyltetoy commented May 18, 2023

When engaging Walk Assist my pedals rotate with the chainring (I know I should clean and lube the motor).
After releasing Walk Assist, since the pedals have been rotating PAS kicks in and send the bike (which I'm walking) into full throttle of whichever Assist Level it is in.

User solution: Go into Assist Level 0 before using Walk Assist or have a well maintained motor which does not rotate the pedals when the chainring rotate.

Developer solution: Make PAS ignore pedal rotation during Walk Assist and possibly have a timeout after Walk Assist like the original firmware.

@majonessyltetoy majonessyltetoy changed the title Make PAS ignore pedal rotation during Walk Mode Make PAS ignore pedal rotation during Walk Assist May 18, 2023
@dav0000000
Copy link
Contributor

Pas would be ignored during PUSH as that function is not called. I'd guess it is likely something to do with ramp down or another function adding power where it shouldn't the moment PUSH is released.

@majonessyltetoy
Copy link
Author

Yes, but as soon as the user let go of the Walk Assist, then PAS reads the cadence pulse counter, which has been building up.

Would something like this work?
c96bd2e

I don't have a build env to test it out.

@dav0000000
Copy link
Contributor

dav0000000 commented May 23, 2023

Not what you want to hear but the best solution for you it to buy and install a new pawl clutch (if that is the problem) and of course to setup a build environment. Your approach looks ok to me, you might want to stop the timer to update the value as it is a uint16_t.

void pas_zero_pulse_counter()
{
ET0 = 0; // disable timer0 interrupts
pas_pulse_counter = 0;
ET0 = 1;
}

@aalm
Copy link
Contributor

aalm commented May 26, 2023

I don't have a build env to test it out.

Have you managed to build it yet?
Was relatively easy to get the makefile working on linux(rpi4) for build env.

@danielnilsson9
Copy link
Owner

I guess this could be a quite common issue as I have this problem on my 6 year old bbshd too. Will try to add a fix in next version.

@danielnilsson9 danielnilsson9 added this to the 1.4.0 milestone May 28, 2023
danielnilsson9 added a commit that referenced this issue May 28, 2023
…ode to avoid incorrectly triggering PAS level if pedals where rotating.
@danielnilsson9
Copy link
Owner

Implemented a 1 second timeout when releasing push walk, let me know how it works if anyone decides to test.

@majonessyltetoy
Copy link
Author

Implemented a 1 second timeout when releasing push walk, let me know how it works if anyone decides to test.

Thank you. That fixed the issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants