Hw-416-b Pir Sensor Datasheet ((install)) Today
For applications requiring immediate action upon motion detection, consider using rather than polling the sensor in a loop for improved response time.
if (motionState == HIGH) digitalWrite(ledPin, HIGH); Serial.println("Motion Detected!"); delay(100); else digitalWrite(ledPin, LOW);
On the corner of the module, you will find three solder pads or a jumper labeled and L .
Passive Infrared (PIR) sensors are the backbone of modern security systems, automated lighting, and smart home automation. Among the various modules available to hobbyists and engineers, the stands out as a highly reliable, compact, and low-power solution for motion detection. hw-416-b pir sensor datasheet
Are you triggering a specific ? (like a relay , buzzer , or smart home automation event )
| Pin | Name | Description | |-----|--------|------------------------------------| | 1 | VCC | 4.5V – 20V DC power input | | 2 | GND | Ground | | 3 | OUT | Digital output (HIGH = motion) |
As noted in the component datasheet, the BISS0001 can be paired with a pyroelectric infrared sensor and a few external components to create a complete passive infrared switch system suitable for burglar alarms, automatic lighting, automatic doors, electric fans, and hand dryers. Among the various modules available to hobbyists and
The Ultimate HW-416-B PIR Motion Sensor Guide: Datasheet, Pinout, and Arduino Integration
The HW-416-B’s versatility makes it suitable for a wide range of projects:
What are you using? (ESP32, Raspberry Pi, etc.) The Ultimate HW-416-B PIR Motion Sensor Guide: Datasheet,
Many sellers list HW-416-B as equivalent to HC-SR501, but there are subtle differences:
/* HW-416-B PIR Motion Sensor Integration Demonstrates how to read a digital signal from the HW-416-B module. */ const int PIR_PIN = 2; // HW-416-B OUT pin connected to digital pin 2 const int LED_PIN = 13; // Built-in Arduino LED int pirState = LOW; // Start assuming no motion detected int val = 0; // Variable for reading the pin status void setup() pinMode(PIR_PIN, INPUT); // Declare sensor as input pinMode(LED_PIN, OUTPUT); // Declare LED as output Serial.begin(9600); Serial.println("Initializing PIR Sensor... Please wait for warmup."); // Give the sensor 30-60 seconds to warm up and calibrate to the environment delay(30000); Serial.println("Sensor active."); void loop() val = digitalRead(PIR_PIN); // Read input value if (val == HIGH) // Check if the input is HIGH digitalWrite(LED_PIN, HIGH); // Turn LED ON if (pirState == LOW) // Motion just detected Serial.println("=> Motion detected! Object moving within zone."); pirState = HIGH; else digitalWrite(LED_PIN, LOW); // Turn LED OFF if (pirState == HIGH) // Motion just ended Serial.println("=> Motion ended. Area clear."); pirState = LOW; Use code with caution. Warm-up Period Warning
The following sketch reads the state of the HW-416-B sensor. It turns on the built-in Arduino LED (Pin 13) and prints alerts to the Serial Monitor when motion is detected.