Home
Grove - 80cm Infrared Proximity Sensor User Manual
Contents
1. Grow the Difference y seeed Grove 80cm Infrared Proximity Sensor User Manual Release date 2015 9 22 Version 1 0 Wiki http www seeedstudio com wiki index php title Twig 80cm Infrared Proximity Sensor v0 9 Bazaar http www seeedstudio com depot Grove 80cm Infrared Proximity Sensor p 788 html cPath 25 31 N y seeed Grow the Difference Document Revision History y seeed Grow the Difference Contents Document Revision History veor0venraranennennrnranennannaneennanearevnsanenraneneren 2 1 Introduction css sise nee ee eee eee EEE een EEE EE EEE EES 2 2 Features eT eC RETR ERE Ne RE TAE ETC ROR CRE ROC re Re era RIC REE EE Ep 3 3 Application Ce cr eee 4 4 Specification ec 5 5 Usage EE EEE EE DE ETE EEE TE EEE NE EE EE VEE EE EEE 6 5 1 With Arduino secs esse seesessssseseseesssesseesssseeseseeseseseesssee 6 5 2 With Raspberry Pi 2 0 ttereee er reece treet ee eee nner dann eres nnenes 8 6 Reference EN EE CAERE OE EE EN ONE EN SN EN orale 10 7 Resources desert doremi ne ane IS AMS TTS SES SS SSS 1 1 V y seeed Grow the Difference Disclaimer For physical injuries and possessions loss caused by those reasons which are not related to product quality such as operating without following manual guide natural disasters or force majeure we take no responsibility for that Under the supervision of Seeed Technology Inc this manual has been compiled and published which cov
2. ered the latest product description and specification The content of this manual is subject to change without notice Copyright The design of this product including software and its accessories is under tutelage of laws Any action to violate relevant right of our product will be penalized through law Please consciously observe relevant local laws in the use of this product y seeed Grow the Difference 1 Introduction The 80cm Infrared Proximity Sensor is a General Purpose Type Distance Measuring Sensor This sensor SharpGP2Y0A21YK boasts a small package and very low current consumption takes a continuous distance reading and returns a corresponding analog voltage with a range of 10cm 4 to 80cm 30 Can be used in TVs personal computers cars and so on N y seeed Grow the Difference 2 Features Easy to use Wide supply voltage range 2 5V 7V Grove Interface y seeed Grow the Difference 3 Application Ideas Waterdrop conservation Toys Robotics N y seeed Grow the Difference 4 Specification Current Item Minimum Typical Maximum Working Voltage 2 5V 5V 7V Analog Output 0 25V 0 4V 33mA y seeed Grow the Difference 5 Usage 5 1 With Arduino The Infrared Proximity sensor is easy to use The relationship between the voltage reading and the distance as shown below When we read the voltage which indicate the distance from t
3. he object in front to this sensor Connect the 3 pin connector to the sensor and connect the 4 pin connector to the Al port of the Grove Base Shield Note This sensor is quite small and use a tiny connector called the Japan Solderless Terminal JST connector These connectors have three wires ground vcc and the output signal Because this sensor fire continuously and don t need any clock to initiate a reading cycle it is easy to interface with any microcontroller For the Arduino amp Seeeduino we prepared a 4 pin to 3 pin wire to convert the 3 pin connecter on the sensor to 4 pin connecter on the Grove Base Shield to compatible with the Seeeduino Grove interface Connect Arduino Seeeduino via a USB cable Copy and paste code below to a new Arduino sketch define IR PROXIMITY SENSOR Al Analog input pin that is attached to the sensor define ADC REF 5 reference voltage of ADC is 5v If the Vcc switch on the Seeeduino board switches to 3V3 the ADC REF should be 3 3 float voltage the sensor voltage you can calculate or find the distance to the reflective object according to the figures on page 4 or page 5 of the datasheet of the GP2YOA21YK void setup y seeed Grow the Difference initialise serial communications at 9600 bps Serial begin 9600 void loop voltage getVoltage Serial print sensor voltage Serial print voltage wait 500 m
4. illiseconds before the next loop delay 500 RRR AAR TRO RR ORR A RR ORR AI ROR TERR I AK RK ROR OR OR RE RR OR ORR Function Get voltage from the sensor pin that is connected with analog pin Parameter void Return float the voltage of the analog pin float getVoltage int sensor value int sum read the analog in value for int i 0 i lt 20 i Continuous sampling 20 times sensor value analogRead IR PROXIMITY SENSOR sum sensor value sensor value sum 20 float voltage voltage float sensor value ADC REF 1024 return voltage Upload the code please click here if you do not know how to upload Open the Serial Monitor you can get the voltage you can calculate or find the distance to the reflective object according to the below figures y seeed Grow the Difference GP2Y0A21YK White paper Reflective ratio 90 Gray paper Reflective ratio 18 Analog output voltage Vo V Distance to reflective object L cm Note Because of some basic trigonometry within the triangle from the emitter to reflection spot to receiver the output of the detector is non linear with respect to the distance being measured 5 2 With Raspberry Pi 1 You should have got a raspberry pi and a grovepi or grovepi 2 You should have completed configuring the development enviroment otherwise follow here 3 Connection Plug the sensor to grovepi s
5. ocket D4 by using a grove cable 4 Navigate to the demos directory cd yourpath GrovePi Software Python To see the code nano grove infrared distance interrupt py Ctrl x to exit import time import grovepi Connect the Grove Infrared Distance Interrupt Sensor to digital port D4 SIG NC VCC GND sensor 4 grovepi pinMode sensor INPUT y seeed Grow the Difference while True LENS Sensor returns LOW and onboard LED lights up when the received infrared light intensity exceeds the calibrated level if grovepi digitalRead sensor print found something else print nothing time sleep 5 except IOError print Error 5 Run the demo sudo python grove infrared distance interrupt py N y seeed Grow the Difference 6 Reference This new rangers use triangulation and a small linear CCD array to compute the distance and or presence of objects in the field of view The basic idea is this a pulse of IR light is emitted by the emitter This light travels out in the field of view and either hits an object or just keeps on going In the case of no object the light is never reflected and the reading shows no object If the light reflects off an object it returns to the detector and creates a triangle between the point of reflection the emitter and the detector Object Object Point of Reflection Different Angles with Different Distances The angles in
6. this triangle vary based on the distance to the object The receiver portion of these new detectors is actually a precision lens that transmits the reflected light onto various portions of the enclosed linear CCD array based on the angle of the triangle described above The CCD array can then determine what angle the reflected light came back at and therefore it can calculate the distance to the object This new method of ranging is almost immune to interference from ambient light and offers amazing indifference to the color of object being detected Detecting a black wall in full sunlight is now possible N y seeed Grow the Difference 7 Resources e GP2Y0A21YK datasheet
Download Pdf Manuals
Related Search
Related Contents
User Manual Compact Signal Calibrator AMETEK JOFRA CSC101 Rubbermaid 2890 Sony CX-NMT90 User's Manual Verilux HappyLight 6000 Samsung Galaxy Tab 3 (8.0) Керівництво користувача(Kitkat) 取扱説明書 - 日立の家電品 MANUAL DEL USUARIO ¡ADVERTENCIA! VGN-AR130G Mode d`emploi Copyright © All rights reserved.
Failed to retrieve file