Automatic Door Lock System in Arduino Uno
As the world is going on a path of Globalization, it’s getting smaller and smaller day-by-day with fast growing technology. So, every individual craves for their own personal space and comfort zone with no distractions and no interference, so that they can maintain their pace with the speedy surroundings, leading us to the idea, Automatic Door Lock System. In contrast, technological advancements have made this idea possible by minimizing the limitations. This project is a complete design of an Automatic Door Lock System with notification status. It is done by using Keypad for typing in the password, Servo for opening & closing of doors and LCD for displaying the status.
Arduino programming language can be divided into three main parts: functions, values (variables and constants), and structure.
Working
When Arduino Uno is connected, the LCD displays a message.
It then waits for the user to type in the password.After the correct password is typed, the door unlocks itself and when the wrong password is typed it displays a message wrong password.
Any Arduino program contains 2 main functions, void setup() and void loop().
lcd.begin()
Initializes the interface to the LCD screen, and specifies the dimensions (width and height) of the display. begin() needs to be called before any other LCD library commands.
lcd.setCursor()
Positions the LCD cursor; that is, set the location at which subsequent text written to the LCD will be displayed.
lcd.print()
Prints text to the LCD.
lcd.clear()
Clears the LCD screen and positions the cursor in the upper-left corner.
delay()
Pauses the program for the amount of time (in milliseconds) specified as parameter. (There are 1000 milliseconds in a second.)The password typed by the user has to be exactly the same with the set password for the door to unlock; that is, the micro servo will rotate in counter clockwise motion.In this case, the set password is ‘0123’ and press D.
myservo.write()
Writes a value to the servo, controlling the shaft accordingly. On a standard servo, this will set the angle of the shaft (in degrees), moving the shaft to that orientation. On a continuous rotation servo, this will set the speed of the servo (with 0 being full-speed in one direction, 180 being full speed in the other, and a value near 90 being no movement).
CLICK THE BELOW LINK TO TRY IN TINKER CAD