Arduino IR Beam Test

A few of our members recently made a bus walking bus walking trip out to Maplin Electronics here in Galway to source some electronics. A few months ago I purchased a Velleman solder-it-yourself clapper kit, which I subsequently plugged into an Arduino and had some fun with. After picking up some resistors, piezos and other bits n’ bobs, I took another look at the solder-it-yourself section for some inspiration. I came across something which tickled my hackery-fancy, an “IR Light Barrier”, again from Velleman.

The basic principle is the following: Two PCBs, one with the sole purpose of illuminating two IR LEDs, the other having a photo transistor and a fairly large buzzer. Place the two boards across from each other, break the IR “beam” between the IR LEDs and photo transistor and the deafening buzzer starts sounding. Belated apologies to those across the road in John Mulholland.

So in a typical maker reaction, my thoughts were, “Well that sucks”. So I ripped out the buzzer, placed two wires on the PCB contacts and plugged them into my Arduino microcontroller:

What I now have is a brilliantly useful and marvellously simple security system. My next step is to hook up the Arduino code to the Twitter API and have it tweet a message every time the beam is crossed.

INTRUDER ALERT!

Author: Aaron Hastings

Aaron is an 18-year old IT student at NUI Galway. He is a dedicated computer nerd and a massive Star Trek fan. He considers himself a recovering Windows user, having recently switched to Ubuntu 10.04 and hasn't looked back. His other interests include playing tennis and watching television and movies. He loves college life and socializing with friends, be it out on the town or in a smelly student apartment. You can follow Aaron on Twitter @thecosmicfrog Aaron's blog can be read at: http://www.aaronhastings.ie

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>