Detecting if a persons is laying in his/her bed


  • Contest Winner

    As part of a larger project, I want to be able to detect whether someone is laying in bed or not. I have been looking on the internet for a sensor that's able to measure that, but my lack of internet skills didn't gave me a solution.

    So I was wondering if anybody could help me with this.

    Thanx in advance.


  • Hero Member

    There are potentially a lot of different ways this could be sensed. There do exist pressure transducer mats that lay on top of a mattress, and it will give you an actual outline of the body so you can confirm it's laying down.



  • I made a few homemade pressure switches to solve a similar problem with presence detection while watching TV. Occasionally my living room PIR would not sense people if they were very still and lights would turn off when a scene would fire on my controller. I built several pressure switches out of cardboard, aluminum tape, thin foam (for spacers) and scrap phone cable and placed them under seat cushions. I use them as simple binary switches and incorporated this sketch within a multisensor I have under a end table.

    Sorry for the bad photos:
    couch1.jpg

    couch2.jpg

    couch3.jpg

    The wire runs to either side of the switch and is installed between layers of aluminum tape. This tape is made of aluminum and is conductive. I found it at a hardware store, it is used for installing air duct. When someone sits on the cushion, the switch compresses and both sides make contact and trip the arduino. I made a larger one for placing under a door mat to let me know when the dog wanted back in the house. Below is a picture during construction. Foam strips were placed between the rows of alum tape and the two side were stacked together and placed under the door mat. When the dog would sit on the mat, it triggered a 'door/window sensor' in Vera and I had a PLEG condition which flashed a Hue bulb in the living room. It did not last long after getting wet but the dog liked it while it worked.:smile:

    couch4.jpg


  • Hero Member

    If it's an air mattress (such as sleep by numbers), you could try adding an air pressure transducer. Pressure should spike if a person is on the bed. I expect that would be very robust and bullet proof.


  • Hero Member

    Or you could put load cells under the legs of the bed. Then it would be a gravimetric detection.


  • Contest Winner

    @NeverDie Thank you very much for your reply. The pressure transducer does sound like a great option. I haven't looked them up, but they sound really expensive. But I see a lot of benefits in that type of sensor. because you'd also be able to detect whether the person is moving a lot in his/her sleep. The thing I'm worried about is if a sensor like that is soft or hard. Because the person I want to build this sensor for is very old and has a weak back. I'm worried that she can't sleep if the sensor is noticeable.

    @Dwalt don't feel sorry, I love your photo's! They give me a good idea of your solution. I really like it. I have to test it a little bit, because the sensor has to be put under the mattress. I don't know how much the mattress weights, but I can always put a spring in the design, so that the sensor would need more weight before it triggers an alarm - meaning person is on laying on the bed in this case.

    @NeverDie not sure what you mean by air mattress, is that an inflatable mattress? (as you probably already noticed, English isn't my native language). I have been looking at pressure sensors. And they also look like a good candidate. I've also found a on the market solution at Conrad, but it's 60 euro's, which is a bit too much to buy if I'm not sure if's the solution for my problem. The load cells also sound like a good solution, but it's an Ikea bed on wheels, not sure how I could mount them.

    My current list is:

    • they home brew sensor that @Dwalt made;
    • Force Sensitive resister like this one (https://www.sparkfun.com/products/9376) it can detected up to 100kg. My theory is that if it's mounted under a mattress it will never get the full weight of the person, so even if the person I'm building this sensor for would weight more than 100kg, the sensor would still work great. Besides I'm thinking that if there's more weight on the sensor than 100Kg it will give the maximum resistor value.
    • this kind of sensor http://www.instructables.com/id/Arduino-Load-Cell-Scale/ but I just don't see how I could mount it under the mattress.
    • Wait until the Christmas sale starts. The usually have gadgets that have a sensor that you have to put under your doormat. The gadget we'll make noise (plays a Christmas) whenever someone stands on the doormat. I could strip the doormat sensor out of the gadget.

    More ideas are also much appreciated. I haven't made a decision yet.


  • Hero Member

    @TheoL said:

    @NeverDie ...I'm worried that she can't sleep if the sensor is noticeable.

    Here's the sort of thing I was referring to in my first post:
    http://www.sensorprod.com/glossary/surface-force-mapping/surface-force-mapping.php
    I think there was even a kickstarter project involving something very similar not long ago. I've visited a couple different mattress stores that have them. I did try laying on them, but all that was almost 20 years ago. They're not hard, but I don't now recall whether or not I could feel wires in them.

    Here's another option:
    https://www.youtube.com/watch?v=5H-KWeD251k

    The sparkfun sensors sound interesting. Not sure how well they would work under a thick mattress, but I'd be curious to know.




  • Contest Winner

    @HenryWhite Thank you verry much. I think I can mount it in a pillow. I'm currently working on a IOT alarm clock and I'll be incorperating one of these in the final solution/ That way the alarmclock knows if the person is in bed when an alarm is triggered and will not start the alarm if no person is present in the bed. For most part this is not a mysensors project. So I'm not sure if I should post the project on this forum.


  • Hardware Contributor

    @TheoL, Would this not be running any MySensors software, or even connected to a home automation controller that is running anything to do with MySensors? Your current project is something that really interests me and i would be looking to do something similar.



  • @TheoL said:

    @HenryWhite Thank you verry much. I think I can mount it in a pillow. I'm currently working on a IOT alarm clock and I'll be incorperating one of these in the final solution/ That way the alarmclock knows if the person is in bed when an alarm is triggered and will not start the alarm if no person is present in the bed. For most part this is not a mysensors project. So I'm not sure if I should post the project on this forum.

    If you believe it or not, I had this idea also a few weeks ago and I am currently thinking about trying it :smile:
    The problem is that the FSR402 is only for max. 10kg.
    I think the pillow would not be the best solution because if you move your head you can easily get out of range of the force sensor (unless you use multiple force sensors in the "pillow-area")


  • Contest Winner

    @HenryWhite said:

    @TheoL said:

    @HenryWhite Thank you verry much. I think I can mount it in a pillow. I'm currently working on a IOT alarm clock and I'll be incorperating one of these in the final solution/ That way the alarmclock knows if the person is in bed when an alarm is triggered and will not start the alarm if no person is present in the bed. For most part this is not a mysensors project. So I'm not sure if I should post the project on this forum.

    If you believe it or not, I had this idea also a few weeks ago and I am currently thinking about trying it :smile:
    The problem is that the FSR402 is only for max. 10kg.
    I think the pillow would not be the best solution because if you move your head you can easily get out of range of the force sensor (unless you use multiple force sensors in the "pillow-area")

    Is see what you mean. There are pressure sensors that can handle a bigger load. But I'm not sure if they break if a weight more than their max is applied to them. And the persons who's sleeping in the bed, shouldn't feel the sensors. He or she should be able to get a good night of sleep.


  • Contest Winner

    @samuel235 said:

    @TheoL, Would this not be running any MySensors software, or even connected to a home automation controller that is running anything to do with MySensors? Your current project is something that really interests me and i would be looking to do something similar.

    From an architectural point of view, this would be a device that would communicate with my Home Automation controller. Home Automation is great when it comes to static schedules. But in my opinion controlling things by use of an calendar is more Life Style automation.

    Besides that, I want to be able to bring the alarm clock along with me, when I go on a Holiday. That's why it needs to be a stand-alone machine. What I'm still not sure of is, if I want to use Google Calendar or a calender hosted on my home network. As for now I think it's better to keep information like when I'm sleeping at home or not safe on my private network. I've found some good open source calendar software, that can be installed on the same Raspberry Pi as on which the alarm clock will run. As far as I understand, you can use that calendar on your iPhone or Android phone as well.

    For me this is a big project. I'm learning Python and Linux. So I don't think it will be ready within a couple of weeks. But my holiday starts on new years eve. So I might come far with it in the two weeks holiday I have,


  • Hardware Contributor

    @TheoL, there is no right or wrong way to implement a project. Having it a standalone device is a must for you it seems, however i would have it connected to your home automation controller to literally just display status' of the alarm and then you could have other nodes actuate/complete actions depending on if your alarm clock is/isn't at home and more specifically, is/isn't set to wake you.

    You could have a automated socket or a automated coffee machine or even lights depending on the status of you alarm. Example below:

    IF the alarm is at home AND armed to wake you, THEN turn on lights to 10%/20%/30%/40% --> 100% 10mins/9mins/8mins/7mins/6mins/etc before your alarm is due to go off, allowing you to wake up to a perfectly light room (not too bright to shock your eyes/system) or even have your coffee machine start brewing 2 minutes before your alarm activates....

    Again, that would just be my suggestion. Doing this ALONGSIDE of having it a standalone machine would not affect anything if you left the house.


Log in to reply
 

Looks like your connection to MySensors Forum was lost, please wait while we try to reconnect.