Uncategorized

PARTS: ANALOG distance SENSORS (SHARP GP2D12/2Y0A02)

Sharp GP2D12 as well as 2Y0A02 infrared rangers output a voltage proportionate to the distance of an item from the sensor.  The GPD12 senses objects at a distance of 10-80cm, while the 2Y0A02 has twice the range.

We’ve previously looked at the Sharp GP2Y0D02 digital proximity sensor. It only signals the existence of objects, while the GP2D12 as well as 2Y0A02 determine distance to them. If you’ve got a GP2YoD02, it may still be possible to tap the analog output. We’ll show you exactly how utilize these sensors below.

Sharp GP2D12, 10-80cm analog IR ranger (Digikey #425-2046-ND, $12.81). Datasheet (PDF).

Sharp 2Y0A02, 20-150cm analog IR ranger (Digikey #425-2062-ND, $14.38). Datasheet (PDF).

We powered the sensors with a 5volt supply, as shown in the schematic above. We linked the output directly to a multimeter set to determine voltage. The datasheet likewise suggests a 10uF bypass capacitor between the power as well as ground pins, however we didn’t utilize it for this demonstration.

This graph shows the connection between the output voltage of the GP2D12 as well as the distance of objects from the sensor (datasheet page 3, figure 6). You can discover the distance/voltage curve for the 2Y0A02 in datasheet page 5, figure 2. There’s an equation to determine distance from the output voltage, or you might utilize a simple lookup table.

The output is unreliable for extremely close objects, seen as the little hump between 5 as well as 10cm. It’s possible to battle this by utilizing a number of sensors with overlapping ranges, or by putting sensors to ensure that nothing can come within the minimum range.

For an exhaustive discussion of the different Sharp proximity sensors, inspect out the Sharp IR ranger info page at Arconame.

Like this post? inspect out the parts posts you may have missed. want to request a part post? Please leave your tips in the comments.