The HW-416B requires a stabilization period (usually 10–60 seconds) after powering up. During this time, the sensor "learns" the ambient infrared signature of the room. Ensure your code ignores signals during this initialization phase.
typically uses the BISS0001 IC to process signals from a pyroelectric sensing element. PIR Motion Sensor - Adafruit Learning System hw416b pir sensor datasheet better
modules include a jumper to select between two trigger modes Single Trigger (L): The HW-416B requires a stabilization period (usually 10–60