Skip to main content

Hack Your Set-Top Box Remote Using Arduino (Build a Backup Remote)

Have you ever lost your TV or set-top box remote or had it suddenly stop working? Instead of buying a new one, you can clone your remote using Arduino.

In this project you will learn how to:
  • Capture IR codes from your set-top box remote
  • Recreate the important buttons using Arduino
  • Build a custom emergency remote
  • Understand how real remotes work internally
This project is a practical continuation of the IR Remote tutorial and introduces real-world IR reverse engineering.

Why This Project Is Useful

Set-top box remotes fail frequently due to:
  • Dead batteries
  • Broken buttons
  • Lost remotes
  • Water damage
With this project, you can create a backup remote with only the most important buttons:
  • Power
  • Channel Up / Down
  • Volume Up / Down

How IR Remote Hacking Works

Every button on your remote sends a unique IR HEX code.
We simply:
  • Capture those codes
  • Save them in Arduino
  • Transmit the same signals using an IR LED
To your set-top box, the Arduino looks exactly like the original remote.

Watch Project Overview

Components Required

  • Arduino Nano
  • IR Receiver (KY-022)
  • IR Transmitter (KY-005)
  • Push buttons (x5)
  • 220Ω Resistor
  • Breadboard and Jumper Wires

Wiring the DIY Remote

IR Transmitter

  • S - D3
  • (-) - GND

IR Receiver

  • VCC - 3.3V
  • GND - GND
  • OUT - D11

Buttons

  • Power - D2
  • Vol+ - D4
  • Vol- - D5
  • CH+ - D6
  • CH- - D7
Use INPUT_PULLUP mode.

Step 01: Capture IR Codes from Your Remote

Upload this sketch to Arduino.
#include <IRremote.h>

const int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
decode_results results;

void setup() {
  Serial.begin(9600);
  irrecv.enableIRIn();
}

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

Open Serial Monitor and press these buttons on your remote:
  • Power
  • Volume Up
  • Volume Down
  • Channel Up
  • Channel Down
Write down the HEX codes.
Example:
  • Power → 0xE0E040BF
  • Vol+ → 0xE0E0E01F
Your codes will be different.

Step 02: Program the Arduino Remote

Replace HEX codes with yours.
#include <IRremote.h>

IRsend irsend;

#define POWER_BTN 2
#define VOLUP_BTN 4
#define VOLDOWN_BTN 5
#define CHUP_BTN 6
#define CHDOWN_BTN 7

void setup() {
  pinMode(POWER_BTN, INPUT_PULLUP);
  pinMode(VOLUP_BTN, INPUT_PULLUP);
  pinMode(VOLDOWN_BTN, INPUT_PULLUP);
  pinMode(CHUP_BTN, INPUT_PULLUP);
  pinMode(CHDOWN_BTN, INPUT_PULLUP);
}

void loop() {

  if(!digitalRead(POWER_BTN))
    irsend.sendNEC(0xE0E040BF,32);

  if(!digitalRead(VOLUP_BTN))
    irsend.sendNEC(0xE0E0E01F,32);

  if(!digitalRead(VOLDOWN_BTN))
    irsend.sendNEC(0xE0E0D02F,32);

  if(!digitalRead(CHUP_BTN))
    irsend.sendNEC(0xE0E048B7,32);

  if(!digitalRead(CHDOWN_BTN))
    irsend.sendNEC(0xE0E008F7,32);

  delay(300);
}

Testing

  1. Power Arduino with USB or battery.
  2. Point IR LED at set-top box.
  3. Press buttons.
Your set-top box should respond exactly like the original remote.

Troubleshooting

Remote not responding

  • Ensure IR LED faces device
  • Try moving closer

Weak range

  • Add transistor driver for IR LED

Wrong codes

  • Recapture codes carefully

Random behavior

  • Avoid sunlight and fluorescent lights

Conclusion

You have successfully reverse-engineered your set-top box remote and built a functional backup remote using Arduino. This project demonstrates how real consumer remotes operate and opens the door to advanced home automation and universal remote projects.

FAQ Section

Is it legal to clone my remote?

Yes. You are only replicating signals from your own device.

Can I clone TV, AC or fan remotes?

Yes. Any IR remote can be cloned using the same method.

What is the range of this DIY remote?

Typically 5-8 meters indoors.

Why do some remotes use different protocols?

Manufacturers use protocols like NEC, Sony, RC5, RC6.

Can I make a universal remote?

Yes. Store multiple device codes and switch between them.

Comments

Popular posts from this blog

Arduino Serial Communication Beginner Guide (UART Explained)

Serial communication is the backbone of most Arduino projects. It allows your Arduino to talk to your computer, Bluetooth modules, Wi-Fi modules, sensors, and even other Arduinos. If you have ever used the Serial Monitor, you have already used serial communication - now you will understand how it really works. By the end of this guide, you will learn: What serial communication is What UART means How Arduino communicates with devices How to send and receive data How baud rate works Common mistakes beginners make What is Serial Communication? Serial communication is a method of sending data one bit at a time over a single wire. Instead of sending many bits simultaneously (parallel communication), serial sends bits sequentially: Example: The letter A in binary = 01000001 These bits are sent one after another very quickly. This method is: Simple Reliable Perfect for microcontrollers What is UART? UART stands for: Universal Asynchronous Receiver Transmitter It is the hardware ins...

How to Connect HC-06 Bluetooth Module with Arduino (Step-by-Step Beginner Guide)

Bluetooth communication is one of the easiest ways to make Arduino projects wireless. Once you understand how to use a Bluetooth module, you can build robots, home automation systems, and smartphone-controlled devices. In this tutorial, you will learn how to interface the HC-06 Bluetooth module with Arduino and send data wirelessly using your phone.    By the end of this guide, you will be able to: Understand how the HC-06 Bluetooth module works Configure the module using AT commands Safely connect it to an Arduino Send and receive serial data over Bluetooth Build the foundation for wireless Arduino projects Watch the Project Overview What is the HC-06 Bluetooth Module? The HC-06 is a Bluetooth-to-Serial module designed to add wireless communication to microcontrollers such as Arduino. It uses Bluetooth 2.0 (SPP - Serial Port Protocol), which means it behaves like a wireless serial cable. Whatever is sent from the phone appears in Arduino’s Serial Monitor and vice versa. ...

How to Use SoftwareSerial on Arduino (Connect Multiple Serial Devices)

In the previous tutorial, you learned how Arduino uses hardware serial communication through pins 0 (RX) and 1 (TX). That built-in serial port is mainly used to communicate with your computer through the USB cable and Serial Monitor . But here is the problem beginners quickly face: Many popular modules use serial communication, such as: Bluetooth modules ( HC-05 / HC-06 ) GPS modules GSM modules Wi-Fi modules ( ESP8266 ) Arduino Uno has only one hardware serial port. So how can we connect these modules while still using the Serial Monitor? The solution is SoftwareSerial . In this tutorial you will learn how to create additional serial ports using normal digital pins. By the end, your Arduino will be able to talk to multiple serial devices. What is SoftwareSerial? SoftwareSerial is a special Arduino library that allows digital pins to behave like RX and TX pins. This means Arduino can create extra serial ports using software instead of hardware. Hardware Serial vs Software Seri...