Go Down

Topic: best way to sense someone entering a room (Read 8900 times) previous topic - next topic


hello basically my project consists of a servo arm applying a sandpaper pad to some film reel thats playing on a projector whenever someone enters a room.
what I was wondering was would be the best sensor to detect that persons presence?

originally I though pressure pads under a carpet but the rooms is quite large , well large in regards to being throughly sensitive about 3 square meters and it seems like it would be quite expensive.

my next thought was infrared beams but then I'd have a similar problem of having to angle quite a few to ensure the room is covered at every point.

recently I have been looking at the ultra sonic range sensors on spark fun and they seemed like they might be appropriate.

any thoughts?



Ultrasonic, PIR, or maybe even a pressure plate(s). When I was 7 yrs old, I made a pressure plate, with just some tin foil, card board, cotten balls, a battery and a buzzer, and that seemed to work pretty well. My first attempt was just a bell on my door knob.
My GitHub:


ok cool , how did you do that? my issue was I thought I'd have to buy 9 or so pressure sensors for every pad , which would be quite expensive

sorry i'm so new to this and barely know anything about electronics , but eager to learn. making my own pressure pads would definitely be fun I think.


Feb 01, 2013, 04:37 pm Last Edit: Feb 01, 2013, 04:40 pm by HazardsMind Reason: 1
It was a simple yet crude design.

  • Cardboard as the bottom plate

  • A few tin foil strips glued to it, with about a inch of space between them.

  • cotten balls spaced between the strips

  • Top cardboard had large sheet of foil glued on

  • Attach wires to foil strips, battery and buzzer

Think of it as a very flat contact button.
However, WE HAVE TECHNOLOGY  :smiley-eek:
My GitHub:


Just think about it this way.  You have a conductor(tin foil) on the top and bottom plates(cardboard) with something separating them(cotton balls).  When you complete the circuit(push the plates together) the buzzer goes off.


Using Kinect sensor to detect the presence of human in the room! Yeay! http://my.safaribooksonline.com/book/hardware/arduino/9781449321918/4dot-working-with-the-skeleton-data/id2894898


Why do you need to cover entire room?
Put some laser in the door frame at the waist height. Two would be enough to determine whether a person entered or left the room. That way you can even count the number of people inside.


Why do you need to cover entire room?
Put some laser in the door frame at the waist height. Two would be enough to determine whether a person entered or left the room. That way you can even count the number of people inside.

Hard. What if two come in hand in hand get counted as one and then one leaves? PIR could be better.
Serial LCD keypad panel,phi_prompt user interface library,SDI-12 USB Adapter


Make the door frame smaller. Single file, forward march!


hmmm I don't intend to do any actual diy so I will leave the door frame as is , would add a lot of work to my project ha. PIR sounds good although does it only sense motion because I imagine people will be still when in the room.

I may try and make some pressure pads tomorrow but if PIR works that sounds like it would probably be easier.


Feb 03, 2013, 10:24 pm Last Edit: Feb 03, 2013, 10:30 pm by samhallett Reason: 1
just watched some videos on pir seems like it's defiantly the way to go

cheers for the help guys

actually watching a bit and wondering if is it only motion because presumably a person is constantly generating radiation whilst moving or not so it would be a case of altering the sketch to enable it to send a constant signal to the servo while the radiation is being detected regardless of rises or falls in the volume of how much is being detected?


Yes there are some issue with PIR. It's only going to tell you if someone in front of it is moving. You can't just point it at the room and count the people. PIR would be easy if you just want to know if someone is in there or not. But to count people going in you are going to need to set it up someway just as you would a trip laser or something. a PIR sensor still isn't going to tell the difference between one or two people.

So you need to figure out these things:
-Is there more than one entry to the room?
-Is it possible for more than one person to enter it at a time, or for them to be so close that conditions don't change between them.
-Do you need to know if someone is leaving? Can they leave out the same way they came? Can someone be leaving while someone else is entering?
-Is it okay to occasionally have errors due to people leaving/entering at the same time?

Basically if you can't control all of these conditions you're going to have some trouble unless you are okay with the occasional error. If you can't get people in and out one at a time per door, you can't really tell exactly whats going on. You would either need video recognition, or enough of those pads to have a high enough resolution to actually see where people are stepping.

If you can control how people enter and leave the room, or you are ok with these errors then just get two trip lasers or two sonar sensors. The two sensors are set up so that as you walk in, you pass one, then the other. If sensor 1 detects something, then sensor 2, someone has walked in. If sensor 2 then sensor 1, someone has walked out. I wouldn't do this with PIR sensors because they detect change so they will bounce around when someone walks in front, then when someone walks away. Both send the same signal, "hey something changed.... hey something changed again, maybe someone is there, maybe not." Whereas with a sonar you can see "something is 6 ft away... ok something is 1 ft away... ok something is 6ft away again" you know that someone just walked by. Plus PIR will bounce around multiple times per change anyway, they are really only any good if you just want to know if someone is around, not anything with accuracy like this.


I started something and its major part is the same--to count the number of people entering a room. If I want to use an IR detector (I bought 38KHz detector) what would I have to do to make it work? Can somebody please help me out with the code too? Its tough being a Biology student for the past 12 years!
Also, I'm open to working with pressure pads, but I would like some help with the code and the connections too!
Thank you!


well to be honest I do only want to know if someone is around , the number of people is irrelevant I only need to differentiate between 0 and any. From what you say about it only detecting change though it sounds as though a still person would be counted as 0. if this is the case I think I will use an ultrasonic one


Sounds like you need a little clarification of your goal. Do you want the sandpaper to actuate when someone enters the room (as in only once per person) or do you want it to actuate the entire time someone is standing in the room (meaning the film scratches to nothing the longer someone stays?)

Monitoring just an entrace is the simplest way to count people. Depending on how you do that, it may have issues where it counts 2 people as one (though, if you put it at their legs, they would have to be walking perfectly in sync.) But how much does that really matter?

Maybe defining the overall purpose/effect you are trying to get would help. I am envisioning that this is an interactive exhibit where you are trying to show the degradation of an image the more it is viewed. Clarify your parameters, and I think people can be of more help.

BTW, a PIR sensor works by using two adjacent sensors angled slightly away from each other. Motion is detected by comparing the two sensors. The most you could determine from them (if you had a truly raw PIR sensor) is the direction of the movement. Most PIR modules have all the logic built in, which simply triggers if a sequential change between the two sensors is detected using comparators. *Technically* it can sense to some degree whether someone is continuing to stand in front of it, but again, you would need access to the raw sensors.

Automatic doors at the store uses radar for this purpose (a special band that is absorped by the human body.) Sonar would provide a similiar effect. Though if your project is as I am envisioning, a simple break-beam detector circuit would really be enough.

Go Up