DPRG
DPRG Events Shoptalk

Website design and hosting by NCC

IR Proximity Detector Project

August 1998, by Jeff Koenig
August 2002, page format revised, links update by NCC

Project Summary

Populated IR Proximity Detector Board, August 1998

Every robot needs sensors of some type to interact with the world around it. Infrared LEDs and Infrared photo detectors are one way to detect objects, but they are easily foiled by surrounding ambient light. One way to improve the detection is to modulate the IR signal and then verify that the signal detected is also modulated.

Theory of Operation

The PIC 12C509 generates a 38 KHz square wave which delivers current alternately to a left and right infrared LED. The IR energy is then reflected off any nearby obstacle and is detected by the Sharp IR receiver. Because the left and right LEDs are alternated, the PIC can determine whether the reflection was caused by an object to the right or left of the sensor.

The program cycles through the following steps:

  1. Flash the Left IR LED at 38 KHz 600 microseconds
  2. If the Sharp IR detector senses IR go to step 3; Else, goto step 7
  3. To verify detection, turn off Left IR LED
  4. Keep Left IR LED off for 600 microseconds
  5. If the Sharp IR detector senses IR go to step 7
  6. Valid detection made, turn on Left LED and bring pin 4 high, goto step 8
  7. No valid detection made
  8. Return to step one alternated "Right" for "Left"

PCB Layout and Parts Placement

IR Proximity Detector Unpopulated PCB, August 1998

Above: A bottom view of the PCB Board

Below: A top view showing placement of compoents

     -----------------------------------------------
    |                  ----------                   |
    |   IR LED        |          |       IR LED     |
    |    - +          |  Sharp   |        +  -      |
    |    O O          |  Module  |        O  O      |
    |                 |          |                  |
    |                  -OOO------                   |
    |                                               |
    |   RED LED   O       O O O O     O    RED LED  |
    |    O -      O       8     5     O      O -    |
    |    O +      O       1     4     O      O +    |
    |            POT      O O O O    POT            |
    |                    PIC12C509                  |
    |                                               |
    |     ----------                 ----------     |
    |   O| 330 R    |O             O| 330 R    |O   |
    |     ----------                 ----------     |
    |                  -----------                  |
    |                 | O O O O O |                 |
    |                  -1-------5-                  |
     -----------------------------------------------
	  

Component List

  • IRPROX PCB (1) (see details section for artwork)
  • PIC12C508 or 509 w/program (1)
  • 5x1 Header (1)
  • 330 ohm resistor (2)
  • T1 visible LED (2)
  • 1K ohm 20 turn potentiometer (2)
  • 8 pin DIP socket (1)
  • Sharp GP1U52X IR module (38 KHz) (1)
  • IR LED (2)
  • IR LED right angle standoff (2) (optional)
  • .1uf bypass cap (1)

The Details

Related Links

Copyright © 1998 Dallas Person Robotics Group
The IR Proximity Detector PCB artwork is licensed under version 2 or later of the GNU GPL. This means everyone has the freedom to use this design for any purpose, to study it, to copy it, to distribute it, and to change or improve it, provided such changes are also made freely available to everyone.

Copyright © 1984 - 2014 Dallas Personal Robotics Group. All rights reserved.