Download PDF Parts List View on YouTube Download Code

Introduction

Proximity sensing is a common application for intruder alarms, light switches, and other home and industrial automation applications.  And there are several ways of accomplishing it.

We have already looked at using a PIR Sensor, this device senses the change in ambient infrared energy caused when a warm body (human or animal) enters the monitored area.

Another method of proximity detection involves using reflected ultrasonic or light beams, the intruding object reflects the beams back to their source where the time delay between transmission and reception is measured to calculate the distance to the object.

Today we will look at another method of proximity detection, this time using microwaves and a scientific phenomenon called the “Doppler Effect”. As advanced as this sounds it can be accomplished both easily and inexpensively using a unique little sensor, the RCWL-0516.

The RCWL-0516

The RCWL-0516 is a small proximity sensor that uses Dopler Radar to sense the presence of an intruder. It is very versatile and can be used on its own or in conjunction with a microcontroller or microcomputer.

RCWL-0516 Microwave Proximity Sensor

This device does not consume much current and operates in a range of 4 to 28 volts, making it an ideal component for a battery-powered design.

The microwave antennas are integrated onto the small printed circuit board, making it a completely self-contained unit.

The RCWL-0516 also support an optional light-dependent resistor (LDR) to allow the device to operate only in darkness. This can be very useful in light control applications.

Module Description

The module is a single circuit board with the following connections:

RCWL-0516 Pinout

Be certain that you note that the 3V3 pin is a 3.3-volt output, not a power supply input. The device has an integrated 3.3 volt voltage regulator which can provide up to 100 mA of current for powering external logic circuitry.

The Output pin is a 3.3-volt logic level pin. When the device detects a moving object it will send this pin HIGH for two seconds.  The device does not measure the distance to the detected object or its velocity, just its presence.

The VIN pin is the positive power supply input, accepting any voltage from 4-volts to 28-volts. The RCWL-0516 does not consume very much current and can easily be powered by the 5-volt output from an Arduino or a Raspberry Pi.

The CDS pins are where you can attach an optional light sensor, a light dependent resistor (LDR).  The LDR can actually be hooked up two ways:

  • Using the two CDS pads on the top of the sensor printed circuit board.
  • By connecting one end to the CDS pin on the main terminal section and the other end of the LDR to ground.

The light sensor will disable the device when it detects ambient light. You may also use the CDS pin as an Enable control for the module.

RCWL-0516 Sensor Modules

The RCWL-0516 comes without ant connecting pins attached. For my experiments I soldered a right-angled Dupont connector to the main pins, allowing the device to be mounted “standing up” on a solderless breadboard.  

I also soldered a couple of pins to the CDS pads at the top of the device. If you decide to do this note that these pins don’t observe the standard 0.1-inch spacing common to most electronic components so you will need to use individual pins.

Doppler Effect

The RCWL-0516 employs “Doppler Radar” to detect movement and thus trigger a proximity alert.

Doppler Radar makes use of the Doppler Effect, a phenomenon discovered in 1842 by the Austrian physicist Christian Doppler.

The Doppler Effect describes a change in frequency observed by a stationary observer when the source of the frequency is moving. It applies to waves of all types, water, light, radio, and sound.

You’ve likely experience this effect with sound many times, perhaps without realizing it. If you have heard vehicles whizzing by you while standing near a highway or an ambulance whose siren pitch changes as it speeds towards or away from you then you’ve heard the Doppler Effect in action.

A very common illustration of the Doppler Effect is the sound of a train whistle.  Let’s use that as an example.

Doppler Effect while Stationary

When the train is stopped and blows its whistle you will hear it at the same frequency it is produced at. In our simple example, we will assume it has a frequency of 1000Hz.  As the train is stationary our observer hears the tone as 1000Hz.

Now let’s get the train moving.

Doppler Effect while moving Towards

Our observer is in front of the train, hopefully not on the tracks!

As the train moves, it blows its whistle, which still has a frequency of 1000Hz. However, the movement of the train compresses the sound waves in front of the train and expands them behind the train.  A boat does the same thing to waves of water as it moves.

Our observer, in front of the train, hears the compressed waves. This compression causes the frequency that he hears to rise, so the train sounds like it has a higher pitched whistle than it actually does. The frequency will fluctuate as the train gets closer and as it changes speed.

Now let’s see what happens when the observer is behind the train.

Doppler Effect while moving Away

Because the waves from the whistle are exp[anded behind the train the observer will hear a lower frequency than the 1000Hz.  As the train moves away or changes speed this frequency will vary.

This is the Doppler Effect.

The Doppler Effect has many scientific applications:

  • Astronomy – Astronomers measure the red or blue shifting of light to determine the speed and distance of objects like galaxies. In fact, just about everything in the universe shows a red-shift, indicating that it is moving away from us. This observation led to the discovery of the expanding universe by Edwin Hubble in 1929.
  • Sattelite Communications – Unless they are geostationary satellites move in relation to the Earth. Dynamic Doppler Compensation is used to compensate for the change in carrier frequencies between the satellite and the ground stations.
  • Medical – An Echocardiogram machine employs the Doppler Effect to measure the velocity and direction of blood as it is pumped to and from the heart.
  • Doppler Radar – This type of RADAR measures the velocity of distant objects by seeing how they alter the microwave carrier frequency. It is used in all sorts of applications including weather monitoring and tracking aircraft. It can also be used by self-driving cars to detect other vehicles.

It is, of course, Doppler Radar that is used by the RCWL-0516 sensor.

So now that we know how the sensor operates and its pinouts let’s put it to use.

Experiments without Arduino

The RCWL-0516 is entirely capable of being used on its own. So for the first experiments we will perform we will use it with just the addition of a few components.

Let’s start by seeing how it performs all by itself.

Experiment 1 – Basic Hookup

For our first experiment we will use the most basic hookup possible. All you will need, in addition to the RCWL-0516, is an LED, a dropping resistor, a few wires and a source of power.

RCWL-0516 Basic Hookup

I used my 5-volt bench power supply for this experiment but you could use another power source if you wish. A 6-volt battery would work well.

I chose a 220-ohm resistor as my dropping resistor, but any resistor with a value of 150 to 470 ohms would work. The color of the LED is also unimportant.

After hooking this up on a solderless breadboard I observed that when I made a movement near the sensor the LED would light up for about two seconds. Which is exactly what it is supposed to do!

RCLW-0516 being Triggered

One other thing I was able to observe was that the device was just as sensitive when I covered it with a small pill bottle. The microwaves essentially “see” through the plastic bottle. This means you could build one of these sensors inside of a plastic enclosure, ideal if you want to hide it or protect it from the elements.

I also noticed that the angle of the sensor made a difference in its sensitivity. If you have difficulty getting this to work try changing the angle or direction that you have your RCWL–0516 sensor oriented.

With that done it was on to the next experiment.

Experiment 2 – Adding a Light Sensor

For the next experiment, we will make use of an LDR, or Light Dependent Resistor.

As its name would imply an LDR is a resistor whose resistance changes when exposed to light. In the old days this was called a “photocell”.  Most LDRs experience a decrease in resistance when exposed to a light source.

The RCWL-0516 has a couple of pads made specifically for attaching an LDR. You can use just about any LDR that you can get your hands on.

RCWL-0516 Hookup with Light Sensor

Hooking this up is pretty easy, LDR’s are not polarity-sensitive so you can connect it up any way you want to. If you don’t want to use the pads at the top of the RCWL-0516 the use the CDS pin on the bottom and connect your LDR between it and the ground connection.

You should now observe that the sensor produces no output when the LDR is exposed to light. But turn off the lights and it is business as usual.

RCWL-0516 with Light Sensor Experiment

This has a lot of practical applications for controlling room lights or for detecting intruders at night.

As you can see the RCWL-0516 is a pretty handy device on its own!

Adding an Arduino

While the RCWL-0516 can be used on its own it also works well as a sensor for a microcontroller or a microcomputer. You can use the RCWL-0516 to detect movement and then have your controller take additional action.

I’m going to show you a couple of ideas for using it with an Arduino Uno. I have no doubt that you can come up with many more.

Arduino Hookup

I’ve seen a number of articles and videos about hooking up the RCWL-0516 to an Arduino so that you can turn on an LED when it detects motion. And while this does serve to illustrate how the hookup is performed it really has no practical purpose – after all, you can just drive the LED directly with the RCWL-0516 and eliminate the need for the Arduino!

Instead, I wanted to use the Arduino for something practical. And the first thing I came up with was a latching device. You can see how to wire it up here.

RCWL-0516 Arduino Latching Hookup

In this circuit, I have used an Arduino Uno, an RCWL-0516, an LED, a couple of resistors and a push button switch.

The resistor attached to the LED is a dropping resistor, I used a 220-ohm resistor for this. The color of the LED is entirely up to you. You could also use a relay instead of an LED if you wanted to control something that needed more current or voltage, if you do make sure you observe all safety precautions.

Best bet is to use an LED during development, it’s much safer that way.

The other resistor is a pull-up resistor for the switch, I used a 10K resistor.

Arduino Sketch

The purpose of this device is to keep the LED on after the proximity detector is triggered. In the basic hookup, the one without an Arduino, the LED only remained on for about two seconds. This time I want it to be left on.

The push button is provided to turn off the LED, in a sense it “rearms” the circuit.

Here is the sketch I used to make it all happen:

It is actually a pretty simple sketch.

We start by defining the pins that the RCWL-0516 sensor, the push-button, and LED are connected to.  We also define a couple of variables to hold the values of the sensor and push button.

In the setup we set the sensor and push-button connections as inputs and the LED connection as an output. We also turn off the LED.

The loop is where all the action is.

In the loop we first read the value of both the RCWL-0516 sensor and the push-button.

  • When the sensor is triggered it will read HIGH.
  • When the push-button is pressed it will read LOW.

We then use a couple of If statements to check these values.

  • If the sensor is HIGH (triggered) then we turn the LED on.
  • If the push-button is LOW (button pressed) we turn off the LED.

And that’s basically it. The LED will be turned on when the sensor is triggered.  The only way to turn it off is to press the button. Simple but effective.

RCWL-0516 Latching Demo

Hook it up, load up the sketch to the Arduino and give it a try. You should see the LED illuminate when you make a bit of motion. Unlike the last experiment, it wil remain on until you press the button to turn it off.

A circuit like this would have many practical applications. You could use it as an intruder alarm or as a control for lights.

You could also combine it with the LDR to have it only work in dark rooms.

Arduino Remote Sensor Project

For our final Arduino experiment, I wanted to make a remote sensor. This way I could detect an intruder in another room.

You will need two Arduino Uno’s for this, you could use other types of Arduino’s but that might require a wiring change as I’m using the SPI Interface as part of the project and it is on different pins on different Arduino’s.

You will also need a 433 MHz RF transmitter and a 433 MHz receiver. I have used these devices before, so if you are not familiar with them please see my article “Using Inexpensive 433MHz Transmit and Receive Modules with Arduino” to bring yourself up to speed.

A couple of LED’s and dropping resistors are all that is left in the parts list. Now let’s see how to hook them up and program them. I’ll start with the transmitter first.

Arduino Remote Sensor Transmitter Hookup

RCLW-0516 Arduino Transmitter Hookup

The RCWL-0516 is hooked up to use the 5-volt power output from the Arduino Uno. The data out pin is connected to Arduino digital I/O pin number 2.

The LED anode is connected to a dropping resistor and that is in turn connected to pin 13 on the Arduino. You could, of course, eliminate the LED and just use the onboard LED on your Arduino Uno which is internally connected to pin 13. I just thought an external LED would be easier to see.

The hookup to the 433 MHz transmitter is actually very simple. The VCC is connected to the Arduino 5-volt output, and the GND is connected to ground. The DATA pin is connected to Arduino pin 12, which is the SPI input.

Arduino Remote Sensor Transmitter Code

Before you can write the code to make the transmitter and receiver work you will need to add a library to your Arduiono IDE.  This library will assist you in operating the 433 MHz radio modules.

The library is called RadioHead and I have discussed it before in the article “Using Inexpensive 433MHz Transmit and Receive Modules with Arduino”. It can be used with many RF modules, including the 433 MHz modules we are using here.

You can download the RadioHead library from the Airspayce website. It’s a ZIP file and the link is buried on the page, look at the diagram below to see how to find it.

RadioHead Library Website

Once you have the ZIP file downloaded you’ll need to install it in your Arduino IDE. It will install a number of example sketches as well as the library itself.

  • Open the Sketch menu item from the top menu bar.
  • Select Include Library. A sub-menu will appear.
  • Select Add .ZIP Library.
  • A dialog box will open. Navigate to the location you saved the ZIP file and select it.
  • Click OK. The library will be installed into your Arduino IDE.

Now that the library is installed you can load the sketch. You can download it from the link in the Resources box at the end of this article of just copy it here.

The sketch starts by including the RadioHead Library. We also include the SPI library, which is part of your Arduino IDE.

Next, we define pins for the sensor and LED. Note that it is not necessary to define pin 12 as the connection to the transmitter as the SPI library takes care of that on its own.

After that, we define variables to represent the sensor value and to use as a holder for the string that we plan to transmit.

The next line creates an Amplitude Shift Keying object, ASK is the method that we use to format the data during transmission. RadioHead takes care of all the ugly details behind this, which include acknowledgments and error checking.

In the setup we initialize the transmitter. We also set the pinModes of the sensor and LED pins and then turn the LED off.

Now to the loop!

In the loop we get the value from the sensor. We then use an IF-ELSE statement to evaluate it and perform the folowing:

  • If the sensor is HIGH that means we detected something. We set the output string to “1” and turn on the LED.
  • If the sensor is LOW then nothing is detected. We set the output string to “0” and turn off the LED.

We then compose a message with the string we just created.

Finally, we send the string and wait for an acknowledgment from the receiver indicating that it was received successfully.

And that’s it for the transmitter. Now let’s look a the other end, the receiver side.

Arduino Remote Sensor Receiver Hookup

Here is how we will hook up our receiver to a second Arduino Uno.

RCWL-0515 Arduino Receiver Hookup

The hookup here is even simpler than the transmitter.

The receiver module VCC is connected to the Arduino Uno 5-volt power output. The GND is connected to the Arduino ground.

The receiver module has two pins for data out, you can use either one as they are internally connected together. Connect one of these pins to Arduino Uno pin 11, which is the SPI input.

The only other connections are to the LED, which is connected to pin 13 through a dropping resistor like it was in the transmitter. Although the diagram shows a green LED I used a blue one (blue LED’s don’t show up well on my blue background so it’s green here), you can actually use any color you like.

Now that you have the receiver wired up let’s look at the code you’ll need to run it.

Arduino Remote Sensor Receiver Code

The receiver code also makes use of the RadioHead library.

We start by including the RadioHead library and the Arduino SPI library, just as we did in the previous sketch.

The only pin we need to define is pin 13 for the LED, the receiver uses the SPI library which already defines pin 11 as receive.

Again we define a string variable to hold the received string.  And we create an ASK object as we did before.

In the setup we initialize the receiver and define the LED as an output. We also turn the LED off.

Now the loop.

In the loop we set a receive buffer for the size of the data string we are expecting, which is 1 in our case.

We then check to see if we have received a valid packet. If we have we get the data from it and pass it to our string variable.

We then check the string value:

  • If it has a value of “1” we turn on the LED.
  • If it has a value of “0” we turn off the LED

And from there the loop ends and we start all over again.

Testing the Remote Sensor

Hook up both of the Arduino’s and load up the code. You will need to power each one individually, I powered one with a 9-volt battery and the other one with the USB cable from my computer.

RCWL-0515 Remote Sensor Demo

You should probably start with the two units fairly close together. After you determine that tthey are functioning correctly you can experiment with moving them apart.

You can increase the range by soldering a small coiled wire to both the transmitter and receiver to act as an antenna, as I have done in my setup.

If all is working well you should see both LED’s light when the detector is triggered. You may notice a very slight time delay between the transmit and receive, this is normal.

You can now detect those fiendish jellybean thieves from the room next door!

Conclusion

The RCWL-0516 is an inexpensive yet effective proximity sensor. It has a lot of obvious uses in both intruder detection and home automation and as the microwaves it uses are not affected by plastic or wooden barriers it can be hidden away in strategic locations.

Hopefully, this article and its associated video have given you some insight into how you might use this Dopler Radar sensor in one of your own designs.

Time to start experimenting!

 

Parts List

Here are some components that you might need to complete the experiments in this article. Please note that some of these links may be affiliate links, and the DroneBot Workshop may receive a commission on your purchases. This does not increase the cost to you and is a method of supporting this ad-free website.

COMING SOON!

 

Resources

Arduino Sketches – The three sketches I wrote for this article, in one ZIP file.

RCWL-0516 Information – A useful resource on GitHub that describes this sensor in detail.

Doppler Effect – A Wikipedia article on the Doppler Effect.

RadioHead Library – The RadioHead packet library for Arduino.

 

Experiments with the RCWL-0516 – Doppler Radar Distance Sensor
Summary
Experiments with the RCWL-0516 - Doppler Radar Distance Sensor
Article Name
Experiments with the RCWL-0516 - Doppler Radar Distance Sensor
Description
The RCWL-0516 is a microwave Doppler Radar proximity sensor that can be used by itself or with an Arduino. It is inexpensive and easy to work with. In this article, I will show you how to use the RCWL-0516 in a number of simple experiments.
Author
Publisher Name
DroneBot Workshop
Publisher Logo
Subscribe
Notify of

55 Comments
Oldest
Newest
Inline Feedbacks
View all comments
TheRainHarvester on YouTube
5 years ago

What is the range of the radar sensor? Is it line of sight, cone of sight, or will it sense through walls/couches/curtains?
What is the advantage over the PIR module?
Thanks!

André Franzen
4 years ago

Andreas Spiess has a youtube video on this.
Outdoors ~7m, indoors ~4m, he tested various materials too, apparently, it should be able to go through walls (if I remember correctly from some other source)

Skye
2 years ago

Well, in my case, you can put one RCWL-0516 sensor connected to a Raspberry Pi or Microcontroller in the centre of your home and it will detect human movement in any of the rooms within 5 metres of the Sensor, i.e. through plasterboard walls and through doors. It even detected me in the room upstairs above the sensor’s room (i.e. through floorboards). Obviously the sensor can be easily hidden too (e.g. inside a plastic box) so that an intruder could not spot it while peeking through a window. Disadvantage-wise, it is harder to constrain it to watch over a specific… Read more »

11 months ago

YES, IT SENSES THROUGH WALLS AND ALL… JUST NOT METAL TOO WELL… GLASS CAN ALSO REFRACT THE WAVES AND GIVE FALSE POSITIVES… ESPECIALLY MIRRORS.. . I’VE GOT ONE SET UP WITH THE RCWL-0516 ENCAPSULATED WITH-IN AN ALUMINUM TUBE, SHROUDED WITH A STEEL SHIELD OF MY OWN DESIGN. THE REACH BEYOND THE RADAR’S EMITTER IS ABOUT 1.5″ AND THAT SEEMS TO FOCUS THE STRENGTH OF THE RADAR OUT TO ROUGHLY 30 FEET OR MAYBE 35.. WITHOUT THE TUBE, ITS RANGE IS ROUGHLY 15-20 FEET IN WHATEVER DIRECTION YOU HAVE THE EMITTER POINTED AND THE SIGNAL IS A PRETTY BROAD CONE SHAPE… Read more »

Lyon
5 years ago

I would like to receive help for designing an Arduino code for the next project. A NEARBY ALARM WITH MERDER ARDUINOS, THROUGH A WIFI CONNECTED: With this code we have to be able to store five numbers that can be set by means of. five BCD thumbs wheels, at the address where the Arduiuno is located, and is shown on a LED or LCD display. If the address is set and stored, the code must be able to connect via a WiFi be with the internet so that it can communicate with all the other Arduinos. There must be a… Read more »

bob
5 years ago

I failed to see anything discussing the range of the device and how to extend that range (with cone reflectors)

David
3 years ago
Reply to  bob

The unit is a microwave transciever… (transmitter and reciever) simple laws of antennae design apply. As is, the unit is fairly omnidirectional, placing a ground plane at 1/4 wavelength (as I remember, could be 1/2 wavelength) away will cause the signal to radiate in one direction away from the ground plane, thus doubling effective distance.

Yvonne de Vries
5 years ago

Is it true that both sides of the sensor must be uncovered. Ik have placed the sensor on a wooden underground, but it seems to me that the sensor is then not working properly.
Thank you for your answer.
Yvonne

Bob
5 years ago

Hi I have sen an article where the sensor is placed in a tf / sd card plastic container with a little cutting the container that they come in will act as a weather proof cover also it’s suggested that you use long wires(about 12″ or so) to conect the unit to the arduino as that can affect results also

Y.D. Stein
4 years ago

Yvonne is lief

Lisa Jay
5 years ago

Great video. I found mine at ebay:
https://www.ebay.com/itm/254380258729

Sarel
4 years ago

Such a great article, thanks! I was wondering, though, if you have two or three (or more) of these devices in proximity to each other (for example you’re wiring up each room in your house, and some might be very close to each other even thought they’re in different rooms.

Will they not interfere with each other?

David
3 years ago
Reply to  Sarel

Edit: according to Eric’s comment below, this does not use Doppler effect so my post is wrong…. Because it operates on doppler effect, it is looking for a change of frequency, not a ‘time of flight’ (how long it takes the same signal to return) or if it returns,, or an emission from the item being detected, so multiple units should improve not compromise the sensing ability, especially if they are directionalized and at right angles to each other. That information is a deduction from pure logic, so real world results may vary. Also I am not a lawyer, but… Read more »

Last edited 3 years ago by David
Frank
4 years ago

Thank you very much for your explanations! I tried to hook the sensor to an RASPI by simply detecting the outgoing high and low values. But after a while the sensor started to trigger without any purpose? I found many people having the same problem. But the solutions grew bigger and bigger and there where still remaining problems and nobody realy found out what the hole thing caused exept many different ideas. Maybe you have an idea to use it more stable on an Raspi?
Many greetings from Frank

4 years ago

Hello, my 433Mhz transmitter keeps triggering the RCWL-0516 module, I need to set a delay between radio messages bigger than 3 seconds otherwise the radar is always high. Any solution? thanks!

Michdo93
4 years ago

any idea how I could use it to test it with a self driving car? I am using a small robot with a Raspberry Pi. I tested this https://www.electromaker.io/tutorial/blog/using-a-doppler-radar-sensor-with-the-raspberry-pi-12 “setup” currently. I am using off course Python. Interesting would be things like to detect the relative velocity from other robot cars. Each good idea would be very helpful.

4 years ago

hi i would like to know where to code sketches for my circuit board or any other electronic PLEASE i looked all over the internet couldn’t find one

Andy
4 years ago

Would this setup work with a couple of nano every ?
Many thanks

science monkey
4 years ago

Very nice project was exactly what i looked for ! Thank you for sharing

Eric
4 years ago

Hi. It’s a common misconception that the RCWL-0516 employs “Doppler Radar” to detect movement and thus trigger a proximity alert. How this device works is based on reflections of the continuous carrier waveform, rather than frequency shifts like doppler. The oscillator is setup to receive reflected wave directly into the feedback loop. If it is almost in phase the amplitude increases, if it is out of phase it decreases. This amplitude difference is what the circuit uses to detect motion. The single transistor is an oscillator with an antenna in the loop. Small reflections off objects get reinserted into the… Read more »

Henk
3 years ago
Reply to  Eric

Eric, spot on! If you break down the circuit into halve it is a self-levelling detector that responds to minute changes in input voltage, and a free running oscillator. The detector is basically the same as in PIR- or LDR-sensors. The oscillator power is detected by measuring the voltage across the 220 ohm emittor resistor. Anything that changes this voltage will work. That includes other nearby RF sources in the GHz range. SInce RF is rather unpredictable, this is what makes this detector difficult to use reliably. What works in a mains-powered indoor setup will not work when battery-powered outdoors.… Read more »

Mike
4 years ago

It is my understanding that this device really detects the movement of water. I assume that a rain storm could cause the device to alarm. Am I correct?

Paul
2 years ago
Reply to  Mike

In my tests it seems to be useless outdoors if raining.

M0IYI
4 years ago

It looks like there’s a 100 ohm resistor in series with the output from the chip so I didn’t bother with a dropping resistor for the led. Great little board!

Jamie donegan
3 years ago

How do I add a piezo speaker and led light?

Anadin
3 years ago

What current can you drain from Out, the digital output?

Marc Draco
2 years ago
Reply to  Anadin

Output impedance according to another comment here is 100R, which means it’s limited to 50mA if my math is right.

RS Sharma
3 years ago

Sir can it be used to see on camera/screen, the hidden human beings

CP Billingsworth
3 years ago

I can’t get these things to detect anything more than 2 inches away. They certainly don’t work if I walk across the room. I’ve tried various VIN values from 4.5 to 13 VDC with no change.

Skye
2 years ago

Well my findings are completely different. I have the RCWL-0516 connected to a Raspberry Pi in the centre of my home, and it detects me moving around from room to room, typically as much as 5 metres away from the sensor through doors and plasterboard walls. If I stop moving the sensing stops detecting me, and then when I start moving it begins again. Closer to the unit a smaller motion will activate it, like shaking a leg while sat down (versus walking from A to B at 5 metres range). It is probably worth checking the sensitivity resistor on… Read more »

Willem N
1 year ago

This has to do with your supply voltage. When I try to drive it from a 5V output pin on an ESP32 connected to a USB power supply, I have the same problem. When I drive it from a lithium battery or dedicated 5V power supply it works fine. Adding a capacitor didn’t help.

Other “radar” sensors are fine with being supplied 5V from my ESP32, e.g. the HFS-DC06 – which has dedicated pots for adjusting delay and sensitivity.

Martin
3 years ago

You can adjust the sensitivity of the size to be detected, this to filter what is smaller than an adult person

SOUNDRAPANDIAN
3 years ago

 RCWL-0516  sense only 10cm distance only.how to increase the sensitivity

Willem N
1 year ago
Reply to  SOUNDRAPANDIAN

Check my comment on supply voltage

3 years ago

@dronebot..whats value resistor on R-GN(or adjustable antena),to reduce the distance with approx 40cm.Sorry this about my cat,and thanks for your time..

Dierickx
3 years ago

hi
i follow all that GOOD video about RCWL-0516
i ‘ve just order some on amazon

One question, my goal is to light up a bulk for a period of time (more than 2 secs)
I just want to use RCWL-0516 and a relay without arduino

How can i extend the delay of light up (More than the 2 secs when a motion is detected) ?

Thanks
Ben

Stalked victim.
3 years ago

Thank you so much. I have a stalking upstairs neighbour that comes down all day to listen at my door. Police and others needs official proof that I cannot provide. Without any knowledge, I build your first simple model, which will help greatly in establishing the stalker’s pattern, so he can be caught. It picks him up thru the wooden door and even thru the concrete wall next to it. I tried a ready made one for light bulbs, but he spotted the switch clicks, This is totally silent. Perfect.

Daniel Lybaert
3 years ago

Hello,

I made this circuit also bud my RCWL 0516 is reacting only at 10 to 20 cm. I see You can change the sesitivity from (7 to 5 m.) with an extra resistor of 1M betwean connection 15-16 of the IC.
This extra resister is connected parralel with the resistor of 1M. that is al ready between 15-16 > parralel means bring it from 1 to 0,5 M ohm.
Can some body help me please ?

Robert Wooster
2 years ago

Hi
I would like to use esp8266 01s but not very good with coding, any help adapting this to run would would be appreciated

Last edited 2 years ago by Robert Wooster
Paul
2 years ago

I’ve been experimenting with this clever device for a while and have had mixed results. Indoors off a nearby power supply it seem to work very well, catching human movement nearly instantly within the radial limits mentioned, 4 and 7m. Outdoors it’s the same until it rains then every moving wet object within range triggers it. It’s basically unusable outside in weather. At my enclosed front entrance I found it oddly flakey and could only attribute that to an electricity smart meter about 1m away. It even started going off every half hour at 6 or 7 in the morning.… Read more »

Skye
2 years ago
Reply to  Paul

I’ve had a similar problem myself. But first, I’ll answer your voltage question – No, you can’t officially run the unit from 3.3V, you need to use the 4-24V pin. (The 3.3V is an output for powering other small circuits). In my case, I have “mostly” been running the sensor connected directly to a Raspberry Pi and positioned in the centre of my home (quite near to my desktop computer and internet router). As such it should only “pick up” motion from people moving around inside, and sometimes it works marvelously and does precisely that. However, it does seem to… Read more »

Ed Devine
2 years ago

RCWL-0516 Send text to phone
I’m wondering if there is any way to send a text to my iPhone when an alarm is received? I’m planning on having it portable and having in my car.

Last edited 2 years ago by Ed Devine
Skye
2 years ago
Reply to  Ed Devine

Possible, but an email message (or even email -> sms via gateway) might be an easier solution. Depends on your car: Does it have a wifi hotspot built-in? Then you’d just write suitable wifi-enabled code for an ESP32 or Raspberry Pi Pico W, and send the email via that. If you absolutely want a direct text-message, then you’d need a 3G or 4G SIM module and any microcontroller (e.g. Arduino) to connect to it via serial and send AT modem commands to the SIM module to post the SMS message. I’d also add that I don’t think the RWCL-0516 sensor… Read more »

Nax
2 years ago

Can you help me sir
My sensor only sense motion around 10cm
I power it with 5v and the output to Led and test it trigger motion around 10cm

Marc Draco
2 years ago

Another great article Bill.I didn’t know that the 3.3v was an output (d’uh) but the dratted things tend to come without any paperwork and short of coming here (which should be the first thing I did) I tend to hook it up and then wonder why it doesn’t work.

Skye
2 years ago

I’m trying to set this up as a intruder-detection system, by placing it in the centre of my home connected up to a Raspberry Pi (5V, GND, GPIO Pin 14) for power and detecting the output. I have Python code working which detects the output and logs it and can also send out an email, depending on whether I have the Alert setting set to Active or Not. (I can watch the logs in real-time over Wifi using an SSH terminal on my mobile phone.) Most of the time, the device is working exactly as I would expect, it detects… Read more »

Skye
2 years ago
Reply to  Skye

Well, a little disappointed that posting here did not produce any suggestions but….

GOOD NEWS – I solved it for myself.

When a detector like the RCWL-0516 is connected to GPIO pins on a Raspberry Pi (or Arduino) then those same pins are subject to RF Interference, and the RFI can set the Pin High instead of the detector. As such I just needed to add a pull-down resistor (I used a software-addressable one) to my code, and the problem went away (no more spurious results):

From this:
GPIO.setup(pin, GPIO.IN)
To this:
GPIO.setup(pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)


S.S
2 years ago

Hello,
I want to increase the On-time delay with this sensor.
Is this possible in this ckt?
Please suggest

Dr Barkat Faridi
2 years ago

Can we use RCWL-0516 for human static presence

Salvini Mendes
2 years ago

I learn a lot with your videos, lessons and way of explain electronics. Thank for everything you teach us !!!!

John
1 year ago

As always, thank you for the great comprehensive tutorial. I plan to use a couple of these in my garage to detect mice or other pests at night. Any tips would be greatly appreciated.

naveed
1 year ago

Sir, rcwl 0516 can operate on 5v and 800ma supply?
I read in diffrent specification max 3ma operating current.

don
1 year ago

I have a RCWL-0516 with a Di-mini to notify me when the mail man approaches the mail box.
It works well, but it is triggered when the metal garage door next to it is opened. I have reduced the sensing distance with a 470K resistor
Any idea why a moving metal door would trigger it?

I am using the RCWL-0516 output to a MOS-fet to turn power to the D1 on, like you would with a PIR.

11 months ago

SO I’VE DOING SOME EXPERIMENTS SANS ANY MICROPROCESSOR WITH CDM324’S AND THE RCWL-0516 RADAR PCB’S. SO, I MUST GIVE YOU A HUGE THANK YOU, YOUR YOUTUBE VIDEOS HELPED IMMENSELY IN THE BEGINING. I WILL MOST LIKELY BE INTRODUCING AN ESP OR AN SMT OR SOME SORT OF MICROPROCESSOR TO THE MIX, AS I HAVE SOME PRETTY AMBVITOUS GOALS THAT WON’T BE POSSIBLE WITHOUT ONE… AT THIS POINT THOUGH, I’M STILL LEARNING AND TRYING TO FIND THE RIGHT ONE FOR THE PROJECT SO TO MINIMIZE IGNORANT MISSED MATCH COMPONENT ISSUES.. HOWEVER, THAT’;S A TOPIC FOR A LATER DATE… ONE STEP AT… Read more »