User manual

40
iii. Sharp GP2YOA21
This type of sensor is widely used; popular choice for application and
development that require accurate distance measurements and inexpensive proximity
sensor. Connect +5v to power and ground and the output signal is an analog voltage
that varies from +3.5v to 0v, which is a proportional to the distance between the
sensor and the object. This IR proximity sensor is more economical than sonar range
finders. It provides much better performance than other IR sensor alternatives.
Interfacing to most microcontrollers is straightforward which the single analog
output can be connected to an analog-to-digital (ADC) converter for reading distance
measurements. The output can also be connected to a comparator for threshold
detection.
Figure 3.19 : Distance sensor block diagram [21]
An IR proximity sensor works by applying a voltage to a pair of IR light
emitting diodes (LED‟s) which in turn, emit infrared light. This light propagates
through the air and once it hits an object it is reflected back towards the sensor. If
the object is close, the reflected light will be stronger than if the object is further
away. The sensing unit is in the form of an integrated circuit (IC), it detects the
reflected infrared light, and if its intensity is strong enough, the circuit becomes
active. When the sensing unit becomes active, it sends a corresponding signal to the