Codey OnlineArduino & ESP32 component library › Motion sensor with microwave radar RCWL-051
Motion sensor with microwave radar RCWL-051
Sensors

Motion sensor with microwave radar RCWL-051

The RCWL-051 is a microwave radar motion sensor module that detects movement by emitting low-power microwave signals and looking for changes in the reflected signal. It typically operates from a 3.3–5 V supply and provides a digital TTL output (OUT) that you can read with an Arduino or ESP32 for motion/presence detection.

Width: 36.3 mm

Pinout — Motion sensor with microwave radar RCWL-051

Pin Signal Description
3V3 power Regulated 3.3V output from the module for small external loads or reference.
GND ground Common ground return for power supply and logic signal reference.
OUT digital Digital motion output; goes high when the radar sensor detects movement.
VIN power Main supply input for powering the RCWL-051 module.
CDS analog Light-sensor control input; connect an LDR network to inhibit motion output in daylight.

Example wiring diagram — Motion sensor with microwave radar RCWL-051

From To Wire
board:5V x1:VIN red
board:GND x1:GND black
board:D2 x1:OUT green

Example Arduino code — Motion sensor with microwave radar RCWL-051

This example was written and compile-checked for the arduino-uno. Codey Online adapts it to any other supported board for you.

// RCWL-051 microwave radar motion sensor example
// Wiring:
// - RCWL-051 VIN  -> Arduino 5V
// - RCWL-051 GND  -> Arduino GND
// - RCWL-051 OUT  -> Arduino D2

const int motionPin = 2;

void setup() {
  pinMode(motionPin, INPUT);
  Serial.begin(9600);
  while (!Serial) {
    ;
  }
  Serial.println("RCWL-051 motion sensor example");
  Serial.println("Move in front of the sensor to see OUTPUT change.");
}

void loop() {
  int motionState = digitalRead(motionPin);

  if (motionState == HIGH) {
    Serial.println("Motion detected");
  } else {
    Serial.println("No motion");
  }

  delay(250);
}

Related components

18650 Battery Shield with USB-C Charger and 5V Boost Converter

18650 Battery Shield with USB-C Charger and 5V Boost Converter

2.4 inch OLED Display I2C 3.3V

2.4 inch OLED Display I2C 3.3V

3.5 inch TFT LCD Shield

3.5 inch TFT LCD Shield

50kg Load Cell Weight Sensor

50kg Load Cell Weight Sensor

Build your Arduino or ESP32 project with AI

Describe what you want to build. Codey Online writes the code, draws the wiring diagram, compiles it and flashes your board straight from the browser.

Start for free