sambithota
Posts: 5
Joined: Wed Sep 18, 2019 9:43 pm

360 degree human presence detection

Wed Sep 18, 2019 9:59 pm

Hi Guys,
I am hoping to get some help here to find a suitable sensor for my small home project. I need to setup a rpi with some sensor on a bed (bottom or side) to decide if anyone is coming near the bed from any side. Should detect only when someone is as close as 1 ft. (It would also help if I can count how many people are near the bed but a nice have feature).
I am reading about PIR sensors, proximity sensors and doppler radar sensors. But not quite sure which will fit this requirement. These sensors might not work as I am looking for a short range (1 ft) motion detection. Also for a 360 view I need to include multiple sensors. Pressure pads around the bed is another option but that needs a really large pressure pad.

Is there any sensor that would work in this situation? or is there any other simple solution to achieve this? Any help would be greatly appreciated.
Capture.PNG
Capture.PNG (3.41 KiB) Viewed 3134 times
Thanks

Andyroo

Re: 360 degree human presence detection

Sat Sep 21, 2019 12:15 am

How about ultrasonic distance detectors?

Only concern I have with this idea is that of the bed covers being dropped over them and getting false readings from that.

How about a light / laser beam as a ‘trip wire’?

Obviously the cabling becomes a bit of a pain as the receptor needs to be at the other end and anyone leaving clothes or slippers in the way would be a constant trigger...

pfletch101
Posts: 634
Joined: Sat Feb 24, 2018 4:09 am
Location: Buffalo, NY, USA

Re: 360 degree human presence detection

Sat Sep 21, 2019 12:39 am

?Camera pointing down from above the bed with appropriate focal length lens to provide necessary field of view, and motion detection. By default, you would see someone further away on the long sides of the bed, but you could ignore motion that was not within the field of interest.

Andyroo

Re: 360 degree human presence detection

Sat Sep 21, 2019 1:40 am

Sorry but a camera above the bed sounds so wrong on a family forum :lol: :oops: :lol:

pfletch101
Posts: 634
Joined: Sat Feb 24, 2018 4:09 am
Location: Buffalo, NY, USA

Re: 360 degree human presence detection

Sat Sep 21, 2019 3:04 am

Andyroo wrote:
Sat Sep 21, 2019 1:40 am
Sorry but a camera above the bed sounds so wrong on a family forum :lol: :oops: :lol:
I obviously have too pure a mind - I didn't even think of that aspect. :oops: Though the camera software could be configured not to record anything except motion/no motion.

sambithota
Posts: 5
Joined: Wed Sep 18, 2019 9:43 pm

Re: 360 degree human presence detection

Sat Sep 21, 2019 3:49 am

Andyroo wrote:
Sat Sep 21, 2019 12:15 am
How about ultrasonic distance detectors?

Only concern I have with this idea is that of the bed covers being dropped over them and getting false readings from that.

How about a light / laser beam as a ‘trip wire’?

Obviously the cabling becomes a bit of a pain as the receptor needs to be at the other end and anyone leaving clothes or slippers in the way would be a constant trigger...
Thanks for the reply. I am concerned about the false reading by a ultrasonic sensor plus have to have multiple ones at each side of the bed.
Camera is definitely not an option even a thermal one.
How about PIR sensors? Is there a way to limit the motion detection area? Having 2 probably at both side of the bed but limiting the area of detection. I read some forums where people talked about taping the sides of the sensor to give it a narrow detection area.

Andyroo

Re: 360 degree human presence detection

Sat Sep 21, 2019 8:38 am

I know you can get narrow beam sensors for burglar alarms that just cover doors etc. so I would assume they make them.

No idea if they are just the normal ones with a different lens or plastic housing but as long as the tape was IR proof I do not see why it should not work.

Maybe just to buy a cheap one of eBay / Ali and give it a try if no one else comes back with any other ideas?

mattmiller
Posts: 2247
Joined: Thu Feb 05, 2015 11:25 pm

Re: 360 degree human presence detection

Sat Sep 21, 2019 10:40 am

Ultrasonic is the only sensor with a narrow enough beam that also has distance sensing abilities.

I'd estimate you'd need 3 per side of bed but maybe 4

What are try to detect approaching the bed?

sambithota
Posts: 5
Joined: Wed Sep 18, 2019 9:43 pm

Re: 360 degree human presence detection

Sat Sep 21, 2019 1:46 pm

mattmiller wrote:
Sat Sep 21, 2019 10:40 am
Ultrasonic is the only sensor with a narrow enough beam that also has distance sensing abilities.

I'd estimate you'd need 3 per side of bed but maybe 4

What are try to detect approaching the bed?
People coming and leaving near the bed. And also count number of people.

User avatar
jbeale
Posts: 3754
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: 360 degree human presence detection

Sat Sep 21, 2019 3:17 pm

I can see why in a hospital, nursing home, or home care setting there would be reasons this information is interesting.

On the sensor side the choices are different if you demand this must work even if the sensor may be covered by sheets or blankets that would absorb ultrasonic pulses. Doppler radar might be preferred there. You can adjust the range down as much as you want by reducing the RF power, however it will never have a hard cutoff in distance, so a large target at longer range will always look the same as a small target that is closer. For example if someone is moving a metal cart around that would always be picked up at longer range than just a person.

If you can maintain a clear line of sight, there are some small and cheap optical proximity sensors with a range of a few feet or less, that ought to work OK. Some of them even do ranging so you can measure how close the target is. However you would probably need many of them for full coverage around the perimeter. If you can mount sensors outside the bed itself, then a simple beam-breaking system allows a precise count of how many times an opaque object passed within X inches, that distance being wherever you put the beam. If you want to use a single sensor, you could imagine a rotating LIDAR device centered under the bed (as long as the sheets don't drape to the floor) but the cheapest of those are hundreds of dollars and I don't know about long-term reliability given the moving parts.

Your title specifies "human presence" but none of these ideas can really distinguish a dog or a cat from a human, except I suppose a pressure mat with a specific force threshold.

Here is a strange idea: geophone. It is a ground vibration sensor used in exploring for oil wells etc. They are very sensitive and can pick up footsteps; the closer they are, the more signal you get. It is hard to tell a large distant noise from a small close noise, though. Depending on the exact situation and background noise level, it might be still be useful in practice. Using one as an automatic person detector would take a lot of work though.

Similar strange idea: tiltmeter. If you have a wood floor, it flexes a small amount as weight is applied, and this can be measured. Assuming normal evenly supported flooring, this bending due to local load is strongly dependent on distance, so you will not see much static deflection from someone standing far away. If someone in the bed rolls from one side of the bed to the other, of course that would change the floor loading as well.

blimpyway
Posts: 586
Joined: Mon Mar 19, 2018 1:18 pm

Re: 360 degree human presence detection

Mon Sep 23, 2019 6:11 am

There is pressure resistive plastic foil you can cut in thin strips and build your under carpet sensors with.
It can be glued on the back of the carpet/linoleum and can be very specific regarding threshold and position of applied pressure

One brand is Velostat, see movies here https://www.adafruit.com/product/1361

User avatar
Gavinmc42
Posts: 5155
Joined: Wed Aug 28, 2013 3:31 am

Re: 360 degree human presence detection

Mon Sep 23, 2019 7:33 am

I remember years ago reading UWB, Ultra Wide Band radar can be range gated.
ie set a perimeter distance or electronic fence.

The ST VL53.... laser distance sensors could be used but they are more spot types unless you scan them.
3D camera(Kinect)? I compiled the Kinect 360 OpenKinect code on a PI4, I have yet to test it.

The demo on this works really well, 5m+ range.
http://www.latticesemi.com/en/Products/ ... imaxHM01B0
I have no idea how to modifiy it yet.

Roof mounted 360 PIR sensor is probably the easiest?
IR blocking tape can be used to "tune" it?

Roof mounted FLIR Thermal camera?
There is two versions of the Melexis MLX90640, 32x24 pixel sensor, 55 and 110 degree.
More expensive 80x60 FLIR sensors are available but probably over kill.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

sambithota
Posts: 5
Joined: Wed Sep 18, 2019 9:43 pm

Re: 360 degree human presence detection

Thu Sep 26, 2019 3:48 am

Thank you everyone for your replay and giving ideas. Considering the fact that I don't want to consider the motion of the person on the bed, seems IR/Ultrasonic or even Thermal cameras won't work as expected.

I am considering this to be the best option so far. Here it is -
1. Pressure Sensor under the mattress to decide if someone is on the bed.
2. Pressure/Force sensor on the floor around the bed to trip when someone is on them. [adjusting the pressure to detect human]

This way I can also know if someone is near the bed when the other person is on the bed or off the bed. Or if the floor sensor trips "on" just after the under mattress sensor trip "off" that means the same person on the bed got down.

Thoughts? Ideas? Do you think this will work?

My second question is can I measure the force/pressure on such sensor on the floor so that I can count how many people standing on it?
Also. can someone point me to these kind of sensor on the market? The model/name that I can use with an raspberry pi?

Thanks

User avatar
jbeale
Posts: 3754
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: 360 degree human presence detection

Thu Sep 26, 2019 4:10 am

You might look up "force sensitive resistor" for example, here's one that is long and thin and costs about $10 per foot. One of the links even mentions "off bed sensor" as a typical application.
https://www.adafruit.com/product/1071
https://www.amazon.com/Pressure-SF15-60 ... 07M6YYPQ3/

It's a simple resistor, so you would normally use this in a half-bridge or full-bridge with 1 or 3 other resistors, and use an analog-to-digital converter to measure the signal output. The Raspberry Pi has no A/D inputs itself, but a few dollars will buy you an Arduino Mini or similar board that does have A/D inputs, then you can send that data to the Pi using a 3.3V serial link or other methods. Or for a bit more money there are probably USB devices with A/D inputs.

In this application you need to think about the detail of the weight distribution. For example, if you simply lay a thin tape on the floor around the bed and a person stands directly centered over it in bare feet, the tape may still measure near 0 force depending on the structure of the arch of the foot. Most of a person's weight is on their heel and a little on the ball of the foot, unless they are on tiptoe or doing ballet. So you may need a set of stiff plates or boards to ensure a small area load anywhere in the region of interest, somehow passes through your sensor. On the other hand, maybe a person's typical motion would inevitably cause some weight at some point to be measured, you might have to just try it and see.

User avatar
Gavinmc42
Posts: 5155
Joined: Wed Aug 28, 2013 3:31 am

Re: 360 degree human presence detection

Thu Sep 26, 2019 12:27 pm

If it was a hard floor then a piezo sensor can be very sensitive to vibration.
Mini earthquake detector.

Pressure mats under carpet would work
But capacitance sensors might work too, based on touch screen tech.
It seems everyone make capacitive touch based chips these days.
Two/three parallel wires and the right chip might be able to detect someone crossing them.

Motorola had one chip that did electric field sensing - MC33794
https://en.wikipedia.org/wiki/Electric_ ... ty_sensing
NXP who acquired Motorola, call these proximity sensors, but they are discontinued :(

Doppler Microwave sensors, the automatic door type are still used.
Car radar chip? the range is too small?
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

User avatar
jbeale
Posts: 3754
Joined: Tue Nov 22, 2011 11:51 pm
Contact: Website

Re: 360 degree human presence detection

Sat Sep 28, 2019 12:20 am

I've used several kinds of doppler radar sensors. They do work but they will not discriminate between small nearby motion and large distant motion. If you've got a metal frame or metal springs in your mattress, they would likely pick up any motion of those as well. A large mass on a load cell or force sensor is indeed a vibration sensor or seismometer, but if the mass loading is negligible, then so is the vibration signal.

Capacitive pickup sounds to me like a very good possibility. It would very likely be cheaper, and might work as well or better in some ways than pressure sensors. You just need to arrange sense wires as electrodes to make the area surrounding the bed effectively a large capacitive touch pad. If you want to count people you need the equivalent of a multi-touch pad, but it seems possible. More precisely, you'd be counting feet. I know some microcontrollers, like the one in the Teensy 3.2 board from PJRC include a number of "touch sense" pins intended for such applications. https://www.pjrc.com/teensy/td_libs_Cap ... ensor.html

User avatar
Gavinmc42
Posts: 5155
Joined: Wed Aug 28, 2013 3:31 am

Re: 360 degree human presence detection

Sat Sep 28, 2019 12:53 am

Years ago I got some stainless steel thread, used by the Wearables crowd.
I was going to make touch sensitive robotic teddy bears, but too many ideas not enough time.

Lots of microcontrollers now have touch/proximity capability.
Proximity would be more sensitive?
https://www.cypress.com/documentation/a ... g-capsense
Some of these micros are getting down to $1-2, so a bunch of them scattered around, sector control .
Could have a double ring, that would detect coming and going people?

IR break beam fencing?
IR leds and IR remote control sensors and stick on retro reflective tape.
Optek have a VCSEL, IR laser diode that should be more efficient than IR LEDS.
Got a few but so many ideas, not enough time :lol:

Many IR proximity chips around now, short range 100mm, need the longer range ones?
Adafruit ,Seed Studio and Sparkfun have breakout boards for most of these.
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

sambithota
Posts: 5
Joined: Wed Sep 18, 2019 9:43 pm

Re: 360 degree human presence detection

Sat Nov 23, 2019 2:59 am

What do you all think about using iBeacon? Having a app in the cell phone to connect when it comes near.

LTolledo
Posts: 4800
Joined: Sat Mar 17, 2018 7:29 am
Location: Anime Heartland

Re: 360 degree human presence detection

Sun Nov 24, 2019 12:45 am

this cannot be achieved by a single type of sensor (at the moment)
you'll need a network of various sensors, (doppler radar, PIR, image, etc)
and a good algorithm to weed out false positives.

currently doing test on doppler + PIR......
"Don't come to me with 'issues' for I don't know how to deal with those
Come to me with 'problems' and I'll help you find solutions"

Some people be like:
"Help me! Am drowning! But dont you dare touch me nor come near me!"

emma1997
Posts: 1376
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: 360 degree human presence detection

Sun Nov 24, 2019 2:09 am

PIR, 'radar', ultrasonic, (at least the cheepies) all too unstable and prone to false trigger. I found 38khz IR to be the most reliable with adjustable range as being discussed in another thread: https://www.raspberrypi.org/forums/view ... 7&t=257372

Another advantage besides reliability is about 1% the cost of solutions mentioned so far.

Return to “Other projects”