Hello guys, today in this tutorial we are going to make an IR Hex data decoder using Arduino. We will print the values of decoded data on LCD. The schematics, circuit diagrams, PCB layout and Arduino code will be described in detail. In last we will focus on some IR remote libraries and discuss the problem in these Arduino libraries. Sponsored by JLCPCB.

Basic idea:

Every digit/button of IR remote have identity number. This is given by microcontroller inside remote control and transmitted through IR led. This data is in the form of 0 and 1. To understand the data in Hex format, we need to capture it and decode using microcontroller. We will capture this data using TSOP1738 IR receiver and decode the data using Arduino’s Atmega328p.

Breadboard schematics:


Components required:

1) TSOP1738

2) Arduino

3) 16x2 LCD (with I2C)

4) 100-ohm resistor

5) IR remote

6) 9v battery

Circuit diagram:

Schematic_IR DECODER_2021-10-23.png

Circuit making:

The circuit is too simple, just put IR Tsop receiver and give power using GND and VCC lines. Connect data pin to any digital pin of microcontroller. Print the values using I2C communication on 16x2 LCD. The values are given in Hex decoded format like: F897E456 ( 8- words).


Working in brief:

Each remote button number has different address, this address is given by microcontroller to each button. And the data is transmitted using IR led in front of remote. This is encoded binary data in 0101 format.

This transmitted data is received using TSOP infrared sensor. The data is decoded in Hex format (E556F562) using microcontroller.

To see the decoded data, we can use serial monitor or LCD (16x2).


/* hello guys here I am using older versions on Ir library so please download and install all the previous version 
 *  the link to download preferred library is: 
 *  This code is made by Sagar saini/ Youtube: sagar networks
 *  Any questions or queries DM me on instagram Saini_sagar_7294.
 *  Explore my website for more interesting projects: www.circuitkicker.com

#include <IRremote.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
LiquidCrystal_I2C lcd(0x27,16,2); 
const int RECV_PIN=8;
IRrecv irrecv(RECV_PIN);
decode_results results;

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

void loop() {

 if (IrReceiver.decode()) 
    Serial.println(IrReceiver.decodedIRData.decodedRawData, HEX);
  lcd.print("IR DECODED");
  lcd.print(IrReceiver.decodedIRData.decodedRawData, HEX);
    irrecv.resume(); // Receive the next value
Decoded values for my universal remote:

This is a universal stereo Bluetooth remote and the values are same for all remotes of this type/ you can match 1-2 values and then go with this decoded data.

Ir decoder using Arduino.png

1) ED127F80

2) FE017F80

3) FB047F80

4) F8077F80

5) F50A7F80

6) F30C7F80

7) FF007F80

8) E51A7F80

9) FD027F80

10) FA057F80

11) F7087F80

12) E41B7F80

13) F20D7F80

14) F00F7F80

15) E11E7F80

16) FC037F80

17) F9067F80

18) F6097F80

19) E01F7F80

20) F10E7F80

21) E6197F80

Circuit PCB:


JLCPCB is CHINA’s No.1 PCB manufacturing company. Offers high precision Pcb boards, Low cost and fast delivery. Try JLCPCB in just $2 for 2-layer PCB boards and $5 for 4-layer PCB. Easy to order and provide 6-color solder mask options. Try from here https://jlcpcb.com/IAT


Arduino Library and problems:

This project need IR library, but the latest version of this library have some corrupted files. So download IRremote-2.8.0 library from Here.

Download other files, circuit diagram, PCB layout, Gerber files from Here.

Implementation of project:

I think the solo project is not valuable, we can decode the data and make different project using these decoded values. Like:

A remote clone, which not exactly looks like a remote...

Read more »