Infrared proximity sensor made by Sharp. Part # GP2Y0A41SK0F has an analog output that varies from 3.1V at 4cm to 0.3V at 30cm with a supply voltage between 4.5 and 5.5VDC. The sensor has a Japanese Solderless Terminal (JST) Connector. We recommend purchasing the related pigtail below or soldering wires directly to the back of the module.
For more project ideas about the IR Sensor? Check out the following blog posts::
If a board needs code or communicates somehow, you're going to need to know how to program or interface with it. The programming skill is all about communication and code.
Skill Level: Rookie - You will need a better fundamental understand of what code is, and how it works. You will be using beginner-level software and development tools like Arduino. You will be dealing directly with code, but numerous examples and libraries are available. Sensors or shields will communicate with serial or TTL.
See all skill levels
If it requires power, you need to know how much, what all the pins do, and how to hook it up. You may need to reference datasheets, schematics, and know the ins and outs of electronics.
Skill Level: Noob - You don't need to reference a datasheet, but you will need to know basic power requirements.
See all skill levels
We welcome your comments and suggestions below. However, if you are looking for solutions to technical questions please see our Technical Assistance page.
Based on 4 ratings:
3 of 3 found this helpful:
...For what it does. It was the wrong tool for my project (obstacle detection) due to the field of view. It will range a wall or big thing, but a chair leg may not be noticed. Was very easy to use and implement. The pigtail Sparkfun recommends is also good and makes installation quick.
My preliminary test of this sensor showed that it is going to work well for my application. It really demonstrates a different concept for proximity detection.
Upto standard
I have two of these, one horizontal and one vertical. I was wondering if the sense or detection angle and range would be different but it seems not.
Anyone have a problem using this type of sensor and getting a lot of noise or spikes in the output signal? I tried using an electrolytic capacitor to help mitigate the noise but it keeps showing spikes in output.
I tried a filter, but the noise spikes are there and I need a consistent and steady output value. I read in a blog that when using arduino if you are plugged into a computer there may be ambient noise from the PC itself through the USB cable.
here is the code I have.
I have posted a project using this sensor as well as taken high-resolution tear-down photos of the sensor and put it on my blog here
Searchable datasheet => http://sharp-world.com/products/device/lineup/data/pdf/datasheet/gp2y0a41sk_e.pdf.
The last diagram in the datasheet is essentially a linear correlation between the sensor's output voltage (on the y axis) and 1/L + .42 (on the x axis), where L is the length in cm. In the form y = mx + b it has an m of about 12.7. Solving for the length gives L = 12.7/V - .42, in cm. On a 5V Arduino with 10-bit ADC conversion, V = 5 x (analogReading/1023). So you can substitute V and crunch a few numbers to get a nice little conversion formula:
I found that this gave very good results, and the calculation is simple and fast. Hope this helps others using this sensor!
We're trying to develop a smart bin which will read the fill-level of the bin and notify us by email when the bin is full and ready for collection. Can we get help on this? I'm thinking this sensor could be used to read the distance from the top of the bin to the material inside and notify when the distance is say xcm. The bin wil approximately 1m in height. Rjio rijo.ealias@gmail.com
Does anyone know the field of view for this type of sensor? I can't find it in the datasheet
Would this sensor be able to detect the distance to a water level if placed at the top of a tank?
What is the depth of the tank? That is a good idea and it should work but it has a short range. The long range sensor I have tested to work reliable up to 12 feet but sometimes 17 feet depending on what is around it. But usually, if you want to read a level, I have worked on King system in an industrial setting; I uses a tube going to the bottom of the take and since it had a vent in the top of the take, you simply use a pressure switch for low or high levels. With the right sensor you should be able to calculate how many gallons of liquid it actually in the tank.
I did a dumb calibration / "best fit" power curve in Excel after some measurements of the voltage reading in an Arduino to inches, here's my function:
This is using 5V USB powering the board and the Vcc going to a 5V pin on the arduino.
Hope this helps anyone using this
Anybody know what the refresh rate for receiving new reading is on this device. I realize that it's outputting a continuous analog signal, but what is the effective response time in terms of that signal responding to changes in distance.
somebody know which is pigtail that recommended?
It's PRT-08733.