Password Based Door Lock System Using Arduino
Password Based Door Lock System Using Arduino
Password Based Door Lock System Using Arduino
Project Name
Submitted To
Prof.Farruk Ahmed
This is the real picture………
This is the Online Project…
Introduction
Components Required:
Keypad
The keypad is used for taking the password. This is
programmed using the library <keypad.h>.
LCD Display
Potentiometer
We have used a potentiometer of 10k ohm resistance in
order to adjust the contrast of the LCD.
Servo Motor
Servo motor is used for opening the gate while rotating. This
is programmed using the library <servo.h>.
Buzzer
#include <Wire.h>
#include <Keypad.h>
#include <Servo.h>
#include <EEPROM.h>
#include <LiquidCrystal_I2C.h>
char keymap[numRows][numCols] =
char keypressed; //Where the keys are stored it changes very often
char code[] = {'1', '2', '3', '4'}; //The default code, you can change it or make it a 'n' digits one
char check1[sizeof(code)]; //Where the new key is stored
char check2[sizeof(code)]; //Where the new key is stored again so it's compared to the previous one
lcd.print("TO _/_ (Door)!!"); //What's written on the LCD you can change
pinMode(Button, INPUT);
myservo.attach(11);
myservo.write(0);
// for(i=0 ; i<sizeof(code);i++){ //When you upload the code the first time keep it commented
// EEPROM.get(i, code[i]); //Upload the code and change it to store it in the EEPROM
// } //Then uncomment this for loop and reupload the code (It's done only once)
let’s discuss the setup part of the program. we have initialized the LCD. then
we have printed information to the LCD. we have configured the button pin
as the input pin. here, we use the button pin to close the door. this is the
pin D11 of Arduino at which the servo is attached. Initially, we gave the servo
to stay at angle zero.
void GetNewCode1() {
i = 0;
j = 0;
lcd.clear();
lcd.print("Enter new code"); //tell the user to enter the new code and press A
lcd.setCursor(0, 1);
lcd.print("and press A");
delay(2000);
lcd.clear();
lcd.setCursor(0, 1);
lcd.print("and press A"); //Press A keep showing while the top row print ***
lcd.clear();
lcd.print("Confirm code");
lcd.setCursor(0, 1);
lcd.print("and press A");
delay(3000);
lcd.clear();
lcd.setCursor(0, 1);
lcd.print("and press A");
Now let’s move towards the change code part. Here LCD asks for an
old password if the password is correct it will enter
the GetNewCode loop. Otherwise, it will enter the else loop. Here, it
will clear the screen and print “Incorrect password, Get Away”
}
lcd.clear();
lcd.print("Code Changed");
delay(2000);
}
else { //In case the new codes aren't matching
lcd.clear();
lcd.print("Codes are not");
lcd.setCursor(0, 1);
lcd.print("matching !!");
delay(2000);
}
else { //In case the old code is wrong you can't change it
lcd.clear();
lcd.print("Wrong");
delay(2000);
}
}
The thermal gun was also tested on soldering iron, 3D printer nozzle, ice cubes
etc and a satisfactory result was observed.
Code
/***********************************
Arduino Contactless thermometer
MLX90614 I2C connection
OLED 4-wire SPI connection
Dated: 7-6-2019
Code by: Aswint Raj
**********************************/
#include <Wire.h>
#include <SparkFunMLX90614.h>
#include <SPI.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
IRTherm therm;
void setup()
{
Serial.begin(9600);
therm.begin();
therm.setUnit(TEMP_C);
display.begin(SSD1306_SWITCHCAPVCC);
display.clearDisplay();
display.setRotation(2);
String temperature;
char runner;
void loop()
{
if (therm.read()) // On success, read() will return 1, on fail 0.
{
temperature = String(therm.object(), 2);
Serial.print("Object: ");
Serial.print(temperature); Serial.println("C");
display.clearDisplay();
runner++;
delay(5);
}
display.setTextSize(2);
display.setTextColor(WHITE);
display.setCursor(display.width()/4,display.height()/12);
if (therm.object()>=100)
display.setCursor(display.width()/4,display.height()/12);
display.println(temperature);
display.drawLine(display.width()/runner,display.height() -
display.height()/2.5, display.width()/runner+1, display.height() -
display.height()/2.5, WHITE);
display.setCursor(0,display.height()-display.height()/4);
display.setTextSize(1);
display.println(" Arduino Thermlgun");
display.setCursor(display.width()- display.width()/4,display.height()/12);
display.println("deg C");
display.display();
if (runner>20)
runner=0;
}
The infrared thermometer is a handy tool for use all over your home for at-
home maintenance to help you stop trouble before it starts.
Automotive repair
One of the main ways an infrared thermometer helps you around the home is
when you are tinkering with your car. The inside of an engine is hot, and taking
temperature readings around the engine can help you spot the trouble can fix
the problem without having to take apart the entire engine first. They are a
diagnostic tool to point at any temperature problems you may have.
You can use the thermometer to make sure your home playset is not too hot
for your children. Metal slides and chains for swings can quickly become too
hot during the summer, and it only takes seconds for your children to receive a
contact-burn from sitting or grabbing them. The infrared thermometer can let
you know how hot the toys are before you let your children play.
The ThermoPro Infrared Thermometer is a hand-held meter that can help you
around your home and garage with spot-testing your insulation, food, and play
equipment. The ThermoPro Infrared Thermometer is accurate up to 1.5
percent with a distance ratio of 12:1 for response time and reading, which is
good for measuring the boiling or freezing point of food, auto, or home repair
sensitivity.
The infrared thermometer uses a built-in laser to ensure the accuracy of your
reading temperature from a distance no matter what you are doing. The
infrared thermometer has more uses than just one from home repair to arts
and crafts to test for temperature. They are very versatile in their uses, and
you will be surprised at how you will able to use the thermometer.
An infrared thermometer has a lens that helps us focus on the desired object
while infrared rays are used to measure the amount of heat generated by the
body or an object. So, these thermometers can even be used to measure the
temperature of dangerous objects or edible products during the processing
stage that cannot be touched. Usually, 6 inches is considered the ideal distance
for using an infrared thermometer and correctly monitoring the temperature.
However, the range can vary depending upon the thermometer we are using.
So, we have to read the instructions before we start measuring the
temperature.
Sometimes people want avoid to go for the clinic, health consultation and
physician try to get hate readings of their body temperature at home. In kids
case they hate keeping this device in their body, between arms for even few
minutes.
If you really want to overcome of these types of challenges then choose the
Infrared Thermometer the biggest benefits of this device that is having the
latest and user friendly features which allow you to check the body
temperature at your home as per your convenience.
This device is also have best for the commercial usage because it can record
the body temperature instantly and gives the perfect results or readings. With
the help of this you can easily get the body temperature readings of infants
and children without any physical contact and can also check while they
sleeping.
The Infrared Thermometer makes just a tiny beep sound while you start the
proceeding and rest of the task will be done silently without disturbing them.
There’s is alarm feature which allow you to adjust the high temperature alarm
when you want to do other important work while get the body temperature
reading without so much disturb them.
The other and most important thing of this device is that they has the large
memory storage which allows you to keep record of temperature readings.
Advantages:
(iii) It is hygienic because TempIR does not come into contact with the skin,
the risk of cross infection is minimized.
(iv) Measurements can be taken from a distance for hot surfaces and objects
or for food service purposes where items should not be touched or
contaminated. They are excellent for surface measurements.
Disadvantages:
(v They get damaged easily if dropped and the battery powering them
eventually runs out.
(vii) Since the IR rays are emitted from the surface of an object or a body, the
infrared thermometer’s use cases are limited to surface temperature
measurement.
Since fog, dust, rain, and other environmental conditions can cause deviations
in temperature readings, paying attention to these conditions and using the
thermometer in clear conditions is advisable.
Conclusion
While it’s understandable that many people have concerns about using
infrared thermometers, there really is no danger. Most of these concerns stem
from misunderstandings about the thermometers themselves.
Since the thermometer does not generate infrared radiation, there’s no risk of
if causing any harm to the user through radiation damage. Likewise, on models
which have a laser, the laser exists solely for the purpose of helping to aim the
thermometer, nothing more, and it’s so low powered that there’s no risk of
harm.
Finally, the only times when infrared thermometers have been found to give
inaccurate temperature readings have been situations in which the user did
not follow the instructions properly, and therefore the inaccurate readings
were the result of user error.