Non-contact runout measurement device

r/

Good afternoon,

I need to measure the runout of a forging bar. I had thought about some kind of photoelectric sensor but I am not clear which one to use. What I would do is put the bar on a rotating base, make a complete turn and measure the variation to get the radial runout.

The distance at which I would place the sensor would be about 50mm and the surface would be somewhat dark and others a bit rough.

On the other hand, would it be possible to program it with Arduino?

I am quite novice in these topics and I would need some help.

Thanks in advance!