RCWL-0516 microwave radar sensor

Posted by

Today we are going to talk about the RCWL-0516 microwave radar presence sensor. A human and animal detection sensor that promises to work better than traditional pyroelectric (infrared) sensors.

RCWL-00516 microwave radar sensor
RCWL-00516 microwave radar sensor

It works by emitting a frequency via an antenna made on the printed circuit board, in the range of GHz. When emitted and reflected by the human body, this frequency returns altered, allowing detection. According to its datasheet it has a Colpitt oscillator, creating a radar via the doppler effect. This other datasheet better shows the schematic diagram of the product.

Specs

According to this link, these are the technical specifications of the RCWL-0516 presence sensor:

  • Supply voltage: 4–28 VDC
  • Operating frequency: 3.18 GHz
  • Sensing distance: 5–7 m
  • Output level: 3.4V High <0.7 Low
    Output drive: 100mA
  • Output timing: 2 second retrigger with motion

The board can also receive an LDR (light dependent sensor) so that there is no detection in high light. In the image above it says “CDS”, but it is optional.

The circuit and the code

The sensor pinout is seen below, only three pins are needed. The VIN I used 5V, the output and the GND. The output was connected directly to pin 2 of the Arduino, without a resistor or other component in the way.

Note in the image below that this is the “detection face”. this is the side where the sensor works.

RCWL-0516 sensor connections
RCWL-0516 sensor connections

We see the code below, it is basically the same as the example we made with the pyroelectric sensor in this link. I do an IF to check if pin 2 is high. If it is, I turn on the output (pin 13), if pin 2 is not at a high level, I turn off pin 13.

void setup() {
  // put your setup code here, to run once:
  pinMode(2, INPUT);
  pinMode(13, OUTPUT);
}

void loop() {
  // put your main code here, to run repeatedly:
  if(digitalRead(2)){
    digitalWrite(13, HIGH);
  }else{
    digitalWrite(13, LOW);
  }
}

See a photo of the assembled circuit, as well as the place where I tested the module. It was in the hallway of my house, which is on average about 5 meters long. There, the position where I took the photo for, the circuit already detects my presence.

rcwl-0516 microwave radar sensor
Microwave human detector circuit
Testing the human detection sensor in a corridor
Testing the human detection sensor in a corridor

Regardless of whether the hallway lights were on or not, the detection worked the same. Every time I appeared in the corridor, detection occurred.

Final words

The RCWL-0516 sensor can replace pyroelectric presence sensors without problems, has a great range and good stability. In addition to the very low price. Want to do experiments too? buy the sensor from my Banggood affiliate link.

One response

Leave a Reply

Your email address will not be published. Required fields are marked *