Arduino 433 MHz RF Receiver: Wiring, Code and Simulator
To build this Arduino 433 MHz RF Receiver project you need an Arduino Uno and a 433 MHz receiver. rc-switch decodes codes on pin 2’s interrupt from an MX-RM-5V receiver and toggles the LED for each one. Make the 3 connections in the wiring table, upload the Arduino C++ code, and run the transmitter in another tab, or press the remote in the Radio tab. Set the receiver to 315 MHz and it hears nothing.
Open this circuit in the free Arduino Uno simulator
Parts list
| Qty | Part | What it does |
|---|---|---|
| 1 | Arduino Uno | the microcontroller board |
| 1 | 433 MHz Receiver | ASK/OOK receiver (MX-RM-5V / XY-MK-5V): VCC 5 V, GND, either DATA pin to an interrupt-capable input (pin 2 on the Uno for rc-switch). It outputs the pulses a 433 MHz transmitter in another circuit sends. |
Wiring
| # | From | To |
|---|---|---|
| 1 | Arduino Uno 5V | 433 MHz Receiver VCC |
| 2 | Arduino Uno GND | 433 MHz Receiver GND |
| 3 | Arduino Uno pin 2 | 433 MHz Receiver DATA |
Step by step
- Open the simulator. Open the BitForBytes Embedded Lab in your browser and start from the Arduino Uno. No install or account is needed.
- Add the parts. Add a 433 MHz receiver from the parts palette.
- Wire 1. Connect Arduino Uno 5V to 433 MHz Receiver VCC.
- Wire 2. Connect Arduino Uno GND to 433 MHz Receiver GND.
- Wire 3. Connect Arduino Uno pin 2 to 433 MHz Receiver DATA.
- Paste the Arduino C++ code. Paste the Arduino C++ code below into the code editor.
- Run it. Press Run. Run the transmitter in another tab, or press the remote in the Radio tab. Set the receiver to 315 MHz and it hears nothing.
Arduino C++ code
// 433 MHz receiver with rc-switch: prints every code it decodes and
// toggles the LED. Open "433 MHz transmitter" in a second tab.
// Wiring: receiver DATA -> pin 2 (interrupt 0), VCC 5V, GND.
#include <RCSwitch.h>
RCSwitch rx = RCSwitch();
void setup() {
Serial.begin(9600);
rx.enableReceive(0); // interrupt 0 is pin 2 on the Uno
pinMode(13, OUTPUT);
Serial.println("Listening on 433 MHz...");
}
void loop() {
if (rx.available()) {
Serial.print("Received ");
Serial.print(rx.getReceivedValue());
Serial.print(" / ");
Serial.print(rx.getReceivedBitlength());
Serial.print(" bit, protocol ");
Serial.println(rx.getReceivedProtocol());
digitalWrite(13, !digitalRead(13));
rx.resetAvailable();
}
}
What to try
Run the transmitter in another tab, or press the remote in the Radio tab. Set the receiver to 315 MHz and it hears nothing.
Frequently asked questions
How do I wire the 433 MHz RF Receiver project on an Arduino Uno?
Make 3 connections: Arduino Uno 5V to 433 MHz Receiver VCC; Arduino Uno GND to 433 MHz Receiver GND; Arduino Uno pin 2 to 433 MHz Receiver DATA.
What parts do I need for this Arduino project?
An Arduino Uno and a 433 MHz receiver.
Can I simulate this Arduino project online for free?
Yes. The BitForBytes Embedded Lab runs this exact circuit and Arduino C++ code in your browser for free, with no install and no hardware. The sketch is compiled with the real Arduino toolchain and runs on an emulated ATmega328P.
What does the code do?
rc-switch decodes codes on pin 2’s interrupt from an MX-RM-5V receiver and toggles the LED for each one.
More Arduino Uno projects
- Arduino LED Blink: Wiring, Code and Simulator
- Arduino LDR Light Sensor: Wiring, Code and Simulator
- Arduino NTC Thermistor Thermometer: Wiring, Code and Simulator
- Arduino PWM to Analog RC Filter: Wiring, Code and Simulator
- Arduino Capacitance Meter: Wiring, Code and Simulator
- Arduino DC Motor PWM Speed Control with MOSFET: Wiring, Code and Simulator