FSR - the best bed occupancy sensor

Is anyone selling these premade? Not comfortable with soldering. I would need 2 for each side of a king bed.

Tried pressure mats which didnt work because our bed is too heavy. Currently using an aqara fp2 presense sensor but its not too reliable for sleep tracking since small movements mark us as “not in bed”

Thank you in advance

@tom_l I have a crazy “indestructible bed” designed to have low strain/high ridgity on the base.

Any thoughts on whether this solution would work ok on this bed or is it a matter of try and see?

I think pressure will get transferred through the mattress, just limited flex (I don’t think that will matter?).

Thanks.


The firmer your base the better. It does not work on flexing. The weight is just transferred through the mattress to press on the sensor.

2 Likes

I’m working on a product for sale that’s currently in the prototype phase. DM me if you’re interested in helping with some beta testing.

2 Likes

Following. I’d be interested as well.

I’d be interested in this as well

I just used a 100k with fine adjust and it works well for one sensor at about 97K and one at 3k on my board.

I actually got this https://www.amazon.co.uk/100-100K-Multi-Function-Potentiometer-Variable-Resistance/dp/B085MFG11C

but the 100K where fine for both and super adjustable with no drift.

1 Like

For those interested in a purchase option, I’m making good progress toward a dual sensor that mounts to a bed slat. You can find out more at https://www.elevatedsensors.com/ and even sign up to get an email when we start shipping.

2 Likes

Sorry if I missed it, but has someone finished building one of those with 2 sensors to detect 2 people separately? Can it be done with one MCU (apart from Stephen’s great work) :smiley:

Also has anyone found a decently priced FSR supplier locally in Aus?

That’s no problem, two seperate sensors and you’re good to go. :slight_smile:

Yes if you use an ESP32. The ESP32 has more than one ADC. The ESP8266 does not.

1 Like

Amazing, got a few 32s laying around.

What about the 2nd question? Should I just get the strips off aliexpress?

There you’d have to wait for someone from Australia or New Zealand. I can give you some sellers names here in Germany… :laughing:

ahm, @tom_l is Aussie :wink:

1 Like

Core Electronics: Extra-long force-sensitive resistor (FSR) - Interlink 408 | Adafruit ADA1071 | Core Electronics Australia OR Force Sensitive Resistor - Long | Sparkfun SEN-09674 | Core Electronics Australia

I’ve ordered other stuff from Core before. Good experience.

I’ve never ordered from this supplier: Buy Extra-long force-sensitive resistor (FSR) ADA1071 Adafruit

1 Like

True, true… :laughing: But I thought he’s far away from home… :laughing:

Just completed my bed sensor, two nights and so far it’s working great! Thanks @tom_l!

1 Like

Completed my combo for the bed, thank you very much for sharing the yaml and idea @tom_l
Used 2x strips (cheap from Ali):
https://www.aliexpress.com/item/1005004912554824.html
Added 2 PIR sensors under each side of the bed and:

  1. Added the bed sensors to bedroom presence group (as in the night usually mmWave radar doesn’t pick up a sleeping person)
  2. Added to light / illuminance logic NOT to switch on the bedroom main light when someone is in bed and it’s after set time
  3. Automation to light (very dimmed) LED strip under the bed (each side of bed separate logic and LED strip) when someone hangs the feet from the bed (going for a little toilet trip in the night). - and turn it off once bed detected the particular person back
  4. Automation to light up dimmer both underbed LED strips when entering bedroom in the night and someone is in bed.
    To do:
    Automations with google nest speaker if someone is still in bed after 15 minutes after the alarm (sensor from companion app).

Today I replaced the matress and it seems like one side of the bed is now heavier than the other (one side 3.0V > 0.5, the other 1.7V > 0.6V). I was able to readjust the resistor value as I predicted it and both sensors have precision potentiometers (one is 200k, as initial calculated value was around 150k, the other one is 50k, as value calculated was 25k). Time of reaction (on/off) around 3 seconds, which is completely fine. Rock solid.

1 Like

That’s really interesting. So you install a higher than needed resistor and use the precision potentiometers to adjust resistance? Sorry I’m a noon when it comes to electronics :slight_smile:

I installed my bed sensor but I find that the min and max change all the time. Sometimes when the bed is empty it shows 3.2v, other times 2.2v for example
So trying to trouble shoot

Would you mind providing the setup?

Yes, I installed potentiometers, as I predicted the values might change when I replace matress or lose weight (in progress).
It’s fine if the bed shows different values for empty, like yours. What is important, is the value difference between empty and occupied (it should drop to 0.3 - 0.7 V) so the states will always be clear.
I’m not sure what you mean by my setup. I can share the yaml of course.
Hardware wise:

  1. ESP32 with two strips (I gave the link in the previous post). Instead of calculated restistor value, I substituted it with a precision potentiometer with value around double of calculated (potentiometer instead of fixed resistor). However, initially, before changes to my bed weight, I set them to the previously calculated value .
  2. Two GPIOs from the ESP32 are used for PWM signal (LEDC) to MOSFET transistors for left and right side of the bed)
  3. Two GPIOs are used for PIR sensors located strategically at each side of the bed.
  4. There is also a 24 > 5V stepdown as I run 24V rail to the bathroom which is next to my bed (saves another brick PSU in the outlet).
    I printed one enclosure for the electronics and two small enclosures for PIR sensors.
    All automations are done in HA, not esphome, as it’s easier and more powerful