Doppler radar module RCWL-0516 with Arduino
FunduinoPublished on
Bewegungen mit dem Doppler-Radar erkennen und einen Alarm auslösen
You need this
RCWL-0516 motion detector - Doppler radar, up to 7 m, 4-28 V
1,87 € *Item no. F23106645About the product — RCWL-0516 motion detector - Doppler radar, up to 7 m, 4-28 V
Funduino UNO R3 Microcontroller - ATmega328P, 16 MHz, for Arduino
11,12 € *Item no. F23107480About the product — Funduino UNO R3 Microcontroller - ATmega328P, 16 MHz, for Arduino
830-point Breadboard - solderless breadboard for Arduino
2,90 € *Item no. FUN-1010553About the product — 830-point Breadboard - solderless breadboard for Arduino
Breadboard Cables Male-to-Male - 40 Pieces, 20 cm
1,74 € *Item no. FUN-1010558About the product — Breadboard Cables Male-to-Male - 40 Pieces, 20 cm
All 4 parts together 17,63 € *Ready to ship immediately · Delivery time: 1-3 business days
* All prices include statutory VAT, plus shipping costs.
How the RCWL-0516 works
Pinout
Exercise 1: Motion status on the serial monitor
Exercise 1: Read the motion status
int Radar module = 8;
int VALUE;
void setup()
{
Serial.begin(9600);
pinMode(Radar module, INPUT);
}
void loop()
{
VALUE = digitalRead(Radar module);
Serial.println(VALUE);
delay(100);
}Exercise 2: Trigger an alarm sound
Exercise 2: Alarm sound when motion is detected
int Radarmodul = 8; // OUT of the radar module connected to pin 8 of the microcontroller
int Piepser = 7; // "+" of the piezo speaker connected to pin 7
int WERT; // Variable for the measured value
void setup()
{
Serial.begin(9600);
pinMode(Radarmodul, INPUT);
pinMode(Piepser, OUTPUT);
}
void loop()
{
WERT = digitalRead(Radarmodul);
Serial.println(WERT);
if (WERT > 0)
{
digitalWrite(Piepser, HIGH); // Turn on the piezo speaker.
delay(1000); // Wait 1000 milliseconds. (It beeps)
digitalWrite(Piepser, LOW); // Turn off the piezo speaker.
delay(5000); // Wait 5000 milliseconds. The loop then starts again.
}
}Rate the instructions