The HW-416-B PIR sensor is a reliable and versatile motion detection solution suitable for a wide range of applications. Its high sensitivity, low power consumption, and adjustable sensitivity make it an ideal choice for designers and engineers. By following the usage guidelines and specifications outlined in this write-up, you can effectively integrate the HW-416-B PIR sensor into your projects.
Note: Always verify the silk-screen markings on your specific HW-416-B board, as manufacturing variances can sometimes invert the VCC and GND positions. Onboard Adjustments
void loop() motionState = digitalRead(motionPin); if (motionState == HIGH) digitalWrite(ledPin, HIGH); Serial.println("Motion detected!"); else digitalWrite(ledPin, LOW);
| HW-416-B Pin | Arduino Pin | |--------------|-------------| | VCC | 5V | | GND | GND | | OUT | Digital Pin 2 (or any digital input pin) |
The HW-416-B features two variable resistors (potentiometers) on the board that allow you to tune its behavior without rewriting a single line of code.
0.5 seconds to 200 seconds (Adjustable via onboard potentiometer)
He squinted at the datasheet, noting the module’s core—the
If you hold the board with the white dome (Fresnel lens) facing up and look at the pin header from the side, the pinout is generally structured as follows (always verify with the silkscreen markings on your specific board revision):
Clockwise rotation increases the duration the output pin stays "HIGH" after detecting motion. Counter-clockwise rotation decreases the time down to roughly 5 seconds. How the HW-416-B Works
Cone angle of approximately 100 to 110 degrees
Because the HW-416-B outputs a standard 3.3V logic level, it can be read directly by the digital input pins of an Arduino without a voltage divider. HW-416-B VCC →right arrow Arduino 5V HW-416-B OUT →right arrow Arduino Digital Pin 2 HW-416-B GND →right arrow Arduino GND Sample Arduino Code
Most HW-416-B variants include a three-pin jumper header labeled and L to select the trigger mode:
He flipped the board over to see the two orange potentiometers. The Time Pot: