Author Topic: Detecting If I Am In Bed  (Read 12897 times)

0 Members and 1 Guest are viewing this topic.

Offline CBPTopic starter

  • Contributor
  • Posts: 14
  • Country: gb
Detecting If I Am In Bed
« on: December 12, 2014, 09:58:07 pm »
Afternoon All

I have a Home Automation system and one of the things I have always been missing is the ability to detect whether or not I am in bed, detecting this can help with turning lights off in rooms/turning the temperature down/locking doors etc etc. I've never managed to do it and I am wondering if anyone has any ideas, these are things I have thought of;

1) Pressure Pads - tried and too unreliable (rapid on/offs as the pad is between the mattress and the top sheet), also feels like sleeping on rubber sheets (that is the main issue, I could get around the first one)

2) Ultrasonics - mounted in the roof directly above the bed, it is unlikely to be able to work out the difference between me and a pillow on the bed or me forgetting to make the bed in the morning. Don't really want a transducer in my face all night.

3) IR distance sensing - the same as 2)

4) Strain gauge - the bed does have slats across the middle (think this as an example http://www.bedslats.co.uk/media/catalog/product/cache/30/image/9df78eab33525d08d6e5fb8d27136e95/w/h/whinfell_solid_oak_bed_angle_4.jpg) that do flex with the load on the bed however this is across several tens of slats and a without building a network of gauges on different ones I am not sure it would be reliable. I also thought about one on the legs of the bed but it is resting on carpet so it will not be on a hard surface, again I don't know if you can measure strain against carpet really.

5) Some sort of passive detection like carrying a Tile presence sensor round with me etc, I can't always make sure that I will take it to bed and I am not implanting any RFID chips in my neck!

6) Thermal Non Contact Sensing - thinking mounted in the roof down onto the bed. Will it detect body heat through sheets? How would I work out the difference between warm sheets from getting out of the bed to what is really actually me.

Has anyone else any ideas about how I could do this? The most simplest solution is just to have a button and press it when I go to bed but I will always forget to do it.

Thanks
 

Offline dr.diesel

  • Super Contributor
  • ***
  • Posts: 2214
  • Country: us
  • Cramming the magic smoke back in...
Re: Detecting If I Am In Bed
« Reply #1 on: December 12, 2014, 10:00:05 pm »
I am in bed

Does it have to be just you, or anybody your size/weight?    :-DD

Sorry....   O0

Offline mtdoc

  • Super Contributor
  • ***
  • Posts: 3575
  • Country: us
Re: Detecting If I Am In Bed
« Reply #2 on: December 12, 2014, 10:14:26 pm »
Do an online search for "hospital bed alarm". 

Hospitals use these routinely so I'm sure multiple companies make them. There should be info available on their design.
 

Offline Marco

  • Super Contributor
  • ***
  • Posts: 6721
  • Country: nl
Re: Detecting If I Am In Bed
« Reply #3 on: December 12, 2014, 10:26:09 pm »
Load cells under the bed posts?
 

Online IanB

  • Super Contributor
  • ***
  • Posts: 11885
  • Country: us
Re: Detecting If I Am In Bed
« Reply #4 on: December 12, 2014, 10:28:31 pm »
Put a switch on the bedroom door that detects when it is closed? Then simply close the door when you go to sleep for the night and leave the door ajar at other times.
 

Online Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11632
  • Country: my
  • reassessing directives...
Re: Detecting If I Am In Bed
« Reply #5 on: December 12, 2014, 11:09:14 pm »
under my car driver seat there is switch to detect and give seatbelt warning. its no ordinary switch but its like in the keyboard. its plastic laminate 2 layers and somesort of carbon contact in between.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline jlmoon

  • Supporter
  • ****
  • Posts: 609
  • Country: us
  • If you fail the first time, keep trying!
Re: Detecting If I Am In Bed
« Reply #6 on: December 12, 2014, 11:40:41 pm »
I am in bed

Does it have to be just you, or anybody your size/weight?    :-DD

Sorry....   O0

LOL..  :-DD that didn't take long!
Recharged Volt-Nut
 

Offline jlmoon

  • Supporter
  • ****
  • Posts: 609
  • Country: us
  • If you fail the first time, keep trying!
Re: Detecting If I Am In Bed
« Reply #7 on: December 12, 2014, 11:43:04 pm »
Load cells under the bed posts?

I can hear the line now.. c'mon in here honey.. let me show you how these load cells work.
Recharged Volt-Nut
 

Online Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11632
  • Country: my
  • reassessing directives...
Re: Detecting If I Am In Bed
« Reply #8 on: December 12, 2014, 11:59:25 pm »
I am in bed
Does it have to be just you, or anybody your size/weight?    :-DD
LOL..  :-DD that didn't take long!
and some people dont like light to be turned off that moment ;) so a manual button near the bed head is still golden. if you asleep and forgetting that button, i dont thing for that type of person, turning the light off will be necessary.
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Online Psi

  • Super Contributor
  • ***
  • Posts: 9946
  • Country: nz
Re: Detecting If I Am In Bed
« Reply #9 on: December 13, 2014, 12:39:49 am »
Place the load-cell under one leg of the entire bed structure, the carpet wont matter.
The loading is the same on any surface but you may want a small metal plate between the cell and carpet. It only has to be the width/length of the cell itself. Maybe a 40x40x5mm block of aluminium.
Assume it will sense ~1/4 of the weight of the bed + contents.
So make sure the load-cell is good enough to detect 1/4 of a persons weight, maybe 1kg resolution or better, and of course make sure it can handle the total weight ok with a good margin.

You can then code some simple logic to detect if someone is in bed using a threshold equal to halfway between an empty bed and a full bed.
« Last Edit: December 13, 2014, 12:56:42 am by Psi »
Greek letter 'Psi' (not Pounds per Square Inch)
 

Offline Circlotron

  • Super Contributor
  • ***
  • Posts: 3180
  • Country: au
Re: Detecting If I Am In Bed
« Reply #10 on: December 13, 2014, 01:09:39 am »
If you had an inflatable mattress you could measure the difference in air pressure, similar to a hydraulic weighbridge. A system like that, being able to measure actual weight, could even log if Goldilocks is sneaking in.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Detecting If I Am In Bed
« Reply #11 on: December 13, 2014, 01:44:24 am »
Quote
Detecting If I Am In Bed

Put some sharp objects in your bed. When you lay down on it, the sharp objects will pinch you and you will know then that you are in your bed.

Side effect: you may have to clean the rest of your house of any sharp objects so you will never be confused when you get pinched.

Hope it helps.
================================
https://dannyelectronics.wordpress.com/
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Detecting If I Am In Bed
« Reply #12 on: December 13, 2014, 01:46:44 am »
Having solved the in-bed detection problem, can I suggest to you a harder problem to conquer?

How do you detect that you are really you?

:)
================================
https://dannyelectronics.wordpress.com/
 

Offline rs20

  • Super Contributor
  • ***
  • Posts: 2318
  • Country: au
Re: Detecting If I Am In Bed
« Reply #13 on: December 13, 2014, 02:48:20 am »
The load on a bed is not magically equally distributed amongst the four legs. Even if the mass is perfectly centered, if diagonally opposite legs are slightly longer, or the floor is correspondingly uneven, they'll take almost all of the weight between them. In practice, there's some flex to the wood, so it will be more even than that, but still not totally even? But legit idea nevertheless, just abandon the idea of assuming that dividing by 4 is the right thing to do.

On the other hand, if you have a three-legged bed, then you're totally sorted  :P. /3, (iff your centre of gravity is located at the centroid of the three legs).

<partial thread derail>

From where does one source load cells / strain gauges? I can find some on eBay, but it's really hard to find ones well-suited to a particular requirement. Take the 100 kg per leg case here for example (you don't want to load cell to break if you sit on the corner of the bed and place your entire weight essentially on that one leg).
 

Offline miguelvp

  • Super Contributor
  • ***
  • Posts: 5550
  • Country: us
Re: Detecting If I Am In Bed
« Reply #14 on: December 13, 2014, 03:11:40 am »
Why not just detect capacitance variation? Of course you'll probably want to time how long the capacitance change stays so it doesn't trigger when you are making the bed.

just some wires attached to the mattress will do.

Or a PIR (like the motion detection domes) mounted on the ceiling pointing down.

On both methods you'll probably want to wait 10 minutes or so, maybe even only 5 minutes to determine that you are there to stay. Also you can combine it with an RTC so you can have windows of when the system will activate.

But if you have dogs that like to sleep in your bed when you are not there it will trigger it with both methods :)
 

Offline pickle9000

  • Super Contributor
  • ***
  • Posts: 2439
  • Country: ca
Re: Detecting If I Am In Bed
« Reply #15 on: December 13, 2014, 03:45:33 am »
Loop sensors like they use at a traffic stop. Pressure switch in a flat bag.

Angry hamster under the sheets and a whistle detector to catch the screams while you are in bed. No screams for 10 minutes indicates you are no longer there.
 

Offline mhwlng

  • Contributor
  • Posts: 19
  • Country: nl
Re: Detecting If I Am In Bed
« Reply #16 on: December 13, 2014, 08:29:11 am »
I have (zwave) motion detectors in every room.

If the last motion detected was in the bedroom and that room has been occupied for > 15 minutes, then I assume that I'm going to bed.
In that case, the central heating is switched off (until motion is detected in any other room, in the morning.) and the wake-up alarm will be enabled.

In this case, the lights will not be switched off automatically. (I read in bed.)

There is a Visonic MCT-201 WP button next to the bed to control the lights.

In the morning, the lights are automatically switched on gradually over a 30 minute period, before the wake-up alarm starts.

« Last Edit: December 13, 2014, 09:06:53 am by mhwlng »
 

Online Retep

  • Regular Contributor
  • *
  • Posts: 98
Re: Detecting If I Am In Bed
« Reply #17 on: December 13, 2014, 02:29:41 pm »
If you go for something that reacts to the load on the bed you better implement some debouncing. Otherwise the whole neighborhood will know when you are having a good time with your wife/girlfriend/boyfriend or whatever ^-^
 

Offline zapta

  • Super Contributor
  • ***
  • Posts: 6190
  • Country: us
Re: Detecting If I Am In Bed
« Reply #18 on: December 13, 2014, 02:36:32 pm »
If you or your wife snore you can use a microphone as a sensor.
 

Offline casper.bang

  • Frequent Contributor
  • **
  • Posts: 311
  • Country: dk
  • Pro SE, amateur EE.
    • BangBits
Re: Detecting If I Am In Bed
« Reply #19 on: December 13, 2014, 06:22:53 pm »
For all the fun ways this could be done, I would probably just use an ATTiny with a thermistor. Let a tiny wire with the PTC resistor run to the center of the mattress (where your butt would be) and let your body temperature be the trigger. The MCU would allow you to use just about any sensor you want, tweak the trigger range and also add some hysteresis. If you just want to monitor your sleep, there are easier way to do it, i.e. with an Android app - which also takes "settling down" into account in its statistics (using the phones gyro to detect movement).
 

Offline magetoo

  • Frequent Contributor
  • **
  • Posts: 284
  • Country: se
Re: Detecting If I Am In Bed
« Reply #20 on: December 14, 2014, 12:44:41 am »
The load on a bed is not magically equally distributed amongst the four legs. [...]

True.  Fortunately, humans aren't symmetrical; the head end will take most of the weight.  (OP, are you human?)  If you can have sensing on those two legs then things should work.  I guess just one would work too.

Plus, at least for me, sitting on a corner usually happens at the foot end.


How do you detect that you are really you?

Assume you are you, unless dreaming. (Anything can happen in dreams.)

If you are not you, then someone else will be you, and they would have the exact same problem of knowing whether they are you; therefore the two cases "you are you" and "someone else is you" are identical.

So it would seem that the solution to this problem is the same as the solution to the first!

Unless dreaming while sleepwalking, so that has to be detected too.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Detecting If I Am In Bed
« Reply #21 on: December 14, 2014, 12:55:42 am »
All the approaches proposed so far can only detect if something is in the bed. The weight approaches for example would not make a difference between a 300lb man or a 300lb pig or 300lb of rocks.

The OP's ask was "Detecting If *****I***** Am In Bed", emphasis mine.

So having detected the existence of "something" in the bed, you have to develop a mechanism that assures the OP that that something is him/her indeed.

I would say that a restart is needed.
================================
https://dannyelectronics.wordpress.com/
 

Offline magetoo

  • Frequent Contributor
  • **
  • Posts: 284
  • Country: se
Re: Detecting If I Am In Bed
« Reply #22 on: December 14, 2014, 01:01:17 am »
OP, lock the bedroom door.
 

Offline dannyf

  • Super Contributor
  • ***
  • Posts: 8221
  • Country: 00
Re: Detecting If I Am In Bed
« Reply #23 on: December 14, 2014, 02:08:54 am »
All of that, and then some, can be fairly easily defeated and seem to be overly and overtly complex and unnecessary.

I would propose a simpler approach: a (reasonably intelligent) human. it can be a maid, a (girl/boy) friend, an employee, a bartler, etc. who would take a look at the "thing/being" in bed and confirm if it is OK.

It would go like this:

OP: "Arthur, am I in my bed?"
Arthur/OP detector: "Yes, Sir. You are surely in  your bed and I can see that with my naked eyes."
================================
https://dannyelectronics.wordpress.com/
 

Offline pickle9000

  • Super Contributor
  • ***
  • Posts: 2439
  • Country: ca
Re: Detecting If I Am In Bed
« Reply #24 on: December 14, 2014, 02:10:10 am »
So I did mention a couple before (plus a joke). Both of the ones mentioned loop sensor a bag are real.

You can easily simulate a bag sensor with a pressure sensor mounted on the end of run of surgical tubing (cork the other end). Place between the mattress and box spring. You may have to pressurize the tube a bit get it to work. These can also sense a heart rate if rigged properly. These are very robust rigs and last well.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf