Simple Laser Tripwire

Introduction: Simple Laser Tripwire

This is a tutorial for a small laser trip wire to keep things safe.

Things you will need



10k ohm resistor

pk buzzer

laser pointer

soldering iron and soldering

an arduino and a bread board

Use the fritzing diagram above for assisstance

Step 1: Step 1

Solder together the 10k ohm resister and the photo-sensor so they can fit in the same hole in the bread board.

Add them to the bread board

Step 2: Step 2

connect more wires and you can calibrate the photo-sensor with the following code

void setup() {
pinMode(4, OUTPUT);



void loop(){

digitalWrite(4, HIGH);



more details here:

Step 3: Step 3

The final bit of code to activate the alarm

int buzzPin = 11;

// buzzer connected to digital pin 11
void setup() {

pinMode(buzzPin, OUTPUT); // sets the digital pin as output }

void loop(){

if(analogRead(0) < 850){ // this number depends on calibration of the photocell

digitalWrite(buzzPin, HIGH); // turns buzzer on

delay(1000); // waits for 1 second

digitalWrite(buzzPin, LOW); // turns buzzer off

} else{

digitalWrite(buzzPin, LOW);



Be the First to Share


    • Puzzles Speed Challenge

      Puzzles Speed Challenge
    • "Can't Touch This" Family Contest

      "Can't Touch This" Family Contest
    • CNC Contest 2020

      CNC Contest 2020



    5 years ago