Arduino Nano Microwave Motion Sensor / Radar Sensor

The Microwave Motion Sensor project demonstrates how to interface a microwave Doppler‑radar motion sensor (for example, the RCWL‑0516) with an Arduino Nano. Unlike PIR sensors, this radar sensor emits microwaves and detects motion by analyzing the change in the reflected signal’s frequency, making it sensitive to movement of any object, not just warm bodies.

What Is a Microwave Radar Motion Sensor?

The RCWL‑0516‑type radar sensor contains a microwave oscillator that emits signals at about 3.18 GHz. When an object (human, vehicle, or other material) moves in the sensor’s field, the reflected waves undergo a Doppler shift, and the sensor’s internal circuit detects this change and sets its output pin HIGH for a short time. The typical detection range is up to about 7–9 meters, and the sensor can work behind non‑metallic walls or enclosures.

Compared to PIR sensors, microwave radar sensors are more sensitive to fast motion, are less affected by high ambient temperature, and can detect motion through thin plastic or glass, but they are also more prone to false triggers if placed near vibrating objects or metal reflectors.

Components Needed

  • Arduino Nano
  • Microwave motion radar sensor (e.g. RCWL‑0516)
  • LED (for motion indication)
  • 220 Ω resistor (for LED)
  • Buzzer (optional, for alarm)
  • Jumper Wires
  • Breadboard

Circuit Setup

1. Connect Microwave Radar Sensor to Arduino Nano:

The RCWL‑0516‑style module exposes three main pins:

  • VIN (or 5V) → 5V on the Arduino Nano.
  • GND → GND on the Arduino Nano.
  • OUT (or OUT / 3V3) → any digital pin on the Nano, commonly D2.

Some modules also include a 3.3V regulator; ensure the Arduino’s 5V pin can safely power the sensor without overheating.

2. Connect Indicator Devices:

  • Connect an LED anode to a digital pin (e.g. D3) through a 220 Ω resistor; connect the cathode to GND.
  • Optionally connect a buzzer to another digital pin, such as D5, for sound alerts when motion is detected.

How the Radar Sensor Works

The sensor continuously emits microwaves in a 360‑degree pattern. When a moving object reflects those waves, the Doppler shift in the received signal makes the internal detection circuit switch the OUT pin from LOW to HIGH for a short duration. The Arduino Nano reads this signal with digitalRead() and can count repeated triggers, drive LEDs, buzzers, or relays, or send messages to the Serial Monitor.

The sensor’s onboard delay‑time setting (via a small potentiometer or jumper) determines how long the output stays HIGH after detecting motion; adjusting this tail can make the system stay on for a few seconds after movement ends, which is useful for automatic lights.

Program: Arduino Nano Microwave Radar Motion Sensor (Motion‑Activated LED & Buzzer)
/*
Microwave Radar Motion Sensor (RCWL-0516 style)
with Arduino Nano
*/

// Radar sensor output pin
const int radarPin = 2;
// LED indicator for motion
const int ledPin = 3;
// Optional buzzer for alarm
const int buzzerPin = 5;

// How long the sensor output stays high (ms)
const unsigned long delayMs = 4000;

// Variables
unsigned long triggerStart = 0;
bool motionDetected = false;

void setup() {
  pinMode(radarPin, INPUT);
  pinMode(ledPin, OUTPUT);
  pinMode(buzzerPin, OUTPUT);
  
  digitalWrite(ledPin, LOW);
  digitalWrite(buzzerPin, LOW);
  
  Serial.begin(9600);
  Serial.println("=== MICROWAVE RADAR MOTION SENSOR READY ===");
}

void loop() {
  // Read the radar sensor
  int radarState = digitalRead(radarPin);
  
  if (radarState == HIGH && !motionDetected) {
    // New motion detected
    motionDetected = true;
    triggerStart = millis();
    digitalWrite(ledPin, HIGH);
    digitalWrite(buzzerPin, HIGH);
    Serial.println("Motion detected!");
  }
  
  if (motionDetected) {
    unsigned long elapsed = millis() - triggerStart;
    
    if (elapsed >= delayMs) {
      // Turn off outputs after delay
      motionDetected = false;
      digitalWrite(ledPin, LOW);
      digitalWrite(buzzerPin, LOW);
    }
  }
  
  delay(10);  // Small delay to smooth loop
}

// If you want to extend the on‑time, adjust `delayMs` or
// use a potentiometer to read the sensor’s delay‑time setting from the board.

Instructions

1. Circuit Setup:

Wire the microwave motion radar sensor according to the pinout described above, making sure the VIN and GND connections are correct and the OUT pin matches the radarPin used in the code.

2. Adjust Sensor Delay:

If your module has a potentiometer or jumper for the output delay, adjust it until the LED stays on for the desired time after motion stops (for example, 4–10 seconds for room or corridor lights).

3. Code Upload:

Connect the Arduino Nano to your computer via USB, open the Arduino IDE, paste the radar‑sensor code, and upload it to the board.

4. Testing:

Open the Serial Monitor (9600 baud). Move within the sensor’s detection range; the LED should light, the buzzer should sound, and the Serial Monitor should show "Motion detected!".

Test from different angles and distances, and avoid placing the sensor near metal or vibrating objects that can cause false triggers.

Applications

Automatic Lighting: Use the microwave radar sensor to turn on corridor, street, or room lights automatically when motion is detected, and keep them on for a set time after the person passes.

Security & Access Systems: Deploy the sensor at gates, doors, or storage areas to trigger alarms, cameras, or email/notifications when motion is detected.

Smart‑Home & Industrial Automation: Integrate the sensor with relays to control fans, ventilation, or machinery only when humans or objects are present, improving energy efficiency and safety.

Troubleshooting

  • No response at all? Check that VIN, GND, and OUT are correctly wired and that the sensor’s 5V supply is stable.
  • Constant HIGH output or frequent false triggers? Avoid placing the sensor near metal objects, vibrating motors, or other radar or microwave sources; also adjust the onboard delay potentiometer if available.
  • Sensor range seems too short? Ensure nothing metal or thick concrete is blocking the front of the sensor, and mount it in a central, unobstructed location.

Best Practices and Notes

  • Follow local regulations; microwave radar sensors emit RF energy and should not be placed in areas that expose people to unnecessary radiation.
  • Use a stable 5V power source; avoid long power wires and noisy supplies that can interfere with the sensor or the Arduino.
  • For outdoor use, protect the sensor from rain and direct sunlight while still allowing an open line of sight for the radar beam.

Extensions and Ideas

You can extend this project by adding a relay to control high‑voltage lights or gates, combining the radar sensor with an LDR so that lights only turn on at night, or using the Arduino Nano to log motion events to an SD card or display them on an LCD. For advanced systems, connect the sensor to an ESP‑based module and send motion alerts over Wi‑Fi or mobile networks.