IR Beam Interrupt

Hi to all forum,
I am really a beginner in Arduino, I know some of coding and electronics.
But the experience is so important, and I do not still have it in all refered to arduino... I do have Arduino Uno, I have made the basic examples...

I would like to know if there some kind of reader of IR Beam Interrupter (for example, put it so close of the entrance door, and when somebody across, or maybe only when door is opened, the IR Beam is interrupted, and I can read that change). The code might be simple I think... Always in 1, when interrupted changes to 0¿

I will apreciate all information, maybe in dealextreme there is that kind of target already build, maybe 2 targets, one Rx and Tx... I do not want to use proximity, just the interruption...

THANKS SO MUCH,
LyonJK

Do a google search on IR phototransistor. You will get a lot of information.

Look at the attached circuit. Q1 is a typical IR phototranisitor like a LPT035 or something similar.

BTW, this is just a sample. It may or may not work in your case as I do not know how powerful your IR beam is.

Hi BillO,
I really thank your information. In my case, I imagine first I need to know a little bit more, I only need to measure "the interruption". But as you say, power need to be considerated¿ The entrance where the door is located, only has 2 or 3 meters.... I understand there will be two parts, the transmitter and the receiver, right¿

Thanks so much,
LyonJK

This project does something similar, It has an IR Transmitter fitted and the Arduino looks for the presence of the IR to count a lap, you want to look for the abscense of the IR to indicate a person, but the principle is the same -

Duane B

rcarduino.blogspot.com

These also work well for detecting people going past: arduino ultrasonic sensor for sale | eBay

(plus you only need one set of wires).

lyonjk:
Hi BillO,
I really thank your information. In my case, I imagine first I need to know a little bit more, I only need to measure "the interruption". But as you say, power need to be considerated¿ The entrance where the door is located, only has 2 or 3 meters.... I understand there will be two parts, the transmitter and the receiver, right¿

Thanks so much,
LyonJK

Yes, you will need a source and a receiver. The source could just be an IR LED with a current limiting resistor. They come on various continuous power ratings (30mW to 100mW are easy to find). That circuit given to you is for a typical receiver. For 3m you would probably need a more powerful source and/or a more sensitive receiver. Please do some research via google. There is a lot of information out there about this.

DuaneB:
This project does something similar, It has an IR Transmitter fitted and the Arduino looks for the presence of the IR to count a lap

Seems to be the wrong link? It's about controlling multiple servos from a RC transmitter.

My solution was to go to the local security store and purchased a cheap set of beams that are used on motorised driveway gates.

Similar to this : http://www.safetyzone.co.za/products.html?page=shop.product_details&category_id=24&flypage=flypage_images.tpl&product_id=20

Consists of a transmitter and a receiver. Power required is 12VDC and they contain a relay. Relay COM is connected to Ground, and NO to the input pin.

Set the internal pullup to keep the pin high, and if the beam is broken, the relay connects Gnd ( com ) to NO ( the input pin ) = Low = beam broken.

Note : the majority of the beams I saw had a minimum distance of around 2 meters. I wanted it for a single hallway door. Solution was to remove the lens from the units, and replace with a plastic cap ( like used on the bottom of a chair leg - costs a few cents from the hardware store ) and drill a very small hole ( 1mm or smaller ) in the cap. This reduced the beam to a very thin 'line' and made it operate as required.

a cheap infrared laser diode would give you a lot more accuracy and no chance of a false reading, focus the beam onto the receiver, less energy waste due to the tight focused beam.

Seems to be the wrong link? It's about controlling multiple servos from a RC transmitter.

Sorry, see below -

Duane B
rcarduino.blogspot.com

fungus:
These also work well for detecting people going past: arduino ultrasonic sensor for sale | eBay

(plus you only need one set of wires).

Thanks to all,

So, if I decide to use ultrasonic instead of IR, for example:

Would it be "the same"¿
As I said before, my goal is to sense when somebody cross, in other words when somebody has enter or leaved out from my house.

I would apreciatte your help, thanks so much,

LyonJK

If I understand you correctly, knowing that someone opened the door is already good enough.
How about using a reed switch like the ones found in most alarms?
They are easy to install as they are meant for the job, cheap as can be and also easy to use with an arduino, as it acts just like a switch.
See for instance Connecting a magnetic reed door switch into arduino – Hardware To Software, but there's probably tons more to find out there.

gateway:
If I understand you correctly, knowing that someone opened the door is already good enough.
How about using a reed switch like the ones found in most alarms?
They are easy to install as they are meant for the job, cheap as can be and also easy to use with an arduino, as it acts just like a switch.
See for instance Connecting a magnetic reed door switch into arduino – Hardware To Software, but there's probably tons more to find out there.

Hi gateway, thanks for the answer.
There's no doubt that I though using a reed switch, or something like a switch. But sometimes, we just open the door when there's a messenger or whatever, I just wanna ensure that somebody has passed...
Would it be too complicated using IR or Ultrasonic?
Thanks so much, best regards.

LyonJK

Hi LyonJK,

IR would also be as simple in terms of programming I guess, just a bit more tinkering to do on adjusting them properly.

However, I don't see how this would solve your problem.
If you open the door for someone, like a messenger, either you or the messenger (or both) will still interrupt the IR beam, also registering as a false entry / exit...

Only valid solution I can think of is using two beams a meter / 3 feet or so apart, and measuring timing and direction.
Something like:
Beam A is nearest to the door, Beam B furthest, both in your hallway.
If B is triggered first, then A and nothing triggered after that for a couple of minutes: exit
If A is triggered, then B and nothing triggered after that for a couple of minutes: entry

And make a filter for all other patterns (for instance, multiple readings of the same trigger, without the other in between count as simply one).

I think this should work for at least a single person going through the door.
If you have multiple people walking out / in the door after each other, you would probably need the last two readings from this setup to deal with direction...

So I would expect IR to be technically simple, but to deal with also detecting the difference between just opening the door and really leaving / entering, the main challenge would be in the software, not the hardware.

Regards Dennis

gateway:
Hi LyonJK,

IR would also be as simple in terms of programming I guess, just a bit more tinkering to do on adjusting them properly.

However, I don't see how this would solve your problem.
If you open the door for someone, like a messenger, either you or the messenger (or both) will still interrupt the IR beam, also registering as a false entry / exit...

Only valid solution I can think of is using two beams a meter / 3 feet or so apart, and measuring timing and direction.
Something like:
Beam A is nearest to the door, Beam B furthest, both in your hallway.
If B is triggered first, then A and nothing triggered after that for a couple of minutes: exit
If A is triggered, then B and nothing triggered after that for a couple of minutes: entry

And make a filter for all other patterns (for instance, multiple readings of the same trigger, without the other in between count as simply one).

I think this should work for at least a single person going through the door.
If you have multiple people walking out / in the door after each other, you would probably need the last two readings from this setup to deal with direction...

So I would expect IR to be technically simple, but to deal with also detecting the difference between just opening the door and really leaving / entering, the main challenge would be in the software, not the hardware.

Regards Dennis

Hi Dennis,
I really thank you, I need to think better what I am going to do, but you really help me.
Thanks so much,
Regards]

Hi LyonJK,

No problem.
Good luck with thinking this through!

Regards Dennis

Actually, I am using one pair of active infrared beam sensor (http://www.hkvstar.com/item/2-beams-ir-beam-motion-detector.html?) too, and encounter the similar problem. It has NC/NC alarm output (when all two beams are interrupted, the beam sensor will trigger the alarm, then send signal out.