I posted on Reddit awhile back about wanting to automate the last room of my house I couldn’t figure out a good solution for on automating…the bedroom. Tricky place to automate…because even one instance of the lights turning on in the middle of the night, or deleting the alarms too soon…and my wife would lose it haha (she loves the house being automated and has told me many times she could never live without it…but issues in the bedroom would be bad).
I was going to go with mmWave sensors, but read so much about how tricky they are with perfectly still objects, and what’s more, we have cats. So trying to separate out cats from people and track “still” sleeping bodies and it just got messy. Anyway, it was suggested to use pressure mats to “weigh” the bed, then somebody suggested FSR’s and then lastly, someone suggested this product specifically (elevatedsensors.com). If you haven’t seen their thread here in the forum, it’s here: Bed Presence for ESPHome by Elevated Sensors
So, I’ll put my experience below, along with how I installed them. Here’s the TLDR if you don’t feel like going through it:
I’m THRILLED with it…but it was a real challenge getting it to work correctly. Not days of work or anything, just a lot of disassembling my bed and reassembling it to finally get everything calibrated correctly. I believe the primary reason for the difficulty is it being used with a memory foam mattress (which seems to be an echo’d sentiment in their product thread). It is working perfectly now, but getting it to that point was the pain.
I want to mention the creator of the product has not asked me to make this post, nor do they have any idea I’m making it, I will link to it in their thread after the fact however
Here are a bunch of photos, some are labelled as to what NOT to do haha.
Unboxing:
My “boxspring” type (just a metal skeleton frame that gets zippered up into a cover) - red circle is where I chose to drill into the frame to mount the chip. I differed from their installation a bit here, as I didn’t want any of the weight of the mattress on it:
Sensor placement and wiring
DON’T DO WHAT’S BELOW lol
In an effort to resolve a problem, I tried this…it DOESN’T WORK
So initially I had these setup as you see above, with the mattress simply laying directly on top of the sensors. That just literally didn’t work at all.
It wouldn’t register anything at all… unless I basically all but stood on the mattress in the direct location of the sensor. I’m attributing that to it not only being a memory foam mattress, but with so many slats, my weight was just being far too evenly distributed for the sensor to notice.
So changed to what you see here (quarter inch thick by 24 inch long wooden slats), in an effort to increase the surface area of load coming from the mattress down onto the sensor. It worked too well and the weight of the mattress without me even on the bed, basically maxed out the capacity of the sensor. It would be 99% to 101% load without me on the bed. If I got on the bed, it would move if I was lucky one percent.
So I tore out what you see above, referring to the wooden slats, I left the sensors where they were. I switched the orientation of the slats, placed the vertical, with the sensor in the center (so the sensors are still running left to right, with the slates placed on top of them in a “+” shape, meeting in the middle).
WHAT’S BELOW SORT OF WORKED, BUT WAS NOT THE FINAL SOLUTION, I DON’T RECOMMEND THIS EITHER
BELOW IS THE GRAPH OF SLEEPING ON THE SETUP ABOVE
We go to bed at 8:20pm in this graph and are out of bed at about 5:30am. All the subsequent ups/downs on the graph are not anyone getting out of bed, we slept through the night. Those are just from moving around on the bed. We got out of bed at 5:30am on that graph. So a LOT of false reports of not being in bed.
AT THIS POINT I FIGURED I’D DO SOME READING ABOUT FSR’S IN GENERAL
I wanted to see what I could find, and I came across this document: https://cdn.sparkfun.com/assets/e/3/b/3/8/force_sensing_resistor_guide.pdf
On page 8 of 26, there was this paragraph (I’ve bolded the most relevant parts):
Set-up a Repeatable and Reproducible Mechanical Actuation System
When designing the actuation mechanics, follow these guidelines to achieve the best force repeatability:Provide a consistent force distribution. FSR response is very sensitive to the distribution of the applied force. In general, this precludes the use of dead weights for characterization since exact duplication of the weight distribution is rarely repeatable cycle-to-cycle. A consistent weight (force) distribution is more difficult to achieve than merely obtaining a consistent total applied weight (force). As long as the distribution is the same cycle-to-cycle, then repeatability will be maintained. The use of a thin elastomer between the applied force and the FSR can help absorb error from inconsistent force distributions.
So it turned out I had the right idea using the wooden slats, but I simply went with the wrong choice of material.
Not having any kind of soft foam (if you google “elastomer” a basic kind of equivalent around the house would be something like a yoga mat…just thin rubber sheeting), I tried…cardboard.
Literally just took a piece of corrugated cardboard from an amazon shipping box, cut it to 24" long and 3" wide. I kind of “softened it up” a bit by bending it/rolling it and jumping on it and laid that in the exact same orientation that you see in my last “wooden slat” photo (in the shape of a plus sign over the center of the sensor). I don’t have a photo of this because I don’t want to move the mattress for the millionth time lol.
After some adjustments (reaching between the mattress and box frame and moving it left/right on each side of the bed) I was able to get perfectly repeatable measurements, and more importantly massive swings between occupied and unoccupied instead of having just 10%-15% changes between occupied/unoccupied.
HERE ARE THE RESULTS FROM SLEEPING IN IT LAST NIGHT WITH THE CHANGES ABOVE
In the graph above we go to bed at 8:30pm and get out of bed at 5:49am. You’ll see there is fluctuation on the yellow graph after we’re both out of bed, and I believe that’s just the memory foam kind “breathing/expanding/contracting” but you’ll see it’s far far far below anything that would cause any kind of false negatives/positives.
So, as I said, no that it’s all wrapped up and the experimenting is over, this WORKS SO GREAT. Here are some of the automations I’ve tied to it thus far (more to come this weekend when I get more time):