The Blog of Ian Mercer.

Home Automation Sensors

Over the year's I've tried almost every possible home automation sensor to determine which ones work well and provde to be reliable.

Uses for sensors can be divided roughly into people motion sensing, people presence sensing, environment sensing (temperature, pressure, solar input, gas and particulates) and indirect sensing.

Indirect sensing is a useful technique for monitoring equipment without making any electrical connection to it. For example you can check that a fridge is working reliably and that the door has not been left open by monitoring the temperature on the motor or cooling coil. If it cycles regularly the fridge is working. If it's above average for a long period then the door is open or there is some other problem with the fridge.

In choosing a sensor for home automation there are many factors you should consider:

  1. Reliability - my top criteria because a sensor that fails even occasionally is useless.

  2. Accuracy - for sensors that read analog values what is their precision and how stable are they?

  3. Latency - how quickly does the sensor fire after motion has happened. Some PIR sensors wait until they have seen three pulses before firing.

  4. Repeat rate - how quickly the sensor recovers and is willing to fire again. Some battery-powered alarm sensors wait up to three minutes between firing in order to conserve battery power.

  5. Noise or False trigger susceptibility - Microwave-doppler radar sensors provide great coverage and are cheap but they fire for no apparent reason. Some humidity sensors are quite random in their output and require severe filtering.

  6. Person-discrimination capability - can the sensor tell the difference between a human and a dog or cat?

  7. Wiring complexity - the one-wire bus makes it easy to link many sensors with a single very long CAT5 cable.

  8. Aesthetics: most PIR sensors are ugly whereas under-floor strain-gauges are invisible.

  9. Power consumption - not a factor except for some remote battery operated sensors.

People-detecting sensors

In terms of people-detecting sensors I would rank them as follows:

  1. Under-floor strain gauges: invisible, very reliable, good cat and dog discrimination powers.
  2. Physical contacts on doors and windows - the typical alarm system sensor.
  3. Optical-beam with two or more beams: can cover a large gap like a garage entrance or barn aisleway.
  4. PIR - cheap and readily available.
  5. Bluetooth - the only sensor that can count people (phones) in a room without a camera.
  6. Microwave-doppler - cheap but needs logic to clean up false triggers and to reason about which rooms are occupied.
  7. Indirect sensing - CO2, temperature, pressure can all aid in detecting the presence of people

Essential sensors

In addition to people sensing you need several other key inputs for a complete home automation system, here's my top list for those:

  1. Outdoor light sensor. A simple LDR suffices but you can also get multi-spectral sensors.
  2. Temperature sensors for living spaces. Essential for any control of HVAC systems. The DHT22 or BME680 are good choices here.
  3. Humidity sensors like the DHT22. These are useful for controlling bathroom fans and preventing condensation.
  4. Temperature sensors for equipement. DS18B20 sensors on a one-wire bus are my favorite here given their reliability, accuracy and ease of wiring.
  5. Gas sensors. Detecting CO2 levels in a room can help trigger ventilation. VOC sensors may be useful too but harder to calibrate.
  6. Pressure sensors. I have some, the graph is mostly a flat line. Not very interesting. May be useful inside the HVAC system to detect airflow or blocked filters.

Related Stories

Home Automation

I've been working on home automation for over 15 years and I'm close to achieving my goal which is a house that understands where everyone is at all times, can predict where you are going next and can control lighting, heating and other systems without you having to do or say anything. That's a true "smart home".

Ian Mercer
Ian Mercer

Bluetooth Tracking Project

My year long Bluetooth project that won the $20,000 HCI and Microsoft competition during lockdown has continued to grow and now reliably tracks how many people are in the house and outside and can locate any device down to room level.

Ian Mercer
Ian Mercer

Digital Twins are never identical

Digital Twin are an online representation of a real world object, a copy of its properties in the digital world and a way to send updated and commands to it. In effect I've been making them for years but now they have a trendy name.

Ian Mercer
Ian Mercer

3d Printed ESP32 Brick

ESP32 provides a great platform for sensors around the house but by the time you've added a USB power brick, cable and enclosure it's quite messy. I wanted a device that I could just plug in with no exposed wires and no mounting needed so I designed one in OpenSCAD.

Ian Mercer
Ian Mercer

Filtering techniques

Filtering raw data is essential for a reliable home automation system. Here are some of the many ways you can filter sensor data.

Ian Mercer
Ian Mercer

Bluetooth Sensing for Home Automation

Bluetooth sensing for home automation is a great proxy for people counting as it can detect and locate each cellphone in the house. iBeacons attached to tools, cars and pets can provide a 'find my anything' feature too.

Ian Mercer
Ian Mercer

Gas sensors

Gas sensors come in many different flavors including CO2, VOC and particulate sensors.

Ian Mercer
Ian Mercer

Humidity Sensors (DHT11, DHT22, AM2320)

Humidity sensors are great for controlling extractor fans in bathrooms and other damp spaces.

Ian Mercer
Ian Mercer

Light sensors for Home Automation

Having at least one light sensor is critical for any home automation system that controls lightng. Lights need to be turned on when it's dark not at specific times of day, especially here in Seattle when it can be dark and cloudy at any time of day.

Ian Mercer
Ian Mercer

Microwave Doppler Sensors (RCWL-0516)

Microwave doppler sensors can be found in some alarm sensors but there are also available very cheaply as a separate component. They offer exceptional range but suffer from false triggers requiring a probailistic approach to people sensing.

Ian Mercer
Ian Mercer

Optical-beam sensors

Optical-beam sensors are reliable and can cover a long-distance such as across a garage or aisle-way. When they include multiple-beams they have good false-trigger rejection.

Ian Mercer
Ian Mercer

PIR Sensors for Home Automation

PIR sensors are cheap and easy to use but they suffer from slow response times and low repeat rates.

Ian Mercer
Ian Mercer

Strain-gauges

Strain-gauges are my top-rated sensor for home automation because they are invisible, reliable and can be tuned to detect people and ignore pets.

Ian Mercer
Ian Mercer

Temperature sensors for home automation

Temperature sensors I've experimented with for home automation.

Ian Mercer
Ian Mercer

Logistic function - convert values to probabilities

Another super useful function for handling sensor data and converting to probabilities is the logistic function 1/(1+e^-x). Using this you can easily map values onto a 0.0-1.0 probability range.

Ian Mercer
Ian Mercer

ATAN curve for probabilities

In a home automation system we often want to convert a measurement into a probability. The ATAN curve is one of my favorite curves for this as it's easy to map overything onto a 0.0-1.0 range.

Ian Mercer
Ian Mercer

Bluetooth

One of my inventions recently won a $20k global competition for applications that could help in a pandemic. It uses Bluetooth to count people.

Ian Mercer
Ian Mercer

Probabilistic Home Automation

A probabilistic approach to home automation models the probability that each room is occupied and how many people are in that room.

Ian Mercer
Ian Mercer

Multiple hypothesis tracking

A statistical approach to understanding which rooms are occupied in a smart house

Ian Mercer
Ian Mercer

A state machine for lighting control

An if-this-then-that style rules machine is insufficient for lighting control. This state machine accomplishes 90% of the correct behavior for a light that is controlled automatically and manually in a home automation system.

Ian Mercer
Ian Mercer

Home Automation States

Understanding the many different 'states' a house can have is critical to creating great home automation

Ian Mercer
Ian Mercer

Graphing gigabytes of home automation data with tableau

Some interesting charts from the gigabytes of data my home automation system produces

Ian Mercer
Ian Mercer

iBeacons for Home Automation

My investigations into using iBeacons for home automation

Ian Mercer
Ian Mercer

iBeacon meetup in Seattle - January 2015

My notes on the iBeacon meetup in Seattle held in January 2015

Ian Mercer
Ian Mercer

Home Automation Systems as a Graph

Using nodes and links to represent a home and all the devices in it

Ian Mercer
Ian Mercer

N-Gram Analysis of Sensor Events in Home Automation

Using n-gram analysis to spot patterns in sensor activations

Ian Mercer
Ian Mercer

Xamarin Forms Application For Home Automation

Building a Xamarin Forms application to control my home automation system

Ian Mercer
Ian Mercer

The Internet of Hubs (and things)

Maybe it should be called the Internet of Hubs instead

Ian Mercer
Ian Mercer

Showing home status with just a single RGB LED

Multicolored LEDs can convey a lot of information in a small space

Ian Mercer
Ian Mercer

A wireless sensor network using Moteino boards

The diminutive Arduino boards include a powerful transmitter/receiver

Ian Mercer
Ian Mercer

The home as a user interface

Ian Mercer
Ian Mercer

A RESTful API for sensor data

POSTing data to a home automation system from Arduino devices

Ian Mercer
Ian Mercer

The Internet of Boilers

An experiment to measure every aspect of an HVAC / boiler system

Ian Mercer
Ian Mercer

VariableWithHistory - making persistence invisible, making history visible

A novel approach to adding history to variables in a programming language

Ian Mercer
Ian Mercer

A Quantified House - My Talk to the Seattle Quantified Self Meetup

My talk to the Seattle Quantified Self meetup

Ian Mercer
Ian Mercer

Integrating an Android phone into my home automation system

Some new features for my home automation using an Android phone

Ian Mercer
Ian Mercer

The Internet of Dogs

Connecting our dog into the home automation

Ian Mercer
Ian Mercer

GreenGoose Review

A review of the now defunct GreenGoose sensor system

Ian Mercer
Ian Mercer

Home power meters revisited

Ian Mercer
Ian Mercer

Home Automation Calendar Integration

Ian Mercer
Ian Mercer

Smart home energy savings - update for 2010

Ian Mercer
Ian Mercer

A smart power strip

Ian Mercer
Ian Mercer

What does a Smart House do at Halloween?

My favorite home automation features for Halloween

Ian Mercer
Ian Mercer

Home Automation Top Features

Ian Mercer
Ian Mercer

Weather Forecasting for Home Automation

Ian Mercer
Ian Mercer

How can I tell if my house is smart?

Ian Mercer
Ian Mercer

Home Automation Block Diagram

Ian Mercer
Ian Mercer

World's Smartest House Demonstration

Ian Mercer
Ian Mercer

Future proof your home with a new conduit system?

Running conduit can be expensive but maybe you don't need one to every room

Ian Mercer
Ian Mercer

New Home Automation Server

Ian Mercer
Ian Mercer

World's Smartest House

Over 15 years of experimentation with home automation

Ian Mercer
Ian Mercer

The Grideye 8x8 camera sensor

Experiments with an 8x8 IR camera for privacy-preserving people detection using cameras.

Ian Mercer
Ian Mercer

World's Smartest House Videos

A collection of videos about my smart home efforts

Ian Mercer
Ian Mercer

CCTV Cameras as Home Automation Sensors

CCTV cameras are an option for detecting people but within the home there are privacy concerns that need to be addressed.

Ian Mercer
Ian Mercer

Pressure Sensors for Home Automation

Pressure sensors can detect HVAC system operation and could potentially detect clogged filters.

Ian Mercer
Ian Mercer