Bed Sensors Do More Than You’d Think

Bed sensors do sort of sound like a gimmick — after all, who cares whether someone is occupying the bed? But if you think about it, that information is quite useful from a home automation standpoint. A person could do all sorts of things in this state, from ensuring the overhead lights in the room can’t come on, to turning off other smart devices that are likely not being used while both occupants are sleeping.

[The Home Automation Guy] presents a couple of ways of doing this, but both center around a fairly inexpensive pressure-sensing mat.

In the first method, he connects the pressure mat up to a Zigbee Aqara Leak Sensor, which conveniently has two terminals on the back to accept the wires from the pressure sensor. Then he simply connects it up to a Zigbee-compatible home assistant like the Aqara Hub.

In slightly harder mode, he forgoes the Aqara Leak Sensor and connects the pressure mat up to an ESP32 using a nifty screw terminal dev board. Then he sets up the sensor and all the desired actions in ESPHome. Of course, with an ESP32, it’s easy to add a second pressure mat for [Mrs. The Home Automation Guy]’s side of the bed.

Now, once they’ve both gone off to bed, the house goes into night mode — all the smart plugs, Sonos devices, and other things are powered down, and the alarm system is put into night mode. Be sure to check out the build video after the break.

24 thoughts on “Bed Sensors Do More Than You’d Think

  1. I worked with a few other engineers on a “smart bed” project over 10m years ago, where we used plastic fiber inside a thin mat. The key waqs software, as we shined laser (led) in one end and the other on a webcam chip. It was sensitive enough to pick up someones heartbeat.

    The target customer were nursing homes (mostly to detect people getting out of their bed at night)

    1. That is hilarious. I did a workterm in 1989 with the company that originally came up with that sensor. It was originally developed to implement collision detection on the Canadarm. They called it Kinotex. I worked on prototypes for use as car seat occupancy sensors able to tell the difference between adults, children, and baby seats. Distance between buttocks is a good measure of whether to deploy an airbag safely. We also proposed it for crush zone sensing but that never became a thing.

      Not only is the sensitivity very high, but the reading you get is surprisingly linear versus deflection distance. Also, while camera sensors are useful for higher resolution applications like beds and space robot arms where you bring a large bundle of fibers into it you can do lower resolutions with LEDs and photodiodes. You can even get ones specifically designed to accept plastic fiber.

      The patent expired a number of years ago. I occasionally think about getting the parts to recreate some of the prototypes to play around with.

    2. As soon as I read this article I thought of nursing homes. My grandmother died last year with dementia and we saw the problems nurses faced. The residents learn very quickly not to step on the pressure sensing mats as they set off the nurse alarm. So they try to step over them, falling and hitting their heads in the process. A pressure mat in the bed would be so much better.

      1. My late father’s nursing home the pressure mats were under the mattress. If the bed was occupied and then became empty it would trigger the nursing station.

        Downside, it also tended to go off if you sat on the bed for a while to visit and then got up to leave.

    3. Came here wondering this. Surely breathing and pulse rate can be picked up and logged.

      The “eight” kickstarter tried to do this, but it evolved more into a smart heater…

      (I gave up and now I’m using a mmradar to detect occupancy for us and a low res heat camera for the kid.)

  2. I’ve tried a lot of different methods:

    Using a strain gauge requires calibration every few months due to drift.

    Pressure mats are not good. They eventually compress and give false positives.

    Using an FSR (force sensitive resistor) is a much better idea. You can get 600mm long versions. Mine has been working perfectly for over a year.

      1. I’m not sure I’ll ever be excited enough about home automation to willingly dive into automated calibration through statistics, but I’d definitely use someone else’s implementation.

    1. They’ve been using something similar on babies to prevent cot death for a good while now. I tried building my own version a long time ago but eh testing home built devices on your own infants wasn’t something my ex supported at the time!

  3. These mats are pretty unreliable, even under the seat of chair, much less a mattress. Also the PVC lining makes noise when you sit, and had false positives (and negatives) to a degree that relying on them for automation is a no-go.

    One main problem is that these act as a binary sensor across the entire mat. You’d really want analog sensing in order to make a good judgment about presence.

    Additionally, depending on the mattress you use, it may or may not work at all. Under a Tempurpedic, the pressure does not reliably trigger if ever at all!

    Presence detection is a great way to perform advanced automations, but this method is not the way. Perhaps under/built into a doormat.

  4. I mean I guess I get it. But wouldn’t it basically be the same thing to wire it all up to listen for one single momentary button under the bedside table? You could even tell your wife it’s detection based.

  5. I’ve got mine set up with the tamper sensor of a z-wave window / door contact, works extremely well, but cannot differentiate which human is occupying the bed. Which could be useful information in some cases. I haven’t really come up with any good automation ideas for it yet though. It was one of those things that seemed like it would be really handy, and I had the spear sensor lying around, but in practice I haven’t really used it for anything.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.