[Release] HubDuino Bed Occupancy/Presence Sensors

Hi writers - I am looking for a reliable sensor that can go under a mattress and detect bed occupancy - or a disturbed night - that will also trigger a night light. It needs to be reliable enough to go under any size mattress and on any type of bed - divan, slatted, etc. It also needs to show occupancy for all sizes of bed - single, double king etc. Any thoughts?

I've found the above bed occupancy sensor to be very reliable after the initial setup (getting one side shimmed to take some of the weight when no one is in bed). We find it very useful.

Although it kind of sounds like your wanting something you can sell or at least make available to a verity of people and with the difference in bed frames, single vs double occupancy beds, weight of mattresses, and more I'm not sure you can find one sensor that could be extremely easily calibrated to work in all cases. The above setup should be able to be made to work in all cases but will require some initial testing and adjusting of the potentiometer to make it reliable.

1 Like

For a sensor that works with any type of bed, I would think you might want to consider a load-cell under at least one of the legs of the bed frame. It would need to handle a considerable amount of weight across a relatively small cross-sectional area, and you'd need to be able to 'tare' it with nobody in bed.

Let me know if you find such a sensor, as it would be interesting.

I ran across this post while searching for a means to determine if a car/vehicle is parked on a target spot. The idea is to both determine presence of the vehicle and its ideal parking distance (min) in a garage (i.e. distance from the wall).

I've seen and considered several methods, even a pressure mat which typically can withstand 25 psi. However that method would only allow for the vehicle to drive over it to trigger arrival. I do not think it would withstand being parked for long periods of time on the mat.

A FSR could be sandwiched between two pieces of more durable material, say pressboard or something like that, and they could be physically positioned diagonally across the surface area so that it would approximate the cross-sectional area pressure.

I have many Arduino based projects I've completed, but never one that uses the 8266 nor integrated into Hubitat using HubDuino. So this would be new to me. Can the example sketch be altered to provide a presence state for this type of application?

Any guidance and forethought would be most appreciated. I'd like to get it clear in my mind before committing to purchase several parts for a test setup.

Thanks!

I would definitely concentrate on the bedframe or the box spring as a constant measuring apparatus. A strain gauge material could be affixed to either of these and its analog differential converted into a digital output with an offset to calibrate for sizing.

For my bed, there is a middle bar support that joins across the bedframe. An apparatus could be constructed along that bar easily. The strain gauge could measure when the bar is stretched (micro amounts) as vertical pressure is applied. Think of it as an inverted bow.

Another approach would be to place an FSR between these two structures, assuming the bed uses a conventual box spring. One of several of the wooden slates would be pressing against the bed frame and those points would create pressure that the FSR can detect.

Hope either of those ideas helps.

I would not use an FSR for detecting the presence of a car. Instead, I would use a distance measuring device (e.g. ultrasonic, lidar, etc...) mounted above the parking space (assuming it is inside a garage or car port). Based on the distance measured, it should be fairly obvious if a car is present or not.

Or, one could use a two-piece beam sensor, that when the car is in its spot, breaks the beam, and sends the signal to Hubitat.

The example sketch found in the first post of this thread implements 2 "Presence" devices. Thus, I am not exactly sure what you are asking? :thinking:

Thanks, I just figured that out. At first glance I thought that the two inputs provided some sort of differential between them to eliminate error when someone tosses and turns while in bed. I didn't read all the details in the post (boo).

So, this setup would/could work for my application and provide digital state of presence for two vehicles parked in the garage. Which is what I'm wanting. Guess the next step is to order up some parts and start playing...

Thanks.

I have a few ultrasonic projects around the house already. But my experience with these cheaper sensors is they are dramatically affected by temperature variance as well as its wide range of angular error (cone effect) which is present in any sonar type sensor. So, even though I have seen several projects posted including opengarage.io I think in the summer it would just be all over the place with inaccurate readings. Also, the sensor although calibrated for specific height range would trigger if someone walks under it that is over 6 ft tall, even though this is less likely to happen and can be deterministically programmed out.

For example, I have an ultrasonic HC-SR04 in the door way to a bathroom that triggers a light to come on when the entrance is crossed and remain on until that path is crossed again ( a toggle setup). It works using the 'newping' library which helps by sampling hits over a time period. However, it suffers false triggers in the winter when the heater is running, the air flow caused by the heat change in the room and its surroundings cause the system to sometimes turn on. The kids call it the ghost effect.

This could be programmed out, say only accept readings when the garage door is opened within a few minutes and then close out sample readings after a hit is determined, aka parked.

My current solution is using a spring loaded lever attached to the garage wall and a foam ball with a row of small neodymium magnets in a tube attached to the swing arm. So, as the car/vehicle pushes the arm inward toward the wall surface where a smartthings multifunction sensor is mounted, it will cause the state to change to closed and can trigger the parked state. Obviously the reverse effect (after the bouncing is delayed out) will cause the sensor to read open (aka unparked).

It has performed very well, but now im adding a second car in the garage which is a small compact car so it doesnt come close the back wall when parked, so it would be more complicated using this technique.

I know I recently saw a post on one of the many Smart Home forums I frequent, where a user shared how they had used a time of flight distance measurement device to detect whether or not a car was present. I have tried to find the project, but I am not seeing it anywhere. :frowning:

I believe these TOF sensors are optical, not ultrasonic, and thus may be more reliable? But I haven't used them.

Yep, I've watch adafruits demos of these, but not used them either. I'm not sure how to address them, especially if I wanted to use it with HubDuino.

Does anyone have any thoughts?

If you're a programmer, you could fairly easily add support for the VL53L0X sensor as another ST_Anything device in the library.

I'm not nearly qualified for that level of programming, only hobbyist level.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.