Looking for advice on sensor for measuring distance a rod travels

I have been doing a bit of searching and cannot seem to find something that will work well so I figured I would ask the larger audience here.

I some small non-ferrous metallic parts which have similar width, but have varying heights that I am trying to sort out by height. I also want to keep track of how many of these parts of each type I have go through in a batch.

The small parts will push the rod into its housing and based on how deep it pushes, it needs to measure the distance. The rod is spring loaded so it naturally wants to stay at 0, but as its depressed from the part, it can travel up to 25mm

Accuracy needs to be to at least 1mm (preferably to .5 mm) and the housing space is very limited (Like 1 inch square)

Due to the limited size, I dont think I can reasonably place a rotary encoder on there, and due to other metallic interference, a proximity sensor or other type wouldn't work either.

Are there any ways to measure the distance a rod travels in / out without a rotary encoder ?

Yes. Have you considered a camera?

Depending on your budget, an LVDT might be appropriate.

1 Like

I'm thinking of the measuring rod moving a gear rack with an engaged gear rotating an optical rotary encoder with, say, 200 pulses per revolution.

Rack & pinion

encoder
encoder

I was also thinking LVDT. I wonder what the errors are in trying to DIY. I mean, it's a very simple concept so it should be easy enough to try.

OTOH, OP is only looking for about 2% precision so an encoder with a gear train or a string pot should be feasible.

OP: a string potentiometer might fit the bill.
[edit]
I've had this project on my back burner for a long time. There are low cost digital scales that can be read with an arduino. The digital calipers are even less expensive (about $10). This project is a good start to understand how to read them: Reading Grizzly iGaging DRO Scales with Arduino | Yuriy's Toys

Hi, @uuacallis
Welcome to the forum.

What range of distances are you aiming to measure?

Will the objects be continuously moving, or will they stop to be measured?

Thanks.. Tom.. :smiley: :+1: :coffee: :australia:

have a look at TOF(Time of Flight) distance sensors

In this use case, there is no place for a camera.

the part / object I am measuring is between 17mm long to 25mm long
They will stop to be measured.

  • Have the rod push a magnet toward an analog Hall Effect sensor “target”.

  • Arduino analog input reads the sensor output.

If space is a problem you can take a look at these keyence lr-x laser sensors ( the head is super small ), the price is in the 'few hundred' dollars range.

P.S.
We also used keyence tof sensors LR-T ( that cost a little more ), but for our application ( with varying, dirty targets ) repeatability wasn't good ( measure varied too much )