IR Remote Controller Clone | IR Remote Hack Using Arduino

|

Arduino IR Remote Hack

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

I will explain the circuit, explain the code and tell you everything you need to know to make your own Arduino IR Remote Controller.

IR Remote Hack Tutorial Video

IR Remote Controller Video Tutorial

Components Needed

  • Arduino Board
  • IR Hack PCB
  • TSOP 1738 IR Receiver
  • IR LED
  • 7805 Voltage Regulator

Objective

Here, what we are going to do is, 

1) Figure out what is being sent by the remote when you press a particular button on the remote controller

2) Replay the code using our device with push of a button.

How to make an IR Remote Hacker using Arduino

The Circuit

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

Step 2 – Ordering the PCB

Getting the PCB from PCBWay

To order your PCB from PCB way, Go to PCBWay and fill the board details in the instant order form.

From there you will be directed form where you can provide more elaborate board details and Gerber upload.

Update your board requirement information in the PCB Specification screen.

You can change the board thickness, board color, silk color, and even the type of finish you want. Some of these add-ons are going to increase the board cost.

Once you have all of the various options for your PCB selected, submit it for review. Before your board goes into manufacturing their team of professional technicians will review your design for any potential errors.

Once the review is completed, all that is left is to add to cart, make payment, and wait for your PCBs to arrive. It could take anywhere from 3 – to 6 days to be produced depending on the number of boards you ordered.

Soldering

Once you get all the components, it’s time for you to solder them together. Solder all the components onto the board and make sure to check the polarity of the components.

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.

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

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

void setup()
{
  Serial.begin(9600);
  Serial.println("Enabling IRin");
  irrecv.enableIRIn();
  Serial.println("Enabled IRin");
}

void loop() {
  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX);
    irrecv.resume();
  }
  delay(100);
}

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

#include <IRremote.h>
IRsend irsend;

void setup()
{
  pinMode(A0, INPUT);
  pinMode(A1, INPUT);
  pinMode(A2, INPUT);
  pinMode(A3, INPUT);
}

void loop() {

  if(digitalRead(A0)==1)
  {
    irsend.sendSony(0xa90, 32); //enter the code here <----------
    delay(40);
  }
  
  else if(digitalRead(A1)==1)
  {
    irsend.sendSony(0xa90, 32); //enter the code here <----------
    delay(40);
  }  
  
  else if(digitalRead(A2)==1)
  {
   irsend.sendSony(0xa90, 32); //enter the code here <----------
    delay(40);
  }  
  
  else if(digitalRead(A3)==1)
  {
   irsend.sendSony(0xa90, 32); //enter the code here <----------
    delay(40);
  }
}

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.

New to Robotics?

We have a beginners guide on “Getting Started with Robotics” which will give you a kick start in this field. Check out our free video tutorial below for a brief introduction.

Top Arduino Projects You can Try this Summer Vacation


Top Robotics Projects You can Try this Summer Vacation

Did you find this page useful? Help us to improve by rating this page.

That’s It Guys!! Have Fun!

Similar Posts

Leave a Reply

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