43
\$\begingroup\$

This is a hobby project about home automation. The idea is that of distributed system of cheap microcontrollers that take measurements, communicate, output data and control appliances.

One important task that this system should perform is detect at every room if there are humans inside (awake or asleep distinction would be a over-the-top bonus :) ). I am still at a loss if this is feasible. PIR-s? Webcameras? Microphones? Optical counters at the doors? Ultrasound?

Available processing power per sensor output: 5MIPS of avr instructions (8-bit RISC) for 3 seconds = 15 million instructions.

Typical usage scenario would be:

  • The apartment is empty (the system should know that).
  • The door opens and a group of 4 people enters the hallway. (the system should know that someone is in the hallway).
  • Two go to a room (the system should track their path by room, with a lag of no more than several seconds, plus know that there is still someone in the hallway).
  • , one of them returns, the other sits on a chair, (the first one is to be tracked. the system should also know in which room is the sitting person).
  • In the meantime the rest two wander randomly in a 2 x 2 meter area in the hallway (taking shoes off, hanging coats) (the system should know they are still in that area).
  • One goes to another room, turns the radio on and goes to sleep (the system should know that there is a sleeping person there).
  • Someone leaves the apartment and returns 10 minutes later (here the only requirement is that the system know that there are still persons inside).
  • The three leave (the system should know that there is still someone inside).
  • Much later, the sleeper gets up, wanders around for half an hour and then leaves the apartment (the system should track his position by room with a lag no more than several seconds, and know when he leaves that there is now no one inside).

I have no pets.


The same question has been asked and received some nice answers on a sister SE: the question.

\$\endgroup\$
9
  • 1
    \$\begingroup\$ I know of a project to track people indoors using dead reckoning and RFID-based fiducials. Maybe a little overkill for a home hobby project, but still pretty neat. \$\endgroup\$
    – House
    Commented Jun 29, 2012 at 22:35
  • 1
    \$\begingroup\$ Those people counting systems are neat: youtube.com/watch?v=BiTuFXuFoPY&feature=player_embedded. I think they use PIR. \$\endgroup\$ Commented Jun 30, 2012 at 18:51
  • 1
    \$\begingroup\$ I have the same problem, but we're two humans and 4 cats in our house. And PIR doesn't works reliably with pets. I tested many of them. they can be calibrated to filter out ONE of the cats, but when they enter in a room toghether, PIR triggers anyway... \$\endgroup\$
    – Axeman
    Commented Jul 2, 2012 at 8:49
  • 1
    \$\begingroup\$ I think that in the next experiment I'll try an rfid tag (in a form of bracelet, or ring, or something like) and a couple of medium distance RFID reader on each door, to detect not only the number of peoples entering or exiting a room, but also WHO they are (so the system can have a configuration for each person). And for the one-time guests... we'll cuff them to a tag when they enter the house... :D \$\endgroup\$
    – Axeman
    Commented Jul 2, 2012 at 10:20
  • 1
    \$\begingroup\$ A very hard problem to completely solve and is why so many home/office automation projects either fail outright or turn into fancy manual on/off switches... \$\endgroup\$ Commented May 24, 2013 at 12:12

9 Answers 9

15
\$\begingroup\$

Especially for a home hobby project I'd probably start with PIR (Passive InfraRed) sensors. They are cheap and very effective at detecting something warm like a human body moving around.

However, PIR sensors will not detect static warm objects like someone sleeping or sitting still on the couch. With enough PIR sensors around the place, you can probably infer where people are motionless by where you know there was movement and in what direction. PIR sensors don't inherently give you direction, but enough of them activated in sequence does. For example three sensors triggered in sequence in a hallway is a strong clue someone is walking down the hall in that direction. If you saw motion of someone entering a room and then motion in the room, but nothing at the doorway, then you can make a good guess the person that entered is still inside but motionless.

This system isn't foolproof, but PIR sensors are cheap and remarkably sensitive, so with enough of them I think you can get to quite a useable level.

One thing to keep in mind is that other warm moving things will trigger PIR sensors too, like pets moving about. If you have a dog, then aiming the sensors so they only see motion a few feet off the floor helps. Cats jump around a lot, but are smaller, so maybe there is a way to not trigger on cats. This system will be a lot easier if you know the only warm moving things are humans though.

\$\endgroup\$
4
  • 1
    \$\begingroup\$ The non-moving person detection case can be a problem. A few weeks ago I stayed in a hotel that used motion sensors of some sort to activate the bathroom lights. About 10% of the time when I was sitting/standing motionless the lights turned off. Since they normally stayed on I assume that whoever sold them the system added logic to detect the case but it was slightly buggy. I was never able to discern a pattern in how it failed. \$\endgroup\$ Commented Jun 29, 2012 at 20:56
  • \$\begingroup\$ Since you are using a microcontroller (or many microcontrollers) you might locally want to preserve the last state of the room in the control unit or the node by implementing a state machine. So, even though the sleeping person is lying still and there is a uniform (not quite) IR signature emanating off him, by knowing from the state machine that someone entered the room, the system may grow more aware of the movements. \$\endgroup\$
    – Anshul
    Commented Sep 11, 2013 at 3:47
  • \$\begingroup\$ @Anshul how is that done? \$\endgroup\$
    – MaNyYaCk
    Commented Jan 16, 2017 at 6:33
  • \$\begingroup\$ @MaNyYaCk A very naive implementation could be simply having a bit value set to 1 when you detect motion, i.e. firing of sensors in a sequence from door to hallway (first is door sensor) - entry, and to 0 when it is the last sensor to fire. This is of course very trivial and easy to fool. (This is what is also said in the main answer by Olin above). What if more than one people entered and not all left? So, you might then want to fuse information from many sensors for a better decision model. \$\endgroup\$
    – Anshul
    Commented Jan 16, 2017 at 7:31
11
\$\begingroup\$

PIRs. I've tested Matsushita/Panasonic NaPiOn PIRs on my previous job, also for home automation, and they worked well. Those were motion detectors, which reacted on changes in the receiver's signal, but you can use presence detectors, which also give a signal if the detector receives a static signal.

I tested with different types of clothing, like a coat over a pullover, and it always detected me from several meters distance, so apparently the radiation from head and hands was already sufficient. So I guess a person sleeping under a blanket will be detected as well (unless maybe she's completely covered by it).

\$\endgroup\$
2
  • \$\begingroup\$ Your clothes warm up considerably as you wear them, so I think they will always radiate heat, but it's true that it might affect the accuracy of the system \$\endgroup\$
    – Gerard
    Commented Nov 24, 2015 at 14:36
  • \$\begingroup\$ I found the following IR temperature module which could be used for this type of sensor: MLX90614ESF. It is about 5 USD per unit. I think I will get one to experiment on it. I guess one has to use some sort of lens similar to the ones used in PIR movement detectors. \$\endgroup\$
    – bcelary
    Commented Jul 28, 2016 at 15:55
7
\$\begingroup\$

PIR is good at detecting moving humans.
If you have a number of them per room you can infer the presence of non mobing humans with reasonable success by tracking people and deciding where they are when they vanish "off the RADAR".

Doppler RADAR modules once common for door openers and now largely replaced by PIRs make excellent movement detectors. You can make your own with relative ease. They also detect moving cats and dogs and flapping curtains etc.
Detection can be limited to humans by bandpass filtering the output. I'm told that human joints produce articulation frequencies which are unique - especially not found at the same frequency in cats and dogs. I was told tat this is a very reliable people detector.

Ultrasound is liable to be less good than PIR's or RADAR

Other systems you mention may be able to be triggered in a beam counter type role but lack the actual person detection capability of PIR and RADAR.

\$\endgroup\$
1
  • \$\begingroup\$ I would be concerned that a PIR with "dead spot tracking" might get confused by groups of people. For example: you're monitoring a hall leading to a room and 2 people went into the room and 1 went out. If the 2 people were walking side by side then you might see it as a single person, leading you to believe that there were no people remaining in the room when in fact there is 1. \$\endgroup\$
    – user3624
    Commented Jun 30, 2012 at 4:26
7
\$\begingroup\$

For the extra points: a sleeping person can be detected with a cheap DIY force sensor. Take two stripes of aluminium foil, crumple them a bit. Then roll them to form a capacitor. Use a plastic bag or foil as insulator/dielectric.

Squeeze this under the full weight of the bed/couch base or foot. Then measure the capacity. E.g. make it part of an oscillator circuit and count interrupts, or count the CPU cycles needed to charge it.

It's good enough to detect a pillow being added or removed. It will drift over time, but can detect events reliably: weight added, weight removed, weight shifting around. (Yes I actually do have a log of my sleeping hours.) It won't help if someone decides to sleep on the floor, but it's a start.

\$\endgroup\$
0
\$\begingroup\$

I believe that producing a radio signal in the KHz range and latter measuring the interference on the signal detected in a long sensing antenna might work much better and easier!

You may even detect where the human body is through some quadracture signal applied to a trasmit antenna with know resistivity.

\$\endgroup\$
0
\$\begingroup\$

My solution stands alone as the most simple minded of all possible solutions. I have a motion detecting software package installed on my computer called: Yawcam. This little puppy takes pictures of anything that moves in my apartment through my HP 5210 web camera. Next, I have a barking dog microwave motion detector pointed out my front door.

As a final touch I pasted a small sticker / shipping label on the outside of my front door that reads: Surveillance Camera Inside.

\$\endgroup\$
1
  • \$\begingroup\$ Actually a face recognition software might be the way to go. The only big concern is privacy - if the system is not air-gapped, someone might tap into the cameras. Therefore, I don't get why this solution is so much down=-voted. \$\endgroup\$
    – Vorac
    Commented Sep 8, 2014 at 8:48
0
\$\begingroup\$

Olin Lathrop's answer should be enough but if you add some sound detection sensors with your project this can increase your human presence detection rate.

Try to to detect human voice with sound detection sensors, this can be made another sign of presence detection in a room or hall.

Cheap and sensitive sound detection sensors are available over internet.

\$\endgroup\$
-1
\$\begingroup\$

I was thinking is a good way to detect prescence is using a some electronic design that have the capacity to detect the weight or deformation of the floor in the room to detect the people (obiously diference is some big like 50 kg avrg), only adjusting the room weight before prescence of humans and that would be the master measure comparing with when a human access to the room and then detect by the diference of weight.

\$\endgroup\$
-1
\$\begingroup\$

i think about a scanner , which can count the number of people in a location. we can use a wi-fi scanner for that. if we want to know , whether there is anybody in a room, place the wi-fi detectors in the corners of the room. scan the area within the detectors using the wi-fi scanner with us, . then it will sence the humans in the room and display the number.

\$\endgroup\$
1
  • \$\begingroup\$ A WiFi scanner scans for WiFi signals, it's not clear what your meaning is. \$\endgroup\$ Commented Sep 6, 2014 at 18:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.