RCWL-0516 with an ESP32 DevKit V1

RCWL-0516 is a low-cost microwave Doppler radar motion sensor that outputs a simple digital HIGH when it detects movement, with no infrared optics required.

RCWL-0516, RCWL-0516 is a low-cost microwave Doppler radar motion sensor that outputs a simple digital HIGH when it detects movement, with no infrared optics required.
In short

The RCWL-0516 takes the ESP32 DevKit V1's VIN on its own VIN pin, inside its 4 V to 28 V range, and its OUT drives GPIO13 directly. OUT is a 3.3 V signal from the module's own regulator, so it needs no level shifting on this board.

Wiring the RCWL-0516 to the ESP32 DevKit V1

Pin by pin.

RCWL-0516ESP32 DevKit V1
VINVIN
OUTGPIO13 (D13)
GNDGND
  • VIN is on VIN, which gives about 5 V only while the board is powered from USB.

What to know on the ESP32 DevKit V1

  • OUT goes high at 3.3 V for about 2 s on motion, a level the ESP32 reads directly. Leave the module's 3V3 pin unconnected: it is an output.SparkFun RCWL-0516 product specifications
  • GPIO13 is also RTC_GPIO14, and RTC GPIOs keep working in deep sleep and can wake the chip. A battery ESP32 can sleep until OUT goes high, instead of polling it every 200 ms like the sketch.Espressif ESP32 Series Datasheet v5.3, p. 14; Espressif ESP32 Series Datasheet v5.3, p. 61
  • On USB, VIN carries about 5 V. On a battery build the module can take the battery directly, since it accepts up to 28 V and draws about 2.7 mA.SparkFun RCWL-0516 product specifications

RCWL-0516 code for the ESP32 DevKit V1

Compiled for esp32:esp32:esp32 on 2026-10-29.

No library needed
// RCWL-0516 on ESP32 DevKit V1: wiring and a free simulation at https://www.tinkered.ai/components/rcwl-0516/esp32
const int RADAR_OUT = 13;   // RCWL-0516 OUT

void setup() {
  Serial.begin(9600);
  pinMode(RADAR_OUT, INPUT);
}

void loop() {
  int motion = digitalRead(RADAR_OUT);
  Serial.println(motion == HIGH ? "Motion detected" : "No motion");
  delay(200);
}

RCWL-0516 on the ESP32 DevKit V1: questions

Do I need a level shifter between the RCWL-0516 and an ESP32?

No. OUT drives to 3.3 V (SparkFun specifications), the ESP32's own logic level.

Can the RCWL-0516 wake an ESP32 from deep sleep?

Yes, on an RTC GPIO such as GPIO13 (RTC_GPIO14, ESP32 datasheet p. 14): RTC GPIOs can wake the chip from deep sleep (p. 61). Configure an ext0 wake-up on a high level.

Keep going

For AI assistants

This guide as plain Markdown. /components/rcwl-0516/esp32.md

What will you build with it?