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

Reset motor's internal position #156

Open
chrisruk opened this issue Jun 29, 2022 · 6 comments
Open

Reset motor's internal position #156

chrisruk opened this issue Jun 29, 2022 · 6 comments

Comments

@chrisruk
Copy link
Contributor

Asked about here https://forums.raspberrypi.com/viewtopic.php?p=2015482

@BeebBenjamin
Copy link

I wondered if this was possible too.

@chrisruk
Copy link
Contributor Author

It may be possible to do this in software library, by creating an offset.

Out of interest, what would you use this feature for?

@BeebBenjamin
Copy link

My use case for this would be starting from where the motor last stopped or was last zeroed. I wouldn't want it to return to the hard zero. If it can already do that then OK. One other thing I noticed, when asking a medium angular motor to step 10 degrees for 36 times to make 360, the motor seems to under or overshoot. Would being able to reset 0 help this at all?

@chrisruk
Copy link
Contributor Author

I'm not quite sure what you mean by 'My use case for this would be starting from where the motor last stopped or was last zeroed'. What function do you mean you'd call?

@BeebBenjamin
Copy link

I would use run_to_position() incremented, with a reset to position after a complete revolution or whenever I want, like you can with a stepper with PID like the uStepper. If this is redundant because of run_for_degrees() then there is no need for it. For my use case (a turntable), what matters is having the quoted 1 degree accuracy from the motor, which it doesn't seem to have with run_for_degrees(), but may do if the position was able to be reset.

@chrisruk
Copy link
Contributor Author

chrisruk commented Dec 5, 2022

I'll pass this on to the firmware dev, to see if they have any suggestions to increase the accuracy of run_for_degrees.

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