Codey OnlineBiblioteka komponentów Arduino i ESP32 › Motion sensor with microwave radar RCWL-051
Motion sensor with microwave radar RCWL-051
Czujniki

Motion sensor with microwave radar RCWL-051

RCWL-051 to moduł czujnika ruchu z radarem mikrofalowym, który wykrywa ruch, emitując słabe sygnały mikrofalowe i obserwując zmiany w sygnale odbitym. Zazwyczaj działa z zasilania 3,3–5 V i udostępnia cyfrowe wyjście TTL (OUT), które można odczytać za pomocą Arduino lub ESP32 do wykrywania ruchu i obecności.

Szerokość: 36.3 mm

Pinout — Motion sensor with microwave radar RCWL-051

Pin Sygnał Opis
3V3 power Regulated 3.3V output from the module for small external loads or reference.
GND ground Common ground return for power supply and logic signal reference.
OUT digital Digital motion output; goes high when the radar sensor detects movement.
VIN power Main supply input for powering the RCWL-051 module.
CDS analog Light-sensor control input; connect an LDR network to inhibit motion output in daylight.

Przykładowy schemat połączeń — Motion sensor with microwave radar RCWL-051

Z Do Przewód
board:5V x1:VIN red
board:GND x1:GND black
board:D2 x1:OUT green

Przykładowy kod Arduino — Motion sensor with microwave radar RCWL-051

Ten przykład został napisany i sprawdzony kompilacją dla arduino-uno. Codey Online dostosuje go do każdej innej obsługiwanej płytki.

// RCWL-051 microwave radar motion sensor example
// Wiring:
// - RCWL-051 VIN  -> Arduino 5V
// - RCWL-051 GND  -> Arduino GND
// - RCWL-051 OUT  -> Arduino D2

const int motionPin = 2;

void setup() {
  pinMode(motionPin, INPUT);
  Serial.begin(9600);
  while (!Serial) {
    ;
  }
  Serial.println("RCWL-051 motion sensor example");
  Serial.println("Move in front of the sensor to see OUTPUT change.");
}

void loop() {
  int motionState = digitalRead(motionPin);

  if (motionState == HIGH) {
    Serial.println("Motion detected");
  } else {
    Serial.println("No motion");
  }

  delay(250);
}

Podobne komponenty

18650 Battery Shield with USB-C Charger and 5V Boost Converter

18650 Battery Shield with USB-C Charger and 5V Boost Converter

2.4 inch OLED Display I2C 3.3V

2.4 inch OLED Display I2C 3.3V

3.5 inch TFT LCD Shield

3.5 inch TFT LCD Shield

50kg Load Cell Weight Sensor

50kg Load Cell Weight Sensor

Zbuduj swój projekt Arduino lub ESP32 z pomocą AI

Opisz, co chcesz zbudować. Codey Online napisze kod, narysuje schemat połączeń, skompiluje projekt i wgra go na płytkę bezpośrednio z przeglądarki.

Zacznij za darmo