No announcement yet.

In Bed? Sensor

This topic is closed.
  • Filter
  • Time
  • Show
Clear All
new posts

    In Bed? Sensor

    Finally, I've wrapped up a cute project and thought I would share. This is a solution to detect my wife and I in bed I wanted something to start "sleeping mode" without requiring a button push or other human action. Basically, it's a pressure sensor to let HS know how many people are in bed. I'm sure most people can see my motivation in this, but here is a list of things that make use of it:

    *Trigger "go to sleep mode" (lights, alarms, etc).
    *Accurate occupancy detection (if I leave and my wife is still in bed, how else does the house know since she didn't move?)
    *Telephone ringer muting.
    *HS Voice muting.
    *Waking alarm snoozes (it is relentless until I get my butt up!)
    *HVAC settings.

    This is based on the Flexiforce pressure sensor you can buy here for $25. It has a variable resistance based on weight. To implement it, I took a common ceramic coaster (see below) and stuck on 4 rubber pads. Under one of those pads I put the Flexiforce.
    The assembly then goes under one of the bed legs, such that the rubber pads are between the bed leg and the coaster. I actually have two such assemblies, one on each side of the bed, and the sensors are hooked together in series. You can probably be more creative in the hookup if you want more information about who is lying where in the bed.

    The flexiforce is hooked to a circuit in the Whestone bridge config, using a single supply AD623 as the op amp. The single supply and low current draw means I can just use a 9V battery inside the circuit box and not worry about it for a long time. The output voltage is then proportional to the weight in bed. This voltage is read by my Anabug and HS is notified if the value changes. Based on the value, it sets an occupancy level for the bed; 0,1 or 2. Everything after that is built into my other scripts, checking the bed occupancy for setting various things. Good fun.
    Attached Files

    That looks like a very clever setup. But, I have to admit..... I was dying to post some something funny; but decided against it!

    FreeWorldDialup desktop# 25831, PPC# 26420


      These pressure sensors
      seem inexpensive.

      I saw them in an ad from for $13

      Maybe 10 years ago I recall that DEC made a CRT monitor with one of these sensors under each of 4 corners (bottom of monitor). As you gently push on the monitor's screen, the differential in the 4 sensors changed. These pressure reports were micro-processed to yield a touch-screen-like capability via mouse emulation. You touched the ordinary CRT's screen and the result emulated a mouse click or drag. Pretty neat because it worked with any monitor, so long as the physical 4 corners were aligned.


        Quite interesting. I wish I had known about these less expensive sensors. I have used the SureAction pulsors for years, but they are MUCH more expensive. I guess one advantage to the SureAction one though is that it can be mounted on the underside of a joist and detect someone walking or standing anywhere in the middle of the floor above.

        I have one of these on either side of the bed so that when we get out in the morning after the alarm has gone off, then the computer can know which one got out. First one into the bathroom gets their choice of music or morning news played!


        Rick Tinker
        HomeSeer Technologies


        Rick Tinker (a.k.a. "Tink")


          After using this for awhile, I found that the rubber pads were not sufficient and tended to creap around. I replaced them, and the bottom assembly with something that was permanently attached to the bed legs... I'll go into more detail if anyone wants, but I think you can come up with just as good of a solution. It may be worth putting the sensors some place other than the legs (like somewhere else in the frame).

          Also, the 9V battery died after a couple months and I decided to add a cheap 12VDC wall plug transformer.


            I was wondering how it would work on carpet. Maybe I could take something like a coaster, then the pressure sensor, then another coaster. Mike, did you use the 100 lb. sensors? Did you find that you needed to readjust it over time?


              I am using mine on carpet and it works ok. I think the goal is to really make sure nothing on either side of the sensor moves. If it does then the value changes.

              Yes, I did experience some creep in the value at first. Actually, it was terrible until I replaced those rubber pads. You will also need to provide adjustments for the gain and offset of the Whestone bridge. I did have to tweak it for a week or so after first setting it up, but finally it settled down.

              I can't even remember which sensor I bought now, but I think it was the 500lb one. No, my wife and I don't weigh that much, even combined, but I didn't want to run out of range given the bed also goes on there. It turns out there is no lack of sensitivity... you can make it up with the gain on the bridge. If I had to do it again I would have bought a lower weight version since my resistances are pretty high, making it more difficult to adjust the offset on the bridge.


                If you have a box spring, you might be able to put the sensor on the underside of one of the box spring supports and get the same result. Those certainly flex under the weight of a person in bed.

                - Gordon

                "Remember the days when you could go into a store and ask the store manager when something they were out of was coming in? Whatever happened to that? Store managers these days only know that 'corporate' is sending a truck next Tuesday. They have no idea what's on it... What a way to do business."
                | - Gordon

                "I'm a Man, but I can change, if I have to, I guess." - Man's Prayer, Possum Lodge, The Red Green Show
       - -


                  One really interesting sensor I came across in my 5 year quest for the perfect bed sensor is the "People Sensor" developed at MIT. I bought one as a kit about 4 years ago, and although it didn't work in the bed, it is still pretty cool. Unfortunatly, they didn't sell many of these, because it looks like they are no longer available, but you can still find the plans to build it here:

                  Basically this thing has two antenna wires you lay parallel, up to about 12 ft. apart, and it triggers when a person walks between them. It can also be tuned to detect a person between ground and one wire. You can, for example, put a wire up both sides of a doorway, and it will trigger if someone walks through. Pretty cool. Its a shame its no longer available.


                    When I was first looking for bed sensors someone one this board also alerted me to that sensor (I think it was on the old HS board). It is very cool... and I want to build it some day. The neatest part is that it's really an occupancy detector, not just a motion detector, so is can see the presence of a body even if they are still. In a few years I'm planning to start building a new house, and I'm probably going to put wires in the walls for this just in case.



                      For these to work, does it matter if you and the wife sleep on the same side of the bed or oposite side.....??????

                      Martin Custer
                      Authorized HomeSeer Distributor
                      Martin Custer


                        It doesn't matter too much where the sensors are placed or where someone sleeps. This is because you can set the analog trigger to occur at any voltage you desire. So after you set it up, you go get in bed and see what kinds of values are produced for various situations. You should get very distinct sets of values for 0,1,2.. people in the bed, but there is variation depending upon exactly where the person is or where the sensors are. For me the variation was small and i set the triggers to allow some swing around the appropriate voltage level.

                        Ideally you want to get the most difference between the voltages, so place the sensors under the legs nearest where people sleep. If done correctly, I imagine you can also figure out who is in bed (if each person habitually sleeps at a certain spot).


                          I was actually attempting a little humor!

                          Even though I can see the uses, my wife would kick my A#s if I tried instaling something like that.

                          Martin Custer
                          Authorized HomeSeer Distributor
                          Martin Custer


                            I told my wife I was willing to disable it when the UPS guy stops by , so no need to kick my a2#$% Kidding aside, She personally doesn't mind, I just gotta figure out how to do this now, the benefits are big, since my wife and I wake up at different times, you could automatically set the house in sleep mode when both people are in bed, have lights dim to 30% when you wake up at night to go to the bathroom or get a drink, stuff like that.

                            HSPRO 2.4 (ESXi 4.1) | my.Alert NEW | my.Trigger | HSTouch | ACRF2 | UltraM1G | BLWeather | BLLan | Rover
                            (aka xplosiv)
                            Do You Cocoon? Home Automation News, Tutorials, Reviews, Forums & Chat


                              I continue my bed sensor quest. About 4 months ago I built a mechanical bed sensor. Two pieces of wood, separated by a spring in each corner (from Home Depot) where the top piece of wood could slide up and down on four large nails in each corner. My bed has 6 legs, so I removed the roller from a middle leg, and set the bed on this sensor. I mounted a switch to the top piece of wood, that would turn on when the bed was weighed down to an adjustable point. After a short "breakin" period, it was very reliable and consistent. The only problem was that the bed creaked when the sensor went up and down.

                              So recently I thought that I would try MikeMatthews idea. I ordered the 100 lb. Flexiforce sensor. (Had to buy 4 for $55 from Tekscan which came to $70 after shipping.)

                              I took to ceramic tiles and put the sensor between them with a small plastic puck as suggested, then mounted this on a piece of wood, and used it to support the bed.

                              Next I built a control box, with a dual op-amp, and +/-15 v supply. The first amp was a simple resistance to voltage converter and used the circuit from the Tekscan site. The second op-amp was a comparator to trip a relay when the voltage exceeded a set point. I can adjust the relative voltage and set point.

                              To make a long story short, it does work, but I'm not overly impressed with the repeatability of the arrangement. Certainly the sensor is taking a fair bit of "break in period." The good news is that the "creaking" is gone, but it seems to need adjustment daily. (Although it does seem to be getting better.)

                              Basically I set my "trip" point at 2.5V and I set it to 2.2V with no one on the bed. My wife will bring that up to about 2.9V, and we get maybe 4.4V with both of us in bed. But when we both get off the bed, and it sits for a day, the voltage may drop to 1.7V with it only rising to 2.4V when my wife is on the bed. Hopefully over time this will settle down. The good news, is that the drift seems to be in one direction only.

                              I thought about running the sensor output voltage directly to my panel which can read a 0 - 5V signal with 256 resolution, and I could have that automatically set the new threshold, but haven't figured out a way to run a wire down the wall to the bed. Instead I use a wireless sensor connected to a Caddx Quickbridge.