detect how many people are entering/leaving home using yun

Hello!

So I got a Arduino Yun and wanted to try out this fun little project:

I basically wanted to setup a trigger at my front door that would detect whether someone was entering or leaving and then send it to some custom web service I would create that would then alert me via text message.

The hard part for me is this electronics portion of differentiating when a person is entering or leaving. What I was thinking was to have two laser beams a few inches apart that are parallel to the door and when someone was walking in one direction and tripped the laser, then i could designate that as entering. If they tripped the other laser first, I could designate that as leaving.

I would increment a counter and then send that to the web service.

But the laser sensor idea is really a rough idea and not particularly well thought out. I'm not an electronics guy so any ideas on how to make this more effective would be great.

Thanks!

Two lasers and two light dependent resistors would probably be the best way to do it as you say, but you would have to put them far enough in your house that the front door doesn't block them. You could put the laser above the door hinges aiming down to the sensor at the bottom opposite corner. This method might not be 100% reliable but it would work in most cases.

Alternatively, you could set up a webcam which detect left and right movement. That would be quite a bit harder.

Use a rotary encoder and make a turnstile like the subways.

I would use one of those ultra-sound range finders (tutorial here at arduino.cc ). If the detected distance is decreasing, the person in entering, if it is increasing, the person is leaving. Set some thresholds from where it starts checking to minimize triggerig on movement right in front of the door. And the advantage is that those sensors are dirt cheap...

Ralf

Plan D: PIR Motion Sensor

PIR Motion Sensor is A passive infrared sensor is an electronic sensor that measures infrared (IR) light radiating from objects in its field of view.

Plan E: Turn your Pi (or Arduino) into a low-cost HD surveillance cam

http://www.raspberrypi.org/archives/5071

The heart of system is software motion which does exist at linino, but unfortunately up stream OS openwrt broken the support ffmpeg at motion. wait Arduino TRE is best bet ( or compile motion yourself). The motion will alert you via text message or web service of image or video which allow you view via internet.

Pressure mat?

x 2

Alternatively...pressure mat x1 and detect if the door opens before or after the mat is pressed