Parts & tools (BOM)
Choose components by cost tier and target accuracy.
Recommended sensors and controllers
- Budget accuracy: DHT22 or AM2302 for low-cost humidity and temperature; basic PIR modules for motion detection.
- Mid-range accuracy: DS18B20 for temperature probes; BME280 for combined pressure/temperature/humidity; SCD4x series for CO2 monitoring when budget allows.
- High accuracy / industrial: professional CO2 sensors with calibration support; separate temperature probes with PT100/PT1000 and proper ADCs.
- Controllers: ESP32 for battery-powered Wi‑Fi devices with low power options; Raspberry Pi for heavier tasks, serial bridging, and local gateways.
Accessories and tools
- Breadboards, jumper wires, and soldering tools.
- Enclosures with ventilation for air sensors and IP-rated boxes for outdoor use.
- Power options: USB power supplies, LiPo batteries and simple charging circuits, or PoE adapters for Raspberry Pi.
- Optional: logic level shifters for 3.3V/5V compatibility, real-time clock modules for timestamp reliability.
Cost considerations
- Budget builds can stay under a few dozen dollars per node but may need frequent calibration and environmental protection.
- Accurate or regulatory use cases require higher-cost sensors and periodic calibration traceable to standards.
Step-by-step builds
Each build outlines the concept, connection notes, sampling strategy, and integration tips without platform-specific configuration examples.
Temperature & humidity with ESP32 and a combined sensor
Concept: Use an ESP32 with a combined temperature/humidity sensor for compact, low-power nodes that publish readings to a local broker or HTTP endpoint.
Key steps
- Mount the sensor in a ventilated enclosure away from heat sources and direct sunlight.
- Wire sensor data and power to the ESP32 while observing voltage levels and recommended wiring practices.
- Choose a sensible sampling interval (for example, 30 seconds to 5 minutes depending on volatility), and implement debounce for rapid transient spikes.
- Include a simple watchdog or reconnect logic so the device resumes reporting after network interruptions.
Integration tips
- Label each device with a human-readable location and sensor type so data streams are easily identified in your dashboard.
- Store timestamps at the edge if the central server may be unreachable for short periods.
CO2 monitor with Sensirion SCD4x
Concept: Use a Sensirion SCD4x family CO2 sensor for reliable indoor air quality monitoring and ventilation control.
Key steps
- Allow a warm-up period after power-on for accurate readings, and locate the sensor where air mixes well with the environment.
- Implement baseline correction or automated calibration routines per the sensor manufacturer to reduce long-term drift.
- Report CO2 readings at longer intervals for battery devices to conserve power; for ventilation control, shorter intervals give quicker responses.
Practical note
CO2 sensors are sensitive to placement. Avoid mounting near windows, vents, or users’ mouths if you want representative room averages.
PIR alarm with Raspberry Pi
Concept: Use a Raspberry Pi for edge processing, recording event logs, and issuing alerts based on motion detection.
Key steps
- Connect a passive infrared (PIR) sensor to a GPIO pin and set up debounce to avoid repeated triggers.
- Run local scripts to timestamp events and push alerts to your messaging or logging system.
- Use the Pi’s network capabilities to bridge to MQTT or forward logs to Graylog for long-term analysis.
Security tip
Ensure the Pi's SSH and services are secured, and isolate sensor networks from your primary home network where possible.
NMEA sensor testbed (boat / serial sensors)
Concept: Build a serial gateway using a Raspberry Pi to read, log, and replay NMEA data for development and testing.
Key steps
- Provide appropriate voltage isolation and level conversion for serial instruments.
- Capture raw sentences to a local log for later analysis and to validate parsing libraries.
- Simulate sensors by replaying logs during integration testing.
Use case
This setup helps validate dashboards and downstream parsers without needing live hardware attached.