Category

PARTS: digital PROXIMITY SENSOR (SHARP GP2Y0D02)

The GP2Y0D02 is an infrared proximity sensor with a detection field that extends 80cm. This type of sensor can be utilized to develop collision avoidance systems for robots. We’ll demonstrate this sensor utilizing a single resistor as well as a multimeter.

Sharp GP2Y0D02 fixed 80cm IR proximity detector (Digikey #425-2064-ND, $14.38). Datasheet (PDF).

The GP2Y0D02 needs a 5volt power supply (not shown). A 0.1uF bypass capacitor between power as well as ground (C1) is a great idea, however we didn’t utilize it in our demonstration. The open collector output (pin 1) pulls to ground when no item is detected, a 12K pull-up resistor (R1) holds the signal high when an item is detected.

In the presentation we linked the output of the sensor to a multimeter. When nothing is in front of the sensor, the detector holds the output low (0.40volts). When we put a PCB in front of the sensor, the output modifications to high-impedance as well as the pull-up resistor (R1) holds the signal high (5volts).

Why open collector?

An open collector output doesn’t toggle between high as well as ground, it toggles between ground as well as unconnected. The unconnected state, likewise called high impedance, exerts nothing on the output as well as enables the signal line to float. This is an undefined specify for many microcontrollers that returns quickly diverse values, so we utilize a resistor (R1) to hold the signal high. The open collector output overcomes the little amount of present streaming with resistor to register the low state. Without this resistor, the output will never reach a appropriate high state.

Open collector outputs are helpful when a number of sensors requirement to share the exact same microcontroller pin. several sensors outputting high to the exact same microcontroller pin is typically thought about a poor method that can damage parts of a circuit. several open collector outputs, however, can only switch to ground; a single resistor holds the signal high. In the situation of several GP2Y0D02s, the signal will be high only when all linked sensors find an item as well as switch to high impedance state.

Like this post? inspect out the parts messages you may have missed.