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

Use potentiometer for angle offset calib #760

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

saitenntaisei
Copy link

@saitenntaisei saitenntaisei commented Sep 4, 2024

Summary

I want to use potentiometer to calibrate Position PID Offset Angle in my servo because the position accuracy of hall sensor is not enough for me. I believe there are some people who also need this feature, since using potentiometer as a position measurement tool is common.

Detail

I use ADC1 as the potentiometer voltage input, because ADC2 might be used as a brake. I just linear mapped voltage to angle and I put moving average filter in order to erase the noise. This feature can be toggled by newly added MCCONF_P_PID_POT_OFFSET_CALIB.

Impact

vedderb/vesc_tool#380 is needed for signature matching, though feature would be off in the default.

TEST

I tested this PR on SUPERFOC6.8 and everything worked as I expected.

@saitenntaisei saitenntaisei changed the title [Feature] Use potentiometer for angle offset calib Use potentiometer for angle offset calib Sep 4, 2024
@saitenntaisei saitenntaisei marked this pull request as ready for review September 4, 2024 06:24
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.

1 participant