IR Remote Decoder Using Arduino


Their are lot of wireless application used in the technology like bluetooth, zigbee, wifi, nrf, and so on.. but the wireless communication used on the olden days is IR communication. The evolution of remote for TV, Radios, DVD players, audio players played and playing a vital role still now. So in this tutorial, i will show you, how to decode the value of the Buttons on the TR remote. You can follow my steps and decode any kind of IR remote using a TSOP1838 module and arduino. This tutorial is helpful for making applications like home automation, controlling a robot using the TV remote and so on..


(I referred the specification of the sensor from UTSOURCE. You can visit the product specification from here.)

The TSOP1838 is a miniature IR receiver IC form the TSOP18xx series. This particular model TSOP1838 will respond to 38kHz IR signals from remote control devices. It is normally used as IR receiver in remote control applications like TV, AC etc. This version is small in size and hence can be used in compact devices.

TSOP-1838 Features

  • Operating Voltage: 2.5V to 5.5V
  • Carrier Frequency (38kHz)
  • Operating current: 5mA
  • High Range and wide coverage area.
  • Improved immunity against HF and RF noise
  • Has in-built pre amplifier
  • TTL and CMOS compatible

TSOP-1838 Applications

  • Receive IR signals
  • Decode Remote signals
  • Analyse, re-create or duplicate remote Signals
  • Wireless control applications
  • Receiver circuit for IR remote controls
  • IR Remote tester circuits

Materials Required:-

  1. Arduino uno
  2. TSOP1838
  3. jumper wires

Circuit Diagram:-

I have connected the TSOP sensor OUT pin to the D4 of the arduino uno. you can choose any of the pin except D0 and D1. Because we are going to view the output on serial monitor.

Adding Libraries:-

The Most important thing is to add corresponding libraries to the arduino IDE. there are lot of libraries to decode the IR remote in the internet. But i prefer the library from sherrif. So follow my steps.

Click manage libraries

Type “IR remote”

Scroll below to find the proper library. i have mentioned with box . select the library and choose the latest version. then click install.

Now you can observe the IR remote example programs on the example menu. so that you have installed the IR library properly

Decoding the IR values

open the sample program which i mentioned on the picture.


* IRremote: IRrecvDemo – demonstrates receiving IR codes with IRrecv
* An IR detector/demodulator must be connected to the input RECV_PIN.
* Version 0.1 July, 2009
* Copyright 2009 Ken Shirriff

#include <IRremote.h>


IRrecv irrecv(RECV_PIN);

decode_results results;

void setup()
irrecv.enableIRIn(); // Start the receiver

void loop() {
if (irrecv.decode(&results)) {
Serial.println(results.value, HEX);
irrecv.resume(); // Receive the next value


Note:- change the pin number which you are connected the OUT pin of the TSOP sensor to the arduino. I am using D4. ( int RECV_PIN = 4;) You can change it in this line on the code.

Result and observation:-

Now open Serial Monitor, Choose the baudrate at 9600. Press any key on the remote. Now you can able to watch the hex value of the remote button you pressed.

Leave a Reply

Your email address will not be published. Required fields are marked *