...
> Sensor’s minimum-distance does not have to be much smaller than 20cm (8“).
Infrared:
Binary Output: detects whether an object is within a threshold distanceMultiple Bit Output: detects the more or less accurate distance to an object
Pro:
- Quality products comparatively cheap
- In some cases very high resolution (up to 1 mm)
Contra:
- Problems with sun light
- Problems with recognition of dark or black objects
- Small range sizes
Recommendation after some research:
Sharp GP2Y 0A02 (ca. $11, 20cm – 150cm Range, Analogue Output)
http://acroname.com/products/SHARP-GP2Y0A02YK0F-IR-PACKAGE
(see also: http://acroname.com/articles/sharp-infrared-ranger-comparison for comparison)
Ultrasonic
Pro:
- Not depending on optical properties of an object -> more reliable in common usage
...