0

Is there any way I can control the position of servo by changing the value of potentiometer for using it for 360 deg motion?

  • Rotary encoders are not that expensive, and not really hard to code into a sketch. Why don't you try that instead of a potentiometer? – Filip Franik Apr 17 '19 at 12:06
0

A pot doesn't spin all the way around, so you could map hi/lo values, but you can't run more than one lap with it. You could add a button that silences the pot input, so that you can hold the button and dial back the pot, releasing the button to continue turning the servo with the pot. In that case, you use relative values between samples to turn the servo instead of simply feeding it the ADC value.

A rotary encoder is probably a better fit though, since it can spin 360 just like the servo. You would still want to "gear down" the encoder if you're micro-stepping, so that say, 4 turns of the encoder yields 1 turn of the servo. This allows full 360 and as much arbitrary precision as your project needs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.