Potentiometer for rotational position

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
differencetones
 
Posts: 3
Joined: Tue Feb 15, 2011 12:59 pm

Potentiometer for rotational position

Post by differencetones »

Hello!
(not sure if this is the right place, but I'll give it a shot)

I'm working on a project where there are some stepper motors involved. I need to know (more or less) exact position of the motor in real-time as it's turning around its axis. At first I thought about using these: https://www.adafruit.com/product/377 which I have a (small) mountain of. But that won't do as these have 24 discrete steps and the stepper turns in 1.8 degree increments.
Does anyone have a suggestion or experiences with using a pot with stepper motors? Or some other suggestion?

Any hints will be welcome!

User avatar
adafruit_support_bill
 
Posts: 88097
Joined: Sat Feb 07, 2009 10:11 am

Re: Potentiometer for rotational position

Post by adafruit_support_bill »

The limitation of a pot is that it will not handle continuous rotation. Most pots turn less than 360 degrees. there are 'multi-turn' pots. But they typically have a finite number of turns (e.g. 10).

What are the requirements of your application? There are several approaches to monitoring the position of steppers.

The simplest method is just counting steps. That will give you a relative position with the same resolution as your stepper - assuming that you do not overload the motors and cause them to skip steps. This is usually augmented with some sort of 'home sensor' to establish the home position. This can be a mechanical, optical or inductive switch to detect the home position.

Beyond that, there are optical or magnetic rotary encoders. These come in various angular resolutions. These also give you relative position and are typically coupled with a homing sensor as described above.

The most sophisticated type of rotational position sensor is an 'absolute' rotary encoder. These directly read out the absolute rotational position without the need for homing. Expect to pay a lot of one.

User avatar
differencetones
 
Posts: 3
Joined: Tue Feb 15, 2011 12:59 pm

Re: Potentiometer for rotational position

Post by differencetones »

Thanks for that!
Yes, I know about the limitations of pots and have been scratching my head for a little while about this.
So, I'm making a series of rotating speakers, where the user can rotate a speaker in one direction "endlessly," ie rotate clockwise for 5 minutes, at different speeds. I would like to always know the position of the motor, if something needs to be reset or other.
How do you count the steps of the motor? Would you use something like AccelStepper?

User avatar
adafruit_support_bill
 
Posts: 88097
Joined: Sat Feb 07, 2009 10:11 am

Re: Potentiometer for rotational position

Post by adafruit_support_bill »

Accelstepper tracks relative position by counting steps internally, and you can query the current position at any time via the CurrentPosition function:
https://www.airspayce.com/mikem/arduino ... 8886bf6fc5

You can initialize the home position at any time by calling SetCurrentPosition:
https://www.airspayce.com/mikem/arduino ... 4e66f6c689

User avatar
differencetones
 
Posts: 3
Joined: Tue Feb 15, 2011 12:59 pm

Re: Potentiometer for rotational position

Post by differencetones »

That's great, thanks for your input!

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”