Arduino 433 MHz RF Transmitter: Wiring, Code and Simulator

To build this Arduino 433 MHz RF Transmitter project you need an Arduino Uno and a 433 MHz transmitter and a push button. rc-switch sends code 5393 every two seconds on an FS1000A transmitter, and 12345 while the button is held. Make the 5 connections in the wiring table, upload the Arduino C++ code, and open the receiver in another tab, or watch the Radio tab decode the codes. Hold the button to send 12345.

Open this circuit in the free Arduino Uno simulator

Parts list

QtyPartWhat it does
1Arduino Unothe microcontroller board
1433 MHz TransmitterASK/OOK transmitter (FS1000A): DATA from any pin, VCC 3–12 V, GND. Whatever you put on DATA is sent: use rc-switch or RadioHead. A 433 MHz receiver in another circuit (open it in a second tab) puts the same pulses on its DATA pin.
1push buttonConnects 1 to 2 while held. Pair with INPUT_PULLUP and wire the other side to GND.

Wiring

#FromTo
1Arduino Uno 5V433 MHz Transmitter VCC
2Arduino Uno GND433 MHz Transmitter GND
3Arduino Uno pin 10433 MHz Transmitter DATA
4Arduino Uno pin 2push button 1.l
5Arduino Uno GNDpush button 2.l

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 transmitter and a push button from the parts palette.
  3. Wire 1. Connect Arduino Uno 5V to 433 MHz Transmitter VCC.
  4. Wire 2. Connect Arduino Uno GND to 433 MHz Transmitter GND.
  5. Wire 3. Connect Arduino Uno pin 10 to 433 MHz Transmitter DATA.
  6. Wire 4. Connect Arduino Uno pin 2 to push button 1.l.
  7. Wire 5. Connect Arduino Uno GND to push button 2.l.
  8. Paste the Arduino C++ code. Paste the Arduino C++ code below into the code editor.
  9. Run it. Press Run. Open the receiver in another tab, or watch the Radio tab decode the codes. Hold the button to send 12345.

Arduino C++ code

// 433 MHz transmitter with rc-switch: sends code 5393 every 2 seconds,
// and 12345 while the button is pressed. Open "433 MHz receiver" in a
// second tab to decode them.
// Wiring: transmitter DATA <- pin 10, VCC 5V, GND; button on pin 2.
#include <RCSwitch.h>

RCSwitch tx = RCSwitch();
unsigned long last = 0;

void setup() {
  Serial.begin(9600);
  tx.enableTransmit(10);
  tx.setRepeatTransmit(5);
  pinMode(2, INPUT_PULLUP);
  Serial.println("433 MHz transmitter ready.");
}

void loop() {
  if (digitalRead(2) == LOW) {
    tx.send(12345, 24);
    Serial.println("Sent 12345 (button)");
    delay(200);
  }
  if (millis() - last >= 2000) {
    last = millis();
    tx.send(5393, 24);
    Serial.println("Sent 5393");
  }
}

What to try

Open the receiver in another tab, or watch the Radio tab decode the codes. Hold the button to send 12345.

Frequently asked questions

How do I wire the 433 MHz RF Transmitter project on an Arduino Uno?

Make 5 connections: Arduino Uno 5V to 433 MHz Transmitter VCC; Arduino Uno GND to 433 MHz Transmitter GND; Arduino Uno pin 10 to 433 MHz Transmitter DATA; Arduino Uno pin 2 to push button 1.l; Arduino Uno GND to push button 2.l.

What parts do I need for this Arduino project?

An Arduino Uno and a 433 MHz transmitter and a push button.

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 sends code 5393 every two seconds on an FS1000A transmitter, and 12345 while the button is held.

More Arduino Uno projects