Arduino Projects

RCWL-0516 microwave radar Sensor with Arduino, Circuit and Code

RCWL-0516 microwave radar Sensor:

RCWL-0516 microwave radar Sensor with Arduino, Circuit and Code- I have been using PIR Sensor, IR Sensors, Ultrasonic Sensors, LDR sensor, Magnetic Reed Switch Sensor, and TOF10120 Laser RangeFinder Sensor etc in different beginners, intermediate, and advanced level projects for detecting any activities and then controlling things accordingly. There is another sensor which is RCWL-0516 microwave radar Sensor which is quite different from all the other sensors I have used so far.

In this tutorial, we will discuss about RCWL-0516 sensor which is a motion sensor that uses microwaves and Doppler Effect to detect motion. RCWL-0516 microwave radar Sensor is a technology that uses radar Doppler microwave induction which is special module for detecting moving objects. The other motion sensors that you know well it is a PIR sensor, as the name says it detects the passive infrared light issued by a person or an animal which makes it unlikely to detect things, moving objects such a moving car or a robot or something else. So this sensor constantly sends microwaves and they reflect back if something is moving. The waves that are reflected back will have a disturbance form which is known as Doppler Effect.The Doppler Effect can be explained, for example a car is moving from right to left. Let us consider, on the right side we have a man and on the left side there is a woman and let’s say the car is moving away from the man and is moving towards the woman. When the car start horn then according to the Doppler effect, when the car moves towards the woman, the frequency of the sound will be double and at the same time the frequency of the sound on the backside of the car will be half as compare to the original sound.

RCWL-0516 microwave radar Sensor

The same principle of the Doppler effect is used in this motion sensor.

Feature:

  • High sensitivity
  • Induction distance
  • High reliability
  • Induction Angle is large
  • Distance is about 3-5 meters.
  • Special signal processing chip rcwl-9196 is adopted.
  • Working voltage range: 4.0v-28v.
  • It can operate at 3mA current
  • Output 3.3v power supply.
  • Compared with traditional infrared induction PIR, it has more penetrating detection capability.
  • The power transmission is between 20mW to 30mW which is not harmful for human being
  • The output maximum voltage 3.4V and minimum 0.7V
  • After triggering it keep the output time delay for 0.2 second
  • It has no effect of rising temperature on its detecting parameters


Specifications:

  • Material: PCB
  • Color: blue
  • Size: 35MM * 17.3MM * 8.65 MM
  • Weight: 7G.

The advantage of this RCWL-0516 microwave radar sensor module is that anything moving can be detected either a human, animal, car or robot as I said and nowadays you will likely find this RCWL-0516 module used in outdoor lighting systems or security systems. So, another advantage is that the sensor is meant to detect 360 degrees, not like the PIR which has around 120 degrees detection angle. So for the range of this module can reach up to 9 meters; typically between like 7 and 9 meters. If you solder 1 megaohm resistor on R and GN you can reduce the range to 5 meters depending on your application.

RCWL-0516 microwave radar Sensor

If you want to detect your driveway but not all like Street you can add an LDR light dependent resistor on the CDS and the module will be triggered only if there’s no enough light outside and what I mean by no enough light is that here you can solder another resistor to adjust on which brightness you want to activate the sensor, for example, on the sensor you activate the automatic lighting or wait until complete dark to activate and the smaller resistor the darker it should be to occupied the system. So the module function is so straightforward when there is a motion it gives a high level signal and also it CTT can add capacitors to extend the two-second delay and of course it depends on the capacitance. So you actually have everything on the module which is using Arduino in case you want to mash it up with other modules.We can automate our home with this cheap sensor.



Interfacing the RCWL-0516 sensor with Arduino:

So the wiring is very simple I am just using five pins

  • Vin
  • GND
  • 3V3
  • OUT
  • CDS

The input voltage is 5V and the out pin is for the output signal.

  • Connect the input pin of the RCWL-0516 microwave radar Sensor with the 5V of the arduino
  • Connect the ground pin of the RCWL-0516 sensor with the ground of the arduino
  • Connect the output pin with either digital or analog pin in our case we are connecting it with the digital pin 2.

RCWL-0516 microwave radar Sensor


RCWL-0516 microwave radar Sensor Arduino Code:

#define Sensor 2
void setup() {
pinMode(Sensor,INPUT);
Serial.begin(9600);

}
void loop() {

bool Detection = digitalRead(Sensor);

if(Detection == HIGH)
Serial.println("Motion detected !!");
if(Detection == LOW)
Serial.println("Clear");

}

After uploading the code when the motion will be detected we will get the message the motion detected.

RCWL-0516 microwave radar Sensor


RCWL-0516 Motion sensor with buzzer:

Now we will interface the RCWL-0516 motion sensor with buzzer. We will connect the input of the sensor with positive terminal of the battery and negative terminal of the battery with the ground of the sensor. The output of the RCWL-0516 sensor will be connected with the signal pin of the buzzer.

RCWL-0516 microwave radar Sensor

When there will be movement in front of the sensor the buzzer will start, isn’t it amazing. You can make such an amazing detection system without using any microcontroller.


RCWL-0516 Vs HC-SR501:

Both of them are obviously motion sensors and the technology on which these sensors work is different so the RCWL is a microwave Doppler sensor while the HC-SR501 is a PIR based sensor with the passive infrared sensor. The frequencies on which these sensors work is different, moving on the cost both of the sensors are cheaply priced and both of them are available at around 50 cents. Both the sensors work on different technologies so how the microwave sensor that is the RCWL-0516 works is it detects a change in frequency by Doppler effect so this operates on a frequency band of 3.2 Gigahertz.

RCWL-0516 microwave radar Sensor

So it is radiating the frequency and when there is some motion around the module there is a change in the frequency by bouncing of object and that is somewhat accounted by the Doppler effect and this change is read by this module and motion is detected. So, this is how basically this module works, on the other hand the PIR sensor that is the HC-SR501 works on the infrared band so how this technically works is there is infrared sensor that emits infrared light and it consists of Fresnel lens you may say which focuses this light in particular directions. What this basically does is it detects the heat of a human being, this works by heat detection so whenever there is some movement and there is a change in the temperature. So  the body temperature that a human has that change or motion of that human body is detected by this infrared sensor and is reported by the sensor. One major difference between these two sensors; if you see application wise is the range that it covers or the direction that you can cover with this sensor. So the infrared sensor can only view it like a cone. So it can only detect motion in a particular cone and this cone has an angle of around 110 degrees. If there is motion happening somewhere maximum then 110 degrees it does not get detected it only detect the motion in front of it. If you imagine there is this ice cream cone building from it with an angle of 110 degrees that is the region where you can detect the motion so the angle of detection you can say or the angle that this can cover is around 110 degrees on the other hand the RCWL theoretically can cover 360 degrees. So, wherever you place this sensor you can detect motion around it. The range distance wise they both claim to have a three to seven meter range this also has a three to seven meter range.

Moving on to the technical aspects this RCWL sensor works on a voltage range of around 4 to 28 volts. So, the gap you have a wide bandwidth while on the other hand the HC-SR501 can only work from around 4.2 volts to around 12 volts.

Engr Fahad

My name is Shahzada Fahad and I am an Electrical Engineer. I have been doing Job in UAE as a site engineer in an Electrical Construction Company. Currently, I am running my own YouTube channel "Electronic Clinic", and managing this Website. My Hobbies are * Watching Movies * Music * Martial Arts * Photography * Travelling * Make Sketches and so on...

Leave a Reply

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

Back to top button