arduino PIR MOTION ALARM 4×4 Keypad

arduino PIR MOTION ALARM
Hello world! Today i made a simple and very cheap to build arduino PIR MOTION ALARM with a keypad, pir sensor, relay and a very loud alarm strobe. You have 30 seconds time to leave the room after activating the alarm system, of course this can be changed in the code to less or more seconds. Now it has been set to 30000 milliseconds.
You can change it at this line in the code:
const int timeDelay = 30000; //give yourself time to leave the room

Schematic:
arduino PIR MOTION ALARM

Simply wire it up like the schematic, Upload the code and the arduino PIR MOTION ALARM should work.
Make sure you have these libraries installed, download them below.

Password.h
Keypad.h
LiquidCrystal.h

Parts list:
Arduino uno, I used the RobotDyn uno. Which has 2 extra analog pins
Potentiometer
LCD 1602
Pir motion sensor DSN FIR800
Ky-019 Relay module
1 x Blue Led
1 x Red led
2 x 1 k Resistor.
4×4 Keypad
12v Alarm Strobe

Code:

facebook-profile-picture
Danny van den Brande

http://www.arduinosensors.nl

I like to code electronics, do 3D Design, Webdesign and Graphic Design.

10 thoughts on “arduino PIR MOTION ALARM 4×4 Keypad”

  1. Dear Sir ,

    As I followed your sketch and the code I have one problem. When the system is activated and the motion sensor realise a motion starts to alarm. The problem is that I can’t deactivated when the siren is on. In your video I do not see any of these problems. Do you any idea about this?

    Regards

  2. hello,

    i am having trouble deactivating the alarm. I can set the system to be active, but, when the alarm is triggered, it will not allow me to deactivate the system with the same password that i used to set the alarm in the first place. Also, isnt the PIR supposed to be triggered by movement. Seems useless that the pir just becomes active in 30 seconds with no movement. Please let me know your thoughts. I really enjoy this project you have created.

    Thank you.

  3. That is because you need to watch the lights, when it is on red (in my video) you can deactivate. When it is flashing you cannot deactivate..
    the pir becomes active but does not trigger the alarm without movement, the 30 seconds is to leave the room. When someone comes in it will trigger so if your still standing in front of it after 30 seconds of course it will trigger, there should also be a delay in the trigger because when you enter the room yourself the alarm of course will trigger to, so the code needs to be modified in order to give yourself like 10 seconds to deactivate before triggering, This is just a simple code as example of course. From here other people can build and add more advanced options

  4. you need to watch the lights, when it is on red you can deactivate. When it is flashing you cannot deactivate..
    the pir becomes active but does not trigger the alarm without movement, the 30 seconds is to leave the room. When someone comes in it will trigger so if your still standing in front of it after 30 seconds of course it will trigger, there should also be a delay in the trigger because when you enter the room yourself the alarm of course will trigger to, so the code needs to be modified in order to give yourself like 10 seconds to deactivate before triggering, This is just a simple code as example of course. From here other people can build and add more advanced options

  5. hola amigo tengo un problema y es al desactivar la alarma, será que en el código hace falta cambiarle o agregarle algo? porque en el mio los dos leds no dejan de parpadear. me podrías ayudar? 🙁 y gracias excelente tu proyecto.

  6. hi i have a problem with the code what should i change to deactivate the alarm when is triggered before the buzzer activates like a delay because when you enter to a house it gives you time to deactivate becore it starts the siren thank you

Leave a Reply

Your email address will not be published. Required fields are marked *