Go Down

Topic: IR Beam Interrupt (Read 2666 times) previous topic - next topic

lyonjk

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

BillO

#1
Apr 30, 2013, 12:47 am Last Edit: Apr 30, 2013, 01:04 am by BillO Reason: 1
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.
Facts just don't care if you ignore them.

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

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, you want to look for the abscense of the IR to indicate a person, but the principle is the same -

http://rcarduino.blogspot.ae/2012/01/can-i-control-more-than-x-servos-with.html

Duane B

rcarduino.blogspot.com

Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

fungus

These also work well for detecting people going past: http://www.ebay.com/sch/i.html?_nkw=arduino+ultrasonic+sensor

(plus you only need one set of wires).

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

DirtBiker

#5
Apr 30, 2013, 02:23 pm Last Edit: May 01, 2013, 08:33 pm by DirtBiker Reason: 1

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.
Dirt Biker

DirtBiker


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.
Dirt Biker

DaveO

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.


cjdelphi

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.

DuaneB

Read this
http://rcarduino.blogspot.com/2012/04/servo-problems-with-arduino-part-1.html
then watch this
http://rcarduino.blogspot.com/2012/04/servo-problems-part-2-demonstration.html

Rcarduino.blogspot.com

lyonjk


These also work well for detecting people going past: http://www.ebay.com/sch/i.html?_nkw=arduino+ultrasonic+sensor

(plus you only need one set of wires).




Thanks to all,

So, if I decide to use ultrasonic instead of IR, for example:
http://dx.com/p/hc-sr04-ultrasonic-sensor-distance-measuring-module-133696
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

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 http://www.hw2sw.com/2012/09/07/connecting-a-magnetic-reed-door-switch-into-arduino/, but there's probably tons more to find out there.

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 http://www.hw2sw.com/2012/09/07/connecting-a-magnetic-reed-door-switch-into-arduino/, 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

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

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



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]

Go Up