IR receiver won’t work with nano


vaibhav here, just getting started. I’m hoping I can get some advice for the annoying problem I’m facing with Arduino nano atmega328p (old bootloader)

Has anyone here managed to get an Arduino nano to work with an IR receiver TSOP 1738? Please share how you went about it.

Objective: To verify that I can get an IR receiver (TSOP1738) connected to the Nano to decode signals from an IR remote.

Problem: The serial monitor on the Arduino IDE does not show any hex codes. I’ve been eliminating possibilities with different tests and am now almost at the end. Would appreciate help on potential fixes.

Possibility 1: Maybe the IR receiver is faulty
Test : tried changing the receiver. Tried 6 so far and none work. So I don’t think it’s the receiver.

Possibility 2: Maybe the IR remote is unique in its frequency output (either different from the usual 38khz or some outlier protocol that the receiver can’t decode).
Test: tried several remotes, 5 of them. Ensured some of them were basic old ones just to be sure there wasn’t some proprietary protocol in play. So that’s not it either.

Possibility 3: Maybe the digital pin on the Arduino nano is faulty
Test: tried multiple digital PWM pins. No luck.

Possibility 4: Maybe the Arduino is faulty
Test: ran the blink led sample code and confirmed that the Arduino works.

Possibility 5: Maybe the circuit components or connections are faulty
Test: All connections seem to be wired fine. I’m using the Arduino 5v and Gnd pin to power the IR receiver. Multimeter shows continuity with TSOP 1738 and Arduino nano pin (5v to VCC, GND to GND, AND, D5 pin(5) TO OUT SIGNAL) no output.

Possibility 6 : Arduino nano pin issue
Test(1): test with all the nano pin pin2-D2,pin3- d3.....also analog pin also still no output
Test(2): change server board and tsop 1738 and repeat test(1) on them

Possibility 7: library problem
Test: i try all the library and different cods i can found on internet but still no response

possibility 8: maybe because of old boot loader
test: not tested yet

possibility 9: coding problem
the cods are perfectly fine it's works for others
also code comes with library

Plz help me out here how can i solve this problem

Did you install the latest IRremote library and try examples from that library. Most IRemote examples on the internet are written for an older version of the library and will not work.

Yas i try that too but still not working

You are using the correct connections for the tsop1738? See
You can try connecting a normal led with a 1k resistor between 5v and the OUT pin of the tsop to see if it reacts to IR signals.

Yas i try also the connect are absolutely ok as par it's datasheet

@squirrel_it, your topic has been moved to a more suitable location on the forum.

Led is not blinking with non of my sensor

Hi, @squirrel_it
Welcome to the forum.

Please read the post at the start of any forum , entitled "How to use this Forum".

Can you please post your code and circuit diagram?

Thanks.. Tom.. :grinning: :+1: :coffee: :australia:

i try diffrent code with different library's some of them i share here
pin2 to D2

**first code**

 #include <IRremote.h>
#include <EEPROM.h>
const int RECV_PIN = 2;
IRrecv irrecv(RECV_PIN);
decode_results results;

#define Relay1 2  // Load1 Pin Out
#define Relay2 3  // Load2 Pin Out
#define Relay3 4  // Load3 Pin Out
#define Relay4 5  // Load4 Pin Out

int load1, load2, load3, load4, power;

void setup() { // put your setup code here, to run once


  pinMode(Relay1, OUTPUT); // declare as output for Load1 Pin Relay1
  pinMode(Relay2, OUTPUT); // declare as output for Load2 Pin Relay2
  pinMode(Relay3, OUTPUT); // declare as output for Load3 Pin Relay3
  pinMode(Relay4, OUTPUT); // declare as output for Load4 Pin Relay4

  digitalWrite(Relay1, 1); // Turn Off Load1
  digitalWrite(Relay2, 1); // Turn Off Load2
  digitalWrite(Relay3, 1); // Turn Off Load3
  digitalWrite(Relay4, 1); // Turn Off Load4

  irrecv.enableIRIn(); // Start the receiver

  load1 =;
  load2 =;
  load3 =;
  load4 =;

  power =;

void loop() {

  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX);

    if (results.value == 0xFFB04F) { // For Load1 On
      load1 = 0;
      EEPROM.write(1, load1);
    else if (results.value == 0xFF6897) { // For Load1 Off
      load1 = 1;
      EEPROM.write(1, load1);

    else if (results.value == 0xFF7A85) { // For Load2 On
      load2 = 0;
      EEPROM.write(2, load2);
    else if (results.value == 0xFF30CF) { // For Load2 Off
      load2 = 1;
      EEPROM.write(2, load2);

    else if (results.value == 0xFF5AA5) { // For Load3 On
      load3 = 0;
      EEPROM.write(3, load3);
    else if (results.value == 0xFF10EF) { // For Load3 Off
      load3 = 1;
      EEPROM.write(3, load3);

    else if (results.value == 0xFF52AD) { // For Load4 On
      load4 = 0;
      EEPROM.write(4, load4);
    else if (results.value == 0xFF42BD) { // For Load4 Off
      load4 = 1;
      EEPROM.write(4, load4);

    else if (results.value == 0xFFE21D) { // For Power On
      power = 0;
      EEPROM.write(5, power);
    else if (results.value == 0xFFA25D) { // For Power Off
      power = 1;
      EEPROM.write(5, power);

    irrecv.resume(); // Receive the next value

  if (power == 1) {
    digitalWrite(Relay1, 1); // Turn Off Load1
    digitalWrite(Relay2, 1); // Turn Off Load2
    digitalWrite(Relay3, 1); // Turn Off Load3
    digitalWrite(Relay4, 1); // Turn Off Load4
  } else {
    digitalWrite(Relay1, load1);
    digitalWrite(Relay2, load2);
    digitalWrite(Relay3, load3);
    digitalWrite(Relay4, load4);


pin5 to D5

**second code**

int input_pin = 5;
IRrecv IRR (input_pin);

void setup () {
  Serial.begin (9600);
  IRR.enableIRIn ();
  Serial.print ("IR Ready ... @Pin");
  Serial.println (input_pin);

void loop () {
  if (IRR.decode ()) {
  Serial.println (IRR.results.value, HEX);
  IRR.resume ();

pin2 to d2

**third code**

/* dump.ino Example sketch for IRLib2
   Illustrates how to receive an IR signal, decode it and print
   information about it to the serial monitor.
//This includes everything. Not generally recommended.
//It's better to include only the parts of library you really need.
//But for this example it's quick and easy. See "comboDump" example
//for a more efficient way.
#include <IRLibAll.h>

IRrecvPCI myReceiver(2); //create receiver and pass pin number
IRdecode myDecoder;   //create decoder

void setup() {
  delay(2000); while (!Serial); //delay for Leonardo
  myReceiver.enableIRIn(); // Start the receiver
  Serial.println(F("Ready to receive IR signals"));

void loop() {
  //Continue looping until you get a complete signal received
  if (myReceiver.getResults()) {
    myDecoder.decode();           //Decode it
    myDecoder.dumpResults(true);  //Now print results. Use false for less detail
    myReceiver.enableIRIn();      //Restart receiver

  Copyright (c) 2014-2015 NicoHood
  See the readme for credit to other people.

  IRL Receive

  Receives IR signals from different protocols and prints them to the Serial monitor.
  Choose your protocols that should be decoded. Remove the not used ones to save flash/ram/speed.
  You can choose a custom debounce time to not trigger a button two times in a row too fast.

  The following pins are usable for PinInterrupt or PinChangeInterrupt*:
  Arduino Uno/Nano/Mini: All pins are usable
  Arduino Mega: 10, 11, 12, 13, 50, 5

pinLed LED_BUILTIN to D13

**fourth code**
1, 52, 53, A8 (62), A9 (63), A10 (64),
              A11 (65), A12 (66), A13 (67), A14 (68), A15 (69)
  Arduino Leonardo/Micro: 8, 9, 10, 11, 14 (MISO), 15 (SCK), 16 (MOSI)
  HoodLoader2: All (broken out 1-7) pins are usable
  Attiny 24/44/84: All pins are usable
  Attiny 25/45/85: All pins are usable
  Attiny 13: All pins are usable
  Attiny 441/841: All pins are usable
  ATmega644P/ATmega1284P: All pins are usable

  PinChangeInterrupts* requires a special library which can be downloaded here:

// include PinChangeInterrupt library* BEFORE IRLremote to acces more pins if needed
//#include "PinChangeInterrupt.h"

#include "IRLremote.h"

// Choose a valid PinInterrupt or PinChangeInterrupt* pin of your Arduino board
#define pinIR 2

// Choose the IR protocol of your remote. See the other example for this.
CNec IRLremote;
//CPanasonic IRLremote;
//CHashIR IRLremote;
//#define IRLremote Sony12

#define pinLed LED_BUILTIN

void setup()
  // Start serial debug output
  while (!Serial);

  // Set LED to output
  pinMode(pinLed, OUTPUT);

  // Start reading the remote. PinInterrupt or PinChangeInterrupt* will automatically be selected
  if (!IRLremote.begin(pinIR))
    Serial.println(F("You did not choose a valid pin."));

void loop()
  // Check if we are currently receiving data
  //if (!IRLremote.receiving()) {
    // Run code that disables interrupts, such as some led strips

  // Check if new IR protocol data is available
  if (IRLremote.available())
    // Light Led
    digitalWrite(pinLed, HIGH);

    // Get the new data from the remote
    auto data =;

    // Print the protocol data
    Serial.print(F("Address: 0x"));
    Serial.println(data.address, HEX);
    Serial.print(F("Command: 0x"));
    Serial.println(data.command, HEX);

    // Turn Led off after printing the data
    digitalWrite(pinLed, LOW);

i try some other codes tooo from YouTube and github

here is diagram


according code pin are changed also i try changing different pin in code and change in Arduino nano like pin2 to d2,pin3 to d3,pin11 to d11 and so on same for analog pin as par possibility 6 and it's testing in main post.

one more thing i aslo check twice serial monitor for correct com port and baud rate are matching with code so no problem with that also

i'm going to try bc558 npn transistor but i don't have bc558/557 so i'm waiting for package arrive

try some code like this to see how the IR receiver responds to signals from any of your remote devices (untested):

// connect IR Receiver output to Nano pin  2
// observe the Nano's built in LED (pin 13)

void setup() {
   pinMode( 2 , INPUT_PULLUP ) ;
   pinMode( 13 , OUTPUT ) ;

void loop() {
   bool signal = digitalRead( 2 ) == LOW ;
   if ( signal ) digitalWrite( 13 , HIGH ) ;
   else digitalWrite( 13 , LOW ) ;

@6v6gt it's not working today i'm going for CRO test

Either you have a damaged IR receiver, the connections are incorrect, the remote control units you are using are not compatible with the receiver or there is come other error.
Start by replacing the IR receiver . Then get an IR led and series resistor and drive that at 38KHz using the tone() function.

Can you please post some pictures of the IR TRANSMITTER and the IR receiver module?

Do you know if the IR Tx is working?

Thanks.. Tom.. :grinning: :+1: :coffee: :australia:

ok i'll try

that's why i'm going to check on CRO

IR receiver tsop-1738

Can you see your Tx working in your phone camera?

Tom.. :grinning: :+1: :coffee: :australia:

Cathode Ray Oscilloscope ?

But have you tried looking at the TX emitter with digital camera to verify that it is Txing?

Tom... :grinning: :+1: :coffee: :australia:

Yas it's working camera showing blak blinking light but it's not that bright