Laser Beam Interruption Detection

Introduction

This experiment demonstrates how to detect the interruption of a laser beam using a photodiode and an Arduino.

Laser Beam Detection

Components Needed

Circuit Setup

  1. Connect the photodiode or phototransistor to an analog pin on the Arduino (e.g., A0).
  2. Place the laser pointer and sensor so that the laser beam hits the sensor.

The sensor detects changes in light intensity when the laser beam is interrupted.

Laser Beam Circuit Setup

Code for Laser Beam Interruption Detection

Upload the following code to your Arduino to detect the interruption of the laser beam:


const int sensorPin = A0;
int sensorValue;

void setup() {
  Serial.begin(9600);
}

void loop() {
  sensorValue = analogRead(sensorPin);
  if (sensorValue < 100) {
    Serial.println("Laser Beam Interrupted!");
  } else {
    Serial.println("Laser Beam Intact");
  }
  delay(500);
}
            

Explanation

The photodiode detects the laser light, and the Arduino reads the intensity. When the laser beam is interrupted, the intensity drops, and the Arduino triggers a detection message.

Troubleshooting