Sylvia's Super-Awesome Maker Show! - cookies http://sylviashow.com/tags/cookies en BAMF Demo: Arduino Laser Tripwire http://sylviashow.com/blog/techninja/2011/05/22/bamf-demo-arduino-laser-tripwire <div class="field field-name-body field-type-text-with-summary field-label-hidden"><div class="field-items"><div class="field-item even" property="content:encoded"><p>At Bay Area Maker Faire (BAMF) 2011 (and now at Maker Faire KC) one of our demos is how to build your very own laser tripwire to help guard your room!</p> <p>Inspired by action_owl's version at <a href="http://www.instructables.com/id/Twittering-Laser-Tripwire-with-Webcam-Capture/">instructables</a>, Sylvia and I made up our very own version with audio feedback for calibration, and authentic alarm sounds!</p> <p><a href="http://sylviashow.com/sites/default/files/post-images/Dadmin/tripwire_0.JPG" class="yoxview_thumbnail"><img class="post-img-c" typeof="foaf:Image" src="http://sylviashow.com/sites/default/files/styles/blog_large/public/post-images/Dadmin/tripwire_0.JPG?itok=DYqMXavk" alt="The ALTAlarm inside a mint tin" title="The alarm consists of an arduino, a small red laser diode, an IR led (from a remote) and a speaker" /></a></p> <h2><a href="https://github.com/techninja/ALTAlarm/raw/master/Laser_Tripwire.pde">Get the code at Github to copy and paste into your Arduino IDE right here!</a></h2> <p>More instructions, build details and the like to be updated after our Demo today.</p> <hr /><p>Update: Alrighty, so our demo didn't go <em>quite</em> as planned, with our cheap laser diode falling to pieces <em>during</em> the presentation, but we did our best with what we had. We're quite sure that with more time we'd have had everything working great! Not that it matters to much, as there's always time for you to get out there and try it yourself!</p> <p>As the code explains hints at, for this build you only need a few things:</p> <ul><li>An Arduino (any version will do)</li> <li>A small cheap red laser diode (a small laser pointer will do)</li> <li>A small piece of mirror, or something else flat and reflective</li> <li>An infrared LED from a remote control (or something else to sense the light from the laser)</li> <li>and last but not least, a speaker (if you want a noisy alarm)</li> </ul><p>For the code as it stands, plug your laser's positive lead into pin 13, one lead of the speaker into pin 10, and the positive lead of the LED into analog pin 0. All the other leads go to ground. When powering up, the laser gets ~3volts from pin 13, which should be enough to light it and send it's photons off toward the mirror, where they will bounce off. If aimed correctly they should find their way back to the infrared LED.</p> <p>When infrared light hits the LED, it sends very tiny (but measurable) voltage back through to analog pin 0. On our LED, this was read at around 115, or about 0.5v. Without the laser, this came down below 100 reliably, so we set the alarm threshold at 95. If the LED's value stays above that number for more than 5 seconds, the alarm is considered "Armed" (it gives a nice beep every second to let you know, then a double beep when it's armed). If the beam is broken (and the LED value drops below the threshold), Woop woop! Alarm!</p> <p>A serial signal is sent at the same time, and if you have a program on a computer listening for this, you can trigger any action you want! Maybe a twitter message for every intrusion, or perhaps an email or text message silently alerting you!</p> <p>We may just want to go ahead and do a quick video on this cool little project in a bit, with all the bugs worked out this time :)</p> <p>Leave a comment if you've got questions! Thanks!</p> <p>Update: For our Maker Faire KC demo, we took out the middle man mirror and replaced the Arduino powered laser diode (which gave us problems galore!) with a simple laser pointer pointed directly at the LED. This is an invisible modification and doesn't require any code change, so you can make yours either way. </p> </div></div></div><div class="field field-name-field-tags field-type-taxonomy-term-reference field-label-above"> <h3 class="field-label">Tags&nbsp;</h3> <span class="field-items"> <a href="/tags/arduino" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Arduino</a>, <a href="/tags/build" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">build</a>, <a href="/tags/cookies" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">cookies</a>, <a href="/tags/laser" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">laser</a>, <a href="/tags/away" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">away</a>, <a href="/tags/maker-faire" typeof="skos:Concept" property="rdfs:label skos:prefLabel" datatype="">Maker Faire</a> </span> </div> Sun, 22 May 2011 17:16:11 +0000 TechNinja 29 at http://sylviashow.com http://sylviashow.com/blog/techninja/2011/05/22/bamf-demo-arduino-laser-tripwire#comments