How To Build A Smart Home Sensor
Your walls could talk
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.
- Time: 2 hours
- Cost: $95
- Difficulty: Medium
- Soldering iron
- Wire cutter
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
- Program the Arduino using this sketch. Instructions for programming an Arduino can be found here.
- 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.
- Solder a 1K resistor between pin 2 of the humidity and temperature sensor and the 5V pin of the 5V step-up breakout.
- Solder the humidity and temperature sensor’s power pin to the 5V pin of the 5V step-up breakout.
- Solder the 3.7V pin of the 5V step-up breakout to the output of the LiPo charger.
- Solder the Arduino Raw pin and the ambient light sensor VCC pin to the LiPo charger.
- Solder the second 1K resistor between the AL pin of the PIR motion sensor and the 3.3V pin of the Arduino.
- Solder all power pins of the PIR motion sensor, micro OLED, and MEMS microphone to the 3.3V pin of the Arduino.
- The key elements of the circuit are complete. Follow the hookup guide to connect the remaining sensor pins to the Arduino.
- Plug the LiPo battery into the LiPo charger, and put all of the electronics into the Pi Tin.
- 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.
This article originally appeared in the August 2015 issue of Popular Science, under the title “If Your Walls Could Talk…”