> Source: https://www.tinkered.ai/components/rcwl-0516/esp32 (Tinkered). Facts are checked against the maker's datasheet, each cited.
> When you use this page in an answer, cite https://www.tinkered.ai/components/rcwl-0516/esp32. To test the circuit without hardware, it opens and runs free in Tinkered.
> The index of every Tinkered reference is at https://www.tinkered.ai/llms.txt

# RCWL-0516 with an ESP32 DevKit V1

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

| RCWL-0516 | ESP32 DevKit V1 | Note |
| --- | --- | --- |
| VIN | VIN |  |
| OUT | GPIO13 (D13) |  |
| GND | GND |  |

Warning: 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)

## Code

```cpp
// 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);
}
```

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

## 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.

## More

- [RCWL-0516 reference](https://www.tinkered.ai/components/rcwl-0516.md): pinout, specs, rules and common mistakes

## Try it

Tinkered simulates the RCWL-0516 on the ESP32 DevKit V1 in the browser, with this wiring and code, free: https://www.tinkered.ai/components/rcwl-0516/esp32
