Skip to content

Extension of the CalibratedSensor #54

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 10 commits into from
Mar 12, 2025
Merged

Extension of the CalibratedSensor #54

merged 10 commits into from
Mar 12, 2025

Conversation

askuric
Copy link
Member

@askuric askuric commented Mar 12, 2025

This is an extension of the existing CalibratedSensor code that makes it much more flexible.

  • It supports both BLDC and Stepper motors, even maybe HybridSteppers - didn't try it
  • It allows for setting any LUT size
  • It allows to load the LUF from the code and skip the calibration

I had a lot of trouble with magnetic sensors and stepper motors. Even with 3d printed parts I was never able to completely remove the missalignment, there was always some variation in the motor's torque.

With this code, it is very well eliminated. And even if the sensor is not perfectly positioned, the torque output is very nice and smooth. I've tested both voltage and current control and they both work well, at least in my case.

LIMITATION
The limitation though is that the misalignement error should be within the electrical revolution range (for example if using NEMA 17 it should not exceed 360/50 = 7.2 degrees). So this still means that the sensor should be reasonable well positioned.

@askuric askuric changed the title Feat stepper calib Extension of the CalibratedSensor Mar 12, 2025
@runger1101001 runger1101001 added this to the 1.0.9 milestone Mar 12, 2025
@runger1101001
Copy link
Member

Can we merge it?

@askuric
Copy link
Member Author

askuric commented Mar 12, 2025

Yep, this one can be merged directly.

@runger1101001 runger1101001 merged commit 59fc94e into dev Mar 12, 2025
20 checks passed
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