So this is technically illegal for a competition robot, however, not everyone builds competition robots so it’s worth knowing.
The school has some potentiometers that don’t work well anymore primarily due to inadvertent continuous rotation. I also had one that was bad straight out of the box, it gave an incorrect reading part way through the range. Although they are not expensive, it’s cheaper to repair them.
The hard part of this process is opening the potentiometer enclosure, I used a small flat blade screwdriver and pried them open on the inside of the slot where they are normally attached to the robot.
Once open they look like this.
I found replacement parts at Mouser.
The data sheet for this part is here.
I bought 10 for less than $5 (excluding shipping).
Parts ready for installation.
Remove the pot completely from the housing, desolder the old pot, solder in the new pot with the wires in the same order. I trimmed and flattened the leads for the new pot before using it, normally this component would be installed in a PCB so it’s leads are designed to hold it in the board prior to soldering.
Here’s a comparison between original and new part.
Put everything back together, make sure the cable relief is in its slot correctly. I used a small amount of plastic model glue to hold the two parts of the cover together.
Takes about 10 minutes.