MicroWave_Sensor_SKU__SEN0192-DFRobot

Introduction

SEN0192 Gravity: Digital Microwave Sensor (Motion Detection)

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:

  1. Able to detect objects without physical contact
  2. Readings not affected by temperature, humidity, noise, air, dust or light - suitable for harsh environments
  3. Strong resistance to radio frequency interference
  4. Low output, not harmful to the human body
  5. Microwaves have a wide detection range and velocity equal to the speed of light
  6. Supports non-life-class object detection

Specification

Board Overview

Antenna Description

SEN0192 Gravity: Digital Microwave Sensor (Motion Detection) Board Overview

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.

SEN0192 Gravity: Digital Microwave Sensor (Motion Detection) Board Overview

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.

SEN0192 Gravity: Digital Microwave Sensor (Motion Detection) Board Overview

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!

SEN0192 Gravity: Digital Microwave Sensor (Motion Detection) Install

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

Connection Diagram

SEN0192 Gravity: Digital Microwave Sensor (Motion Detection) 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.

More Documents