Codey OnlineLibreria di componenti Arduino ed ESP32 › Motion sensor with microwave radar RCWL-051
Motion sensor with microwave radar RCWL-051
Sensori

Motion sensor with microwave radar RCWL-051

L'RCWL-051 è un modulo sensore di movimento a radar a microonde che rileva il movimento emettendo segnali a microonde a bassa potenza e cercando variazioni nel segnale riflesso. In genere funziona con un'alimentazione da 3,3–5 V e fornisce un'uscita TTL digitale (OUT) che puoi leggere con un Arduino o un ESP32 per il rilevamento di movimento e presenza.

Larghezza: 36.3 mm

Pinout — Motion sensor with microwave radar RCWL-051

Pin Segnale Descrizione
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.

Schema di cablaggio di esempio — Motion sensor with microwave radar RCWL-051

Da A Filo
board:5V x1:VIN red
board:GND x1:GND black
board:D2 x1:OUT green

Codice Arduino di esempio — Motion sensor with microwave radar RCWL-051

Questo esempio è stato scritto e verificato in compilazione per arduino-uno. Codey Online lo adatta a qualsiasi altra scheda supportata.

// 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);
}

Componenti correlati

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

Crea il tuo progetto Arduino o ESP32 con l'AI

Descrivi cosa vuoi realizzare. Codey Online scrive il codice, disegna lo schema di collegamento, lo compila e programma la tua scheda direttamente dal browser.

Inizia gratis