PIR Infrared Motion Sensor Modules

Description

PIR (Passive Infrared) motion sensor modules are bare-bones electronic components that detect movement by sensing changes in infrared radiation from warm bodies like humans and animals. These affordable, DIY-friendly modules are designed for makers building custom automation systems, requiring integration with microcontrollers like ESP8266/ESP32, Arduino, or Raspberry Pi. Popular models include the HC-SR501, HC-SR602, and AM312, offering adjustable sensitivity and delay settings for precise motion detection in home automation projects.

Device

Overview

My Implementation

I use HC-SR501 modules paired with ESP8266 boards running ESPHome firmware, creating completely local motion sensors throughout my home. Each sensor connects to a Wemos D1 Mini via three wires (power, ground, signal), then integrates wirelessly with Home Assistant over WiFi. I tuned the onboard potentiometers to 5-second delay and medium sensitivity, deploying them in hallways and bathrooms to trigger lighting automations and occupancy tracking without any cloud dependency.

Device Score Summary

CategoryScoreRationale
Features★★★☆☆Reliable motion detection with adjustable parameters. No built-in wireless or processing, purely a sensor component
Interoperability★★★★★Universal GPIO interface works with any microcontroller. ESPHome provides seamless Home Assistant integration
Setup Ease★★☆☆☆Requires soldering skills, microcontroller programming, and troubleshooting. Not plug-and-play for beginners
Cloud Dependency★★★★★Completely local when paired with ESPHome or Tasmota. Zero cloud communication or external dependencies
Vendor Trust★★★☆☆Generic components from various Chinese manufacturers. HiLetgo is reliable supplier but no formal support
Overall★★★★☆Excellent value for DIY enthusiasts with electronics skills. Unbeatable price and flexibility for custom installations

★★★★★ Exceptional | ★★★★☆ Very Good | ★★★☆☆ Good Enough | ★★☆☆☆ Frustrating | ★☆☆☆☆ Avoid

Features

  • Passive infrared detection with 7-meter range and 120-degree field of view
  • Adjustable sensitivity and time delay via onboard potentiometers
  • Low power consumption (less than 65mA operating current)
  • Wide voltage input range (4.5-20V DC depending on model)
  • Triggerable and repeatable modes for different automation behaviors
  • Compact form factor suitable for discrete installation
  • 3.3V logic output compatible with ESP8266, ESP32, and Arduino
  • No wireless protocol built-in, requires microcontroller for connectivity

Specifications

Price$1-3 per module (5-pack typically $5-10)
ProtocolGPIO (requires ESP/Arduino/RPi for WiFi/Zigbee)
Hub RequiredYes (microcontroller + Home Assistant)
PowerWired (4.5-20V DC, 65mA)
Cloud DependencyLocal (when paired with ESPHome/Tasmota)
HA IntegrationCustom (ESPHome or Tasmota)
Voice ControlIndirect via HA automations
DimensionsHC-SR501: 1.3 x 1 x 0.9 inches
WarrantyNot specified

Home Assistant Integration

Integration Method: ESPHome

  • Requirements: ESP8266/ESP32 board with ESPHome firmware, PIR module connected to GPIO pin, Home Assistant ESPHome integration installed
  • Entities: Binary sensor entity reporting detected/clear states, optional diagnostic sensors for signal quality and uptime
  • Setup: Define binary sensor in ESPHome YAML with GPIO pin configuration, flash firmware to ESP board, auto-discovers in Home Assistant
  • Notes: Fully local operation with instant response. Tasmota firmware is an alternative to ESPHome with similar configuration process.

Practical Considerations

  • Calibration Period: PIR sensors require 30-60 second warm-up time after power-on before reliable detection begins
  • False Positives: Can trigger from pets, air currents, and temperature changes. Careful placement and sensitivity tuning essential
  • Wiring Knowledge: Requires basic electronics skills to connect GPIO, power, and ground correctly. Reversed polarity can damage components
  • Power Supply: Most PIR modules operate at 5V but HC-SR501 has onboard regulator accepting up to 20V. Verify voltage requirements per model
  • Detection Limitations: Cannot detect stationary people. Movement perpendicular to sensor works best, radial motion less reliably detected
  • Firmware Choice: ESPHome offers easier configuration and better Home Assistant integration. Tasmota provides more flexibility for advanced users
  • Enclosure Planning: PIR sensor lens must have clear line-of-sight. Plastic enclosures can reduce sensitivity if too thick or wrong material

References