The sharp gp2d12 is an analog distance sensor that uses infrared to detect an object between 10 cm and 80 cm away. It is a great sensor to use for autonomous robots or noncontact optical switches. This extra long range makes them a good alternative for ultrasonic distance sensors. Experiments have been performed with sharp gp2y0a21yk distance sensors. Sharp gp2y0a21yk0f analog distance sensor arduino shop sri. Linearizing the sharp ir ranger 2yoa21 with an arduino. The sharp infrared range sensor 2y0a21 works for long distances, up to 80cm and the sensor has a minimum measurement of 10cm as the sensor wont be accurate because of its suited environment conditions its made for. Download the sharp ir distance sensor datasheet pdf buy an ir distance sensor with a cable from amazon or adafruit, or without a cable from newark. It is also simple to solder three wires to the sensor where the connector pins are mounted see the lower picture to the right. How to use sharp ir distance sensor with arduino gp2y0a21yk0f. Gp2y0a21yk0f sharp ir analog distance sensor distance 1080cm cable arduino.
Download the code for sharp infrared sensor arduino c. In case that reflective object has boundary line which material or color etc. While ultrasonic sensors for more about those see the sensors label can be fooled by textures and echos, ir. Hi all, ive written a small library that gives a steady distance reading in cm of sharp ir sensors. In case that reflective object has boundary line clearly, there is cases that distance can not measure exactly. Arduino uno demo code for the sharp gpy2y0a21yk0f ir distance sensor. This specific series focuses on getting started with arduino, and covers core concepts like basic code structure, interfacing with sensors, actuators and more. Sharp gp2y0a02yk0f ir distance sensor 20150 cm arduino library. Sharp infrarot distanzsensor 2y0a21 bastelgarage elektronik. How to use sharp ir distance sensor with arduino download code.
An accurate measurement experimental campaign has been performed. The sharp distance sensor 2y0a21 is wide angel distance measuring sensor with accurate measurment used for many diy projects. I use these to sense my garage door status and they are working for a long time without any issues. The bildr guide has explains the 2y0a21 as well as other proximity sensors. The sharp gp2y0a21yk0f is a relatively easy to use ir distance sensor with a range of 10 80 cm. How to use the sharp ir sensor gp2y0a41sk0f arduino tutorial. Gp2d120, the sensor output voltage as a function of distance range to an object is approximated by the following equation. Arduino sharp 2ya02 long range ir proximity connecting wires wiring diagram. There are only three connection wires to the arduino and lines of code. Sharp gp2y0a21yk0f ir sensor datasheet download summary sharp datasheet for the gp2y0a21yk0f 1080 cm infrared distance sensor, including technical specifications, output characteristics, and dimensional drawings. Note that there are different variants of this sensor available with different sensing ranging. Distance measuring sensor lineup sharp corporation. Dec 20, 2015 share on tumblr the ir infra red proximity sensor or distance sensor has two elements one is ir emitter and another one is ir receiver.
How to use a sharp gp2y0a710k0f ir distance sensor with arduino. Arduino code and video for sharp ir distance module. Sharp gp2y0a21yk0f distance measuring sensor unitcomposed of an integrated combination of psd position sensitive detector, ired infr. Allow to acquire distance data from analog sharp ir sensors. Sharp gpy2y0a21yk0f ir distance sensor arduino demo download summary.
Im involved in a school project that requires tu misure a distance of an object, i was considering the ping ultrasonic sensor, but i read that is used for far away objects, and i need to measure short distances. Than my teacher came up with a ir distance sensor manufactured by sharp. This sensor requires a sirc01 sharp gp2 ir sensor cable 8. Sharp takes no responsibility for any defects that may occur in equipment using any sharp devices shown in catalogs, data books, etc. Sharp gp2y0a02yk0f ir distance sensor 20150 cm arduino. Sharp ir rangefinder gp2y0a21yk0f 10cm80cm sharp ir. The cad files and renderings posted to this website are created, uploaded and managed by thirdparty community members. In this small project we are going to use sharp gp2d12 sensor and an arduino uno to measure the distance between the sensor and an object.
If youre running a recent version of the arduino ide, you can install it with the library manager. I recently got my self a sharp 2y0a02 distance sensor. The sharp infrared range sensor 2y0a21 works for long distances, up to 80cm and the sensor has a minimum measurement of 10cm as the sensor wont be accurate because of its suited environment. Sharp gpy2y0a21yk0f ir distance sensor arduino demo.
Arduino library for sharp 2y0a21 ir distance sensor jaddr2linesharpdist. Except where specially indicated, models listed on this page comply with the rohs directive. If there is an object in front of this sensor 10 to 80 cm that object reflects some ir rays back to the. When looking at the back, the three connections from left to right are power, ground, and the output signal.
A very basic project composing of a sharp infrared proximity sensor hooked up to an arduino with a few lines of code. Ir sensors work by using a specific light sensor to detect a select light. The variety of the reflectivity of the object, the environmental temperature and the operating duration are not influenced. The gp2y0a21 sharp distance sensor is a great way to add obstacle avoidance or motion sensing to your robot or any other project. This ir sensor is more economical than sonar rangefinders, yet it provides much better performance than other ir alternatives. Sharp gp2y0a21 ir distance sensor 1080cm for arduino. Feb 19, 2017 how to measure distance using arduino sharp ir sensor arduino code. The range of this triangulationbased sensors is from 10cm to 80cm. Read the datasheet and purchase on that senses at the distance you care about for you project. Ir sensors work by using a specific light sensor to detect a select light wavelength in the infrared ir spectrum. Sharp gp2y0a21yk0f analog distance sensor 1080cm 6 pololu.
How to use the sharp ir sensor gp2y0a41sk0f arduino. It can be used for touchless switch, sensor for energy saving, for detection of human body. Distance measuring sensor united with psd 2, infrared led and signal processing circuit. Waterproof jsnsr04t ultrasonic distance sensor with arduino tutorial. The variety of the reflectivity of the object, the environmental temperature and the operating duration are not influenced easily to the distance detection. The product description for the sharp 2y0a21 can be found here. Cfkay gp2y0a21yk0f ir sensor arduino sharp infrared distance sensor. How to use sharp ir distance sensor with arduino download. An alternative library, where the board does the actual calculation on the cpu can be found here.
With a detection range of 4 to 32 and an analog voltage indicating the distance, this sensor is very easy to use. Interfacing to most microcontrollers is straightforward. The latest version of the library can be downloaded here on github or click the button. It will produce 32 khz range ir pulse and typical response time of ir receiver will be 39 ms. When using a protective cover over the emitter and detector, ensure the cover efficiently transmits. In case of changing the mounting angle of this product, it may measure the distance exactly. This content and associated text is in no way sponsored by or affiliated with any company, organization, or realworld good that it may purport to portray. In this tutorial we will use the sharp ir sensor gp2y0a41sk0f to measure distance from an object. Can anyone give me the code to at least print out the distance in the serial. How to use sharp ir distance sensor with arduino gp2y0a710k0f.
How to connect a sharp 2y0a710f distance sensor to arduino jun 21, 2017 by admin in arduino sharp 2y0a710f is a distance measuring sensor unit, composed of an integrated combination of psd position sensitive detector, ired infrared emitting diode and signal processing circuit. In this tutorial, you will learn how the sensor works and how to use it with arduino. Arduino sharp sensor gp2y0a21yk0f 1080cm with cable. The sharp distance sensors are a popular choice for many projects that require accurate distance measurements. It returns an analog voltage that can be used to determine how close the nearest object is. It works for the gp2y0a21yk and gp2y0a02yk, but it easy enough to expand it for the rest of the sensor family. The sharp ir rangers are a very effective means of measuring distance. The output is analog which is proportional with the. Arduino code and video for sharp ir distance module with lcd1602 display this is the arduino code and video for sharp infrared sensor module wiht lcd1602 this video shows you how to measure the distance between 4cm to 180cm depending on the module, using arduino. According to the sharp device specification for distance measuring, sensor model no. The distance sensor produced by sharp is a popular and relatively low cost solution for measuring distance. Once complete, use the table of contents to move on to the next lesson.
Sharp gp2y0a21yk0f ir sensor datasheet parallax inc. It is united with psd infrared led and signal processing circuit. The sensor can be used also for measuring the rightness or color in very limited extent but in this article we will talk only about measuring distances. Sharp 2y0a21 ir distance sensor 3d cad model library grabcad. Arduino code and video for sharp ir distance module with. The sharp gp2y0a21yk0f ir range sensor 10cm to 80cm takes a continuous distance reading and reports the distance as an analog voltage with a distance range of 10cm 4 to 80cm 30. In this article i have shown you how the sharp gp2y0a710k0f ir distance sensor works and how you can use it with arduino. Sharp gp2y0a02yk0f ir distance sensor 20150 cm arduino library raw. Where v is voltage and r is range, the equation produces a very straight line.
How to use a hcsr04 ultrasonic distance sensor with arduino. In the absence of confirmation by device specification sheets, sharp takes no responsibility for any defects that may occur in equipment using any sharp devices shown in catalogs, data books, etc. Sharp gp2y0a21 ir distance sensor 1080cm for arduino the. Measure distance with sharp ir sensor and lcd1602 display in arduino without i2c. Based on typical values from sharp, the formula to translate output voltage ratio into distance is. Gp2y0a21yk0f is a distance measuring sensor unit, composed of an integrated combination of psd position sensitive detector, ired infrared emitting diode and signal processing circuit. Ir distance sensor includes cable 10cm80cm gp2y0a21yk0f. The output is analog which is proportional with the distance of the object. Dec 27, 2014 first, a quick word on why we would want to do this. The sharp 2y0a21 proximity sensor measures distance by shining a beam of infrared light and uses a phototransitor to measure the intensity of the light that bounces back. Sharp gp2y0a21 ir distance sensor 10 80cm for arduino related projects. The sharp gp2y0a710k0f is a relatively easy to use ir distance sensor with an extra long range of 100 500 cm. Sharp distance sensor 2y0a02 is a distance measuring sensor unit.
I have tried it and failed, i have no idea whether the sensor is spoiled or i just suck. This sensor is great for sensing objects up to 5 feet away. This is a sharp gp2y0a21 irinfrared distance sensor for arduino. Applications should be designed to eliminate sources of lens contamination.
Arduino code and video for sharp ir distance module robojax. Based on typical values from sharp, the formula to translate sensorvalue into distance the formula is only valid for a sensorvalue between 80 to 500 is. Arduino based accurate distance measurement for sharp. Linearizing the sharp ir ranger 2yoa21 with an arduino today i will be linearizing a sharp ir ranger. More specifically, i will be using the sharp 2yoa21 f 04. Also use a white or light colored reflect material to ensure accuracy. Sharp ir ranger sensor gp2d12 for arduino geeetech wiki. How to connect a sharp 2y0a710f distance sensor to arduino. Sharp gp2y0a02yk0f ir distance sensor 20150 cm arduino library o. New version arduino sharp sensor gp2y0a21yk0f 1080cm with cable, gp2d12. The aim of this post is to explain how to convert voltage from sharp ranging sensor into an accurate distance.
The interface is 3wire with power, ground and output. Measure distance with sharp ir sensor and lcd1602 display. Gp2y0a21yk 8 data sheet notes keep the sensor lens clean. Distance measuring sensor arduino project hub arduino create. In this article i have shown you how the sharp gp2y0a21yk0f ir distance sensor works and how you can use it with arduino. This is a start guide for using distance sensors with arduino and some processing. With use of a servo you can provide a wide view by pointing the sensor to the left and right and anything in between. I would love to know what projects you plan on building or have already built with this ir distance sensor. Sharp ir sensor gp2y0a21yk0f gp2y0a21yk0f is a distance measuring sensor unit, composed of an integrated combination of psd position sensitive detector, ired infrared emitting diode and signal processing circuit. It can also find the distance to objects that present a very narrow edge, it has infrared proximity sensor and can measure the distance form 20 cm to 150 cm. If you did, please share it with a friend that also likes electronics. This is the arduino code and video for sharp infrared sensor module this video shows you how to measure the distance between 4cm to 180cm depending on the module, using arduino. Read values from sharp gp2y0a21 distance sensor and output to serial. I am trying to use a sharp ir sensor 2y0a21 to measure the distance in cm of objects.
Includes sketches for both simple and averaged measurements. This library uses a lookup table in program memory to convert the adc values to distance values. Library for the sharp gp2y0a41sk ir distance sensor. Distance between sensor and mirror reflector can not sometimes measure exactly. In the articles below i explain how these distance proximity sensors work and how you can use them with arduino. This video shows you how to use sharp infrared distance sensor to measure the distance using arduino. This library was a test to evaluate code size and processing time. Try downloading the codebender plugin and clicking on the run on arduino button to.
Feb 03, 2018 this video shows you how to use sharp infrared distance sensor to measure the distance using arduino. Download the arduino code for sharp ir sensor and lcd1602 from. The product description for the sharp 2y0a21 can be. Get the best deals on sharp sensors when you shop the largest online selection at. Page 3 of 4 pages sketch this program will display the distance in inches of an object from the sharp ir sensor. We using gp2y0a21yk wideangle distance measuring sensor. Gimax gp2y0a21yk0f 100% new sharp 2y0a21 1080cm infrared distance sensor. How to use a sharp gp2y0a21yk0f ir distance sensor with arduino. With the code im using, im getting messy numbers that increase as an object comes closer to the sensor and decrease as the object moves away. Pololu sharp gp2y0a21yk0f analog distance sensor 1080cm. Sharp gp2y0a21yk0f ir range sensor 10cm to 80cm robotshop.
825 651 1185 1489 1679 538 1241 1037 107 682 284 1665 1255 720 12 1514 577 871 524 645 1372 955 61 523 102 1189 1388 725 742 1145 848 877 722 68 1482 104 530 384 1103 703 1 747 75