{"id":163,"date":"2015-11-16T20:59:21","date_gmt":"2015-11-16T20:59:21","guid":{"rendered":"https:\/\/zhutarduino.wordpress.com\/?page_id=163"},"modified":"2019-10-20T18:29:06","modified_gmt":"2019-10-20T18:29:06","slug":"arduino-laser-tripwire-burglar-alarm","status":"publish","type":"page","link":"https:\/\/thezhut.com\/?page_id=163","title":{"rendered":"ARDUINO laser tripwire burglar alarm"},"content":{"rendered":"<p><iframe loading=\"lazy\" title=\"ARDUINO laser tripwire burglar alarm\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/ok89bI3oqx4?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share\" referrerpolicy=\"strict-origin-when-cross-origin\" allowfullscreen><\/iframe><\/p>\n<p>Lasers are a cheap and easy way to make a ARDUINO laser\u00a0tripwire burglar alarm.\u00a0\u00a0But a word of warning, a laser can blind you if shined in your eyes so do not use this anywhere a child or pet will be able to come in contact with!<\/p>\n<p>The video above will walk you through how this circuit works and how to set it up, Below is the wiring schematic and the ARDUINO ide code for building the project&#8230;<\/p>\n<h2>Parts needed:<\/h2>\n<p>affiliate links:<\/p>\n<ol>\n<li>one <a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=ARDUINO board&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=3d153a884d462b78cd55a271f9bf25a2\" target=\"_blank\" rel=\"noopener noreferrer\">ARDUINO<\/a> board<\/li>\n<li>one <a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=resistors&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=1626689d8b4ee468b2af018560e5b109\" target=\"_blank\" rel=\"noopener noreferrer\">resistor<\/a><\/li>\n<li>one <a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=photoresistor&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=b56273a0b6e9589b62e63c9f72804f6c\" target=\"_blank\" rel=\"noopener noreferrer\">photoresistor<\/a><\/li>\n<li>one <a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=laser arduino&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=3a6ca5f934dcb85b6242c3a878b186ab\" target=\"_blank\" rel=\"noopener noreferrer\">laser pointer<\/a><\/li>\n<li>one speaker or <a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=piezo&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=79c5b41d052952979755524642505b37\" target=\"_blank\" rel=\"noopener noreferrer\">piezo<\/a><\/li>\n<li><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=ARDUINO jumper wires&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=9c58975c9343bb7756a80236e2dc0446\" target=\"_blank\" rel=\"noopener noreferrer\">jumper wires<\/a><\/li>\n<li><a href=\"https:\/\/www.amazon.com\/gp\/search\/ref=as_li_qf_sp_sr_il_tl?ie=UTF8&amp;tag=zhut01-20&amp;keywords=ARDUINO breadboard&amp;index=aps&amp;camp=1789&amp;creative=9325&amp;linkCode=xm2&amp;linkId=b8942a47461ce1b75e8c4bafcc4f2026\" target=\"_blank\" rel=\"noopener noreferrer\">breadboard<\/a><\/li>\n<li>power supply for laser<\/li>\n<\/ol>\n<p>If you don&#8217;t have any of these parts just click on there link to find where to buy them cheap with fast shipping.<\/p>\n<h2>THE SCHEMATIC:<\/h2>\n<p>This schematic is for a ARDUINO UNO but if you use a different arduino board just modify to fit your board..<\/p>\n<p>If you are using a laser pointer or the laser found in the parts description above I recommend adding a 220\u03a9 resistor to\u00a0the pos+ side to\u00a0bring the voltage down to a safe level (under 5 volts), 5 volts will work but it will burn out faster (not last as long)&#8230;<\/p>\n<p><a href=\"https:\/\/thezhut.com\/wp-content\/uploads\/2015\/11\/laser_trip.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-168\" src=\"https:\/\/thezhut.com\/wp-content\/uploads\/2015\/11\/laser_trip.jpg?w=300\" alt=\"laser_trip\" width=\"835\" height=\"640\" srcset=\"https:\/\/thezhut.com\/wp-content\/uploads\/2015\/11\/laser_trip.jpg 1008w, https:\/\/thezhut.com\/wp-content\/uploads\/2015\/11\/laser_trip-300x230.jpg 300w, https:\/\/thezhut.com\/wp-content\/uploads\/2015\/11\/laser_trip-768x590.jpg 768w\" sizes=\"auto, (max-width: 835px) 100vw, 835px\" \/><\/a><\/p>\n<h2>THE ARDUINO IDE CODE:<\/h2>\n<p>void setup() {<br \/>\nSerial.begin(9600); \/\/start serial<br \/>\n}<\/p>\n<p>void loop() {<br \/>\nint light=(analogRead(A0)); \/\/read photo eye<br \/>\nSerial.println(light); \/\/print light value 4 testing<br \/>\ndelay(10);\u00a0 \/\/delay for stability<br \/>\nif (light&lt;600) \/\/check if beam broken<br \/>\n{<br \/>\nfor (int x = 0; x &lt; 25; x++) \/\/set alarm duration<br \/>\n{<br \/>\ntone(2,400,100); \/\/set tone to be played<br \/>\ndelay(200);<br \/>\n}<br \/>\n}<br \/>\n}<\/p>\n<h2>The\u00a0ARDUINO ide\u00a0forever alarm code:<\/h2>\n<p>\/\/ this alarm will not stop until you cut the power or hit the reset button on your arduino..<\/p>\n<p>void setup() {<br \/>\nSerial.begin(9600); \/\/start serial<br \/>\n}<\/p>\n<p>void loop() {<br \/>\nint light=(analogRead(A0)); \/\/read photo eye<br \/>\nSerial.println(light); \/\/print light value 4 testing<br \/>\ndelay(10);\u00a0 \/\/delay for stability<br \/>\nif (light&lt;600) \/\/check if beam broken<br \/>\n{<br \/>\nint x=1;<\/p>\n<p>while (x==1)<\/p>\n<p>{<br \/>\ntone(2,400,100); \/\/set tone to be played<br \/>\ndelay(200);<br \/>\n}<br \/>\n}<br \/>\n}<\/p>\n<p>I hope this ARDUINO laser tripwire burglar alarm tutorial was helpful and if you have any comments or questions about this project please leave them on our Facebook page, also if you want to be notified when new projects and tutorials are uploaded to this website follow us on Facebook.\u00a0 <a href=\"https:\/\/www.facebook.com\/zarduino\/\" target=\"_blank\" rel=\"noopener noreferrer\">OUR FACEBOOK PAGE!!!<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Lasers are a cheap and easy way to make a ARDUINO laser\u00a0tripwire burglar alarm.\u00a0\u00a0But a word of warning, a laser can blind you if shined in your eyes so do not use this anywhere a child or pet will be &hellip; <a href=\"https:\/\/thezhut.com\/?page_id=163\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":10,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":"","_links_to":"","_links_to_target":""},"class_list":["post-163","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/163","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thezhut.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=163"}],"version-history":[{"count":3,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/163\/revisions"}],"predecessor-version":[{"id":1496,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/163\/revisions\/1496"}],"up":[{"embeddable":true,"href":"https:\/\/thezhut.com\/index.php?rest_route=\/wp\/v2\/pages\/10"}],"wp:attachment":[{"href":"https:\/\/thezhut.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=163"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}