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!
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”.
To clarify: three sensors in total for this specific application. One sensor physically under each foot. Not three under each foot, sorry if that was unclear.
A strong spring with a single switch under one end of the bed is sufficient. (Getting out of bed was my only way of stopping the alarm clock.)
Does that work for two (or more) people in bed at once though? How much hysteresis does that have?
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?
Also, don’t know why this was a reply than new comment but oh well.
Heh.
https://twitter.com/newlywedsontjob
Just watch this one fir alternative design :)
https://en.wikipedia.org/wiki/Munich_%28film%29
This might be good to install in a couch if you don’t want the dog getting up on it.
“Instead, his system more flexible and built on capacitive sensing.”
IP camera pointed at the bed combined with some simple image processing/motion detection would be my preferred solution.
Using what software stack, OpenCV?
You should get a job at the NSA or facebook (or a porn producer?) then.
Whichever you pick, they’ll like your view of things (pardon the pun).
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.
I did something like that with opencv to detect when elderly dementia patients leave bed.
Far easier to use 4 load cells under the legs. It’s actually really common in high end home automation.
I would just look if my phone is plugged in the charger next to my bed. Or tap in to the buzzer of my alarm clock.
Yes, more correctly, reading HaD on my bed.
ha ha, takes “Map My Ride” to a whole new level :D
Good job though!
Would sewing conductive thread across the mattress work instead of the copper tape?