Twittering Laser Tripwire with Webcam Capture

PrintPrint PDF FacebookFacebook TwitterTwitter Send this to a friendE-mail
by action_owl
 

introTwittering Laser Tripwire with Webcam Capture


This instructable will show you how to construct a laser tripwire that can twitter and grab an image from a webcam, as well as execute any command you can put in a bash script.
This instructable is actually quite simple and is even suitable as a beginner arduino project. It requires a GNU/linux (or possibly Mac) operating system with the arduino IDE and Processing IDE working properly. This project could also be implemented in Windows if you created a more complex processing application.



Hardware Requirements
Arduino Board
Laser pointer/pen
Light Dependant Resistor
100Kohm Resistor

Optional:
  Webcam
  Breadboard


Software Requirements
Arduino IDE
Processing IDE
Linux OS (I'm using Arch Linux for this project)
Curl
Webcam (part of xawtv)


Other Stuff:
Mirror
Solder and Soldering Iron
Wire
Hot Glue Gun
Hacksaw/Knife
Straw or Ballpoint Pen
Twittering Laser Tripwire with Webcam Capture
PIC_0192.JPGPIC_0138.JPG
arduino.pde359 bytes
twitter.trip270 bytes
 
Remove these adsRemove these ads by Signing Up.
 

step 1Connecting The LDR

 
I needed the LDR and the laser to be in a position where they would not move around so I connected my LDR and resistor directly to the Arduino without a breadboard, but you can do it however you like, below are the photos for soldering and bending them into shape I also included a simple diagram.

I cut the end off of a ballpoint pen so that I could slip it over the LDR to prevent ambient light from affecting the reading, you could also use a straw.
Connecting The LDR
PIC_0156.JPG1.JPG2.JPG3.JPG4.JPG5.JPG7fin.JPG6fin.JPGPIC_0157.JPGdiag.pngPIC_0159.JPGPIC_0161.JPG
To Download the PDF or View All Steps,   
Become a Pro Member »
35 comments
Aug 4, 2010. 3:07 AMcarboman says:
Cool and awesome!! I would be tempted to just hook the ldr to my joystick port and cut out the arduino.. I would use freebasic to get info from the joystick port and then call twidge to do the twitter via the shell. Probably use an antique computer running Debian to do all this.
Jul 4, 2010. 3:29 PM_soapy_ says:
Looking at this, and your tweets, either you are working really late, or a 5am badger or moth is messing your sensor up. Might I suggest a small delay in the code so it triggers after (say) 1/4 of a second?
May 10, 2010. 11:20 AMstanuszekj says:
the ohms resistor is 100K about the LDR radioshack does not have them in stock throughout there website chain
Jan 26, 2010. 1:04 PMsardines454 says:
I can't seem to download the files in your 'ible.  Every time I click the link it downloads a file with some wierd name and a .tmp extensions.  Do you have anywhere else that I could download the code from?
Apr 12, 2010. 2:32 PMJunkyard John says:
I've had this problem before. Just rename the file to the extension you need. SIlly instructibles.com
Jan 19, 2010. 4:48 PMyosama101 says:
How do you open the twitter.trip file? and Im having a bit of trouble with your instuction, like the code.
Feb 2, 2010. 4:48 PMyosama101 says:
Oh, I dont need this anymore. I did it for a school assignment. It ended up not working, BUT we got an 85% on it, which is good lool for it not working lmao.
Jan 7, 2010. 2:17 PMcoolio49085 says:
1+ for Django
Jan 7, 2010. 1:40 PMAlpvax says:
could require alot of code editing, (i dont know as im not an arduino user, although this could convince me otherwise) but could it be linked with just a webcam and used as an intruder alert, getting the webcam to photograph whoever entered your room??

awesome 'ible
Jan 7, 2010. 11:35 AMjridley says:
Wouldn't it be more useful to use an infrared laser?  The red laser is too easy to notice.
Jan 5, 2010. 7:50 AMyosama101 says:
How sensitive does the LDR have to be? WHat were the specifications of the LDR you used?
Jan 4, 2010. 6:50 AMrenehug says:
Thanks for posting this here! Do you have any idea what range you can cover with this setup?
Jan 4, 2010. 4:29 PMt4kitty says:
can you follow these steps on window

Jan 4, 2010. 7:01 PMt4kitty says:
windows*
Jan 4, 2010. 3:36 PMBuzzsushi says:

do you have like a radioshack part number for the LDR?
And how many ohms is the resistor?

Jan 3, 2010. 8:41 PMdanahyatt says:
Nice project. I want to try this one for my first. Where do I purchase the Arduino? I will mount the laser like in the plans. Can you expand on how you used the webcam, zawtv? Perfect choice of linux arch for the os.
Jan 4, 2010. 11:01 AMdanahyatt says:
I am purchasing the "Aruuino USB Board" from sparkfun, is this the right one?
Jan 4, 2010. 10:36 AMdanahyatt says:
Printed my parts list and read Arch Linux wiki & forums plus watched few Youtube how to build the Arch Kernel. Will order Arduino today from sparkfun.com.  Thanks!
Jan 13, 2010. 8:17 AMnetgrazer says:
Build a kernel? I'm not sure about Arch Linux, but I never had to mess with anything like that on Ubuntu. Painless installation, works "out of the box".
Jan 4, 2010. 9:00 AMand-reas says:
Damn, this is so awesome! Maybe I'll be buying myself an Arduino for my birthday soon..
Jan 3, 2010. 11:57 AMmrmath says:
What's the twitter link?  I tried arduinotripwire (from the video), but it couldn't find it.
Jan 4, 2010. 4:27 AMmrmath says:
I don't know if you know about it, but you can upload pics to twitpit.com under your twitter account, and then link to them in twitter.  Since I know NOTHING about arduino (including how to spell it), I have no idea how hard it would be to get the pics from the tripping up and linked to the twitter.  But, there's my thought.

Are you planning on leaving it running?
Jan 4, 2010. 5:12 AMFred82664 says:
Nice stack of books toped off with Fedora and RHE . oh and cool ible
Jan 3, 2010. 3:17 PMxtremd says:
 I think this qualifies as awesome.... Good work!
Jan 3, 2010. 12:59 PMiBurn says:
So those thirty seconds it took me to subscribe to you, well worth it. ;D
Jan 3, 2010. 12:47 PMSaskView says:
Very cool.  Lots of uses for this!
Jan 3, 2010. 11:10 AMAngryRedhead says:
Clever and devious!