Bed Occupancy Sensor

So I finally installed 4 bed sensors one on each side. I followed @diplix way of installing the load sensors and an additional wood on the 2 sensors on each side.

However the weight is not measured when I sit or sleep on the mattress it is only measured when I apply pressure/weight on the sensor part itself.

What am I doing wrong?

If I apply pressure in the middle of the latch/wood it doesn’t detect it until I apply pressure on the side where the sensor is. So this is not good as I sleep in the middle and sensors are on the sides?

Hi
You have a great project,
you give me the wiring diagram
thank you very much

Hi
You have a great project,
you give me the wiring diagram

Did anybody look for higher amount of kg besides 50? My bed is a big 2 person bed with the proper sturdy wood. So my gues would be that the bed ways around 50kg. That would leave 150kg left if i do all 4 legs. 2 Grown ups and then perhaps 2 kids jumping on the bed would make them break?

Asking because i see how the 50kg works. Apply it under the leg and it applies pressure. (just have to remember to put some metal under the leg otherwise it will dent into the wood and give false readings) but the higher ones 75kg and even 200kg models have weird shapes and its impossible to mount them under the legs without too much height increase or better yet WAF factor.

Can’t really have this under the bed legs:

It’s exactly for this reason that I’m looking at FSR’s - check this out: https://github.com/martikainen87/Home-Automation/wiki/ESP8266---Bed-Occupancy-Sensor

I did mine with 50kg pieces so that there is support material under the strain gauge. This way it can’t bend “too much” but in the process I lose some kilos it is able to measure. Doesn’t bother me as i’m only interested if someone is on the bed or is not. Works like a charm. I also have separate readings from both sides to determine which side (or both) are occupied.

The bed occupancy is by far the best thing with smart lightning :slight_smile:

You could also think of adding support legs in the middle?

You mean that because they don’t break on excessive load? I see they go to somewhere in the range up to 10kg. My leg of the bed is already more than that. Even though its a 2 person bed, we can individually put the headrest up. So i could just add a plank under that on each side and monitor with just 2. Won’t give you exact details on a person but a easy way to know someone is in the bed. Added benefit for me is also if someone puts some clothes at the end of the bed or a suitcase (before you go on vacation packing) it wont trigger.

I think like my other post, i’ll go with support plank per bed piece and just do 2 each. I only need “on/off” that would mean i can have 100kg on the head end. Should be sufficient enough i suppose. (i could do 4, but then i believe i need 2 devices) added benefit is if the weight of 1 bed piece is more then 100kg we can assume more then 2 people on one part and put some smooth music on the sonos :slight_smile:

Please post pictures when you complete this, I’d like to see how you implement this. My point to using FSR’s was so that they wouldnt break under the load of my bed, they’d sit atop the mattress but under the mattress pad. I too have a very large king size bed. The weight of the bed/frame alone probably exceeds the limit of these sensors.

Not nearly as cool or fun to build, but I found these a few weeks ago, and have had good success. There is an API, but I’m not a developer.

At the moment, I have two of these one for each side of the bed, and have it set up to turn on an Input Boolean using IFTTT with the sensor and webhook.

Obviosuly, its not local (prob could be with the API), but it’s fast. I’d say that within seconds of getting in to bed, it’s turned on/off the input boolean.

I suspect you could use a single one in the middle of the bed, but have not tried that.

Nice thing about this, is there are no other brokers needed.

Edit: I have not even really used the sleep tracker part of it, just the IFTTT trigger

1 Like

The whole idea of these topics was that the nokia sleep was expensive and not quick enough or act as a scale. I think somewhere in the start there is a mention of it. If you have the cash and it works for you, thats fine.

I hear you about the cost. But the original post said that the cost was about $100 in parts. And this was $75. That’s the main reason I posted it.

Edit: I also wanted to add that I found it to be very responsive even with IFTTT. And as I said in my original post there is an API. I’m just not a developer. I’m not at all trying to take away from the original post. I think it’s pretty cool. But for $75 no time invested. This may be a good option for some people who just want to get it done.

at the moment my costs would be around 20 bucks perhaps. Only need arduino/hx711/load cells in theory. Case and molds for the items is another thing though. All the other stuff i have lying around (like soldering tools and stuff) also, the nokia sleep in holland are 100,- euro. So makes it 115 dollars?

No worries. At amazon today they are $75 USD. No soldering required and sleep tracking as well for those who care. Again, not saying this is better but it is easy. If someone worked on the API it would be even better. I do think that one of these could work as a bed occupancy sensor (of course without the sleep metrics) if placed in the center of a mattress.

Your right about that, either way its good to hear that the device works as most would think. I have not seen much people using it.

The DIY solution is definitely more expensive in time and money than off the self devices, I do not recommend it unless your application demands something that is not otherwise available.

The problems I found with off the shelf solutions, YMMV:

  • high latency (>100ms)
  • battery powered (I loathe changing batteries)
  • false positives when rolling around (under mattress solutions are not good for restless sleepers)

Alex, i got around to getting all items from ali, got a wemos which works just fine too. I am now up to the part to use the weight on the load cells, a few questions that i have.

  1. Do you need the mold so that it “hangs” and provides better measurements? As indicated by amulet
  2. Do you have to scale reset the load cell one by one, or if you wire them up all 4 of them to the hx711 can you calibrate it with putting a weight on all 4? Or do you have to do them still indivually?
  3. That said, if you place a weight on 1 load cell (1 of 4) will it indicate that specific weight? (since the other 3 have no weight on them and it combines right)

Since now i have 4 load cells but when i calibrate it, start and place a weight on it (which sits on all 4) and change the setting so it matches the weight it will change a lot when i place it again. Or even more worse if i place more wait on it, it doesn’t come near the correct value. It does look to be a linear ‘fault’ so if i have 10kg its ok, but when i place 20kg it might say 40kg and with 40kg it might say 80kg.

I paired the 4 load cells the same as on instructables:
image

I’am close thats for sure :slight_smile:

To answer my own questions:

  1. You need the mold, otherwise it doesn’t register the values correctly.
  2. Only need to scale the ‘set’, so all 4 can individually measure weight (just place the bed/legs whatever on the 4 and then scale set it)
  3. Each load cell can do the weight measures.

Only see my wemos reboot often, which should not happen ‘that’ often i think. Crashes somehow then just restarts. (and my legs of the bed, first 2 legs at the head side weigh 30kg each. Leaves only 20kg to spare. So bigger load cells would be nice. Have not find cheap 100kg ones)

Not to over simplify things but an open-close sensor with auxiliary terminals and a cheap pressure sensor work really well… Multiple ways to do everything but I thought I’d add my two cents! This is mine:

IMG_20191102_191041|375x500

How do you set the force threshold using that method? Or is it that the auxiliary terminals are analog inputs?