Skip to content

adding MagneticSensorPWM implementation #61

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

Merged
merged 2 commits into from
Apr 9, 2021
Merged

Conversation

jordancormack
Copy link
Contributor

Adding support for PWM magnetic position sensors, tested with the AS5048a's PWM output. This implementation is almost identical to the already existing MagneticSensorAnalog sensor type, giving an output of 0 to 2Pi radians per mechanical revolution.

This implementation has been tested with the AS5048a PWM output.  It follows an almost identical format to the existing MagneticSensorAnalog implementation.
@askuric
Copy link
Member

askuric commented Apr 9, 2021

Hey @jordancormack
Thanks for the pull-request. I'm sorry for a bit of delay. I am going to merge it to the dev branch but I dont think that this implementation will be the one we will use. I'll use your code to bootstrap the pwm sensor implementation, but we will be uisng an interrupt based support.
pulseln is blocking function and it will take too much time to execute. Especially since the pwm sensors have pwm frequency of 1kHz which means that pulseln takes at least 1ms to execute. Which is ok to test stuff, but it is too long for smooth operation.

Thanks!

@askuric askuric merged commit bf00d4f into simplefoc:dev Apr 9, 2021
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

Successfully merging this pull request may close these issues.

2 participants