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

Feature request: support for one wire PAS #525

Closed
AkbarRamzan opened this issue Sep 1, 2022 · 7 comments
Closed

Feature request: support for one wire PAS #525

AkbarRamzan opened this issue Sep 1, 2022 · 7 comments

Comments

@AkbarRamzan
Copy link

Currently only quadrature sensors are supported but many (cheaper) PAS sensors use only a single wire.
There are 2 signal types for one wire PAS:
One pulse every time a magnet passes when pedalling forward, no signal when pedalling backwards
One pulse of a certain width when pedalling forwards, a different width when pedalling backwards. Backwards pedalling can be used for regen.
Ideally the servo pin should be the default as uart could be used for Bluetooth / display but ebikes are unlikely to use servo.

@AkbarRamzan
Copy link
Author

image

@AkbarRamzan
Copy link
Author

#243 (comment)
some code for PAS that may be useful.

@AkbarRamzan
Copy link
Author

image
I captured the signal generated when pedalling forwards using lisp at increasing RPM
image
It appears back-pedalling has <50% duty cycle so you can work out pedal direction that way. Back-pedalling for regen would be nice.

@AkbarRamzan
Copy link
Author

I'm adding support through lisp/ QML and packages. Stay tuned

@ReFeXe
Copy link

ReFeXe commented Apr 21, 2023

How did you manage to implement this?
Have varied width pas.
when using code #243 (comment)
I get triggered both ways

@ReFeXe
Copy link

ReFeXe commented Apr 22, 2023

I'm adding support through lisp/ QML and packages. Stay tuned

I can't figure out how to adapt the above code

@ReFeXe
Copy link

ReFeXe commented Apr 22, 2023

I did it, though.
https://github.com/ReFeXe/bldclcd3/blob/release_6_02/applications/app_pas.c

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

2 participants