Description
It uses Doppler radar technology, with auto-sensing capabilities to control other product, sensor with high sensitivity, reliability, wide angle sensor,Wide supply voltage range . It is widely used in lighting situations,anti-theft alarm situations.
- Working voltage: 3.3-20VDC
- Standby quiescent current: <3mA
- Transmit power: <2mW;
- The working environment temperature: -20℃~+80℃;
- The output signal: TTL level; high is 3.3V and Low is 0V
- Detection angle: 360°(spherical)
- Detection range: 6-8 meters
Getting started with 5.8GHZ Microwave Radar Sensor
In this project you’re going to create a simple circuit with an Arduino and Microwave radar sensor that can detect movement. An LED will light up when movement is detected.
Parts required
Connecting the Hardware
Arduino Microwave Radar Sensor
D2 0
VCC VCC
GND GND
CODES
Upload the following code
int led = 13; // the pin that the LED is atteched to
int sensor = 2; // the pin that the sensor is atteched to
int state = LOW; // by default, no motion detected
int val = 0; // variable to store the sensor status (value)
void setup() {
pinMode(led, OUTPUT); // initalize LED as an output
pinMode(sensor, INPUT); // initialize sensor as an input
Serial.begin(9600); // initialize serial
}
void loop(){
val = digitalRead(sensor); // read sensor value
if (val == HIGH) { // check if the sensor is HIGH
digitalWrite(led, HIGH); // turn LED ON
delay(100); // delay 100 milliseconds
if (state == LOW) {
Serial.println(“Motion detected!”);
state = HIGH; // update variable state to HIGH
}
}
else {
digitalWrite(led, LOW); // turn LED OFF
delay(200); // delay 200 milliseconds
if (state == HIGH){
Serial.println(“Motion stopped!”);
state = LOW; // update variable state to LOW
}
}
}
NOTE: IF you get stray ‘223’ errors The problem is with your “
and ”
characters. Replace them with ordinary quotes, "
, and you should be fine.
Testing the circuit
Open serial monitor