An arduino that runs a simple sketch can become a laser security system. The hardware is pretty easy.
Like this:
Like Loading...
Step #1: Make the connections
Next
- Use the breadboard (or protoshield) to connect one leg of the photoresistor to Analog Input 0, and the other leg to +5v. Then, take the 10K resistor and connect one leg to GND (ground) and the other to Analog Input 0. Also, I wired an LED to Digital I/O pin 13 to show when the laser beam is broken. Hook the negative end of the LED to ground as well.
Step #2: Set up the laser
Next


- Remove the end cap and take out the batteries. Inside, there should be a spring, connect one of the alligator clips to this spring. Most laser pointers have a completed circuit when the end cap is on, so connect the other alligator clip to some metal on the actual metal housing of the laser pointer. Connect one of the alligator clips to GND, and the other to digital I/O pin 4. Finally, you can use tape to secure the button down, so the laser pointer is always on.
Step #3: The program
Next
- Copy and paste this into the IDE:
- void setup() { pinMode(4, OUTPUT); pinMode(13, OUTPUT); } void loop(){ digitalWrite(4, HIGH); if(analogRead(0) < 750){ digitalWrite(13, HIGH); } else{ digitalWrite(13, LOW); } }
- Then click upload.
Step #4: Test n' troubleshoot



- Run the program and see how it goes! When the laser is hitting the photoresistor, the LED is off. When the laser isn't hitting the photoresistor, the LED is on. Troubleshooting: First off, you have to make sure that the laser pointer is on. If it is not, check the following: -That the on button really is on. -That you didn't connect the alligator clips the opposite way they should be. To fix this, change one from GND to Pin 4, and the other from Pin 4 to GND.
- There are other things you can do to change it up a little bit. You can add a 3 volt siren instead of the LED or use a 3 volt wireless transmitter to make an alarm on your phone or whatever you want. Happy Making!
You must have hooked up something wrong. Try using a protoshield if you don’t have one. If something is still wrong, try switching things untill it works.
I had now re-uploaded photos that were high quality. I hope it is better! P.S. Satisfied now?
I had put new pics in on March 28th, 2012.
I think it would be possible, you’d just have to figure it out.
P.S. It’s arduino.
// What's Trending
Raspberry Pi Design Contest
Teardrop Camper Trailer
Dad Builds Son an Iron Man Arc Reactor
Seventeen Sneaky Secret Hides
What to do with an 800 Lb Eucalyptus Slab
10 Things to Connect to Your Raspberry Pi
Farm Drones Take Flight
What does this 2×6 have to do with Father’s Day?
// What's Shared
A better way to slice a pumpkin
DIY Nerf Darts
100 Dollar Store Organization Ideas for Craft Rooms and Beyond
In the Maker Shed: Minty Boost USB Charger
Mad’s Mouse House
Lace Princess Crowns
I Have a (Puzzling) Dream
Play the Rings of a Tree Trunk Like a Record
// Most Commented
Plastic Bags into Plastic Blocks: Revisited
10 Hot New Boards to Watch
Why the Maker Movement is Here to Stay
MAKE Asks: Roadside Hacks
DIY Hacks & How To’s: Convert From Battery Power to AC
Ten Tips for Hand Saws and Blades
How To Make Your Own Laundry Detergent
Watch This Apartment Building on Governors Island Go “Boom!” and Implode
Trending Topics
Get our Newsletters
About Maker Media
Subscribe
to MAKE!
Get the print and digital versions when you subscribe