RCWL-0516 Microwave Radar Sensor Features
The RCWL-0516 microwave radar motion detection sensor is used to detect motion at a maximum distance of 9 meters. The viewing angle of this module is about 270 degrees and it has a digital output. You can install a photocell sensor on this module.
Note
The RCWL-0516 module does not work properly at a distance less than 20 cm.
Note
This module can measure a maximum distance of 7 meters by default; but you can adjust distance by placing a resistor behind the board.
Note
This module returns to LOW mode after 2 seconds of no motion detection by default; But you can adjust this time by placing a capacitor behind the board.
For more information, refer to the following link.
You can download the datasheet of this module here.
RCWL-0516 Microwave Radar Module Datasheet
RCWL-0516 Microwave Radar Module Pinout
This sensor has 5 pins:
- VIN: Module power supply – 5 V
- 3.3: Module power supply output – 3.3 V
- GND: Ground
- OUT: Digital output
- CDS: CDS photocell output
You can see the pinout of this module in the image bellow.
Required Materials
Hardware Components
Software Apps
Interfacing RCWL-0516 Microwave Radar Sensor with Arduino
Step 1: Circuit
Step 2: Code
/*
on Sep 23, 2020
by MohammedDamirchi
Home
*/
const byte interruptPin = 2;
// the setup routine runs once when you press reset:
void setup() {
// initialize serial communication at 9600 bits per second:
Serial.begin(9600);
pinMode(interruptPin, INPUT);
pinMode(LED_BUILTIN, OUTPUT);
}
// the loop routine runs over and over again forever:
void loop() {
if (digitalRead(interruptPin) == HIGH) {
Serial.println("5");
digitalWrite(LED_BUILTIN, HIGH);
} else {
Serial.println("0");
digitalWrite(LED_BUILTIN, LOW);
}
delay(20);
}