I'm trying to measure the distance an object is pulled along a pulley track using arduino sensors. I have an object that is manually pulled, from a resting position, on a pulley system and I need to be able to track the distance it travels over one pull.
Example: The object traveled 90% (example) of the total pulley distance for 5/10 pulls.
Example: The object traveled 11.53 ft along the pulley.
Attached the image below for a visual diagram. I have two ideas, but I'm not an Arduino sensor expert. I'd love input on an elegant solution.
Use an arduino (hall?) sensor to sense how many times the pulley rotates, and then use an equation to determine the distance.
Use a sensor that senses the distance pulled in cord, maybe each direction, and record that distance. I got this idea from pump sensors, no idea if a comparison exists.
Really just looking for advice on what sensors to use, how to implement them (general), and what type of metrics I could record.
Putting a rotary encoder on the pulley should allow or very accurate measurements if the rope does not slip on the pulley.
You mention 11 feet but you don't give the range of movements you want to measure. I don't know if an ultrasonic sensor would work over that distance or whether it would be sufficiently accurate.
As often in practice, there exist multiple ways to measure the distance, each with its special pro's and con's.
Direct distance measurement (by US...) is limited by the sensor range and accuracy, but is absolutely precise within these limits (no origin shift).
Indirect distance measurement (pulley turns) is subject to slip, rope elongation or other effects, which can result in a persistent absolute error. Such sensors should be complemented by e.g. limit switches, which allow to restore the device to some absolute reference point.
One can choose either method, or combine both, to yield results of the required accuracy.
The easiest way I can think of is just to attach a magnet to the pulley and count the number of rotations with a hall sensor, as you mention.
For it to be accurate you need to make sure there is very little slipp between the pulley and the rope. This can be done be lining the pulley with rubber or if it does not create to much friction, wrap the rope around the pulley. If this does not work, you can let the rope pass through two opposing wheels which do rotate with the rope.
You also need to place more magnets on the pulley to increase the accuracy, so you can detect quarter turns or something. There is however quite limited how many magnet you can have without the interfering.
So to make it accurate I will suggest adding a disc, with a high number of slits, to the pulley, shine a light through and count the number of slits it has rotated with a light sensor.