Introduction
The digital microwave sensor uses doppler radar to detect moving objects using microwaves. This differs from the method used by a regular infrared (IR) sensor as the microwave is sensitive to a variety of objects that can reflect it's wavefpr,, and its sensor readings are not affected by ambient temperatures. This type of sensor is widely used in industrial, transportation and civil applications such as measuring a vehicle's speed, measuring liquid levels, automatic door motion detection, automatic washing, production line material detection, car reversing sensors, etc. The microwave detection method has the following advantages compared with other detection methods:
- Able to detect objects without physical contact
- Readings not affected by temperature, humidity, noise, air, dust or light - suitable for harsh environments
- Strong resistance to radio frequency interference
- Low output, not harmful to the human body
- Microwaves have a wide detection range and velocity equal to the speed of light
- Supports non-life-class object detection
Specification
Working Voltage: 5V +/- 0.25V
Working Current(CW): 60mA max., 37mA typical
Size: 48.5x63mm
Emission:
Detection Distance: 2-16M continuously adjustable
Emission Frequency: 10.525 GHz
Precision Frequency Setting: 3MHz
Output Power (Minimum): 13dBm EIRP
Harmonic Emission: < -10dBm
Average Current (5�): 2mA typ.
Pulse Width (Min.): 5uSec
Load Cycle (Min.): 1%
Reception:
Sensitivity (10dB S/N ratio) 3Hz to 80Hz bandwidth: -86dBm
3Hz to 80Hz Bandwidth Clutter: 10uV
Antenna Gain: 8dBi
Vertical 3dB Beam Width: 36 degrees
Level 3dB Beam Width: 72 degrees
Board Overview
Antenna Description
Signal Processing
The following diagram demonstrates the working principle of the sensor module. It works by amplifying a tiny signal which is received by the microwave sensor, and then through the comparison circuit it converts the signal into a square signal with a digital output of 0 or 1 which an Arduino or other micro controller can easily handle.
Signal Detection Range
Detection Angle: The angle of detection is 72 degrees with the antenna in a parallel direction (azimuth) The vertical (pitch) direction of the antenna is 36 degrees.
Install
Microwaves can penetrate through walls. So sometimes it has inaccuracies when microwaves penetrate through outside walls and detect moving objects in non-target areas. Be sure to choose an installation location to avoid this!
Indicators and Output Status
When the microwave sensor does not detect moving objects, the indicator LED remains off. When the sensor detects moving objects, the LED will turn on and the output level will be change from HIGH to LOW. The LED will automatically turn off about after 0.5s and the output level will change from LOW to HIGH. If the microwave sensor detects continuously moving objects the LED will keep flashing on and off. The output level will fluctuate between HIGH and LOW until the object stops moving.
Distance Adjustment
The microwave sensor has a distance range of 2-16m. The detection distance can be adjusted using the potentiometer. If it is turned in the direction on MIN, the detection distance decreases. If it is turned in the opposite direction, the range increases.
Comparison with IR Sensor
Microwave Sensor | IR Sensor | |
---|---|---|
Trigger Mode | Movement | Infrared Reflection |
Temperature Influence | No Influence | Over 40 degrees C can inhibit function |
Object Penetration | Able to penetrate any non-metallic object | Unable to penetrate |
Ambient Environmental Requirements | No requirements | Dusty or brightly lit environments can inhibit function |
Working Life | more than 100,000 hours | about 1000 hours |
Stability | Very reliable and stable | Induction distance will shorten over time |
Tutorial
Requirements
Hardware
- Arduino UNO (or similar) x1
- Microwave sensor x1
- 3PIN digital cable x1
Software
- Arduino IDE V1.6.5 Click to Download Arduino IDE from Arduino®
- Download and install the MsTimer2 Library (About how to install the library?)
Connection Diagram
NOTE: Align the antenna surface towards the area you need to detect.
NOTE: The sensor can be adjusted continuously within the range of 2-16m. Turn the potentiometer in the direction of MIN and the detection range decreases. Turn the potentiometer in the opposite direction and the detection range increases.
Sample Code
Please download MsTimer2 library first. Here is tutorial about Library installation.
/*!
* @file microwaveSensor.ino
* @brief This example reads temperature and humidity from SHT1x Humidity and Temperature Sensor.
* @copyright Copyright (c) 2010 DFRobot Co.Ltd (http://www.dfrobot.com)
* @license The MIT License (MIT)
* @author Loan <Loan.he@dfrobot.com>
* @version V1.0
* @date 2015-7-30
*/
/***********Notice and Trouble shooting***************
1.Connection and Diagram can be found here
<https://wiki.dfrobot.com.cn/_SKU_SEN0192__Microwave_sensor%E5%BE%AE%E6%B3%A2%E4%BC%A0%E6%84%9F%E5%99%A8%E6%A8%A1%E5%9D%97>
2.This code is tested on Arduino Uno, Leonardo, Mega boards.
3.arduino Timer library is created by jonoxer.
See <https://www.dfrobot.com.cn/images/upload/File/SEN0192/20160112134309yy5nus.zip arduino Timer library> for details.
****************************************************/
#include <MsTimer2.h> //Timer interrupt function
int pbIn = 0; // Define the interrupt PIN is 0, that is, digital pins 2
int ledOut = 13;
int count = 0;
volatile int state = LOW; //Define ledOut, default is off
void setup()
{
Serial.begin(9600);
pinMode(ledOut, OUTPUT);
attachInterrupt(pbIn, stateChange, FALLING); // Sets the interrupt function, falling edge triggered interrupts.
MsTimer2::set(1000, process); // Set the timer interrupt time 1000ms
MsTimer2::start();//Timer interrupt start
}
void loop()
{
Serial.println(count); // Printing times of 1000ms suspension
delay(1);
if (state == HIGH) //When moving objects are detected later, 2s shut down automatically after the ledout light is convenient.
{
delay(2000);
state = LOW;
digitalWrite(ledOut, state); //Turn off led
}
}
void stateChange() //Interrupt function
{
count++;
}
void process() //Timer handler
{
if (count > 1) //1000ms interrupt number greater than 1 is considered detected a moving object (this value can be adjusted according to the actual situation, equivalent to adjust the detection threshold of the speed of a moving object)
{
state = HIGH;
digitalWrite(ledOut, state); //Lighting led
count = 0; //Count zero
}
else
count = 0; //In 1000ms, interrupts does not reach set threshold value is considered not detect moving objects, interrupt the count number is cleared to zero.
}
FAQ
Q&A | Some general Arduino Problems/FAQ/Tips |
---|---|
A | For any questions, advice or cool ideas to share, please visit the DFRobot Forum. |