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!
Inspired by action_owl's version at instructables, Sylvia and I made up our very own version with audio feedback for calibration, and authentic alarm sounds!
Get the code at Github to copy and paste into your Arduino IDE right here!
More instructions, build details and the like to be updated after our Demo today.
Update: Alrighty, so our demo didn't go quite as planned, with our cheap laser diode falling to pieces during 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!
As the code explains hints at, for this build you only need a few things:
- An Arduino (any version will do)
- A small cheap red laser diode (a small laser pointer will do)
- A small piece of mirror, or something else flat and reflective
- An infrared LED from a remote control (or something else to sense the light from the laser)
- and last but not least, a speaker (if you want a noisy alarm)
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.
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!
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!
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 :)
Leave a comment if you've got questions! Thanks!
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.