Picture of Homemade Infrared Rangefinder (Similar to Sharp GP2D120
GP2D12 (Medium).jpg
DSCN1467 (Medium).JPG
Here is my instructable on how to construct a pretty simple (for some!) short range infrared rangefinder/range sensor. Infrared rangefinders are very useful in a number of projects. The majority of these come from obstacle detection (in robots) or generally detecting distances! The one shown here is only a simple rangefinder and will only really be able to measure about 6 or 7cm infront of the range finder. Luckily, most objects reflect infrared well enough to produce a reading (including a hand, paper and tin foil). I will be showing you how to use the infrared range finder with an Arduino and ways of linearizing the result.

Step 1: Theory

Picture of Theory
The theory behind an infrared rangefinder is that pulsed infrared is emitted from an IR led and then reflected back off an object into an IR receiver. As light adheres to the inverse square law which states that as distance from a source is increased, the intensity decreases by the square (Source: http://hyperphysics.phy-astr.gsu.edu/hbase/vision/isql.html). Essentially, the light is emitted by the infrared LED, which then bounces off the object. In the first instance, the LED is the emitter and the reflective object is the observer. Once the light hits the object, it then bounces off and is reflected back to the IR receiver. The object is then acting as the source of light so the inverse square law takes effect twice. This has the problem that the maximum range of the rangefinder is quite short and to increase the range, higher power LED’s would be required.

Another problem that takes affect with light based rangefinders is how it can be affected by ambient light. I fix this in my rangefinder by modulating the emitting LED. Without this modulation, a simple light bulb connected to the mains can affect the result by superimposing 50Hz onto the actual signal.

My rangefinder works through having a  modulated IR source at an ultrasonic frequency, being detected by a IR receiver (IR photodiode) which is then fed into a high pass filter, amplified and peak detected.
1-40 of 59Next »
Mic1001 year ago
I finally built your 36KHz version of the NE555 everything is OK thank you
Now I will look for RC5
everything is here smd pictures of test

pyrohaz (author)  Mic1001 year ago

Awesome pcb man! Glad it worked for you :)

Its trendy :)

thermallyme3 months ago

Thats terrific

This is so great!

This is so great!

Its fascinating

mousepaper1 year ago

Thats really good

Really good


fastbobble1 year ago

Thats wonderful...

gorgeddamp1 year ago

Thats awesome...

Its astounding

illrings1 year ago

Thats fabulous

airbugger1 year ago

Thats fascinating

Its helpful :)

headlymph1 year ago


tealrink1 year ago


Thats grand

harechubby1 year ago


clapfilk1 year ago


Thats incredible


Thats spectacular...

HWgeek1 year ago

Very nicely done! Having had to deal with Sharp this looks like a nice way to not have to use their stuff.

Question on Step 3 - probing the IR receiver - the scope trace. What point were you probing and what was your voltage scale on the scope?? I ask, as I am trying my hand at building up this circuit, having some issues with getting it working on the receiving end. The darlington pair doesn't seem to be amplifying the signal. Thanks!

gazumpglue1 year ago

her is the kicad PCB projet in zipped file in my i've remplaced the 4148

diodes by shottky diodes

Mic1001 year ago

thanks to :)

her is the kicad PCB projet in zipped file in my i've remplaced the 4148

diodes by shottky diodes


pyrohaz (author)  Mic1001 year ago

Them 3d plots are great! Is that a part of kicad? I'm still used to working with eagle haha

Mic100 pyrohaz1 year ago

yes is part of kicad

pyrohaz (author)  tiecheap1 year ago

Cheers! :)

pyrohaz (author)  gamystuffed1 year ago

Thank you!

pyrohaz (author)  craniumfurbelow1 year ago

Thanks :)

pyrohaz (author)  nativemedia1 year ago

Cheers! :)

vandhika1 year ago
im newbie to electronics and want to learn. this project suites me as it seems easy to be done and i need distance meter that can be logged.

if build this, do i need the oscilloscope? is all component typical so i can use your constant (Normalize_constant, etc)?
pyrohaz (author)  vandhika1 year ago
Hey, you don't need an oscilloscope to do this project at all fortunately though one would definitely help to debug it. With hope, if you follow the build instructions directly, it should fully work! All of the component values will work with the current values.
BunnyRoger1 year ago
Very good Instructable!!!
pyrohaz (author)  BunnyRoger1 year ago
Awesome instructable!!
pyrohaz (author)  Amanda Culbert1 year ago
Thank you :D
MAApleton2 years ago
Very cool. Definitely one of my favorites.
1-40 of 59Next »