tutorialspinouttools
Sensors · ESP32-C3

RCWL-0516 on OLED: Microwave Motion (Radar)

Free ESP32 & Arduino tutorial · wiring, code & parts · gokul.builds

Overview & Wiring

What it is: The RCWL-0516 is a Doppler microwave motion sensor. Unlike a PIR it doesn't need line of sight — it can sense movement through thin walls, plastic and cardboard, which makes it great for hidden presence detection. How it works: It emits a low-power microwave signal and watches for a frequency shift from moving objects (the Doppler effect). OUT goes HIGH (3.3V) when motion is detected. Digital only. Wiring: RCWL OUT -> GPIO10 (digital) RCWL VIN -> 5V (accepts 4–28V; 5V is ideal) RCWL GND -> GND OLED VCC=3V3, GND=GND, SDA=GPIO4, SCL=GPIO5 Libraries: only "Adafruit SSD1306" and "Adafruit GFX Library". On screen / Serial: "MOTION!" or "idle". Wave a hand — even from behind a book — to trip it. Gotchas: It's very sensitive and has a wide field, so it can trigger on movement several metres away or through walls; mount it thoughtfully. Keep it away from the ESP32's WiFi antenna and USB cable, which can cause false triggers. OUT is 3.3V-safe.

Circuit Diagram

RCWL-0516 on OLED: Microwave Motion (Radar) wiring diagram for ESP32-C3

Parts You Need

ESP32-C3 SuperMiniBuy →
0.96" SSD1306 OLEDBuy →

Source Code (Arduino / ESP32)

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>

Adafruit_SSD1306 display(128, 64, &Wire, -1);

#define RADAR 10              // OUT on GPIO10 (digital)

void setup() {
  Serial.begin(115200);
  Wire.begin(4, 5);
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
  pinMode(RADAR, INPUT);
}

void loop() {
  bool motion = digitalRead(RADAR) == HIGH;

  display.clearDisplay();
  display.setTextColor(SSD1306_WHITE);
  display.setTextSize(1);
  display.setCursor(0, 0);
  display.println("RCWL-0516 Radar");
  display.setTextSize(2);
  display.setCursor(0, 26);
  display.println(motion ? "MOTION!" : "idle");
  display.display();

  Serial.println(motion ? "MOTION" : "idle");
  delay(120);
}
Browse all tutorials ESP32-C3 pinout Calculators