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
| Qty | Part | What it does |
|---|---|---|
| 1 | Arduino Uno | the microcontroller board |
| 1 | 433 MHz Transmitter | ASK/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. |
| 1 | push button | Connects 1 to 2 while held. Pair with INPUT_PULLUP and wire the other side to GND. |
Wiring
| # | From | To |
|---|---|---|
| 1 | Arduino Uno 5V | 433 MHz Transmitter VCC |
| 2 | Arduino Uno GND | 433 MHz Transmitter GND |
| 3 | Arduino Uno pin 10 | 433 MHz Transmitter DATA |
| 4 | Arduino Uno pin 2 | push button 1.l |
| 5 | Arduino Uno GND | push button 2.l |
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 transmitter and a push button from the parts palette.
- Wire 1. Connect Arduino Uno 5V to 433 MHz Transmitter VCC.
- Wire 2. Connect Arduino Uno GND to 433 MHz Transmitter GND.
- Wire 3. Connect Arduino Uno pin 10 to 433 MHz Transmitter DATA.
- Wire 4. Connect Arduino Uno pin 2 to push button 1.l.
- Wire 5. Connect Arduino Uno GND to push button 2.l.
- Paste the Arduino C++ code. Paste the Arduino C++ code below into the code editor.
- 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
- 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