Site Navigation

Your Account

Choose Language

Introduction

Today you will find a Laser module. You will be able to set up a trip wire to let you know if anyone is trying to sneak a peak at the presents!

Tools

No tools required.

Parts

Video Overview

Insert your LDR into your Breadboard.
  • Insert your LDR into your Breadboard.

  • The LDR is not polarised so the orientation of the LDR doesn't matter. Just be sure that the legs are not in the same row. (Note our breadboard is rotated 90ยบ).

Add Comment

Insert your 10k Ohm resistor such that one of the resistor's legs shares a row with one of the legs of the LDR. Your 10k Ohm resistor has the colour bands: "Brown, Black, Black, Red, Brown".
  • Insert your 10k Ohm resistor such that one of the resistor's legs shares a row with one of the legs of the LDR.

  • Your 10k Ohm resistor has the colour bands: "Brown, Black, Black, Red, Brown".

Add Comment

From the row with just the LDR leg put the black jumper wire and run it to GND (ground).
  • From the row with just the LDR leg put the black jumper wire and run it to GND (ground).

Add Comment

From the row where the legs share, use your white jumper wire and insert it into your Arduino's Analogue 0 Pin.
  • From the row where the legs share, use your white jumper wire and insert it into your Arduino's Analogue 0 Pin.

Add Comment

Run a red jumper wire from your Arduino's 3V pin to the other leg of your 10k resistor.
  • Run a red jumper wire from your Arduino's 3V pin to the other leg of your 10k resistor.

Add Comment

Run a red jumper wire from your Arduino's 5V pin to the S leg of the Laser Module.
  • Run a red jumper wire from your Arduino's 5V pin to the S leg of the Laser Module.

Add Comment

Connect the '-' pin to an Arduino ground pin.
  • Connect the '-' pin to an Arduino ground pin.

Add Comment

Plug your Buzzer in so that the positive pin is on the right hand side.
  • Plug your Buzzer in so that the positive pin is on the right hand side.

  • There are markings on the buzzer which indicate the positive and negative pins.

Add Comment

Connect the Digital Pin 9 to the Buzzer's positive pin.
  • Connect the Digital Pin 9 to the Buzzer's positive pin.

Add Comment

Connect the Buzzer's negative pin to ground.
  • Connect the Buzzer's negative pin to ground.

Add Comment

  • Upload this code - now when the laser gets broken the buzzer will go for 3 seconds!

Add Comment

  • Checkout the tripwire in action!

Add Comment

Conclusion

At the end of this guide you will be able to set up a Laser as a trip wire and edit code to change the time it beeps for!

6 other people completed this guide.

Madeleine Schappi

Member since: 09/27/2017

4,527 Reputation

24 Guides authored

Team

Advent Edit Member of Advent Edit

Community

3 Members

24 Guides authored

3 Comments

Where it says: if (ldr_value < 600); it needs to be changed to: if (ldr_value >100); because the laser decreases the LDR value.

Thomas Kitsoukilias - Reply

I found the same value was required see below

if (ldr_value > 100) {

ZoeM - Reply

Yeah, I had the same problem. Thanks. You might say that you have to point the laser at the light sensor. that took me a while. Im not the brightest guy on this.

john Zuill - Reply

Add Comment

View Statistics:

Past 24 Hours: 0

Past 7 Days: 0

Past 30 Days: 5

All Time: 131