About proximity sensors

Hey guys,

I’m starting a new project which involves a proximity sensor that has to detect a range from 1cm to 5cm. Which could be the best option to go for?


Is it always detecting the same thing?

It has to detect when an object is close to the sensor. Different objects but same shape.

You need to be a bit more specific. Metal? Shiny? White? Surface normal to detector? Speed required?

It is like a pool game, I need to know when the ball falls inside the hole. I guess the balls will be of different colors made of acrylic, wood or metal.

I need to know when the ball falls inside the hole.

If they are not going somewhere else you can use a few micro switched to detect they are in the hole like this project:- http://www.thebox.myzen.co.uk/Hardware/Crazy_Golf.html

However if the hole is dark then you could use an IR beam that is broken by the ball.

If it was the same or nearly same object then I would suggest using strength of reflection of light from the object. If you want to see if a ball is in a pocket then beam interrupt is probably the way to go.

Balls of different materials will be very hard to make the same density and elasticity. They won't behave with the consistency of pool balls, judging blade on an angle shot will kind of suck.

Then an IR LED and a IR receiver would be a the best choice? Because maybe the hole isn't always completely dark.

I am a bit lost with which would be the best choice.

This one using an IR LED and a photoresistor:


or this one using a QRD1114 IR emitted / Phototransistor.


With the first link you might struggle to get the distance. I used a transistor amplifier in this project to get the required distance:- http://www.thebox.myzen.co.uk/Hardware/Sneak_Thief.html

The second is more expensive and the web page has it wrong how it works. It does not use reflected intensity but reflected angle, that is why you can get a distance measurement from it. It is more likely to work without any further auditions and be less sensitive to external light pollution.