Proximity sensing is a very common application in electronics.
There
are several ways to accomplish this. The most common way is by using a
PIR sensor. PIR Sensor senses the change in ambient infrared radiation
caused by warm bodies. I have already covered this in my Tutorial No. 5:
"PIR Sensor Tutorial - With or Without Arduino". However, since PIR
sensors detect movement from living objects, they can generate false
alarms. These sensors are also inefficient in hot environments, as they
rely on heat signatures.
The
other common methods of proximity sensing involve, using reflected
ultrasonic or light beams. Using these sensors, the intruding object is
detected by the reflected beam back to its source. The time delay
between transmission and reception is measured to calculate the distance
to the object.
In this tutorial, we are going to look at another
method of proximity sensing using "Microwaves" and "Doppler Effect".
In my hand is an inexpensive RCWL-0516 Microwave Radar Motion Sensor.
The RCWL-0516 microwave sensor detects "any movement" from "any object"
and does not rely on heat, making it more reliable in hot environments. I
am going to use this sensor to create a Geo-fence around my house to
detect motion and get notifications.
Sponsors
What is the Doppler effect?
So, before understand how the RCWL-0516 sensor works, let’s understand the Doppler Effect.
The Doppler effect, is named after the Austrian physicist Christian Doppler, who described this phenomenon in 1842.
He described the change in frequency observed by a stationary observer when the source of the frequency is moving. The sound's pitch is higher than the emitted frequency when the sound source approaches the observer as the sound waves are squeezed into shorter distance (bunched together), which can be heard as a higher pitch. The opposite happens when the object moves away from the observer, causing the sound waves to become lower in frequency and lower in pitch (spread out). As a result, the observer can hear a noticeable drop in the pitch as it passes.
This holds true for all sorts of waves, such as water, light, radio, and sound.
Doppler microwave detection devices transmit a continuous signal of low-energy microwave radiation at a target area and then analyze the reflected signal. The target’s velocity can be measured by analyzing how the target’s motion altered the frequency of the transmitted signal.
Due to Dopplers effect, the frequency of reflected microwave signal is different from the transmitted signal when an object is moving towards or away from the sensor. When a car approaches a speed trap radar, the frequency of the returned signal is greater than the frequency of the transmitted signal, and when the car moves away, the frequency is lower. This is how a speed gun calculates the speed of the car.
- Operating Voltage: 4-28V (typically 5V)
- Detection Distance: 5-7 Meters
- Maximum Current Drawn: ~ 2.7 mA
- Operating Frequency: ~ 3.18 GHz
- Transmission Power: 20 mW (typical)/30 mW (max)
- Signal length: ~ 2s
- Regulated Output: 3.3V, 100mA
GND : is the ground pin.
OUT : is the 3.3V TTL logic output. This pin goes HIGH for 2seconds when a motion is detected and goes LOW when no motion is detected. The output of this module is "analog" and can be connected to an analog input of a micro controller and sampled by an ADC. The output voltage is roughly proportional to the distance between the sensor and the object.
VIN : provides power to the module. Connect this pin to an input voltage anywhere between 4 to 28V (however, 5V is commonly used). This module consumes less than 3mA of current so, you can easily power this by the 5V output from an Arduino or a Raspberry Pi.
CDS : pins are where you attach an optional LDR (light dependent resistor) allowing it to operate only in the dark.
You can connect the LDR to the sensor in two ways:
* By using the two CDS pads on the top of the module.
* Or by connecting one end of the LDR to the CDS pin at the terminal end, and the other end to the ground.
We will cover this in the details in the demo section.
Remember, this module comes without any connecting pins attached to it.
What does CDS stand for?
CDS stands for Cadmium Sulphide, which is the photoactive component in LDRs. Because of this, LDRs are sometimes called CDS photoresistors.
The RCWL-9196 IC
The chip also supports "repeat triggers" and has a "360-degree detection area without blind spots".
The transistor Q1 also acts as a mixer that combines the transmitted and received signal and outputs the difference which is filtered by the low pass filter formed by C9 and R8, and is amplified by the IC.
Jumper Settings
C-TM : (Pulse length Adjustment) By installing a suitable SMD capacitor you can adjust the repeat trigger time by extending the output pulse length. Default trigger time is 2s. Increasing capacitor's capacity will make repeat trigger time longer. A 0.2µF capacitor extends the output pulse to 50s, while 1µF extends it to 250s.
R-GN : (Detection Range Adjustment) By installing a suitable resistor you can reduce the detection range. The default detection range is 7m. If you install a 1M resistor the distance reduces to 5m, while a 270K resistor reduces it to 1.5m.
R-CDS : (Light Sensitivity Adjustment) You can use this as an alternative to soldering the LDR. Any resistor between 47K – 100K will suffice. The lower the value, the brighter the light must be in order to disable the trigger.
Demo
The wiring is very simple, you just need to connect the sensor's VIN and GND to a power supply between 4-28V. Then connect a LED to the OUT pin via a 220Ω current limiting resistor. That’s it, as easy as that.
Now, when the module senses motion, the red LED lights up for about two seconds when the OUT pin of the sensor goes “HIGH”. You can replace the LED with a relay module if you want to turn something ON/OFF based on motion.
Demo 2: Connecting an LDR
As discussed earlier, you can either connect the LDR to the two CDS pads on the top of the sensor, or attach one leg of the LDR to the CDS pin at the bottom of the module and the other one to GND. LDRs don't have polarity, so they can be connected in any direction of your choice.
When the LDR is exposed to light the resistance of the LDR decreases, and you will notice that the sensor produces no output. However, the sensor resumes normal operation once the room is darkened.
This property of the sensor can be used in spotting intruders at night or controlling lights in a room.
Demo 3: Connecting an Arduino
In this example, I am going to light up an LED using an Arduino when the sensor senses a motion.
Power the sensor from the 5v pin of the Arduino and connect the OUT pin to pin 2 of the Arduino.
Now, connect an LED to pin no 3 of the Arduino via a 220Ω current limiting resistor.
Upload the code and swipe your hand over the sensor. The red LED lights up and the serial monitor displays the message "Motion Detected" when the sensor detects a motion.
Demo 4: Sending Motion Alerts Over RF or WiFi
You can attach this module to a nodeMCU or a NRF20L01 transceiver module or to a 433MHz RF transmitter/receiver module to send the detected motion information as a notification to a mobile device or save it in a database.
Advantage and Disadvantages
- Very cheap and compact. The PCB itself is less than 4mm thick
- They can penetrate through walls and holes allowing them to have a wide detection range
- Radar signals can penetrate non-conductive materials such as plastic and wood allowing them to be hidden or protected from accidental damage
- These sensors can work perfectly behind 18mm thick pieces of pine wood, 50mm thick hardback book with no obvious reduction in sensitivity
- These sensors are safe. They put out very low levels of microwaves at 3.2GHz
- They are not effected by heat much and have better detection rate than traditional IR sensors
- They are incredibly sensitive to movement and can detect small movements very easily
Disadvantages
- Since these sensors rely on a Doppler radar system, signal reflections from other nearby objects can interfere with the measurement, making it less reliable and accurate than other sensors
- These sensor and all its leads needs to be rigidly mounted. If the connecting leads are subject to movement or vibration, they will trigger the sensor
- These sensors don't work behind normal standard double glazing panels
- The reflections from metals can also influence the measurements
- They can be triggered by the wind
- You can use Aluminum foils to block the microwave signals from the sensor
Uses
- Burglar alarm
- Intruder detection
- Smart security devices
- Human sensing toys
- Geofencing
- Halloween props
- Sensing people/animals through walls even without light
- Security and motion sensing light switches
Thanks
Thanks again for checking my post. I hope it helps you.
If you want to support me subscribe to my YouTube Channel: https://www.youtube.com/user/tarantula3
Other Links:
- PIR Sensor Tutorial - With or Without Arduino: YouTube
- DIY Relay Module: YouTube
- All About nRF24L01 Modules: YouTube
- DIY - NodeMCU Development Board: YouTube
- Contactless Wireless Door Bell Using Arduino: YouTube
- Doppler Effect: Wikipedia
Support My Work
- BTC: 1Hrr83W2zu2hmDcmYqZMhgPQ71oLj5b7v5
- LTC: LPh69qxUqaHKYuFPJVJsNQjpBHWK7hZ9TZ
- DOGE: DEU2Wz3TK95119HMNZv2kpU7PkWbGNs9K3
- ETH: 0xD64fb51C74E0206cB6702aB922C765c68B97dCD4
- BAT: 0x9D9E77cA360b53cD89cc01dC37A5314C0113FFc3
- LBC: bZ8ANEJFsd2MNFfpoxBhtFNPboh7PmD7M2
- COS: bnb136ns6lfw4zs5hg4n85vdthaad7hq5m4gtkgf23 Memo: 572187879
- BNB: 0xD64fb51C74E0206cB6702aB922C765c68B97dCD4
- MATIC: 0xD64fb51C74E0206cB6702aB922C765c68B97dCD4
Thanks, ca gain in my next tutorial.
Tags
----
RCWL-0516, PIR sensor, ultrasonic, Doppler Effect, microwave sensor, microwave, Arduino, RCWL0516, Geofencing, Wikipedia, Arduino Geofencing, microwave Doppler radar, Microwave radar module,Microwave Sensor with Arduino, R-CDS, R-GN, C-TM, burglar alarm, security lights, VIN, intruder detection, home automation, cadmium sulphide, CDS,Active sensor,passive sensor,RCWL-9196,RCWL9196,BISS0001,MMBR941M,human sensing toys, How To Make Motion Sensor Light Switch, active sensor, passive sensor, radar sensor, motion sensor,
Odysee: https://odysee.com/@Arduino:7/All-About-RCWL0516-Microwave-Radar-Motion-Sensor-Module:b
Cos: https://cos.tv/videos/play/46636133664986112
No comments