Codey OnlineBibliothèque de composants Arduino & ESP32 › Motion sensor with microwave radar RCWL-051
Motion sensor with microwave radar RCWL-051
Capteurs

Motion sensor with microwave radar RCWL-051

Le RCWL-051 est un module de capteur de mouvement à radar micro-ondes qui détecte les déplacements en émettant de faibles signaux micro-ondes et en surveillant les variations du signal réfléchi. Il fonctionne généralement avec une alimentation de 3,3–5 V et fournit une sortie TTL numérique (OUT) que vous pouvez lire avec un Arduino ou un ESP32 pour la détection de mouvement et de présence.

Largeur: 36.3 mm

Brochage — Motion sensor with microwave radar RCWL-051

Broche Signal Description
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.

Exemple de schéma de câblage — Motion sensor with microwave radar RCWL-051

De Vers Fil
board:5V x1:VIN red
board:GND x1:GND black
board:D2 x1:OUT green

Exemple de code Arduino — Motion sensor with microwave radar RCWL-051

Cet exemple a été écrit et vérifié à la compilation pour le arduino-uno. Codey Online l'adapte pour vous à toute autre carte prise en charge.

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

Composants similaires

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

Construisez votre projet Arduino ou ESP32 avec l'IA

Décrivez ce que vous voulez créer. Codey Online écrit le code, dessine le schéma de câblage, le compile et flashe votre carte directement depuis le navigateur.

Commencez gratuitement