Simple Laser Alarm system

Discussion in 'The Projects Forum' started by Shagas, Aug 6, 2013.

  1. Shagas

    Thread Starter Active Member

    May 13, 2013
    802
    74
    Hello again!

    So ,

    After having my bike stolen from my back yard I've decided to make a simple laser alarm system where the alarm will be triggered if the beam is broken .
    I've confirmed that thieves have been visiting my backyard even after my bike was stolen and probably before that ( the gate was open in the morning after being surely closed at night ) so I've decided to take action .

    There are two entry points to my backyard , and I want to place 2 IR beams on both points , but for start I will only make one beam . I will leave the project compatible for a future second beam .

    I've enclosed a complete diagram of the system I am planning to make.
    You are free to comment /ask questions / suggest improvements / Ideas to my awesome design.

    **********

    Functionality :

    The way this is going to work is that I will be sending an 808nm IR beam from one side of the yard to the other where an 808nm sensor will be placed ( a distance of about 8 meters).
    When an unwelcome visitor breaks the beam by physical obstruction , the micro will turn on the amplifier which will emmit an alarm siren implemented ( I hope I'm using this word correctly) by a square wave generator modulated by a fixed low-frequency sin wave generator . I am thinking of using a 555 or another circuit for the square wave and a simple phase-shift osc for the sin wave modulation . I will probably be using a JFET optocoupler as a variable resistor for the modulation
    I was actually thinking of doing the alarm signal with PWM from the micro
    but I want to have an equal share of Analog/digital in this project simply for educational value so I went with an analog OSC.
    When the beam is Broken , The alarm will wail for about 10 seconds . Hopefully that will scare these a**holes away and leave my back yard alone.

    Intricacies:

    The project is not going to be automatically timed , but will be switched on at night manually.
    Also , I want the alarm to trigger only if the beam has been broken for at least a certain period of time , perhaps 20-60 ms so that it is not accidentally triggered by very large insects or a Bat(yeah yeah , it's improbable but still) or a flicker on the laser side of things.


    Questions:

    - I'm planning to use external interrupt pins for the Laser sensor , so how
    would I go about programming the interrupt so that it triggers the alarm only after the beam has been broken for a certain amount of time ?
    Im guessing I would use a level interrupt where I would increment a variable in the ISR and the alarm function would be called after the variable reaches a certain value hmm?
    If anyone can provide some ideas or maybe even pseudocode , I'd appreciate it . (i'm not that familiar with interrupts on MCU yet )

    - The reason I am only going to put 1 sensor for now is because the other one would be pretty far from the MCU to link it by wire . How could I do it wirelessly? I've seen some cheap wireless digital signal transfer RX/TX modules suggested on this forum in the past .

    - What sensor should I use for the laser detection ?
    I'm planning to go with a small thingy like this :
    http://www.gme.cz/l-np-3c1-p520-014
    I'm not sure what to call that thing(phototransistor ? ) but i've worked with it in the past and know how to wire it up.
    The issue is that I need a bigger surface area , otherwise it's going to be difficult aiming the laser at the thing. Any suggestions?

    Thanks in advance for the help!
    laseralarm.png
     
  2. wayneh

    Expert

    Sep 9, 2010
    12,140
    3,054
    I'd consider a camera like hunters use to catch things going bump in the dark. Deterrence is one thing, justice is another.
     
  3. Shagas

    Thread Starter Active Member

    May 13, 2013
    802
    74
    Well yeah....Maybe in the future , but for now I decided to put the skills that I've learned in the past year and make something practical out of it.

    Ofcource justice would be sweet but I'm going to have to settle with Deterrence on this one ...at least for now.
    Besides , even with a good shot of the culprit it would not be easy to track them .
    I doubt the police would apply Face- recognition software database searches for something petty as this
     
  4. blueroomelectronics

    AAC Fanatic!

    Jul 22, 2007
    1,758
    98
    A better bike lock might help, or bring the bike inside.
     
  5. wayneh

    Expert

    Sep 9, 2010
    12,140
    3,054
    You should also definitely watch this video. Imagine your thieves as the cats.
     
  6. Shagas

    Thread Starter Active Member

    May 13, 2013
    802
    74
    Yes I'm an idiot for leaving the bike outside . I've told myself and been told that many times .
    The bike is gone now so...too late for that .
    The point of this project is for unwanted visitors not to enter my backyard in general , also to put to use what I learned about the AVR so far
    so is there any advice you can give me on those coding issues concerning interrupts? :)
     
  7. RichardO

    Well-Known Member

    May 4, 2013
    1,235
    384
    The 20 to 50 mW LASER you show in your block diagram is _quite_ dangerous. A LASER pointer is limited to less than 5 mW. I believe that the invisible IR needs to be even lower power since the eye will not know that it is being damaged -- there is no reflex action such as closing the eye or looking away from the beam.

    You need to modulate the beam to reject ambient light. This is typically done at about 40 KHz. There are many modules available to receive the modulated beam. The modulation can be done with a 555 timer.
     
  8. Shagas

    Thread Starter Active Member

    May 13, 2013
    802
    74
    :D , had some giggles there .
    There is one main reason why I didn't consider a PIR and wen't for a laser beam
    (at waist hight!!! ) instead:

    ----> Cats! < -----

    I don't want the alarm going of with every cat strolling across my yard.
    Fortunately for me I haven't had cat urine problems yet .
    But I could hook up a sprinkler ... although considering my malice I would probably load the hose with acid instead of water
     
  9. Shagas

    Thread Starter Active Member

    May 13, 2013
    802
    74
    Yeah you are right , I'm going to try to get something less than 10mW .

    The system is going to be turned on at night so there is almost no ambient light.
    That won't be a problem anyway since i'm planning to make a trigger circuit on sensor so it Hard-triggers once a certain lumination threshold is passed and since I am using a laser beam I can make that threshold very high , so that even on very bright moon evenings it won't come close to keeping the sensor high in the event of a broken beam path
     
  10. Shagas

    Thread Starter Active Member

    May 13, 2013
    802
    74
    Also , there wouldn't be any noise issues in using an SMPS through a 5v regulator for the Micro would there?
    I haven't built/tested an SMPS myself , but I've heard that they are not used for analog circuitry due to their noise .
     
  11. doovalacky

    New Member

    Jul 18, 2013
    9
    0
    Just one comment I will make. With security alarms single beam IR detectors give a lot of false alarms even over 8m. Its a lot better with dual beam spaced about 200mm vertically. You will be surprised how often bugs etc fly in front of the receiver.
     
  12. RichardO

    Well-Known Member

    May 4, 2013
    1,235
    384
    You could use a retro-reflector (think bicycle reflector) to fold the beam back from the far point of its path. The reflector would be at the same place that you were planning on installing the transmitter.

    Even though this would double the distance the beam travels, the transmitter can then be in the same box with the receiver all of the other electronics.
     
  13. Shagas

    Thread Starter Active Member

    May 13, 2013
    802
    74
    Hmm yes I thought about this and I am going to test it before finalising it .
    I'm planning to give the beam a 20-50 ms (depending on tests) breaktime before triggering alarm . Also I was thinking of defocusing the beam to make it have a larger diameter , and I'm going to use a more powerfull laser
     
  14. Shagas

    Thread Starter Active Member

    May 13, 2013
    802
    74
    I see what you mean , but the first issue is the double distance and the second issue is that I was planning to connect both beams to one central unit and the second beam is going to be on the other side of the house so the only way to link it is wirelessly.

    I'm planning for the sensor to be on the side where the electronics are going to be and the laser is going to be on the other side independantly connected . That is going to be done to avoid needing to use a reflector

    Thanks for the suggestion though , I might need to use it
     
  15. jinbtown

    New Member

    Aug 11, 2013
    5
    0
    might want to consider something like garage door opener safety sensors. It'd be an ultra simple retrofit with components already built. I believe they have something like a lens that widens things out a bit - at least based on adjusting mine, it seems to have a fairly wide range, ie doesn't need to be pointed exactly at it. One side takes power, one side sends signal
     
Loading...