arduino laser trip wire project - · pdf filearduino laser trip wire project by troy cole, tim...

8
Arduino Laser Trip Wire Project By Troy Cole, Tim Henderson, Caren Khachik, Frank Cole In this photo our Arduino Uno open source software laser tripwire is shown. The circuit consists of 1 10k ohm resistor, 1 Arduino Uno board r3, 1 solder less breadboard, 3 LEDs 20Ma, 3 270ohm resistors, 1 3k- 100k photocell resistor LDR. Basically this Arduino laser tripwire device allows George to be notified of a customer entering the lobby so he can have peace of mind watching his DVDs and listening to music. The main piece of more or less advanced technology

Upload: trinhduong

Post on 22-Feb-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Arduino Laser Trip Wire Project - · PDF fileArduino Laser Trip Wire Project By Troy Cole, Tim Henderson, Caren Khachik, Frank Cole In this photo our Arduino Uno open source software

Arduino Laser Trip Wire Project

By Troy Cole, Tim Henderson, Caren Khachik, Frank Cole

In this photo our Arduino Uno open source software laser tripwire is shown. The circuit consists of 1 10k ohm resistor, 1 Arduino Uno board r3, 1 solder less breadboard, 3 LEDs 20Ma, 3 270ohm resistors, 1 3k- 100k photocell resistor LDR. Basically this Arduino laser tripwire deviceallows George to be notified of a customer entering the lobby so he can have peace of mind watching his DVDs and listening to music. The main piece of more or less advanced technology

Page 2: Arduino Laser Trip Wire Project - · PDF fileArduino Laser Trip Wire Project By Troy Cole, Tim Henderson, Caren Khachik, Frank Cole In this photo our Arduino Uno open source software

used was the Arduino board and we used it for its timer reset capability along with its environment inputs and outputs.

Basically the tripwire device uses a beam of light that focuses on the light dependent resistor when that light is interrupted aka the wire gets tripped it turns on a light notifying George that there is a customer in the lobby.

The tools required for this project were

A pair of needle nose pliers

Super glue

Wire cutters

Wire strippers

Soldering iron

Non Tripped state

Page 3: Arduino Laser Trip Wire Project - · PDF fileArduino Laser Trip Wire Project By Troy Cole, Tim Henderson, Caren Khachik, Frank Cole In this photo our Arduino Uno open source software

In this photo you can clearly see the undisturbed beam of light in the box allowing the red led on the breadboard to be on for our non tripped state

Tripped State

In this photo you can clearly see the beam of light to the LDR is interrupted causing the green LED to light signaling George of a customer.

Page 4: Arduino Laser Trip Wire Project - · PDF fileArduino Laser Trip Wire Project By Troy Cole, Tim Henderson, Caren Khachik, Frank Cole In this photo our Arduino Uno open source software

Schematic

In this image you can clearly see the schematic layout of both circuits the LED1 laser circuit and the Arduino input output LDR circuit.

Page 5: Arduino Laser Trip Wire Project - · PDF fileArduino Laser Trip Wire Project By Troy Cole, Tim Henderson, Caren Khachik, Frank Cole In this photo our Arduino Uno open source software

Bill of Materials

Component Description

LED1 20mA Light Emitting Diode(laser)

R3 270 ohm resistor

V1 9v Battery

LDR1 10k-100k ohm

LED3 20mA Light Emitting Diode(red)

LED2 20mA Light Emitting Diode(green)

R2 270 ohm resistor

R1 10k ohm resistor

10150-1017-ND Arduino Uno

---- Solderless breadboard

---- Jumper Cable

---- Cardboard box(any size)

---- Heat Shrink Tubing(optional)

Sourcing Information

Page 6: Arduino Laser Trip Wire Project - · PDF fileArduino Laser Trip Wire Project By Troy Cole, Tim Henderson, Caren Khachik, Frank Cole In this photo our Arduino Uno open source software

All the materials used in this project can be purchased at your local electronics store but of course these resources are not available to him so we recommend ordering these parts at www.frys.com or www.mouser.com/electronicparts. The components to replicate this set up is would priced at around one hundred dollars with the Arduino Uno being the majority of the cost at forty-fifty dollars.

Step by Step Instructions

In our setup, our enclosure was a cardboard box to simulate two different rooms; one with George being unable to visually see or hear people enter his hotel and the other room being the waiting room where customers come and check in.

1. First step is to set up the breadboard to mimic the middle portion of the schematic in between the Arduino Uno and LED1/R3. After completing the setup place it aside for later.

2. Second step is to setup up the enclosure for our components. Puncture two holes into the box with the first hole in the center of one side of the box and the other hole opposite to the first hole.

3. Third step is set up LED1/R3 portion of the schematic. Grab one of the LED’s to act as your laser and place it through one of the holes in our enclosure with the output on the inside of the box and the leads of the LED pointing outside. Next solder the resistor R3 to the positive lead on the LED and connect the free end of the resistor to a 9 V power supply via solder. Solder the ground ends of the LED and power supply together to complete the circuit and done. In our setup we used Heat shrink to cover our solder joints but this is completely optional.

Page 7: Arduino Laser Trip Wire Project - · PDF fileArduino Laser Trip Wire Project By Troy Cole, Tim Henderson, Caren Khachik, Frank Cole In this photo our Arduino Uno open source software

4. Next step is to set up the free hole of the box with light depend resistor (LDR) as to complete the trip wire portion of the project. Push the LDR into the hole of the box so that the leads of the LDR stick outside the box.Use the jumper cables to extend the connection of the leads so that a bridge between the solderless breadboard and the LDR can be made easily. Proceed to step 5.

5. Now our last step is program the Arduino Uno to perform the behavior switch LED’s for when the laser wire is “tripped”. Copy and paste the given sketch from above, and then connect the jumper cables from Arduino Uno to the breadboard as to mimic the schematic above and the set up is complete. Connect a power supply to the Arduino via computer or by connecting a 9 V battery to “VIN” on the Arduino Uno with positive lead of the battery and connect the ground wire to “GND” on the Arduino Uno and that completes it.

Closing Paragraph

The project could have been improved by implementing some sort of alert other than light. Sound was considered initially but was ruled out due to the scenario in which George had headphones on and would not be able to hear the signal, but the maybe a better a sensor would be to use the entrance matt as pushbutton to remote trigger a device George carries on him at all times that either emits sound or vibrates. This idea would entail the use of a remote device to accomplish this feature.

Page 8: Arduino Laser Trip Wire Project - · PDF fileArduino Laser Trip Wire Project By Troy Cole, Tim Henderson, Caren Khachik, Frank Cole In this photo our Arduino Uno open source software

const int LEDone= 8; Arduino Sketchconst int LEDtwo= 7; int threshold = 0; void setup() { pinMode (A0,INPUT); pinMode(LEDone, OUTPUT); pinMode (LEDtwo, OUTPUT); threshold= analogRead(A0); }

void loop() { threshold= analogRead(A0); if (threshold < 750){ analogWrite(LEDone, 255); analogWrite(LEDtwo,0); delay(5000); analogWrite(LEDone,0);

} else { analogWrite(LEDtwo,255); } }