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.
Parts List
From ShillehTek
- 433 MHz Wireless RF Transmitter + Receiver Pair - receives your remotes code and transmits it back to the socket.
- Arduino Nano V3.0 (CH340G ATmega328P) - runs the receive and transmit sketches.
- 120 PCS Dupont Jumper Wires - quick breadboard wiring between the Arduino and RF modules.
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.
- 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.
- 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();
}
}
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.
- 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.
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).


