Skip to content
Buy 10+ on select items — save 10% auto-applied
Free US shipping on orders $35+
Order by 3pm ET — ships same-day from the US
Skip to main content

Arduino 433 MHz RF: Decode and Replay Remote Codes | ShillehTek

May 09, 2026 65 views

Arduino 433 MHz RF: Decode and Replay Remote Codes | ShillehTek
Project

Build an Arduino 433 MHz RF decoder and replay sketch to control remote mains sockets, capturing codes once and automating on and off actions with ShillehTek parts.

30 min Beginner3 parts

Project Overview

Arduino + 433 MHz RF transmitter/receiver modules: In this project you will use an Arduino (UNO/Nano style) with a cheap 433 MHz RF receiver to decode remote-control socket codes, then use a 433 MHz RF transmitter to replay those codes to switch a mains socket on and off on demand. The RCSwitch library handles both receiving and transmitting.

  • Time: ~30 minutes
  • Skill level: Beginner
  • What you will build: A sketch that prints any 433 MHz code it sees, then a second sketch that re-broadcasts a captured code to switch a remote socket on or off.
Arduino with 433 MHz RF transmitter and receiver modules used to decode and replay remote socket codes
The classic 433 MHz pair - transmitter (left) and superheterodyne receiver (right).

Parts List

From ShillehTek

External

  • A commodity 433 MHz remote-control mains socket (the kind sold in 3-packs at hardware stores)
  • A 17.3 cm length of solid-core wire as a quarter-wave antenna

Note: 433 MHz is unlicensed in most regions but power-limited. Do not boost the transmitter past stock unless you have checked your local rules.

Step-by-Step Guide

Step 1 - Meet the Modules

Goal: Identify the pins you will use on the transmitter (TX) and receiver (RX).

What to do: Compare your modules to the pin labels below so you can wire VCC, GND, and DATA correctly. Plan to add a 17.3 cm antenna wire to the TX ANT pad.

Pinout reference for 433 MHz RF transmitter (VCC, DATA, GND, ANT) and receiver (VCC, DATA, DATA, GND) modules used with Arduino
TX has VCC / DATA / GND / ANT. RX has VCC / DATA / DATA / GND.
  • TX: 3 pins - VCC (3-12 V; more range), DATA, GND. Solder a 17.3 cm wire to ANT.
  • RX: 4 pins - VCC (5 V), 2x DATA (use either, both are linked), GND.

Expected result: You know which pin is which on each module.

Step 2 - Wire the Receiver to the Arduino

Goal: Power the receiver and feed its data into an interrupt-capable Arduino pin.

What to do: Connect the 433 MHz receiver (RX) to your Arduino so the RCSwitch library can capture pulses reliably.

Arduino Nano wired to a 433 MHz RF receiver module with DATA connected to D2 for decoding remote codes
Receiver: VCC to 5 V, GND to GND, DATA to D2 (interrupt-capable).
  • RX VCC 5 V
  • RX GND GND
  • RX DATA D2 (D2 supports external interrupt 0 on UNO/Nano)

Expected result: Receiver is powered and feeding D2.

Step 3 - Sniff Your Remote

Goal: Print the code your existing remote sends for ON and OFF.

What to do: Install the RCSwitch library via Tools Manage Libraries, then open File Examples rc-switch ReceiveDemo_Advanced. Or upload the sketch below and open the Serial Monitor.

Code:

#include <RCSwitch.h>
RCSwitch sw = RCSwitch();

void setup() {
  Serial.begin(9600);
  sw.enableReceive(0);   // interrupt 0 = D2
}

void loop() {
  if (sw.available()) {
    Serial.print("code=");
    Serial.print(sw.getReceivedValue());
    Serial.print(" bits=");
    Serial.print(sw.getReceivedBitlength());
    Serial.print(" proto=");
    Serial.print(sw.getReceivedProtocol());
    Serial.print(" pulse=");
    Serial.println(sw.getReceivedDelay());
    sw.resetAvailable();
  }
}
Arduino Serial Monitor displaying decoded 433 MHz RF remote-control values, bit length, protocol, and pulse length
Press your remote - the code, bit length, protocol, and pulse length print on each press.

Press ON for socket 1 and write down the code. Press OFF and write that down too. Repeat for every socket you want to control.

Expected result: A short table like Socket 1 ON = 5592371 / Socket 1 OFF = 5592380, etc.

Step 4 - Wire the Transmitter

Goal: Replace the receiver with the transmitter to send codes.

What to do: Disconnect the RX module and wire the TX module to the Arduino. Add the quarter-wave antenna wire to the ANT pad.

Arduino wired to a 433 MHz RF transmitter module with DATA on D10 and a 17.3 cm antenna attached for better range
TX VCC to 5 V, GND to GND, DATA to D10. Do not skip the antenna.
  • TX VCC 5 V (or 9 V via the Vin pin for more range)
  • TX GND GND
  • TX DATA D10
  • 17.3 cm wire soldered to the ANT pad

Expected result: Transmitter is mounted and the antenna is in place.

Step 5 - Replay the Code

Goal: Switch the socket on and off from your sketch.

What to do: Replace the example numbers with your captured ON/OFF code and bit length, then upload and test near the socket.

433 MHz remote-control mains socket used as the target device for Arduino RF code replay
The target - a standard 433 MHz remote socket from a hardware store.

Code:

#include <RCSwitch.h>
RCSwitch sw = RCSwitch();

void setup() {
  sw.enableTransmit(10);   // D10
}

void loop() {
  sw.send(5592371, 24);    // socket 1 ON  - replace with your code/bits
  delay(2000);
  sw.send(5592380, 24);    // socket 1 OFF
  delay(2000);
}

Stand within about 10 m of the socket. The cheap TX has a real-world range of about 3 m without the antenna and about 25 m with one.

Expected result: The socket clicks on and off every two seconds.

Step 6 - Where to Take It Next

Goal: Decide how to integrate the same capture-and-replay approach into a bigger project.

What to do: Choose one of the options below and adapt the same receive/transmit concepts.

  • Wire it into Home Assistant via an ESP8266 + MQTT bridge
  • Schedule on/off cycles with Time + an RTC like the DS3231
  • Use RemoteSwitch instead of RCSwitch for sockets that use Kaku/Klik-aan/Klik-uit protocols
  • Combine with a PIR sensor for motion-triggered lighting

Expected result: You have a clear next step for extending the basic Arduino 433 MHz control workflow.

Conclusion

Using an Arduino with a 433 MHz RF receiver and transmitter, you decoded your remote-control socket codes and replayed them to switch the socket on and off from a sketch. Once you have the code values, you can automate the same socket whenever you want.

Want the exact parts used in this build? Grab them from ShillehTek.com. If you want help customizing this project or building something for your product, check out our IoT consulting services.

Photo and wiring-diagram credit: Instructables (original guide by diy_bloke).