This project uses a digital microwave sensor and an Arduino control board to create a human detection system that can detect moving objects behind walls. Compared to infrared sensors, ultrasonic sensors, PIR proximity sensors, and TOF time-of-flight sensors, this project is sensitive to various objects, and the sensor’s data is not affected by indoor temperature.
Understanding Microwave Sensors
Microwave sensors are devices that use microwave properties to detect physical quantities, such as the presence, speed, distance, and angle of objects.
During operation, microwaves emitted by the transmitting antenna are absorbed or reflected when they encounter the object being measured, causing a change in power. If the receiving antenna receives the microwaves that pass through or are reflected back by the object, converts them into electrical signals, and processes them with a measurement circuit, microwave detection is achieved.
Structurally, microwave sensors mainly consist of a microwave oscillator and a microwave antenna. The microwave oscillator is the device that generates microwaves, such as a traveling wave tube, magnetron, or some solid-state components. The oscillation signal generated by the microwave oscillator needs to be transmitted via a waveguide and then emitted through the antenna. To ensure that the emitted microwaves have consistent directionality, the antenna should have a special structure and shape.
Compared to PIR and others, the performance of microwave sensors is not affected by fiber optics, temperature, humidity, noise, dust, etc., and they are widely used in liquid level detection, automatic washing machines, vehicle speed measurement, automatic door motion detection, vehicle overturning, production line material detection, automatic lighting control, and advanced security alarm systems.
Digital Microwave Sensor V2.0
Using the Gravity Digital Microwave Sensor V2.0 from DFRobot, it can detect any object non-contact, with readings unaffected by temperature, humidity, noise, air, dust, and light, and has strong RF interference resistance, making it suitable for harsh environments. Due to its low output power, it is harmless to humans and can also detect non-living objects.
Main features include:
Operating voltage: 5V
Operating current: Maximum 60mA, typical value 37mA.
Detection range: 2-16 meters, adjustable via potentiometer.
Detection angle: 72° in the direction parallel to the antenna, 36° in the vertical direction.
Emission: Radiation frequency: 10.525GHz
Frequency modulation accuracy: 3MHz
Output power (Minimum): 13dBm EIRP
Harmonic radiation: <-10dBm
Average current: 2mA typ.
Pulse width (Min.): 5uSec
Duty cycle (Min.): 1%
Receiving: Sensitivity (10dB signal-to-noise ratio) 3Hz to 80Hz bandwidth: -86dBm
3Hz to 80Hz bandwidth cluster: 10uV
Antenna gain: 8dBi
Vertical 3dB bandwidth: 36 degrees
The red LED is the power indicator, and the yellow LED indicates the signal. When there are no moving objects, the LED remains off; it only lights up when the sensor detects moving objects.
The yellow PCB is the antenna interface board, the red wire is 5V, the black wire is GND, and the green wire is output.
Microwave Sensor Testing
The “ON” duration of the microwave sensor can be changed as needed, and using a higher-level microwave sensor can provide a more advanced performance experience.
The project requires displaying the number of interrupts that occur every 3 seconds through an OLED display module. These interrupts only occur when moving objects or humans are present, with a larger number indicating more motion.
The detection range of the microwave sensor is 2-16 meters, and the blue potentiometer on the module is used to adjust the measurement distance.
To test the performance of the sensor, I fixed it on the door, ensuring that the front of the microwave sensor faced the area to be detected, to see if it could detect my brother’s movements.
Sure enough, the sensor successfully detected my brother in the room.
Building a Human Detection System
This system can detect moving objects and humans hiding behind walls; refer to the circuit diagram of this detection system.
In the system, the output pin of the microwave sensor is connected to pin D2 of the development board, and the 5V and GND pins are connected to the Arduino’s 5V and GND pins, respectively.
The upper left side of the circuit diagram shows a 5V stable voltage based on the LM7805 regulator, and J1 is the DC power female connector. Here, we connected a 12V adapter, lithium-ion battery, or solar panel.
The right side of the circuit diagram shows an I2C interface SSD1306 OLED module, with its SCL and SDA pins connected to the A5 and A4 pins of the Arduino board, respectively.
Below is the code for this living detection system:
#include
#include
#include
#include
#define SCREEN_WIDTH 128 // OLED display width, in pixels
#define SCREEN_HEIGHT 64 // OLED display height, in pixels
// Declaration for an SSD1306 display connected to I2C (SDA, SCL pins)
#define OLED_RESET -1 // Reset pin # (or -1 if sharing Arduino reset pin)
#define SCREEN_ADDRESS 0x3D
Adafruit_SSD1306 display(SCREEN_WIDTH, SCREEN_HEIGHT, &Wire, OLED_RESET);
int pbIn = 0; // Define interrupt 0 that is digital pin 2
int ledOut = 13; // Define the indicator LED pin digital pin 13
int number=0; //Interrupt times
volatile int state = LOW; // Defines the indicator LED state, the default is not bright
void setup()
{
Serial.begin(9600);
pinMode(ledOut, OUTPUT);//
attachInterrupt(pbIn, stateChange, FALLING); // Set the interrupt function, interrupt pin is digital pin D2,
//interrupt service function is stateChange (),
//when the D2 power change from high to low , the trigger interrupt.
MsTimer2::set(3000, Handle); // Set the timer interrupt function, running once Handle() function per 1000ms
MsTimer2::start();//Start timer interrupt function
display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
display.clearDisplay();
display.display();
}
void loop()
{
display.setTextSize(2);
display.setTextColor(WHITE);
display.setCursor(0,5);
display.println(“status: “);
display.setTextSize(3);
display.setTextColor(WHITE);
display.setCursor(0,30);
display.println(number);
display.display();
display.clearDisplay();
delay(10);
}
void stateChange() //Interrupt service function
{
number++; //Interrupted once, the number + 1
}
void Handle() //Timer service function
{
number = 0;
}
Thus, by installing the circuit on the wall, the microwave sensor system can detect if someone is moving on the other side of the wall and display the results on the OLED display.
Author: Hard City Allchips, Source: Breadboard Community
Link: https://mbb.eet-china.com/blog/uid-me-3975615.html
Copyright statement: This article is original by the author, and reprinting is prohibited without permission!
Follow the Breadboard Community for daily selections of electronic technology knowledge
▼

-
Disassembled a switch power supply, what circuits are there?
-
Step-by-step guide to analyzing over-voltage protection circuit design, have you learned the essence?
-
Do you really know how to draw timing diagrams? No, you don’t!
-
Production of circuit board shielding cover drawings
-
DC-DC buck circuit output problem
-
Production of circuit board shielding cover drawings
-
Flashing ESC – An Engineer’s Awkward Day