Case Study: Homeowner Saves 30% on Energy with DIY PIR Sensors

Overview

A tech-savvy homeowner in Texas was frustrated with high energy bills and manual light switches. His 2,500 sq ft home had 40 light fixtures, but lights were often left on in empty rooms. He decided to build a DIY PIR sensor system using ESPHome and Home Assistant.

The Challenge

The homeowner faced several specific issues:

  • Family members frequently left lights on in empty rooms
  • No central control for lighting automation
  • Commercial smart home systems were expensive
  • Privacy concerns with cloud-based systems
  • Wanted local control without internet dependency

The Solution

The homeowner built a DIY system using these components:

  • Sensors: AM312 PIR sensors (35µA standby, 3.3V compatible)
  • Controllers: ESP32 boards running ESPHome
  • Hub: Home Assistant on Raspberry Pi 4
  • Lights: Existing LED fixtures with smart switches
  • Quantity: 12 PIR sensors + 15 smart switches

Total cost: $180 (ESP32 boards $60, sensors $24, smart switches $96).

The system logic:

  • Each room had a dedicated PIR sensor connected to an ESP32
  • ESPHome reported motion status to Home Assistant via Wi-Fi
  • Home Assistant automations turned lights on/off based on occupancy
  • Hallways and bathrooms used shorter hold times (2-5 minutes)
  • Living areas used longer hold times (15-30 minutes)
  • Bedrooms used vacancy mode (manual-on, auto-off)

Implementation

The project was completed over three weekends:

  1. Weekend 1: Set up Home Assistant on Raspberry Pi, install smart switches (4 rooms)
  2. Weekend 2: Build ESP32 sensor nodes (6 rooms), test connectivity
  3. Weekend 3: Create automations, fine-tune hold times, add battery backup

Each sensor node was powered by USB (existing outlets) with a supercapacitor backup.

Results

After 12 months of operation:

2,500 kWh

1,500 kWh

40%

8,000 kWh

6,000 kWh

25%

10,500 kWh

7,500 kWh

29%

$1,575

$1,125

$450

Additional benefits included:

  • Payback period: 5 months (based on $180 investment)
  • Improved convenience (lights automatically follow family)
  • Learning experience (ESPHome, Home Assistant)
  • No cloud dependency (100% local control)
  • Expandable system (add more sensors anytime)

Key Lessons Learned

  1. ESPHome simplifies DIY automation: No coding required for basic motion sensors.
  2. AM312 sensors are ideal for ESP32: 3.3V compatible, low power, small size.
  3. Hold times need adjustment per room: Living areas needed 30 minutes, hallways 2 minutes.
  4. Bedrooms should use vacancy mode: Manual-on prevents lights turning on while sleeping.
  5. Battery backup prevents outages: Supercapacitors kept sensors running during power flickers.

ESPHome Configuration Example

esphome:
  name: living-room-sensor

esp32:
  board: esp32dev

wifi:
  ssid: "YourSSID"
  password: "YourPassword"

api:
  password: "YourAPIPassword"

binary_sensor:
  - platform: gpio
    pin: GPIO4
    name: "Living Room Motion"
    device_class: motion
    filters:
      - delayed_on: 100ms
      - delayed_off: 30s

Conclusion

This case study demonstrates that DIY PIR sensor systems can deliver 30% energy savings at very low cost. The $180 investment paid back in 5 months. The key to success was using ESPHome for easy configuration and AM312 sensors for 3.3V compatibility with ESP32.

Leave a Reply

Your email address will not be published. Required fields are marked *

Metric Before After Reduction
Annual lighting energy Annual HVAC energy Total energy Annual cost