Sensor to detect motion

I'm making a piston that is attached to a motor by a string, the piston is "cocked" back using the motor. The piston is sliding through a linear bearing I made. The end of the piston is attached to elastic bands which provide the moving force when extending the piston. When the piston needs to be extended, the motor needs to unwind to provide little resistance so that the piston can move freely. To know when I need to stop the motor (for both extending and cocking), I need to know the position of the rod. (I can't use an encoder for the motor because feedback in the motor doesn't necessarily correspond to feedback in the position of the piston, what if when extending, the piston hits something and doesn't move forward. Then the motor will continue to unwind even though there is no tension in the string and the string will bundle up and get caught somewhere).

Currently, I'm using a VL53L0X module to measure the position of the piston, but the output is unstable even when the piston is stationary.

Note: In case the diagram is confusing, the VL53L0X is placed slightly to the side of the string so I have access to the end of the piston

Can you access the end of the rod axially and measure the distance from a fixed point?

Use a time of flight laser sensor and have a reflecting disc on the end of the bearing.

It sure would be a lot easier to help if you posted some photos or a sketch

yes

I'm currently using that setup with a VL53L0X, but when the rod is stationary, the output isn't stable. Changes by about ±30mm, so I need a better solution

You haven't told us enough about what you have to give us a fighting chance to know if it requires a hardware or software soloution.

I do not have anything like that variation in readings when I use that sensor.

1 Like

I've changed the post. I was using a black surface with the VL53L0X, now that I use a white surface, the reading only changes by ~10mm, so there was no real problem. I'm guessing if I use a more reflective surface like you suggested, I'd get better results

Mat white is better than a reflective surface.

It will also help if you tried averaging a few readings.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.