Introduction: In-Bed Presence Detector (SmartThings + Z-wave Pressure Mat)

I wanted an easy way to detect when my (medically complex) son was in his bed so that I could trigger other smarthome rules from his presence. This Instructable shows how I followed the process documented by some other users on the Samsung SmartThings forums to create a Z-wave pressure mat to use as an "in bed" detector. Cheers!

Jonathan Lasko
maxstrength.org

Step 1: What You'll Need

To build this Z-wave connected pressure mat, you'll need:

  1. a Z-wave open/close sensor with leads allowing you to connect your own switch (I used an Ecolink DWZWAVE2-ECO, $29 on Amazon.)

  2. an easily-modifiable pressure mat (I used an Ideal Security SK630 Pressure Mat, $22 on Amazon.)

Many of these pressure mats are weather-proof. It is definitely a good idea to get a waterproof may if you are planning to use this in the bed of a child, eldery loved one, or someone with complex medical needs.

Step 2: Test the Individual Components

Before you modify the pressure mat, it's good to make sure it works as expected. Try connecting the cord of the mat to the alarm and testing that you hear the chime.

This way, if it seems like the mat is broken, you can still send it back. (In subsequent steps, we'll modify the mat, which might make a return more difficult.)

Similarly, now would be a good time to test your open/close sensor to make sure it is working. Connect it to your hub of choice. (I use Samsung SmartThings.)

Step 3: Expose Pressure Mat Bare Wires

There are two option for our approach:

Approach #1: Fellow Instructabler tachyon offered this bit of wisdom: "I always try and avoid cutting off connectors whenever possible and feasible. Instead buy the corresponding mating connector and attach some wires to that. This way if you ever want to sell, repurpose, or return a device to its original use you'll have the ability to do so easily. Plus you'll have the advantage of a connector so you can easily unplug the device for transport, repair, testing, etc."

I heartily agree with tachyon, and while I don't currently know exactly which part to purchase to serve as the receiving/female end to that output, I will post it later if/when I find out.


Approach #2 (this is the one I took): Cut the plug off the end of the pressure mat cord, removing some insulation in order to expose sufficient wire to connect inside the open/close sensor.

Step 4: Connect the Pressure Mat to the Open/close Sensor

Open up the open/close sensor. As long as you bought an open/close sensor which allows you to hook in your own switch, you should see a space to connect the bare wires, similar to what is shown. Connect the wires from the pressure mat. At this point you should be able to test that the mat is properly connected to the open/close sensor by putting pressure on it. (The sensor should indicate via LED light that it is opening/closing.)

Step 5: Test the Final Result

Time to test your Z-wave connected pressure mat! You can see in the video that when I step on the mat, the Samsung SmartThings app indicates that the sensor is reporting closed. When I lift my foot, it reports open again.

I put this in my (medically complex) son's bed, where I use it in smarthome rules like:

  • turning off our home stereo system automatically when my son goes to bed
  • blink lights in another room if my son is in bed and his heart rate monitor (see https://github.com/yahnatan/pulseox) indicates that he might need assistance

Comments

author
NepgearGo made it!(author)2017-07-21

Is the pressure mat hard? I'm planning to put one under my bed so I don't have to tell Google Home to turn off my lights. :P

author
DIY+Hacks+and+How+Tos made it!(author)2016-12-18

Nice design. Something like this could be pretty useful in hospitals.

author
yahnatan made it!(author)2016-12-19

DIY Hacks and How Tos, you wrote:

"Something like this could be pretty useful in hospitals."

I would love to hear more of what you're thinking here! :-)

author
DIY+Hacks+and+How+Tos made it!(author)2016-12-19

For instance, a hospital or nursing home could quickly do a bed check of ever patient at night to see that everyone is sleeping. You could also monitor activity levels. There are probably a lot of other applications that I am not thinking about right now. But it has a lot of potential.

author
yahnatan made it!(author)2016-12-25

My son has spent some time in hospitals. (Thankfully we've stayed away recently.) Based on our experience, I would say they already have this in place. Conversely, I haven't spent much time in nursing homes of late -- I think you're right that this is an area ripe for intelligent automation and sensing.

- - - - - - - - -
Our experience in hospitals: When a patient is checked in, they are asked to apply sticky ECG electrodes to the chest which allow them to monitor patient heart rate and respiratory rate. Also, an infrared diode sensor connected to a pulse oximeter is typically connected to an extremity (like a finger or toe)--this gives an additional heart rate signal as well as SPO2 -- the concentration of oxygen in the blood. (A sudden drop in SPO2 would signal some sort of breathing problem.)

These sensors are hooked to monitors which are positioned above the patient's bed. Another monitor station outside the room allows the nurse to wait outside the room but still have visibility on the patient's status. (In an ICU situation, where you might have one nurse to two patients, it would be just outside the door. In a normal hospitalization, a.k.a. "on the floor" there might be a nurse at a small open office space for one section of a corridor.)

All of this data is flowing and stored for at least a period of time before aging out of the system. If a patient were to hop out of bed, they would still be tethered to sensors unless they unplugged them, in which case the nurse would get an alarm on her station.

Patients who need this kind of monitoring all the time (because they have a heart, lung, or other condition) have wearable sensors. I use a small microcomputer to read the real-time, to-the-second statistics off my son's pulse oximeter and send them to an elasticsearch database to create hospital-like visualizations over time for my wife and I (and his nurses and other caregivers) to use. It also allows me to wire his machines into our home automation system. If you're interested, you can see a video and some sample code (really it's just scripts taking the data from one place and sending it somewhere else) here: https://github.com/yahnatan/pulseox

I am really interested in hearing people's ideas about how to better leverage sensing and data in medical monitoring. One of the most impressive breakthroughs in this area I recently read about was at my alma mater: a professor named Suchi Saria and her team used cutting-edge machine learning techniques to create a statistical model which takes inputs from the many different monitoring sensors in NICUs and predicts the onset of sepsis (no. 2 killer worldwide, after heart disease) with 85% accuracy.

author
DIY+Hacks+and+How+Tos made it!(author)2016-12-26

That is really interesting. I think there is still a lot of room for improvement in patient monitoring.

author
Tachyon made it!(author)2016-12-21

First, this is really great work. congrats.
Second, personally I always try and avoid cutting off connectors whenever possible and feasible. Instead buy the corresponding mating connector and attach some wires to that. This way if you ever want to sell, repurpose, or return a device to its original use you'll have the ability to do so easily. Plus you'll have the advantage of a connector so you can easily unplug the device for transport, repair, testing, etc.
I know this is an obvious tip but it's one I see overlooked a LOT.

author
yahnatan made it!(author)2016-12-25

Great point, and one that I agree with in principle. I will make an edit in the Instructable suggesting it (and admitting that while I don't know exactly which part would be the receiving/female end to that output, I will post it later if/when I find out).

author
zposner made it!(author)2016-12-18

I used the EXACT same mat in my digital doormat.

About This Instructable

1,697views

33favorites

License:

Bio: Home where my thought's escaping, Home where my music's playing, Home where my love lies waiting Silently for me.
More by yahnatan:Shared reminders for caregivers: make your phone a Caregiver TotemIn-Bed Presence Detector (SmartThings + Z-wave pressure mat)
Add instructable to: