reflective sensor to detect black object

Hi,

I need to detect the presence of a small black object along a thin track. The object is small tubular shape, diameter of 4mm and length of 4mm. It is of opaque black color. The track along which it travels is steel.

I need to detect the presence of the black object at a specific location along the track. I looked into IR reflective sensor, but two questions remain.

  1. The track is not exactly shiny or white, it's dull steel. Not sure if the common IR sensors can detect the color difference.

  2. The object and the track itself is only 4mm across. Not sure if the sensor can "focus" on such a small area while ignoring the background.

Can you recommend a sensor for this or advise on the feasibility of this? Preferably I can use an Arduino, otherwise, I may have to look into camera systems with OpenCV.

Thanks

paulwece:

  1. The track is not exactly shiny or white, it's dull steel. Not sure if the common IR sensors can detect the color difference.

Black may or may not reflect IR - depends on the pigments used. As we see it as black, doesn't mean it's also black in IR. Grab an IR sensor and try it out.

  1. The object and the track itself is only 4mm across. Not sure if the sensor can "focus" on such a small area while ignoring the background.

You can use an inductive or capacitive sensor to find the metal rail, but you have to get very close to it (a few mm away at most).

Not sure if the common IR sensors can detect the color difference.

Since you have possession of the objects, you are in a good position to buy a few different sensors and experiment. Let us know what you find out!

Can you get your optics down level with the track?
If yes, then you may be able to shoot across the surface to detect the linear position of the target.
Lateral position on the surface needs more thought...