Hello world! Today i made a simple and very cheap to build alarm System 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
Follow the next step for the Schematic, Code & Parts list.
Step 1: Schematic, Code & Parts List.
Simply wire it up like the schematic, Upload the code and it should work.
Make sure you have these libraries installed, download them below.
- Arduino uno, I used the RobotDyn uno. Which has 2 extra analog pins
- LCD 1602
- Pir motion sensor DSN FIR800
- Ky-019 Relay module
- 1 x Blue Led
- 1 x Red led
- 2 x 1 k Resistor.
- 4x4 Keypad
- 12v Alarm Strobe