FSR - the best bed occupancy sensor

Nice thanks!

Hey mate, hope you’re well :slight_smile:

How are you stopping the alarm? Alexa Media Player?

With an automation triggered by the bed sensor state.

Oh I get that, I meant are you using Alexa Media Player to stop the alarm on an Echo device of some type… Or you have some other smart alarm clock that integrates with HA

If so how are you doing that?

I’m talking about my security alarm, not a wake-up alarm.

I just use my phone alarm to wake up to.

HAHA, oh ok. Thanks mate! I thought I could turn off the Alexa alarm when I got out of bed. All good :slight_smile:

I’m going to use this to swap out my load cells next week. Same issue with the bed not being suitable for it, its a different weight on on either side :frowning:

So thanks for this :slight_smile:

Hey Tom,

I’m just about to order the parts for this. What are you recommending for R1? I cant read the bands.

Thanks :slight_smile:

Please read the instructions:

3 Likes

Thanks

Yeah, I’m still learning and getting the hang of the lingo. I didn’t see till now that means testing the FSR first, to determine the value of the resistor you will need, using that formula.

Man, this looks SUPER cool, and I can think of several different things I would automate with this additional data point if it were available.

I’m a “functional” coder, and an “advanced novice” with YAML/HA, but soldering? Yeah, notsomuch. It would be really cool if these were available for sale, pre-packaged. If I’m understanding correctly, the resistor that you’ve got wired into your circuit needs to be a certain value depending on the weight of the mattress, yes? Could always get there with a potentiometer I would think.

The other thing is, I don’t know anything about ESP devices, or how to integrate them or program them. If you ever decide to package these up into a consumable product for novices, do let me know!

1 Like

I did this myself, in fact in my first attempt the voltage was high enough and low enough to act as a switch and I could use any pin on the node mcu I used. Since then I soldered up a more permanent setup on a proto board and no longer works but I have to trouble shoot that. This works really well I think compared to a load cell, since my bed has drawers on it and about 8 legs by my count

1 Like

Has anyone used this with an adjustable bed? I would like some sort of bed occupancy monitor, but I’m not sure if it would work properly if adjusted.

I don’t know if I have posted this here before.
I can’t find it as a post but here is my wake up alarm that is re-triggered by staying in bed.
I get four minutes to get out of bed then it sends a new alarm to my phone every minute until the bed sensor says I’m out of bed.

Automatic wake up alarm - YouTube

2 Likes

Thats really cool!

I wanted to use Alexa Media Player to stop the Alexa alarm, so I could keep the Alexa alarm lol, if that makes sense, with the snooze for x mins ect. But then have the bed stop the Alarm when I got up.

AMP can control entities with alarms, but not alarms with entitles sadly :frowning:

What type of resistor did you solder between pin 3V3 and A0, what to look for at my local marketplace?

I used a 1/2W metal film 1% resistor because that is what I had lying around, but a 1/4W carbon film 5% resistor would do just as well. It’s not important. Calculating the value is the important part.

2 Likes

mmWave perhaps? I am only one night into testing. And my bed doesn’t adjust. At least in theory it should work if aimed and configured appropriately.

Hi, I’ve just built this with an Ikea double bed and two 60cm sensors from Banggood running off an ESP32. It seems to work very reliably, thanks for all the code and diagrams that has made it a lot easier.

2 Likes

i just finished building/installing this and it works fine with my adjustable bed.

I put the single strip across the middle of the frame that doesn’t move and I saw maybe a .02 volt change from flat to adjusted.

Thanks for this project @tom_l. I never could get the capacitive touch sensor to work reliably and so far this seems to work really well.

And I like that I have more control over the signal to trigger the presence or not thru adjusting the biasing resistor and trigger level.

2 Likes

hey @tom_l thanks for this project.

I was wondering if you have any automations that you have used this occupancy sensor with? Could you please share it?

Thanks.

Ps. I have got it up and running however I cannot find the binary sensor as you have shown on your lovelace card I.e. binary_sensor.master_bed_occupied.

When I set my esp up I get only 2 sensors. I.e. trigger level and master bed sensor.

1 Like