if (val == HIGH) digitalWrite(LED_PIN, HIGH); if (pirState == LOW) Serial.println("Motion detected!"); pirState = HIGH;
— “HW416B” could be a specific board silkscreen from an unbranded supplier (AliExpress, Amazon, etc.). No official datasheet exists, but specifications typically mirror HC-SR501. hw416b pir sensor datasheet better
While most datasheets give you a wall of text, here are the numbers that actually matter for your build: Wide range from 4.5V4.5 cap V to 12V12 cap V (though is standard). Detection Range: Up to 7 meters in a 120∘120 raised to the composed with power cone. Output Signal: A simple digital "High" at 3.3V3.3 cap V logic level when motion is detected. Current Draw: Extremely low idle current (around ), making it perfect for battery-powered setups. 2. The "Better" Adjustments: Potentiometers and Jumpers if (val == HIGH) digitalWrite(LED_PIN, HIGH); if (pirState
👉 “HC-SR501 datasheet” (not HW-416B) Detection Range: Up to 7 meters in a
| Feature | HW416B | HC‑SR501 | |---------|--------|----------| | | Yes (potentiometer) | Yes (potentiometer) | | Adjustable sensitivity | Yes (potentiometer) | Yes (potentiometer) | | 3.3 V operation | Via configuration pins (verified) | Requires regulator bypass | | Trigger mode jumper | Yes (repeat/non‑repeat) | Yes | | EMC certification | Listed in product specs | Not typically claimed | | Price | Similar (~US$3–5) | Slightly cheaper (~US$2–4) |
| State | Voltage Level | Meaning | |-------|---------------|---------| | HIGH | 3.3 V (5 V‑tolerant) | Motion detected | | LOW | 0 V | No motion |
The sensor requires an initial calibration period of 10 to 60 seconds after power-up before it will reliably detect motion. Don't expect immediate detection when you first apply power.