Introduction: Reliable and Low Cost IR Proximity Sensor

Picture of 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:

Step 1:

Step 2: Components

Picture of 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

Picture of Circuit Diagram

Step 4: PCB Assembling

Picture of PCB Assembling

Step 5: Interfacing to Arduino

Picture of 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.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

Picture of Arduino Wiring Diagram

Step 7: Working Video

Step 8: Application Example

Picture of Application Example

robocar with 2 sensor

Step 9: Downloads



Jose MichaelD (author)2017-01-10

Hi, around how many mA does the circuit consume?

chrisjlionel (author)2016-03-04

Helpful. Thanks.

TSJWang (author)2013-10-20

Would I be able to use other IR Sensors by Vishay?
Such as these:
I see no TSOP 1738, but there are other 38 KHz modules

agr00m (author)TSJWang2015-06-09

I'm pretty sure any 38kHz IR Receiver will work.

SandeepR4 (author)2015-05-11

hackeinstien (author)2014-06-10

when i cnnct the sensor board to my arduino my arduino switches off what to do pls help...

hackeinstien (author)2014-06-10

can you please ellaborate the connection of preset resistors i still a school boy so i m not able to undrstnd

GreeceFallout (author)2014-06-07

A Really nice project but i have a few questions
1) can i use this sensor with a PIC microcontroller ?
2) Can i use plastic TSOP instead of metal ?
3) if the TSOP is Tsop is 1740 is it ok ?

jjagannath1 (author)2014-05-20

Pls help
The sensor is giving high single always whether thr is any object or not. I hav set the frequency to 38khz then also the same problem. Please help me out!

please use metal type TSOP.

onlyduy (author)2013-10-30

Dear SIr,
What is the value to set to RV1 and RV2? Because output of tsop is high & it goes low for very short period & return to high again. (TSOP can BRM--15S8--11 change TSOP 1738?) Please let me know. Thanks Sir

Jestin_Cubetech (author)onlyduy2013-10-30

set the both preset resistor in middle position before the calibration.
you have to adjust the preset resistor for matching reception frequency..
some TSOP sensors are not suitable for continues 38 KHZ signal reception.
metal type tsop is good and it works fine.

onlyduy (author)Jestin_Cubetech2013-11-01

I got that! All working good. Thank you so much

Jedrokivich (author)2013-10-24

Great, useful project :) What is the approximate range of the sensor?

5 cm maximum , because it is a proximity sensor..
you can increase the sensing range using high power IR led [555 output LED].

Tom Hargrave (author)2013-10-21

It looks like this part will work in its place.

Thank you for your interest

Jestin_Cubetech (author)2013-10-22

you have to adjust the preset resistor for matching reception frequency..
some TSOP sensors are not suitable for continues 38 KHZ signal reception.
metal type tsop is good and it works fine

Raphango (author)2013-10-21

wHOA! Voted!

A question: Wich program did you use to make this wonderful PCB? Does it generates the 3d view too?

Jestin_Cubetech (author)Raphango2013-10-22

Proteus ares7.10

Tom Hargrave (author)2013-10-21

The TSOP1738 is listed as Obsolite by the manufacturer.

TSJWang (author)2013-10-19

This is exactly what I need!

galah (author)2013-10-18

You might want to add an extra resistor in series with VR1. A few hundred ohms would be suitable. Otherwise the 555 might not be happy when the trimpot is turned to the minimum resistance end.

Jestin_Cubetech (author)galah2013-10-18

thank you for the comment
it is a good suggestion...

carlos66ba (author)2013-10-18

Very nice. One question: since you are using this system with an arduino, would not it be easier to drive the 38 kHz directly in the arduino program (e.g., with PWM)?

yes definitely ..
we can generate a 38khz pulse using arduino GPIO pin.
but this "portable" - "stand alone" sensor module save precious arduino GPIO pins ..

apoorveinstein (author)2013-10-18

Does this sensor provide digital o/p or analog o/p???

digital output

Thanks for an early reply.
I would like to know what's the range in which this sensor can detect any obstacle?

at least 5cm..
you can increase the proximity sensor range using powerful IR LED

AJMansfield (author)2013-10-18

Finally, a schematic for an actually functional IR proximity detector. Nearly every other detector I have tried to use has been complete trash because of the problems you describe others as having. I will have to make/get some of these! Would these also work for range-finding, too?

sharp IR sensor is the best sensor for distance measurement
[adc output for your micro controller].

Proximity sensor is a digital output sensor [output 1/0]
obstacle present =0v
obstacle not present =5V

byronkay (author)2013-10-18

Could this sensor be used indoors to detect body heat?

Jestin_Cubetech (author)byronkay2013-10-18

hmm no...
tsop 1738 sensor required a 38khz signal.
last 2 digit [tsop17 "38" ] stands for frequency.

andrea biffi (author)2013-10-18

very useful! thanks!

Thank you for your interest

About This Instructable




Bio: embedded system enthusiast ...
More by Jestin_Cubetech:Wireless Robo-car  using  360°  servo motorRaspberry Pi - Revision 2  DIY Add-On Boardwater tank automation - prototype
Add instructable to: