For this dandy little project you'll need:

  • Arduino - I'm using an Arduino Uno
  • a 3 x 4 keypad
  • a 16 x 2 LCD screen
  • a laser module/sensor
  • a light dependent resistor (LDR)
  • a buzzer
  • 3 x 220 ohm resistors
  • 1 x 10K resistor
  • 1 x 10k potentiometer (optional, it's to adjust the LCD screen brightness)
  • an LED
  • and a ton of wires!

Step 1: LCD + Keypad

So, first thing I did was to get the LCD and keypad working together.

For this I pretended that it was some sort of arm/disarm (or entry/exit) thing.

My code for this part is at: http://pastebin.com/YndLneqm.

Getting the LCD wired up was tricky as most wiring diagrams for it don't show the last two pins wired up and these are required for the back light. Check my snazzy Fritzing wiring diagram to see how I wired up my LCD screen, pot (for adjusting brightness) and keypad. The pins for them all are also mentioned in my code.

NOTE: pin 1 isn't used as whenever I wired something to pin 1 I experienced weirdness. Not sure why. I expect it's something to do with the pins data uses?

If you don't have the keypad.h library you'll need to grab it from here: http://playground.arduino.cc/code/Keypad

I did the code right but when I went to download it I got an error message saying failure to comply
Can you paste the exact error message? I'm hoping the error message give some help as to why it didn't compile and work for you.
<p>compilation terminated.</p><p>exit status 1</p><p>Error compiling.</p>
<p>compilation terminated.</p><p>exit status 1</p><p>Error compiling.</p>
<p>Hey,</p><p>Great project... Could you please say how to make the alarm continue to run till a desired time limit even if the laser hits the photoresistor again once its broken and would stop only if the pass code is once again entered.... Thanks</p>
<p>Hi</p><p>Could you run is with the arduin I keypad membrane which has more ports?</p><p>Regards </p>
<p>I just noticed something. The I/O pins on the Atmega328 are rated abs. max. 40mA each. Be careful that the combined current of the LED and laser module does not exceed that. The laser module by itself will draw around 30mA @ 5V, but that is just an estimate and every laser module is a little different. The best thing to do wood bee to take an ammeter and measure the actual current coming out of the pin and adjust accordingly.</p><p>My recommendation for a good, safe, cheap laser module is <a href="http://www.ebay.com/itm/131070411103" rel="nofollow">http://www.ebay.com/itm/131070411103</a></p>
<p>Looks like you ran out of digital I/O pins and had to use A0 as an output. I didn't even know you could do that. Total n00B</p>
<p>Do u have all the correct coding for this arduino project </p>
<p>As far as I'm aware the code is proper and working. I've not had any complaints about it.</p><p>What makes you think the code isn't working properly? Let me know what your version is/isn't doing and I'll look over my/your code.</p>
<p>I think that the code is incorrect. Please, can you sent the correct code?</p><p>david3456@hotmail.es</p><p>Thanks</p><p>PD: I'm not English and i don't speak english very weall</p>
Can you enter a code to disarm it when the beam hasn't been broken to allow access
<p>Yes, you can arm/disarm it at any time. In my code the beeper only sounds when the beam is broken.</p>
<p>Is this programmed with Ubuntu IDE? Just getting started with Arduino and looking for an IDE.</p>
<p>I just used the vanilla Arduino package that's in the repos for programming this.</p><p>sudo apt-get update &amp;&amp; sudo apt-get install arduino arduino-core</p><p>That'll install the lot for you. Good luck!</p>
<p>Very nice, Ronnie. I'll be trying it and staying tuned for more. Thanks. I voted.</p>
Many thanks for the vote.<br><br>If you've got any problems with it drop me a message/email and I'll try and help you.

About This Instructable




Bio: Self-taught part-time artist who paints, draws and doodles.
More by ronnietucker:Go/Baduk/Weiqi Game Board Brewduino Soil/Moisture Detection System 
Add instructable to: