How To Build A Smart Home Sensor

Your walls could talk

Home Sensor
Home SensorPhotograph by Jarren Vink

Wearable technology does a fine job of keeping tabs on your personal fitness. But to measure the health of the place where you live, you need a different tool. This device monitors the temperature, humidity, noise, and light level for any room. It can even track the number of people who enter. Within the casing, a collection of sensors sends information to an Arduino, which interprets the input and displays the data on a small screen. Based on the device’s readings, you can turn on a dehumidifier, lower the thermostat, or crack open a window—whatever it takes to keep your home environment comfortable.

Stats

  • Time: 2 hours
  • Cost: $95
  • Difficulty: Medium

Tools

  • Soldering iron
  • Pliers
  • Wire cutter

Materials

All materials can be ordered from SparkFun Electronics.

  • Arduino Pro Mini 328 - 3.3V/8 MHz (DEV-11114)
  • PIR motion sensor (SEN-08630)
  • Hookup wire (PRT-08022)
  • Two 1K resistors (COM-08980)
  • Humidity and temperature sensor - RHT03 (SEN-10167)
  • 5V Step-Up Breakout - NCP1402 (PRT-10968)
  • LiPo Charger Basic - Micro-USB (PRT-10217)
  • Ambient Light Sensor Breakout - TEMT6000 (BOB-08688)
  • MEMS Microphone Breakout - INMP401 (BOB-09868)
  • Micro OLED Breakout (LCD-13003)
  • Polymer Lithium-Ion Battery - 1,000 mAh (PRT-00339)
  • Pi Tin for the Raspberry Pi - White (PRT-11979)
Home Sensor Hookup Guide

Home Sensor Hookup Guide

This hookup guide illustrates the wired connections between each component of the sensor.Dave Prochnow

Instructions

  1. Program the Arduino using this sketch. Instructions for programming an Arduino can be found here.
  2. Prepare the PIR motion sensor's circuit board by locating and removing the black rectangular three-pad chip (also known as an integrated circuit, or IC) labeled 78L05. On the part of the board where the chip used to sit, identify the now-empty pads 1 and 3. Solder a piece of hookup wire between the pads.
  3. Solder a 1K resistor between pin 2 of the humidity and temperature sensor and the 5V pin of the 5V step-up breakout.
  4. Solder the humidity and temperature sensor's power pin to the 5V pin of the 5V step-up breakout.
  5. Solder the 3.7V pin of the 5V step-up breakout to the output of the LiPo charger.
  6. Solder the Ardu­ino Raw pin and the ambient light sensor VCC pin to the LiPo charger.
  7. Solder the second 1K resistor between the AL pin of the PIR motion sensor and the 3.3V pin of the Arduino.
  8. Solder all power pins of the PIR motion sensor, micro OLED, and MEMS microphone to the 3.3V pin of the Arduino.
  9. The key elements of the circuit are complete. Follow the hookup guide to connect the remaining sensor pins to the Arduino.
  10. Plug the LiPo battery into the LiPo charger, and put all of the electronics into the Pi Tin.
  11. Finally, place the home-health sensor in the room of your choosing. The micro OLED screen will let you keep a finger on your home's pulse.
Home Sensor - Open View
Home Sensor - Open ViewDave Prochnow

This article originally appeared in the August 2015 issue of Popular Science, under the title "If Your Walls Could Talk..."