Bed occupancy DIY sensor

I don’t want to recommend any of them as these are all cheap chineese products and I had an issue with one of them. I guess they are sensitive to weight (long term) and pressure distribution. I used this and this and I am going to experiment with this.

I’m using one very similar to this with an Insteon window sensor with input… The two little contacts fit right into the input of the sensor perfectly.

It’s been rock solid for about 3 months now

Someone maybe create video for this DIY sensor?

1 Like

hay I did it this way

How did you make your chart so long? Mine is 1/6 of the screen

I’ve seen people using 3 different techniques here and I’m trying to figure out what would be best for me.

  1. Strain gauge (start of this thread) on slats
  2. Load cell + sensors (essentially turning your bed into a large weight scale)
  3. Pressure mats

Numbers 2 and 3 seem like they won’t work particularly well with a heavy foam mattress. Is that true?

Click in the title area of the chat, and it should fill up the screen

1 Like

wow thanks
don’t know why it doesn’t have cursor: pointer

can you put this in a chair?

@tom_l Can you share what regulated power supply you’re using?

I just got mine set up with your examples and also using a cheap 5V adapter, but would love to reduce the noise more.

When you say between bed frame do you mean between box springs and mattress? Thanks

no, between “slatted frame” and the bed frame, hope you can imagine what kind of bed I had… I just bought a new one without slatted frame and a 35cm Boxspring matress and don’t have any load cells implemented yet. no idea how…

1 Like

Thanks for the reply, I’m looking at the same problem. This bed is so heavy I would need a car jack to raise a corner to put in a load cell. By process of elimination I think I’m moving to FSR’s under the sheets. Maybe these https://www.adafruit.com/product/1071

Same here. I mounted 4 load cells between the slats and support frame - more info & discussion here (Slats are flipped up so you can see the sensors in the pic)

It’s been working flawlessly for months under a heavy foam mattress. It’s not getting actual scale numbers but if you adjust the sensor templates, you can set thresholds to tell you if there are one or two (or more) people or pets on the bed.

image

1 Like

i was thinking if this would be possible since most of the projects i’ve seen around were place underneath the bed posts. Thanks for this.

1 Like

@aaronpk, I’m very interested in if you were able to get this to work with multiple strain gauges and how. I purchased a few of these strain gauges and they just arrived today so I’m playing around with them. I’d like to be able to measure either side of a king bed but I’m worried that I might not have enough resolution in the slats to detect one person’s side of the bed vs. the other. My wife definitely doesn’t want me using load cells (because then I can see weight). :stuck_out_tongue:

Thanks,
-Greg

It’s been working reasonably well actually! For the most part it can tell the difference between both sides of the bed. It only gets that wrong if one of us is sprawled out. But I have it set up to report “number of people in bed” into HA, which I use to affect other automations, for example:

  • If the bedroom motion sensor detects motion, and nobody is in bed, turn on the lights
  • If the kitchen motion sensor detects motion, and one person is in bed, turn on only the countertop lights
  • If the kitchen motion sensor detects motion and nobody is in bed, turn on the overhead kitchen lights

That said, I’ve had a few problems with it over the last 6 months or so. Mainly the problem seems to be that the values tend to drift over time and I have to recalibrate the threshold for what “in bed” is. I wish I could figure out some way to trigger on the sharp change in value rather than looking for a simple cutoff, but I can’t figure out how to do that while also making it respond in under 0.5 seconds, which is my tolerance for whether it feels like it’s working correctly. So far, I’ve had to recalibrate it about 2-3 times in the last 6 months, so not too bad. And once it’s working, it works 99% of the time.

You can try the change rate attribute of the statistics sensor.

Will that respond within a half second though?

It will update as soon as your bed sensor updates. You will see negative spikes when the level changes from high to low rapidly and positive spikes when the level changes from low to high readings. Slow drift changes will be unnoticeable.