555 Based IR Proximity Detector

Sometimes you want a simple solution to a problem and you don’t mind if your main controller has to do the work. This IRPD requires the main robot processor to choose which side to look at, and requires it to “debounce” the results for reliably operation. But, it still works really well without any complex program code.

The NAND gate is a standard 74LS00 that you can get anywhere – even Radio Shack, same with the 555, IR detector (RS Everlight or Sharp GP1U58Y) and IR LEDs can also be gotten at Radio Shack. Parts are easy to find and simple to connect. This does not require any fancy wiring or parts placement. Make sure that you use a .1uf bypass cap next to the 555 and next to the IR demodulator. Tweak the 2K pot until you have 38KHz, if you have a ‘scope, this is a 1/38,000 period, or about 26.3us. If you are using a Parallax¬†Basic Stamp II for your robotic controller, you can feed the output of the 555 in an I/O port and measure the frequency very easily. The code to do this is below. It assumes that you are using port 7 as the 555 input port.

O555 con 7
freq var word

count O555,100,freq
debug dec5 freq*10,cr
goto Loop

One of the nifty things that make the 555 circuit fun to use is that you can use it to do IR communications with other devices that read IR at 38KHz! If you run pin 4 of the 555 to a Stamp II port instead of just tying it high, you can use the serout Stamp II command to modulate the IR in such a fashion that other IR demodulator equiped devices can read it! I’ve done it, it works – Have fun.

Copyright 2006  DLC

2 thoughts on “555 Based IR Proximity Detector

Leave a Reply

Your email address will not be published. Required fields are marked *