Description
GP2Y0A21YK0F is a distance measuring sensor unit,composed of an integrated combination of PSD(position sensitive detector) , IRED (infrared emittingdiode) and signal processing circuit.This device outputs the voltage corresponding to the detection distance, So this sensor can also be used as a proximity sensor.
Features
- Distance measuring range : 10 to 80 cm
- Analog output type
- Supply voltage : 4.5 to 5.5 V
- 3-pin JST connector
Getting started with Sharp GP2Y0A21YK0F 10~80cm Infrared Proximity Distance
In this tutorial we are going to see! how to interface it with arduino so that we can develop big system such as security system, counter,… this infrared proximity sensor has a simple theory of light reflection if the there an obstacle it reflect the light and the photodiode vary the resistance according to the amount of reflected right. so let’s start
Step1: Hardware required
Step2: Hardware connections
connect the infrared sensor as shown below so that we can read the data from the sensor
after now we are ready to upload the sample sketch and see, how it works
Step3: Testing the circuit
No required library for this system( for the additional purpose you can use a library but for now no required library). you can download the sample sketch here, open the sketch and upload it!! you will start to get value, take an object (like a book, or your hand) move forward and backward you will see how the values are changing according to the distance between an object and a sensor as shown below
Step4: Documents
Download all documents used for this tutorial here
Reviews
There are no reviews yet.