Pages: [1] 2   Go Down
Author Topic: What to use for a Light Barrier ?  (Read 2671 times)
0 Members and 1 Guest are viewing this topic.
Germany
Offline Offline
Full Member
***
Karma: 0
Posts: 214
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

what component should I use to create a  light barrier?
Actually, the method doesn't have to base on light, it is just the name - the task is to check if something is between the sender and the receiver?
Additionally, I'd prefer to only have to use one component each, that means to use the mere fact that most waves are reflected on objects.

Idea: Using cheap ultrasonic modules like this one, I only need one each because they use that ultrasonic is reflected on objects. Then I would set a normal distance, if it changed then something is between.

Thank you
Logged

using Arduino Uno Rev 3

USA
Offline Offline
God Member
*****
Karma: 14
Posts: 644
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How large of a gap do you want between the sender and reciever?
Logged

Germany
Offline Offline
Full Member
***
Karma: 0
Posts: 214
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is about 3meters, and by the way I prefer the use of only one module that sends and receives the signal (maybe ultrasonic)
Logged

using Arduino Uno Rev 3

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 551
Posts: 46240
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

What is the purpose of this barrier? How likely is it that people will try to get around it without triggering it?

If you use a narrow angle ultrasonic sensor (yes, they are available in different angle ranges), and the distance it measures is less than the distance to the far wall, then something is between the sensor and the far wall.

Note that ultrasonic sensors work best with hard objects, like walls and furniture, and not so good with soft objects like people and pets.
Logged

Germany
Offline Offline
Full Member
***
Karma: 0
Posts: 214
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

It should be part of a burglar alarm system. This is for a door.
It is very unlikely that people can get around.

I am thinking about this one
http://www.ebay.com/itm/320940785000

idea
« Last Edit: October 06, 2012, 09:31:53 am by karlok » Logged

using Arduino Uno Rev 3

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I dont't think that Ultrasounds are your best bet, I would rather use a laser (any cheap 1$ laser is good) or, simpler, a door magnetic reed switch.
Logged

Phoenix, Arizona USA
Offline Offline
Faraday Member
**
Karma: 36
Posts: 5519
Where's the beer?
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Why not simply use what is used on real alarm systems; that is, a passive IR switch sensor?

http://www.ebay.com/itm/Adjust-Pyroelectric-Infrared-IR-PIR-Motion-Sensor-Detector-Module-New-/140769056656

3.3V TTL output (so some level conversion would be needed); place it in the corner of the room diagonally opposite that of the door, about 10-15 cm below the level of the ceiling and angled down toward the door. It'll cover the majority of the room, and can be made fairly sensitive. Bonus: You can use it when not in alarm mode to automatically turn on and keep lights on while you are in the room (well, until you stop moving - you need to have a delay to check for motion in the room to reset the time-to-live on the lights going out).
Logged

I will not respond to Arduino help PM's from random forum users; if you have such a question, start a new topic thread.

Germany
Offline Offline
Full Member
***
Karma: 0
Posts: 214
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,
thanks for the answers.
@CharlesDomingue: a laser is a nice idea, however I couldnt find one on ebay, maybe because I don't know what to exactly search for.
@cr0sh: Sounds very good, I want to use what is used in real alarm systems. I have some questions concerning this:
There is no manual nor datasheet attached in the ebay auction and it seems that cables need to be soldered because I couldn't see some pins, so I don't know how to attach it to Arduino.
What does TTL output mean? And did I understand it correctly?: Output is as the following: 3.3V = alarm, 0V = normal state.
And how does this "motion detector" work? I think it recognizes the body heat(?)
And.. Is this a safe system?

Thank you
Logged

using Arduino Uno Rev 3

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This system just recognizes motion by reflected ir waves on the subject, and for the laser, any cheap laser pointer would do, example: http://www.ebay.com/itm/Mini-LED-Flash-light-Torch-Keychain-Laser-Pen-PURPL-/190732252540?pt=US_Laser_Pointers&hash=item2c6887357c
You just need a laser pointer and a photoresistor hooked up to an Analog Input and +5v, where you can set the threshold for the ambient light in your program. If you need any help for the program I can help you. But your best bet remains the reed switches, if it's not a big deal to put screws on your door frame...
http://www.ebay.com/itm/White-Door-Window-Contacts-Magnetic-Reed-Switch-Sensor-/350611210023?pt=LH_DefaultDomain_0&hash=item51a20e7f27
Logged

Germany
Offline Offline
Full Member
***
Karma: 0
Posts: 214
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ah ok, now I understand better.

I already have a photoresistor and tried out some circuits.
And my result is, that it is too sensitive to normal sun light difference over the day.
I was told that there were special photoresistors for different types of lights (distinguished by the wave length, e.g. red laser)
Your link is about a PURPLE laser, is there a PURPLE-sensitive photoresistor?
Logged

using Arduino Uno Rev 3

Offline Offline
Newbie
*
Karma: 0
Posts: 12
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is a red laser, it's only the casing that is purple. Also, you can just buy them from a dollar store or whatever... I think that the photoresistor you got is perfect, there is still a difference between a laser beam shining on it and the ambient room light. If you didn't know, a photoresistor just changes the resistance of the current that passes through it depending on the lightning. So if you plug it in +5 volts, and measure the current that is exiting on the other side, by hooking it up to an Analog Input, you can get the quantity of light that is shining of it with digitalRead() function, which outputs a number from 0 (0v of 5v, lot of resistance = lot of light), to 1023 (5v of 5v, no resistance = no light at all) so you can set a threshold, so it takes a lot of light to trigger. To pull this value off,  you can either:

-Hook up a pot that sets that threshold, so you turn it until it only detects the light from the laser beam, ideal if you plan to take it to different places, with more or less lightning for easy adjustment

or,

-Hardcode that value in your code, so it's kind of "permanent" (until you change it in the program). To do so, you send the photoresistor values thru serial and you listen to them while playing around to write down your values.
Logged

Germany
Offline Offline
Full Member
***
Karma: 0
Posts: 214
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello,

because the PIR motion detector is independent of the laser barrier, I already ordered the PIR motion detector. This one is with pins is designed for the use with Arduino.

Can I supply 5V to the 4.5V laser pointer without problems? I tested it with one I have at home, and it worked, will it work again, for longer times?
I read that a reference value for the photoresistor's value should be taken (reference: with normal light (either day or night); and the one the laser lights on). These values can be compared, but how should I compare them? What about: if v1~v2 then alarm, that means if they have circa the same value. I could say "abs(v1-v2 )< 50 then alarm", what about this ? Calibration wouldn't work because the room I am speaking about changes its brightness during the day very much.

Thank you for your help.
Logged

using Arduino Uno Rev 3

USA
Offline Offline
God Member
*****
Karma: 14
Posts: 644
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can I supply 5V to the 4.5V laser pointer without problems? I tested it with one I have at home, and it worked, will it work again, for longer times?
It depends upon the laser unit in question.  Some of them can tolerate the additional voltage without noticable damage or shortened working lifetime, others will have problems in the long run.  The only way to be sure is find-out the ratings for the specific laser you are using.

I read that a reference value for the photoresistor's value should be taken (reference: with normal light (either day or night); and the one the laser lights on). These values can be compared, but how should I compare them? What about: if v1~v2 then alarm, that means if they have circa the same value. I could say "abs(v1-v2 )< 50 then alarm", what about this ? Calibration wouldn't work because the room I am speaking about changes its brightness during the day very much.
A laser shining directly onto the photoresistor should be significantly brighter than even full daylight and/or normal room illumination.  Therefore the threshold will be a much greater voltage than the possible with ambient light no matter what time of day or the amount of ambient lighting.
Logged

Germany
Offline Offline
Full Member
***
Karma: 0
Posts: 214
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Ok, then I will go ahead to buy a laser to use it as a light barrier, because the one I have at home shouldn't be damaged.
I could also create a voltage divider - calculated with this, I'd have: Vin=5,R1=220,R2=1K,Vout=4. That should be ok.
I already also heard, that the batteries are a bit more than 1.5V, maybe 1.6V or 1.7V. A new "1.5V"-battery I measured had a bit more than1.6Volts. That means that 1.6V*3=4.8V should be definitely still in the acceptable range for the laserpointer. Most of them are from China and hence don't have a manual with technical parameters.
Logged

using Arduino Uno Rev 3

USA
Offline Offline
God Member
*****
Karma: 14
Posts: 644
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I already also heard, that the batteries are a bit more than 1.5V, maybe 1.6V or 1.7V. A new "1.5V"-battery I measured had a bit more than1.6Volts. That means that 1.6V*3=4.8V should be definitely still in the acceptable range for the laserpointer. Most of them are from China and hence don't have a manual with technical parameters.
Yes that's very true, and always something to keep in mind when working with batteries. The datasheets always go by a nominal voltage though the "name brands" usually will have plotted voltage curves available as well.  Therefore on any battery powered device design you need to ensure the total voltage of the pack can provide a high enough voltage until the cells are mostly discharged, while making sure fresh batteries won't cause the excessive initial voltage to the device being powered.
Logged

Pages: [1] 2   Go Up
Jump to: