Hw-416-b Pir Sensor Datasheet Upd →

Note: Always let the PIR sensor warm up for 30–60 seconds after powering on. During this time the output may be erratic or stay HIGH, but it will stabilise once the sensor has calibrated to the ambient conditions.

To help refine this documentation for your project, let me know: What or platform are you planning to use?

Turning off desk monitors, lights, or exhaust fans when a room becomes vacant. hw-416-b pir sensor datasheet

// Define pins const int PIR_PIN = 2; // HW-416-B OUT connected to digital pin 2 const int LED_PIN = 13; // Onboard LED void setup() pinMode(PIR_PIN, INPUT); // Set PIR pin as input pinMode(LED_PIN, OUTPUT); // Set LED pin as output Serial.begin(9600); // Initialize Serial Monitor Serial.println("PIR Sensor Warm-up: Waiting for stabilization..."); delay(30000); // Allow 30 seconds for the sensor to stabilize Serial.println("Sensor Active."); void loop() int sensorState = digitalRead(PIR_PIN); if (sensorState == HIGH) digitalWrite(LED_PIN, HIGH); // Turn on LED Serial.println("--- Motion Detected! ---"); else digitalWrite(LED_PIN, LOW); // Turn off LED delay(100); // Small delay to prevent serial flooding Use code with caution. 5. Troubleshooting False Triggers

Detection Range: 3 to 7 meters (Adjustable). Detection Angle: Approximately 110° to 120° cone. Operating Temperature: -15°C to +70°C. 🛠️ Tuning the Hardware Note: Always let the PIR sensor warm up

The HW-416-B is a passive infrared (PIR) module that acts as a digital switch, sending a "high" signal when it detects a change in the infrared environment. 4.8V to 20V DC (Standard 5V is ideal).

int pirState = LOW; int val = 0;

High (3.3V) when motion is detected / Low (0V) when idle Detection Distance: Adjustable from 3 meters up to 7 meters Detection Angle: Less than 110-degree cone shape Delay Time: Adjustable from 0.5 seconds to 200 seconds