Interface a TSOP1738 IR receiver sensor with Arduino

What is a TSOP1738 IR receiver sensor?

A TSOP1738 is an IR receiver sensor that is used to receive an output signal from the IR based remote like a TV remote, AC remote, etc. It works on a frequency of 38Khz. It includes a photodetector and preamplifier inside it. It is a low power device that is highly immune to ambient light. When you press any button on an IR remote, the IR remote sends a signal associated with that button at 38KHZ. That is then received by the photodetector inside the sensor and the pre-amplified using a preamplifier. The pre-amplified signal can be further used by the microcontroller to decode the received data from the sensor.

Pin configuration of the TSOP1738 IR receiver sensor

TSOP1738 IR receiver sensor pin diagram

Pin uses

  • Pin 1 is the GND pin used to connect the ground to the sensor.
  • Pin 2 is the VCC pin used to connect the 5V to the sensor.
  • Pin 3 is the OUT pin used to get data from the sensor.

Features of  the TSOP1738 IR receiver sensor

  • The operating voltage of the sensor is between -0.3-5V DC.
  • The current consumption of the sensor is <5mA.
  • The operating frequency of the sensor is 38KHz.
  • It is compatible with TTL and CMOS technology.
  • It consists of an internal filter for PCM frequency.

Components needed

  • Arduino UNO
  • TSOP1738
  • Breadboard
  • TV remote
  • Jumper wires

Pin connection of the TSOP1738 IR receiver sensor with Arduino UNO

  • Connect the VCC pin of the sensor to the 5v pin of the Arduino UNO.
  • Connect the GND pin of the sensor to the GND pin of the Arduino UNO.
  • Connect the OUT pin of the sensor to the D2 pin of the Arduino UNO.

Circuit diagram of TSOP1738 IR receiver sensor with Arduino UNO

TSOP1738 IR receiver sensor circuit diagram

Before writing the code please download and install this library in Arduino IDE. https://github.com/Arduino-IRremote/Arduino-IRremote

Arduino Code for the TSOP1738 IR receiver sensor

#include "IRremote.h"//Include library for TSOP1738
int recvPin=3;//Define pin for the sensor
IRrecv myIR(recvPin);//Create an object of type IRrecv to access all the functions of the library
decode_results results;//Create a variable of decode_results type to store the values

void setup() {
myIR.enableIRIn();//Enable TSOP
Serial.begin(9600);//Set baud rate for serial communication
}

void loop() {
//Check whether the communication is available or not
if(myIR.decode(&results))
{
  Serial.print(results.value,HEX);//Print the data in HEX form
  delay(100);
  myIR.resume();
}
}

Leave a Reply