Motion Sensor Module BYC-WB-D1 Based on BISS0001 for Arduino

Motion Sensor Module BYC-WB-D1 Based on BISS0001 for Arduino

In this tutorial, we will explore how to use the BYC-WB-D1 motion sensor module based on the BISS0001 IC with an Arduino. This module is designed for low-power motion detection, making it ideal for various applications, including security systems and automation projects. By the end of this guide, you will have a working setup that can detect motion and trigger an output, such as a buzzer. To clarify some of the concepts and code, you can refer to the video (in video at 00:00).

Hardware Explained

The BYC-WB-D1 module is built around the BISS0001, which is a micro-power motion detection IC. This sensor works by detecting changes in infrared radiation, typically emitted by people or animals. When motion is detected, the output pin of the module changes state, which can be read by the Arduino. The module typically has three pins: - **VCC**: This pin powers the module, usually connected to the Arduino's 5V output. - **GND**: This is the ground pin, connected to the Arduino's GND. - **OUT**: This output pin indicates when motion is detected; it can be connected to a digital input pin on the Arduino to read the sensor's state.

Datasheet Details

ManufacturerBISS0001
Part numberBYC-WB-D1
Logic/IO voltage2.7 V – 12 V
Supply voltage5 V
Output current (per channel)≤ 20 mA
Peak current (per channel)≤ 60 mA
PWM frequency guidanceN/A
Input logic thresholdsHigh: > 2.5 V, Low: < 0.8 V
Voltage drop / RDS(on) / saturation≤ 0.5 V
Thermal limits−40 °C to 85 °C
PackageTO-220
Notes / variantsLow power consumption

  • Ensure proper power supply voltage between 5 V and 12 V.
  • Observe current limits on the output pin to prevent damage.
  • Maintain proper grounding to avoid false triggers.
  • Use a pull-down resistor if necessary to stabilize the output pin.
  • Double-check pin connections before powering the circuit.

Wiring Instructions

To wire the BYC-WB-D1 motion sensor module to your Arduino, follow these steps: 1. Connect the **VCC** pin of the sensor to the **5V** pin on the Arduino. This powers the sensor. 2. Connect the **GND** pin of the sensor to the **GND** pin on the Arduino to complete the circuit. 3. Connect the **OUT** pin from the sensor to digital pin **11** on the Arduino. This pin will read the motion detection signal. Make sure your connections are secure, as loose wiring can lead to unreliable readings or false triggers.

Code Examples & Walkthrough

In the code snippet below, we initialize the necessary variables and set up the serial communication to monitor the motion sensor's output.
int count = 0; // just counting seconds
int buzzer = 11; // pin to connect to buzzer or relay

void setup() {
  Serial.begin(9600);
  pinMode(buzzer, OUTPUT); // set pin 11 as output
}
This code initializes a counter variable, count, which will keep track of how many seconds motion is detected. The variable buzzer is set to pin 11, where we will connect our output device. Next, we enter the loop where we continuously read the output from the motion sensor:
void loop() {
  int v = analogRead(A0); // read the output pin of the module
  if (v == LOW) {
    digitalWrite(buzzer, LOW); // set buzzer pin LOW
    count = 0; 
  } else {
    count++;
    digitalWrite(buzzer, HIGH); // Set buzzer pin HIGH
    Serial.print(count);
    Serial.println("-Detected");    
  }
  delay(1000); // wait for 1 second
}
In this loop, the program reads the output from the motion sensor. If no motion is detected (i.e., v == LOW), the buzzer is turned off. If motion is detected, the buzzer is activated, and the count of detected seconds is printed to the serial monitor. For a more detailed understanding of the code and how it functions, please refer to the full code loaded below the article.

Demonstration / What to Expect

Once you have completed the wiring and uploaded the code to your Arduino, you should expect the buzzer to sound whenever motion is detected. The serial monitor will display a count of how many seconds motion has been continuously detected. If the sensor does not detect motion, it will stop the buzzer and reset the count. Common pitfalls include wiring errors, such as incorrect pin connections or power supply issues. Always check your connections and ensure that the sensor is properly powered to avoid false readings.

图像

Motion sensor module BYC-WB-D1 based on BISS0001 for Arduino
Motion sensor module BYC-WB-D1 based on BISS0001 for Arduino
114-Motion sensor module BYC-WB-D1 based on BISS0001 for Arduino
语言: C++
已复制!

|||您可能需要的东西

资源与参考

尚无可用资源。

文件📁

没有可用的文件。