I built a hand driven rig that allows me to polish the barrels from airsoft guns. They are toys that shoot plastic BBs at safe velocities for those who are interested. I am now going to automate the process. This involves a rod moving linerally through about 570mm of travel. To do this I have decided on using some stepper motors with a belt and pulley system.
The question I have now is what devices are on the market that can measure distance? Im going to need to pair this with a spring in order to determine the force being applied to the rod to move it. Basically a caliper mechanism that can read into a Raspberry Pi paired with a spring will allow me to make a scale of sorts.
Im new to this sort of thing and not sure what search terms to even begin with haha. This distance measuring device will only need to measure in a range of roughly 30mm. Not very far, just a little.
Any input would be appriciated!