Are You in Bed?

If you’re building an omniscient home-automation system, it’s ability to make decisions is only as good as the input you give it. [Petewill]’s self-made panopticon now knows when someone is in bed. That way, the [petewill]’s automatic blinds won’t open when he’s sleeping late on weekends.

[Petewill] didn’t take the easy way out here. (In our mind, that would be a weight sensor under one of the bed’s feet.) Instead, his system more flexible and built on capacitive sensing. He’d tried force sensors and piezos under the mattress, but none of them were as reliable as capacitance. A network of copper tape under the mattress serves as the antenna.

The details are taken care of by an MPR121 from Microchip. An Arduino and an nRF24L01+ module round out the build. There’s some hints about using the capacitive-sensing chip for you in the video (below) and there’s Arduino code up on his website.

The advantage of capacitive sensing is that you can easily define the area you want to cover — simply lay the tape where you want it. That way you could build different rules depending which side of the bed is occupied.

So add capacitive sensors to your bed to push your ridiculously complicated home automation system over the edge into insanity!

20 thoughts on “Are You in Bed?

  1. Not sure putting a sensor under one leg of the bed would be sufficient to gather the level of granularity needed here to differentiate between one or two occupants? I could be wrong though but it feels unlikely. We have bulk containers that hold thousands of pounds that we want to measure the weight of, which requires a minimum of three sensors under each foot. They are just simple load cells, coupled with a bit of processing. You can buy them off the shelf or assemble them from load cells, possibly some circuitry to interpret the load cell signals and your microcontroller of choice.

    How water resistant is this system? People sweat when they sleep as well as the possibility of kids, pets, themselves possibly making things various levels of “wet”.

    1. I just jumped around in the video so maybe it mentions it and I didn’t see that part. I will come back later.

      I don’t get why weight protection doesn’t work. Weigh the bed and make that zero, anything over zero means someone is there. Heck make it 50lbs over and you don’t have to worry about extra pillow or pet or whatever. He mentioned rolling over, but there would still be a greater weight than none even if standing directly over another leg. What am I missing?

    1. Much better without a camera, especially if it would be network connected. If the network is hacked, a simple sensor can not generate so much data to leak out. Data which does not exist can not be leaked.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.