What is the best way to detect randomly placed objects using an ultrasonic?

Teach the sensor the "background" as your good condition. By teaching a good ultrasonically reflective background surface as the good condition, any object getting between the sensor and the background will be detected, therefore causing the output to switch.

Faq tags: