# Infrared Remote and IR Receiver (TSOP1738) With Arduino

2,988

6

4

This instructable is for Arduino beginners. This is one of my earlier projects with Arduino. I enjoyed a lot when I made it and hope you will like it too. The most attractive feature of this project is the “Wireless control”. And that is through a normal IR remote easily available in our house. It may be a TV remote or an AC remote or any other IR remote. In this project we'll see the working principle of a infrared remote and decode it's signal with the help of ARDUINO and TSOP 1738, it's a universal infrared receiver. This TSOP 1738 works with most of the infrared remotes.

You can find the project video in the link below :

https://youtu.be/0udePvGIIJ8

### Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

## Step 2: Tech Notes

In the photo as I pressed any button of the remote you can see the red LED light blinking. means the remote is emitting infrared signal whenever I pressed the button. However we cannot see this light with bare eyes.

This signal has a bunch of ON and OFF or you can say HIGH and LOW. We can call this bunch of ON and OFF as a signal pattern. Each of the button has its own unique pattern. So whenever we press a particular button we get a particular signal pattern which is assigned to that button only. So this is all about the IR remote.

Now it's time to receive the signal. Our aim is to identify the high and low signals as 1 and 0. In this way we can convert the signal pattern into data. ARDUINO and TSOP 1738 will do that for us.

The infrared receiver will receive the signal from remote and give it to arduino. Then arduino will analyze the received signal and convert it into hex data. Once we convert the infrared signal into data, we can easily process that data and perform any conditional task as per our wish.

In this case the target was to control digital output of Arduino with a TV remote. To represent digital HIGH/LOW I have used 3 LEDs - Red, Yellow and Green. Conditional activities are as follows:

Turn ‘ON’ the LEDs in a particular sequence (RED, GREEN, BLUE) when the "Volume up" button is pressed each time.

Turn ‘OFF’ the LEDs in a particular sequence (BLUE, GREEN, RED) when the "Volume down" button is pressed each time.

But the above buttons will work only when the system is activated by pressing ON/OFF button. If you press the ON/OFF button when system is already ON then the whole system will shut down and turn off all LEDs.

Please see the Algorithm for better understanding.

## Step 4: Material List

IR Remote control : You can use any IR remote available in your house. Or you can buy it.

IR receiver : 1 no. TSOP 1738 sensor which is easily available in online shops.

Resistor : 1 no. 330 ohm resistor and 3 nos. 220 ohm resistor

Arduino controller : 1 no. Arduino UNO. Any other Arduino board will work fine for this project.

LEDs : 3 nos. 5mm LEDs of different color (Red, Yellow, Green)

Jumper wire : some jumper wires (male-male).

And of course the power cable of arduino is required. No special tools or instruments are required for this project.

For software you’ll need Arduino IDE installed in your PC or laptop.

## Step 5: Software Installation

• If you don’t have Arduino IDE then you may check the official website of Arduino. You’ll find the link over there.
• Also you need to download “IRremote” library from github and copy to the library folder of arduino IDE.
• Upload the sketch “IRrecvDemo.ino” from the example of IRremote library.

## Step 6: TSOP1738 Circuit

Hold the oval surface of TSOP1738 facing towards you. Now the left most pin is the Ground pin. The next pin is the Vcc (5V DC) and the right most pin is the data pin. Please see the pin out diagram for better understanding.

Connect GND pin to one of the GND pin of Arduino UNO.

Connect Vcc pin with 5V pin of Arduino UNO.

Connect 330 Ωresistor to the data pin of TSOP 1738. Then connect another leg of the resistor to Arduino pin 2.

## Step 7: Note HEX Code of Buttons

Now open the serial monitor and press the buttons from remote. You’ll find the HEX code of each button on the serial monitor.

Note down the HEX code of the buttons of your choice.

## Step 8: Output LED Circuit

Add the Output LED circuit with the existing TSOP circuit.

Connect Ground bus to Arduino UNO GND. Its a simple and small step but IMPORTANT.

Now, Place all 3 LEDs in RED – GREEN – BLUE sequence. Connect 220 Ω resistors between –VE leg of each LED and Ground bus.

Connect +VE leg of red, green and blue LED to pin 7, 6 and 5 of arduino respectively.

## Step 9: Sketch and Algorithm

Please see the algorithm in Step 2 for understanding the sketch in easy way. However, the whole sketch has line by line description in the sketch itself.

Upload the sketch “IR_Test.ino” to Arduino.

## Step 10: Execution

Now use the remote buttons to operate the LEDs as per your wish.

Extras :

• You may use a 5V DC relay to control other home appliances with the TV remote.
• It is recommended to check the datasheet and pin out available from the
seller of your TSOP sensor. There are several types of TSOP sensors available in market. Pin out are different in each case. Some of them come with aluminium cover. Some will look similar but different pin out. So take care before powering up.

Participated in the
Microcontroller Contest

## Recommendations

• ### Internet of Things Class

22,791 Enrolled

## 4 Discussions

i received the ir signal from remote but i didnt get hex code of the button

if you constantly press any button of remote, you will get a line of "FFFFFFF"'s, and no codes.
press shortly, and you will get the code, unless your remote is defective!

or is an very old remote, ultrasonic type, not an infrared one! :D

This kind of system opens up a lot of control options for projects. One Arduino and one remote can control any number of devices.