You might have seen this quite often in sci-fi movies: a group of special agents passing a laser maze vigorously, as agile as a cat. Touching or stopping any of the beams will causes alarm and the whole plan will be spoiled, just like the picture shown in figure 1. In this tutorial I will show you how to DIY a simple laser alarm system using TI Launchpad and a set of laser switch. The time laser beam is blocked, the buzzer will ring and the LCD displays real-time message to notify the owner. With different components and add-ons, you can also create your own system as you wish, anywhere you want! So, let’s get started!
What you will need:
1. Connecting the parts:
First you need to plug the IO expansion shield on the MSP430G2553 board, and then connect the expansion board, Buzzer Module, Laser Photoelectric Switch Module and the LCD screen. Attach the buzzer on to the digital pin 2_5 on the expansion board. Then attach the Laser Photoelectric Switch on the digital pin 1_5. Remember that the black wire means the ground, red for the power, green for the digital signal and blue for the analog. Be careful when connecting.
A description of I/O Expansion Shield for Launchpad V1 (DFR0257) is shown in figure 2.
Finally, plug the peripherals switch as shown in figure 3.
OK, here is the final effect as shown in figure 4:
In this tutorial we will only use the energia 0101E0009 as our writing software. You can download it from the official web site of TI. And we will use three extra libraries in total, one is for the LCD screen, another is for the Buzzer module and the left for the laser photoelectric switch. You can download it from the wiki page of each product.
After downloading the libraries, you need to put the library files into your “energia/libraries” folder. After doing this, you can open the energia IDE and click on the “Sketch-Import Library” to check if you have setup the library successfully.
Programming as shown in figure 5?
Above are the main steps I did to make a laser alarm. With some other add-ons you can do anything you want, e.g. adding like spraying devices so that those who blocks any beam get sprayed with water or …well, depending on your imagination. All right. Thanks for reading and enjoy making!