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:
We simply:
Open Serial Monitor and press these buttons on your remote:
Example:
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
Why This Project Is Useful
Set-top box remotes fail frequently due to:- Dead batteries
- Broken buttons
- Lost remotes
- Water damage
- 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
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
Example:
- Power → 0xE0E040BF
- Vol+ → 0xE0E0E01F
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
- Power Arduino with USB or battery.
- Point IR LED at set-top box.
- Press buttons.
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


Comments
Post a Comment