arduino home security
The arm activates in 10 seconds after pressing the a button for detecting objects, it uses an ultrasonic sensor and once the alarm detects something a buzzer starts emitting a sound. In order to stop the alarm, we need to insert a four digit password. The preset password is 1 2, 3 4, but we also have the possibility to change it by pressing the P button. We enter the password change menu, but first we need to enter the current password in order to continue and then enter the new four digits password. Once the password is changed the next time we activate the alarm, we will only be able to stop the alarm by entering the new password. If we enter a wrong password, we will get a message that we need to try again now. Let’S see the required components for this project. Obviously, we need an Arduino board, an ultrasonic sensor, LCD display a buzzer and a four by four keypad here’s, the circuit schematic. So for the buzzer we just need a single pin, but one we PWM support the 4 by 4. Keypad has 8 pins, 4 of them are for the rows, and 4 of them are for the columns of the keypad. Each button is actually a push button switch, which makes a short between one row and a column when pressed so, for example, if we set the row one line low and all columns line high, when we will press, for example, the button tree due to the short Between the two lines, the column tree line will drop to low.
So in such a case, we can register that the button tree has been pressed. As for the two other components on this project, the ultrasonic sensor and LCD display, you can check my previous detailed tutorials on how to connect and use them. Next let’s see the original code. So first we need to include the standard liquid crystal library, for the LCD and keypad library, which needs to be additionally installed. Then we need to define the buzzer and you just onek sensor, pins, define some variables needed for the program, define the keys of the keypad as well as create the two objects for the keypad and the LCD. In the setup section, we just need to initialize the LCD and define the pin modes for the buzzer and Neutra sonic sensor in the loop section. First, we check whether the alarm is activated or not. So if the arm is not activated on the LCD, we will hit the home screen of the program, which offers two options: a for activating the alarm and before changing the password, then using the my keypad dot gate key function. We read which button from the keypad has been pressed and if that’s the button, a the buzzer will produce a 200 millisecond sound and the activate alarm variable will become true. In that case, on the LCD we will print the message. Alarm will be activated in and using the while loop. We will make a countdown of nine seconds before the alarm is activated, then the message alarm activated will appear and we will measure the initial distance from our alarm device to the objects opposite of it.
So the next step is that the ultrasonic sensor will constantly check whether the currently measured distance is smaller than the initial distance corrected by a value of 10 centimeters. And if that’s true. It means that an object has appeared in front of the sensor. And the alarm will be activated, the tone function will activate the buzzer and the enter password custom function will be called. This custom function will print a message that the alarm is activated and that we need to enter a password in order to stop the alarm. So using the next while loop, we are constantly checking whether we have pressed a button on the key and each button press is added to the temporary password variable. If we enter more than four digits or we press the sharpe button, the previously entered digits will be clear, so we can type them again from beginning. On the other hand, if we press the asterisk button, we will check whether the currently entered password is the same as they originally set password. If that’s true, the alarm will be deactivated, the buzzer will stop producing a sound and we will get back to the home screen. But if the entered password was wrong, the message wrong, try again will appear and we will have to try to enter the correct password again for changing the password. We use a similar method here. First, we need to enter the current password in order to be able to set a new password.
So just like I said, we are using the same method as the one exclaim for entering the password for deactivating. The alarm, of course, you can find and take a closer look at this code on my official website article for finishing the project.
arduino home security Video
[mam_video id=lTAo_H5eqsk]
[mam_tag id=4861]
arduino home security news
-
Posted on Tuesday October 15, 2019
Spy chip planting said to be easy to do and tough to spot Tech Xplore … Continue Reading » -
Posted on Thursday October 10, 2019
Planting Tiny Spy Chips in Hardware Can Cost as Little as $200 WIRED … Continue Reading » -
Posted on Friday October 11, 2019
Sending An ESP32 Into Space Hackaday … Continue Reading »
arduino home security Social
🔬 Now that you’ve gotten your feet wet, dive into the kit and enjoy all nine experiments. Order yours today: http://bit.ly/2MnQ7fr
https://www.pinterest.com/pin/35465915794474667/
https://www.pinterest.com/pin/35465915794474666/
https://www.pinterest.com/pin/35465915794474664/
where to buy this housing?
Can we use aurdino uno
yes but make sure you make the pins correctly
i only have arduino uno
What is the value of your resistor? Thankss
What is the value of your resistor? Thanks
…someone make this project but working with home assistant plz!!!
how if i use lcd i2c ?
Which model did you use?
I did this project! It works! Thank you!
Hi! Can u help us with the codes?
What would be a way to use PIR sensor instead of sonic?
At 1:17, how do the merged black connectors on the LCD display work? I’ve been stuck on that for a while.
what is the size of the box
I will use it but i have 16×2 LCD with I2C connector. So how can i configure the code for it?
Anyway, I found it. Also I changed this system to home alarm system with door contacts, pir detectors and changeable permanently password option. And also I prepared a plastic case with my 3D printer. It just need last touches, after that I will prepare a video and share.
Thanks.
@Önder Yılmaz Hey bro did you manage to film the video? I would like to watch it
Carlos Vega hi there, not yet, sorry for delay, because of some health problems. I’ll manage in 2 weeks.
hi sir, i want to make home security system using arduino uno,breadboard,keypad4x4,lcd display,PIR,infrared sensor,led,buzzer.can u help me plzzzzzz
Will the saved password remain after the Arduino resets?
hey did u connect these with a breadboard?
You dont need one. Its all connected to the arduino mega
Is this project able to be done with an Arduino UNO?
Yeah. As for the specofics idunno bht it can def be done.
Please make a video on how to make a Home Security Alarm System with multiple sensors for multiple rooms… Thankz!
Please give cod