IR Remote Hack Using Arduino | Complete Codes and Step by Step Tutorial

by jithinsanal1610 in Circuits > Arduino

15 Views, 1 Favorites, 0 Comments

IR Remote Hack Using Arduino | Complete Codes and Step by Step Tutorial

Arduino-IR-Remote-Hack-1-1122x631.png
2020-02-11 (7).png

Hey guys, welcome back to RootSaid. How about hacking an IR Remote Controller? In this post, I will show you how you can hack an IR Remote Controller and create a device using Arduino that will act as an IR Remote Controller.

​Components Needed

The following are the components that are required to make your own IR Remote Hacker circuit

  • Arduino Board
  • IR Hack PCB
  • TSOP 1738
  • IR Receiver
  • IR LED7805
  • Voltage Regulator

The Circuit

2020-02-11 (1).png
2020-02-11 (2).png

This is a simple circuit comprising of a TSOP 1738 IR receiver, IR LED and an Arduino Nano. The input power is connected to a 7805 regulator. 7805 is a 5V regulator which will convert an input voltage of 7- 32V to a steady 5V DC supply.

So, you can connect an input voltage of anywhere between 7V to 32 to this circuit. For my bot, I prefer an 11.1V Lipo Battery. There are indicator LEDs across various points for easy troubleshooting.

  • IR LED - D2 of Arduino
  • Output of IR Receiver - D11
  • Button 1 - A0
  • Button 2 - A1
  • Button 3 - A2
  • Button 4 - A3

To get Started, First Go to EasyEDA website and create a free account. Go to “Editor” and create a new project. For now, JLCPCB have 689 Basic components and 30k+ Extended components at your disposal. See the complete list of components here.

Make sure you add the components from this list while drawing the schematics in EasyEDA. You can even search for the components and check its availability. Now you can get your layout done using inbuilt tools in EasyEDA.

You can now download the Gerber file and use it to manufacture your PCB from JLCPCB. Gerber File contains information about your PCB such as PCB layout information, Layer information, spacing information, tracks to name a few. BOM File or Bill Of Material contains the list of all components in the Layout. CPL file(Component Placement List / Pick & Place File (PNP) file), it is used by automated SMT Assembly machines to determine where each part should be located on the board.

Creating the PCB

2020-01-04.png
2020-02-11 (4).png
2020-02-11 (3).png
2019-11-02.png
2020-02-11 (5).png
2019-11-02 (1).png
2020-02-11 (6).png

Go to JLCPCBs website and Click on “Quote Now” and upload your Gerber File.

Once the Gerber file is uploaded, it will show you a preview of your circuit board. Make sure this is the PCB Layout of the board you want.

Below the PCB preview, you will see so many options such as PCB Quantity, Texture, Thickness, Color etc. Choose all that are necessary for you. Click on “Assemble your PCB boards”.

Now, you will have to upload the BOM and CPL file that we downloaded earlier.

Select all the components you want JLCPCB to assemble in your PCB. Simply click on the confirm box to select the components.

In this page, you can review your order. You can check the layout, see all the components and if there is any problem, you can click on “Go Back” to edit your order.

Once everything is done, click on “Save To Cart”. In the next page, you can choose a shipping and payment option and Check Out Securely. You can either use Paypal or Credit/Debit Card to pay.

The PCB will be manufactured and shipped within days and will be delivered to your doorstep within the mentioned time period.

Once you get the PCB in hand, all you have to do is solder the header pins and connect the all the components.

IR Remote Hacker in Action

2020-02-11.png

Part 1 - Reading the Code from IR Remote

When we push a button on our remote controller, it sends some codes through the IR LED. In order to send those codes from our device, we first need to know them. For that we are going to use a TSOP 1738 IR receiver and an Arduino. Here I will be using an Arduino Nano. Connect the output pin of the IR receiver, which is on the left side, to pin 11 on the Arduino.

Installing the Arduino IR Remote Library

Now we will install the IR remote library. Simply go to Sketch->Include Library->Manage Library and search for Arduino IR Remote. Once it is done, go to examples and upload the IR demo sketch to the Arduino. Once it is done, start the serial monitor.

Now when we press the button on a remote pointing towards the receiver we should be able to see code in hexadecimal format in the serial monitor. Make a note of that and we are done with first step.

Code for Reading IR

Now start the serial monitor, point the remote controller to the IR receiver and press a button. You should see the HEX code in the serial monitor.

Part 2 - Replaying the Code

Now we know what to send. Let's test it first on a breadboard. You will find the circuit diagram below.

Code for Replaying

The program for the remote. Every button has its own if statement. If the button is pressed it will try to send its code by using the IR send through the IR LED.

Testing

Now point the remote to the gadget and press on buttons one by one and give it a quick test.