Potentiometer vs Optical Shaft Encoder

If a robot mechanism, such as an arm tower or chain bar, were to rotate more than the set range of the potentiometer, then would it be ok to use an optical shaft encoder instead? If so, then why aren’t optical shaft encoders always used instead of a potentiometer since their range is infinite compared to a potentiometer?

Potentiometers are often used on arms because they never reset, the value of the pot if an arm is parallel to the ground will stay the same if you turn off the robot and turn it back on. Also, they are lighter. If your arm or chain bar goes past the degrees of freedom then feel free to use an encoder.

An optical shaft encoder would work in this application, but the VEX Encoders have a lower resolution than the Potentiometers.

If we assume that the Potentiometers can measure roughly 230 degrees of rotation and the 0-4095 ADC reading we get out of the cortex is mapped to that 230 degrees of rotation, then the potentiometer can read at a resolution of 230/4096 degrees, or roughly 0.056 degrees. The encoders measure 360 ticks per revolution which only offers a resolution of 1 degree, which is far worse. I would suggest using a gear reduction to spin a shaft such that it is constrained to 230 degrees so that you can use a potentiometer if you have the space, the added resolution makes a big difference.

Also I just want to add that the pot is absolute position and an encoder is only relative. So if you arm was slightly off the ground when you turned the cortex on your results would not be consistent with if the arm was on the ground when you turned on.

@The Pioneers For the shaft encoder, does it have to be on the same axle as the axle connected to the motor? For example, if I have a 1:5 gear ratio and I put the encoder on the axle connected to the 60 tooth gear, would the information I’m getting from the encoder be incorrect? I was just looking at another post on the forum talking about how shaft encoders wouldn’t be accurate if they weren’t directly connected to the axle that was connected to the motor.

It wouldn’t be incorrect. The values would change 5 times as slow as if it were connected to the motor axle. The measurements wouldn’t be as exact as if you had connected it to the motor, but the measurements certainly will not be incorrect.

@jmmckinney @tabor473 Unfortunately, due to our chain bar/arm tower rotating more than 230 degrees, the potentiometer would limit its functionality. Also, is it bad if we were to use a potentiometer and have the axle length constantly hit the maximum limit of the potentiometer? In other words, if the only thing that was stopping the axle from turning any further was the potentiometer, would that result in the breaking of the sensor?

Thanks! @The Pioneers

Yep no problem, and to answer your other question, potentiometers break easily so if that was the only thing stopping your mechanism then it would most likely break @Entropy170

Yes, you would likely break the sensor. So it is said, you can link the arm to the potentiometer with timing chain (that tiny and otherwise useless vex chain) at, say a 2:1 ratio. When the arm moves 20 degrees, the pot moves 10. The sensor value from the pot is 16 units per degree (iirc,) so there would still be decent resolution to program with.