I working on a home (rather room) automation system using a Raspberry Pi as 'brain' and an Arduino as sensor board.

I find it quite difficult to come up with a solution to reliably track if a person is currently inside the room or not (to trigger the lights).

Here are my current ideas and what I think about them:

  • PIR: only for movement detection, probably can't see when I'm sitting at my desk: would need to wave to the sensor every once in a while.
  • Door counter: not reliable if someone decides to turn on his heels.
  • camera: too difficult to program reliably.
  • IR thermo array: probably the most reliable, but expensive for high resolution, not sure if something about 4x16 would be enough. [Edit] I have found that the Panasonic Grid Eye 8x8 thermopile sensor (~30$) is advertised by Panasonic themselves as that it could span a whole room and indicate the position of a person in the room. Even though I think that this won't work for the entire room, it will surely be enough to get a nice movement vector in the area of the door if someone enters or leaves the room (if the sensor is faced more to the door instead into the whole room).
  • microwave sensor: haven't really found information about sensitivity in comparison to PIR.

Does anybody have some more ideas or thoughts on the ones listed above?

  • \$\begingroup\$ You could also use a pressure sensor on your chair to sense when someone is sitting there. \$\endgroup\$ – Peter Bennett Nov 22 '15 at 17:44

Combining the outputs from a few simple sensors such as a PIR, sound sensor, door switch, etc., might work well. You could set a different delay time for each and OR the results. So if you haven't moved, burped, or opened a door in a long while your either sleeping, not home, or just plain dead. (Its lights out in all cases.)

  • \$\begingroup\$ You might even be able to get a surplus Kinect Xbox sensor to use as a people/movement detector. I believe the output is already digitized. \$\endgroup\$ – Nedd Nov 22 '15 at 12:19
  • \$\begingroup\$ I'm sure Kinect would work nicely, but it consumes 16W, too much for 24/7 usage. \$\endgroup\$ – Benjoyo Nov 22 '15 at 13:04

This subject is called presence detection and is very tricky. As stated in other answer, you should combine different inputs to try guessing if someone is in the room or not.

I recommend you go for higher level of programming (meaning interfase the arduino with a PC or rpi), and use some more calculations like probabilities and such, to enrich the output. I don't think a simple OR would do the trick.

Is it acceptable for people accesing the room to have an RFID tag or other wireless form of identification on them? Have you consider using ambient noise as an input too?

  • \$\begingroup\$ I am in fact using the Arduino as sensor board only, except some preprocessing all logic is done on the rpi. I guess that the noise approach won't work for me, because there is some street noise going on. RFID tags are at least interesting, I'll think about it. \$\endgroup\$ – Benjoyo Nov 22 '15 at 16:16
  • \$\begingroup\$ @Benjoyo you could calibrate the noise floor to the typical noise for different days and times of the week, and discard as a false positive anything below that threshold. \$\endgroup\$ – jotadepicas Nov 22 '15 at 17:54

One way would be using a person's smartphone's Wi-Fi to track where he/she is. It is an existing technology called Wi-Fi positioning system (WPS). The way it works is that you connect to the Wi-Fi hub (use the R-Pi for this, loads of material online on how to convert it into a Wi-Fi hub) in the house/room and then the Wi-Fi hub keeps measuring the intensity of the receiving signal from your smartphone. Then based on the intensity of the signal it approximately detects your position in a house/room.

One more way is a through a similar thing called Bluetooth positioning system (BPS). I believe Apple had used this technology in manufacturing a product called iBeacon. It works on the same principle as the WPS. I think bluetooth is better suited to your application since it uses less power and detects proximity instead of location. I guess if you only want to switch on the lights in a room, detecting proximity would be enough.

Both of these methods would be implementable with the help of an Arduino and a Raspberry Pi. The only drawback of these methods are that if you go for a large scale implementation .i.e for the whole house, then you end up using a large amount of Wi-Fi/Bluetooth nodes for better accuracy. But for a room it's a good enough solution.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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