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

QtyPartWhat it does
1Arduino Unothe microcontroller board
1433 MHz ReceiverASK/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

#FromTo
1Arduino Uno 5V433 MHz Receiver VCC
2Arduino Uno GND433 MHz Receiver GND
3Arduino Uno pin 2433 MHz Receiver DATA

Step by step

  1. Open the simulator. Open the BitForBytes Embedded Lab in your browser and start from the Arduino Uno. No install or account is needed.
  2. Add the parts. Add a 433 MHz receiver from the parts palette.
  3. Wire 1. Connect Arduino Uno 5V to 433 MHz Receiver VCC.
  4. Wire 2. Connect Arduino Uno GND to 433 MHz Receiver GND.
  5. Wire 3. Connect Arduino Uno pin 2 to 433 MHz Receiver DATA.
  6. Paste the Arduino C++ code. Paste the Arduino C++ code below into the code editor.
  7. 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