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!