1
$\begingroup$

I am working on my first hobby project and I'm not very familiar with sensors yet. I am trying to build a system which detects the presence of a person in a small room with a single entrance/exit door.

The idea is when the first person enters the room, the lights turn on and any following person doesn't affect state of the lights. After the last person leaves, the lights should turn off. In a programmatic sense, the lights should turn on when present person count is greater than 0.

I have explored my options and found out that infrared sensors are usually used for this type of problem. What I am not sure is how to detect whether person has entered or left, so I would like to ask for some help with this.

$\endgroup$
1
$\begingroup$

I think that most instances of a project like this use a motion sensor to detect if people are in the room rather than trying to count the number of people in the room as that would require knowing if someone was entering or leaving the room. The problem with a motion sensor to drive the lights that a person who enters and then becomes still (at a computer, TV, asleep, etc.) can cause the motion sensor to fail to detect a person in the room, causing the lights to turn off.

You could try to count people in the room, but, as mentioned, this requires knowing not just that someone passed the threshold but also knowing the direction they were going. This could be done with a really simple light curtain on either side of the door and then watching to see which sensor triggers first.

The light curtain doesn't need to be complicated; you can use one IR transmitter and one IR photocell for each "curtain". When the received intensity drops below some threshold you trigger an event. Outside then inside is someone entering and vice versa is someone leaving.

You can also use pressure mat, where again you put one inside and one outside.

Don't forget to take the door into account! If you use IR light curtain you'll have to set up one sensor unit far enough away that the door won't trigger (and thus block) the sensor.

$\endgroup$
  • $\begingroup$ Thanks for the answer! As you've pointed out, motion sensor would mean there has to be movement, which isn't always true in my case and waving your hand so lights don't turn off is very annoying. Light curtain seems like simple and effective solution. $\endgroup$ – Marko Grešak Jun 19 '15 at 21:23
1
$\begingroup$

Expanding on the motion sensor idea: you could combine that with a door open/shut sensor or basically just a switch that detects when the door is open. After an open/shut event, you could detect if there is motion or not. If there is, set a flag that a person is in the room. That gets rid of the issue where the person may become motionless. I'm assuming that the state of person present/absent can only change during the open/shut event and I'm also assuming that if there are people inside the room, at least one of them will likely be moving directly following the open/shut event.

$\endgroup$
  • $\begingroup$ I have been thinking about concept like this and it seems nice, but I would need to built in this sensor into the door and also have another motion detection sensor inside the room. I have ordered few of latter and I will first try the idea of having one on each side of the door and using the activation time difference as means to determine direction. If this works, it also saves me doing any modification to the door. The chance of accidental activation is in my opinion very small, some tweaks to sensor range should make it almost nonexistent. $\endgroup$ – Marko Grešak Jun 22 '15 at 21:10
0
$\begingroup$

A human inside a room can be identified by using temperature sensors. Every object has its own temperature, i.e. a human also has a certain body temperature - using this we can find the find the presence of human being inside a room.

$\endgroup$
  • 2
    $\begingroup$ To be specific, I think @gowtham means IR sensors (as opposed to a thermometer). IR sensors can only detect surface temperatures, though, so it may be possible to "fool" an IR sensor by standing in extreme temperatures (outside of the expected band) or by wearing thick clothing. $\endgroup$ – Chuck Feb 9 '16 at 18:33

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.