Break Beam Sensor to detect entry through a door

I'm trying to build a break-beam sensor that will be installed on my door, so I can detect someone walking in or out by having the person break a beam of visible light or IR light hitting a sensor. The light source will be on the door (on the side that swings open near the knob) and the detector will be on the frame, such that when the door is closed, the light source and the detector will be almost touching each other (is it possible that this will overload the detector? I can always install the detector and the light source at different heights so that even if the door is closed, the light source will be far enough away to prevent an overload).

Is visible light or IR better for this application? Is there a module out there that is designed for this? I've been looking at the GP1UX311QS on AdaFruit as the sensor because this is the one used in a tutorial at ladyada.net (Sensor tutorials - IR remote receiver/decoder tutorial) but I would like to know if it would be suitable for this application and what kind of issues I can expect. I already have a bunch of CdS photoresistors but I think they will easily be flooded by the ceiling lights in my room and not be able to detect a tiny LED 2-3 feet away (the maximum distance from the door frame to the side of the door that swings open) if the ceiling lights are on.

I'd appreciate any help :slight_smile: . Thanks everyone.

You have a few options:

  1. reed switch;
  2. hall sensor;
  3. light sensor.
    Last one is most complex for beginners, but I've seen project with arduino on a web, google "arduino trip wire"

Thanks for the reply. The reed switch and the hall sensor would be fine for detecting the opening of the door, but would they work for detecting if a person has passed through the door? I would imagine that neither of the two would work at ranges of 2-3 feet, but I could be wrong. The light sensor seems more suitable. I do notice that in the Arduino Trip Wire examples, they use lasers. Can I use IR emitter and sensor instead of the laser for the given range? TV remotes work at about that range. My other concern was the current rating of the emitters. I've heard that IR LEDs requires considerably higher current than visible light LEDs (even up to 1 Amp!). Just not sure how much current is needed (or what current rating should the IR LED be) to emit a 35-45 KHz signal to around 2-3 feet. Any ideas?

Yes, it's true they usually bump current into IR led up to 1A, only it's pulse current, and average 'd 100 mA or less, depends on a diode.
You will need transistor to do the same way, create high current pulses keeping average not exceeding particular diodes limits.

Hi,

Try using a PIR (Passive IR). I think it is the best option for your purpose..

http://www.sunrom.com/sensors/pir-motion-sensor-module