Introduction: Reliable and Low Cost IR Proximity Sensor



This is a simple yet effective IR proximity sensor built around the TSOP 1738 module.
The TSOP module is commonly found at the receiving end of an IR remote control system; e.g., in TVs, CD players etc.
These modules require the incoming data to be modulated at a particular frequency and would ignore any other IR signals.
It is also immune to ambient IR light, so one can easily use these sensors outdoors or under heavily lit conditions.
Such modules are available for different carrier frequencies from 32 kHz to 42 kHz..
In this particular proximity sensor, we will be generating a constant stream of square wave signal using IC555 centered at 38 kHz and would use it to drive an IR led.
So whenever this signal bounces off the obstacles, the receiver would detect it and change its output. Since the TSOP 1738 module works in the active-low configuration, its output would normally remain high and would go low when it detects the signal (the obstacle).

description source: http://robotiks4u.blogspot.in/2008/05/this-is-simple-yet-effective-ir.html

Step 1:

Step 2: Components

Components list

1, 555 ic
2, PCB
3, Resistors 330Ohm,100 Ohm
4, Capacitors  0.1uF,0.02uf,1uF
5, LED IR LED,Yellow LED
6, Diode 1N4148
7, Preset Resistors 5K,1K
8, Connector 3 pin
9, TSOP Metal Type 1738  [38 khz  IR Receiver ]
10, heat shrink tube
11, connecting wires - 3

Step 3: Circuit Diagram

Step 4: PCB Assembling

Step 5: Interfacing to Arduino



//TSOP IR Sensor  test - Arduino  uno program


const int buttonPin = 2;     // the number of the pushbutton pin
const int ledPin =  12;      // the number of the LED pin

// variables will change:
int buttonState = 0;         // variable for reading the pushbutton status

void setup() {
  // initialize the LED pin as an output:
  pinMode(ledPin, OUTPUT);     
  // initialize the pushbutton pin as an input:
  pinMode(buttonPin, INPUT);    

  // initialize serial communications at 9600 bps:
  Serial.begin(9600);
  Serial.println("TSOP IR Sensor Testing" );
}

void loop(){
  // read the state of the pushbutton value:
  buttonState = digitalRead(buttonPin);

  // check if the pushbutton is pressed.
  // if it is, the buttonState is HIGH:
  if (buttonState == HIGH) {    
    // turn LED off:   
    digitalWrite(ledPin, LOW); 
  }
  else {
    // turn LED on:
    digitalWrite(ledPin, HIGH);
    Serial.println(" sensor Active " );
  }
}

Step 6: Arduino Wiring Diagram

Step 7: Working Video











Step 8: Application Example

robocar with 2 sensor

Step 9: Downloads

Downloads

Microcontroller Contest

Participated in the
Microcontroller Contest

Build My Lab Contest

Participated in the
Build My Lab Contest