Khaji 1

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 38

An

Internship Report
on
“PASSWORD BASED DOOR LOCK SYSTEM”
Submitted in the partial fulfillment for the award of
Bachelor of Engineering
in
Electronics and Communication Engineering

Submitted by

AJIJAHAMAD KHAJI 2GB21EC035


Internship Carried out
at
Name of Organization/company

Internal Guide External Guide

Pro Prof. RAJU.M.Tech.,MISTE Mr. ABZAL NAWAZ


Assistant Professor

DEPARTMENT
OF
ELECTRONICS AND COMMUNICATION ENGINEERING

GOVERNMENT ENGINEERING COLLEGE


HUVINAHADAGALI - 583219 VIJAYANAGARA (DIST)
2023-2024
Government of Karnataka
Department of Collegiate and Technical Education

GOVERNMENT ENGINEERING COLLEGE


HUVINAHADAGALI – 583219, VIJAYANAGARA (DIST)

CERTIFICATE
This is to certify that the an internship report entitled “PASSWORD
BASED DOOR LOCK SYSTEM” carried out by AJIJAHAMAD KHAJI bearing USN:
2GB21EC035 a bonafide student of Government Engineering College,
Huvinahadagali in partial fulfillment for the award of Bachelor of Engineering
in Electronics and Communication Engineering of the Visvesvaraya
Technological University, Belagavi during the academic year 2023-2024.The
internship report has been approved as it satisfies the academic requirements
in respect of internship work prescribed for the said Degree.

-------------------------- --------------------------- ----------------------------


Internship Coordinator HOD Principal

Date :

Place :
VISVESVARAYA TECHNOLOGICAL UNIVERSITY
“JNANA SANGAMA”, BELAGAVI-590 018

DECLARATION

I, AJIJAHAMAD KHAJI, USN-2GB21EC035 the student of 6th semester Bachelor of

Engineering in Electronics and Communication Engineering, Government Engineering College,

Huvinahadagali hereby declare that the internship report titled “Password based door lock

system” has been prepared and presented by me and submitted in partial fulfillment of the

course requirements for the award of degree in Bachelor of Engineering in Electronics and

Communication Engineering of Visvesvaraya Technological University, Belagavi during the

year 2023-2024. Further the content of the report has not been submitted previously for the

award of any degree or diploma to any other university.

Place: Huvinahadagali

AJIJAHAMAD KHAJI
2GB21EC035
ACKNOWLEDGEMENT

The sense of contentment and elation that accomplishes the successful completion of our task
would be incomplete without mentioning the names of the people who helped in accomplishment
of this mini project, whose constant guidance, support and encouragement resulted in its
realization.

I would specially thank our internship coordinator Manukumar G B Department of


Electronics and Communication Engineering for their expert guidance, encouragement and
valuable suggestions at every step.

I would specially thank our external internship guide Mr. ABZAL NAWAZ for their expert
guidance, encouragement and valuable suggestions at every step.

I would also like to express our gratitude to Dr. Rajashekhar U, Head of the department of
Electronics and Communication for encouraging and inspiring us to carry out during internship
work.

I would like to thank Dr. Nagaraj B Patil Principal, Government Engineering College,
Huvinahadagali, for continuous support and constant encouragement to carry out during
internship work.

I am extremely happy to acknowledge and express sincere gratitude to our friends who gave us
constant support and encouragement and well wishes for their help and co-operation and
solution to problems during the internship work.

AJIJAHAMAD KHAJI

i
CONTENTS
Acknowledgement
Contents
List of Figures

CHAPTER 01:
1.1 Introduction
1.2 Services
1.3 Missions
1.4 Vision
1.5 Outcomes

CHAPTER 02:
2.1 Definition of Embedded System
2.1.1 Embedded System Hardware
2.1.2 Embedded System Software
2.1.3 Real time operating system
2.2 Characteristics of Embedded System
2.2.1 Applications of Embedded System
2.3 Introduction to ARM Microcontroller
2.3.1 ARM v7
2.3.2 Pin configuration of LPC2148
2.3.3 Features of LPC214X Series controllers
2.4 Steps to configure LPC2148
2.4.1 Keil Version
2.4.2 Flash Magic

CHAPTER 03:
3.1 LED Blinking
3.1.1 Interfacing LED Program to LPC2148
3.2 Liquid Crystal Display (LCD)
3.3 DC Motor
3.4 Sensors
3.4.1 Type of Sensors
3.5 UART
3.5.1 Introduction of UART communication
3.6 Radio Frequency Identification
3.6.1 Interfacing RFID Program to LPC2148
3.7 Keypad
3.8 PWM
3.8.1 Calculations
3.9 GSM (Global System for Mobile Communication)
3.10 Analog to Digital Convertor
3.10.1 ADC in LPC2148 ARM7 Microcontroller
3.10.2 Accelerometer
3.10.3 Temperature Sensor
3.10.4 Timer

CHAPTER 04:
4.1.1 Introduction
4.1.2 Components Required
4.1.3 Circuit Diagram
4.1.4 Applications
4.1.5 Advantages
4.1.6 Disadvantages

CONCLUSION
REFERENCE
LIST OF FIGURES

Figure No Name Page No

1.1.1 Company Logo 1

1.2.1 Embedded System Projects 3

2.1.1 Basic block diagram Embedded system 5

2.1.2 Embedded System 6

2.2.1 Application of Embedded System 7

2.3.1 LPC2148 8

2.3.2 Pin configuration 9

3.1.1 LED 15

3.2.1 LCD 16

3.2.2 Tabular Column of LCD 17

3.3.1 DC Motor 17

3.4.1 Object sensor 18

3.4.2 Fire sensor 18

3.4.3 Temperature sensor


18
3.5.1 Basic UART communication 19

3.6.1 RFID 20

3.7.1 Keypad 21

3.9.1 Pin assignment diagram of GSM 23

3.12 Tabular column of register 24

3.10.2 Accelerometer 25

3.10.3 Temperature sensor 25

4.1 Password based door lock system 26

4.2 Circuit diagram 27

4.3 Access password door lock 28

4.4 Enter the password 29


EMBEDDED SYSTEM 2023-24

CHAPTER 1

ABOUT THE ORGANISATION

1.1 INTRODUCTION:

Figure 1.1.1: Company Logo


Technofly Solutions is a leading electronics product design, development and services
company. The professionals with industrial experience in embedded technology, real time software,
process control and industrial electronics held the company.
The company is the pioneers in design and development of Single Board Computers,
Compilers for micro-controllers within India. Talented professional in the field of embedded
hardware, software design and development toil to reach its excellence.
Technofly Solutions & Consulting was found in year 2017 by a team with 14+ years of
experience in embedded systems domain. Technofly Solutions focuses globally on automotive
embedded technologies and VLSI Design, Corporate Training & Consulting. Till now we have
delivered more than 15+ Corporate Trainings for companies working in Embedded Automotive
Technologies in India. Also involved in the Development of OBD2 (On Board Diagnose Product for
Passenger cars) for clients in India.
Company Profile:
TechnoFly was formed by professionals with formal qualifications and industrial experience in the
fields of embedded systems, real-time software, process control and industrial electronics. The
company is professionally managed and supported by qualified experienced specialists and
consultants with experience in embedded systems – including hardware and software.

Initially, the company Developed system software tools; these include C Compilers for micro-
controllers and other supporting tools such as assembler, linker, simulator and Integrated

DEPT OF ECE,GEC,Huvinahadagali Page 1


EMBEDDED SYSTEM 2023-24
Development Environment. Later Single Board Computers (SBCs) – were developed and are still
manufactured. Such hardware boards support a broad range of processors – including 8 bit, 16 and 32
bit processor.
Since 2015, company also started offering design and development services. This includes a
complete spectrum of activities in product development life cycle that is idea generation, requirement
gathering to prototype making, testing and manufacturing. Company has so far provided product
design services for various sectors which include the Industrial automation, Instrumentation,
Automotive, Consumer and Defense sector.
1.2 SERVICES:
Embedded Software engineering Services:
When you don’t have enough time, or the right skills on hand, you can supplement your team with
expert embedded engineers from Technofly, who can tackle your projects with confidence, take out
the risk, and hit your milestones. We’ll take as much ownership as you want us to, and make sure
your project is done right, on time and on budget. Go ahead, check our reputation for on-time, on-
budget delivery. We've earned it, time and again. We can help you cut risk on embedded systems
R&D, and accelerate time to market. Technofly is your best choice for designing and developing
embedded products from concept to delivery. Our team is well-versed in product life cycles. We
build complex software systems for real-time environments and have unique expertise and core
competencies in the following domains: Wireless, Access and IOT/Cloud. Technofly solution also
offer services which includes
 Developing client / server applications to run on Windows / Linux
 Develop / Test Internet based applications

 Test suite development for applications and network protocols

 Developing Networking tools for the enterprises

 Verification & Validation of Enterprise applications

 Software maintenance of enterprise applications

DEPT OF ECE,GEC,Huvinahadagali Page 2


EMBEDDED SYSTEM 2023-24
Fig 1.2.1: Embedded System Projects

WORKING DEPARTMENT IN THE COMPANY:


The team is associated with R&D in Wireless Communication Technologies department in the
company. The team is currently working on 4G-5G technologies associated with Cognitive Devices
such as WLAN, Bluetooth, Zigbee, other Mobile networks etc, for better achievable network
efficiencies. The work involves examining various methodologies currently available and under
development and implementation of the same for further analysis and in depth understanding of the
effects of these methods on network capacities.
The department is currently developing and examining optimal solutions for Network Data Rate
maximization in both co-operative and non-cooperative network users scenarios involving
cognitive(SU’s) and non-cognitive(PU’s) devices. The work is mainly concentrated on:
 Resource management (Spectrum management as well as power management),
 Power Spectral analysis,
 Detection Test statics computation methodology analysis,
 Low power VLSI design
 Efficiency analysis

The department is actively involved in acquiring latest technologies related projects in Low power
VLSI, wireless domain and these projects are well thought out and detailed implementations are
carried out. Projects are mainly done on Verilog, MATLAB platform (from math works) and may
also depend on NS2, NetSim and Xilinx platforms as per the requirements of the project in progress.
Current internship involves study implementation and analysis of High speed and Energy Efficient
Carry Skip adder (CSKA) with Hybrid model for achieving high speed and reducing the power
consumption.
 Study Requirements: Low power VLSI design and fundamentals of Digital circuits
 Implementation Requirements: Verilog code / Modelsim tool

 Detection Test Static: Simulation results

 Platform: Verilog and simulated by Modelsim 6.4cand synthesized by Xilinx tool.

1.3 MISSION:
"To help our customers in achieving their time-to-market objective by being their dependable
technology partners and delivering our commitments on time and every time with quality."

DEPT OF ECE,GEC,Huvinahadagali Page 3


EMBEDDED SYSTEM 2023-24

1.4 VISION:
“Technofly Softlab vision is to impart every new technology available in this smart world to the
needy corporates, engineers, scientists, and to the students, and contribute in making Indian
companies’ global leaders in technology

1.5 OUTCOMES:
I have carried out my internship my in Technofly Solutions. I have learnt about Embedded
Systems, ARM LPC-2148 and Arduino microcontroller. Designed an embedded system to control
robotic motions using various sensors.
Outcomes of internship are
 Enhancement the client interface to make it more intuitive and user-friendly.
 Enhancements of clients to work on all types of clients.

 Enhancement of embedded system to control more types of embedded systems.

 Handling of error scenarios.

 I have learnt in a friendly environment and all my friends and mentors were supportive to me.
 I have also learnt about interfacing of LED, LCD, Switch, DC Motor, Sensors, RFID card ,Wi-Fi,
GSM, Buzzer and UART.
 I have also learnt to control speed of DC motor and to control brightness of LED using PWM.
 I have done mini-project which involves the control of movement of Robot using LED, LCD,
Switch, DC Motor, Sensors, RFID card, Buzzer and 4X4 keyboard.

DEPT OF ECE,GEC,Huvinahadagali Page 4


EMBEDDED SYSTEM 2023-24

CHAPTER 2
Introduction to Embedded Systems
2.1 Definition of Embedded System
An embedded system is one kind of a computer system mainly designed to perform several tasks
like to access, process, store and also control the data in various electronics-based systems.
Embedded systems are a combination of hardware and software where software is usually known
as firmware that is embedded into the hardware.

Fig2.1.1: Basic block diagram of Embedded System

2.1.1 Embedded System Hardware:


As with any electronic system, an embedded system requires a hardware platform on which it
performs the operation. Embedded system hardware is built with a microprocessor or
microcontroller. The embedded system hardware has elements like input output (I/O) interfaces, user
interface, memory and the display. Usually, an embedded system consists of:
 Power Supply
 Processor
 Memory
 Timers
 Serial communication ports
 System application specific circuits

2.1.2 Embedded System Software:


The embedded system software is written to perform a specific function. It is typically written in a
high level format and then compiled down to provide code that can be lodged within a non-volatile
memory within the hardware. An embedded system software is designed to keep in view of the three
limits:

DEPT OF ECE,GEC, Huvinahadagali Page 5


EMBEDDED SYSTEM 2023-24

 Availability of system memory


 Availability of processor’s speed
 When the system runs continuously, there is a need to limit power dissipation for events like stop,
run and wake up.

2.1.3 Real Time Operating System


A system is said to be real time, if it is essential to complete its work and deliver its service on
time. Real time operating system manages the application software and affords a mechanism to let
the processor run. The Real Time operating system is responsible for handling the hardware
resources of a computer and host applications which run on the computer.

Fig 2.1.2: Embedded System


2.2 Characteristics of Embedded Systems
 Application-specific functionality – specialized for one or one class of applications
 Deadline constrained operation – system may have to perform its function(s) within
specific time periods to achieve successful results
 Resource challenged – systems typically are configured with a modest set of resources to meet
the performance objectives
 Power efficient – many systems are battery-powered and must conserve power to maximize
the usable life of the system.

DEPT OF ECE,GEC, Huvinahadagali Page 6


EMBEDDED SYSTEM 2023-24

 Form factor – many systems are light weight and low volume to be used as components in
host systems
 Manufacturable – usually small and inexpensive to manufacture based on the size and low
complexity of the hardware.

2.2.1Applications of Embedded Systems


Embedded systems find numerous applications in various fields such as digital electronics,
telecommunications, computing network, smart cards, satellite systems, military defense system
equipment, research system equipment, and so on.

Fig 2.2.1: Applications of Embedded Systems

2.3 Introduction to ARM Microcontroller


The ARM stands for Advanced RISC machine and it is a 32-bit reduced instructions set computer
(RISC) microcontroller. It was first introduced by the Acron computers’ organization in 1987. The
ARM is a family of the microcontroller developed by the different manufacturers such as ST
microelectronics, Motorola and so on .The ARM microcontrollers are cost sensitive and high
performance devices which are used in a wide range of application such as industrial instrument

control systems, wireless networking and sensors and automotive body system etc.

The ARM microcontroller architecture come with a few different versions such as ARMv1,
ARMv2 etc and each one has its own advantage and disadvantages.

DEPT OF ECE,GEC, Huvinahadagali Page 7


EMBEDDED SYSTEM 2023-24

2.3.1 ARM v7
ARM7 is one of the widely used micro-controller family in embedded system application. This
section is humble effort for explaining basic features of ARM-7.

LPC2148 is the widely used IC from ARM-7 family. It is manufactured by Philips and it in
preloaded with many inbuilt peripherals making it more efficient and a reliable option for the beginners
as well as high end application developer.

Fig 2.3.1: LPC2148


2.3.2 Pin Configuration of LPC2148
MEMORY-LPC2148 has 32kB on chip SRAM and 512 kB on chip FLASH memory. It has
inbuilt support up to 2kB end point USB RAM also.
On chip FLASH memory system- The LPC2148 incorporates a 512 kB Flash memory system. This
memory may be used for both code and data storage.
I/O Ports- LPC 2148 has two I/O Ports each of 32 bit wide giving us total 64 I/O Pins. Ports are
named as P0 and P1.

DEPT OF ECE,GEC, Huvinahadagali Page 8


EMBEDDED SYSTEM 2023-24

Fig2.3.2 Pin configuration


2.3.3 Features of LPC214x series controllers.
 8 to 40 kB of on-chip static RAM and 32 to 512 kB of on-chip flash program memory.128 bit
wide interface/accelerator enables high speed 60 MHz operation.
 Embedded ICE RT and Embedded Trace interfaces offer real-time debugging with the on chip
Real Monitor software and high speed tracing of instruction execution.
 USB 2.0 Full Speed compliant Device Controller with 2 kB of endpoint RAM. In addition, the
LPC2148 provides 8 kB of on-chip RAM accessible to USB by DMA.
 Two 32-bit timers/external event counters (with four capture and four compare channels each),
PWM unit (six outputs) and watchdog.
 Low power real-time clock with independent power and dedicated 32 kHz clock input.
 Multiple serial interfaces including two UARTs (16C550), two Fast I2C-bus (400 kb it/s), SPI
and SSP with buffering and variable data length capabilities.
 Vectored interrupt controller with configurable priorities and vector addresses.
 Up to nine edge or level sensitive external interrupt pins available.
 On-chip integrated oscillator operates with an external crystal in range from 1 MHz to30 MHz
and with an external oscillator up to 50 M Hz.

DEPT OF ECE,GEC, Huvinahadagali Page 9


EMBEDDED SYSTEM 2023-24

2.4 Steps to configure LPC2148 :


 Keil µVision.
 Flash Magic.
2.4.1 Keil µVision

 Open Keil µVision from the icon created on your desktop.


 Click on Project menu, and then hit on New u Vision Project.

1. Select target Device vendor. In this case NXP (founded by Phillips).

1. After this, a dialog box will pop-up on screen. This will ask you whether to copy startup code for
LPC2148. Click on Yes.

DEPT OF ECE,GEC, Huvinahadagali Page 10


EMBEDDED SYSTEM 2023-24

1. Now click on File menu and hit on New. Write code in C and FileName.c Save.

1 .Now right click on Target 1 and hit on Options for target “Target 1”.

8. In Options for target “Target 1”. In output tab, click on check box Create HEX File.
Then go to Linker tab. Click on Use Memory Layout for Target Dialog.

DEPT OF ECE,GEC, Huvinahadagali Page 11


EMBEDDED SYSTEM 2023-24

9.Add required files to source group.

10.Then hit on Rebuild All target files.

11.Now we can see Build output.

DEPT OF ECE,GEC, Huvinahadagali Page 12


EMBEDDED SYSTEM 2023-24

2.4.2 Flash Magic


Here is to setup Flash Magic and load HEX file into LPC2148 Microcontroller.

C HAPTER 3

DEPT OF ECE,GEC, Huvinahadagali Page 13


EMBEDDED SYSTEM 2023-24

TASK PERFORMED
3.1 LED Blinking:
A light-emitting diode (LED) is a two-lead semiconductor light source device used for
indicating the output status by making it ON or OFF. An LED is nothing but a p–n junction diode,
which emits light when provided with power supply. When voltage is applied to the leads of an
LED, it forces the electrons to recombine with electron holes within the device, emitting energy in
the form of photons. This effect of emitting energy in form of photons is called
electroluminescence. The colour of the light is determined by the energy band gap of the
semiconductor corresponding to the energy of the photon.

Fig 3.1.1: LED

3.1.1 Interfacing LED program to LPC2148


#include<LPC214x.h>
#define LED // port0.20
(1<<16) void pin
delay(int i); int
main (void)
{
IO0DIR |= LED; // led as
while(1) output
{
IO0SET |= // led
LED; on
delay(10000);
IO0CLR |= // led
LED; off
delay(10000);

}
}

DEPT OF ECE,GEC, Huvinahadagali Page 14


EMBEDDED SYSTEM 2023-24

void delay(int i)
{

int j, k;
for(j=0;j<I;j++); for (k=0;k<35;k++);
}
3.2 Liquid Crystal Display (LCD)
LCDs (Liquid Crystal Displays) are used for displaying status or parameters in embedded systems.
LCD 16x2 is 16 pin device which has 8 data pins (D0-D7) and 3 control pins (RS, RW, EN).

The remaining 5 pins are for supply and backlight for the LCD.

Fig 3.2.1: LCD


The control pins help us configure the LCD in command mode or data mode. They also
help configure read mode or write mode and also when to read or write.
LCD 16x2 can be used in 4-bit mode or 8-bit mode depending on the requirement of the
application. In order to use it we need to send certain commands to the LCD in command mode
and once the LCD is configured according to our need, we can send the required data in data
mode.

Fig 3.2.2: Tabular Column of LCD

DEPT OF ECE,GEC, Huvinahadagali Page 15


EMBEDDED SYSTEM 2023-24

Since we are using LCD in 4-bit mode, we require only 4 Data pins.LCD Data pins D4-D7 are
connected to respective pins.LCD control pins RS, RW and EN are connected to their respective
pins.
3.3 DC Motor
DC motor converts electrical energy in the form of Direct Current into mechanical energy.
In case of a motor, the mechanical energy produced is in the form of rotational movement of the
motor shaft .The direction of rotation of the shaft of the motor can be reversed by reversing the
direction of Direct Current through the motor.
The motor can be rotated at a certain speed by applying a fixed voltage to it. If the voltage varies,
the speed of the motor varies.
Thus, the DC motor speed can be controlled by applying varying DC voltage; whereas the direction
of rotation of the motor can be changed by reversing the direction of current through it.

Fig 3.3.1:DC Motor


3.4 Sensors
A sensor is a device, module, or subsystem whose purpose is to detect events or changes in its
environment and send the information to other electronics, frequently a computer processor.

3.4.1 Types of sensors


1. Object detector-
Object detection is a form of proximity sensing to determine if an object or material is present
(arrives) or absent (disappears).

Fig 3.4.1: Object sensor


2.Flame/Fire detector-

DEPT OF ECE,GEC, Huvinahadagali Page 16


EMBEDDED SYSTEM 2023-24

A flame detector is a sensor designed to detect and respond to the presence of aflame or fire,
allowing flame detection. Responses to a detected flame depend on the installation, but can include
sounding an alarm, deactivating a fuel line (such as a propane or a natural gas line), and activating a
fire suppression system.

Fig 3.4.2: Fire sensor


3. Temperature detector-

A temperature sensor is a device, usually an RTD (resistance temperature detector) or a


thermocouple, that collects the data about temperature from a particular source and converts the data
into understandable form for a device or an observer and so on.

Fig 3.4.3: Temperature sensor

3.5 UART
UART stands for Universal Asynchronous Receiver/Transmitter. A UART’s main purpose is to
transmit and receive serial data.

3.5.1 Introduction to UART Communication


In UART communication, two UARTs communicate directly with each other. The transmitting
UART converts parallel data from a controlling device like a CPU into serial form, transmits it in
serial to the receiving UART, which then converts the serial data back into parallel data for the
receiving device. Only two wires are needed to transmit data between two UARTs. Data flows from
the Tx pin of the transmitting UART to the Rx pin of the receiving UART:

DEPT OF ECE,GEC, Huvinahadagali Page 17


EMBEDDED SYSTEM 2023-24

Fig 3.5.1: Basic UART Communication


UARTs transmit data asynchronously, which means there is no clock signal to synchronize the
output of bits from the transmitting UART to the sampling of bits by the receiving UART. Instead of
a clock signal, the transmitting UART adds start and stop bits to the data packet being transferred.
These bits define the beginning and end of the data packet so the receiving UART knows when to
start reading the bits.
When the receiving UART detects a start bit, it starts to read the incoming bits at a specific
frequency known as the baud rate. Baud rate is a measure of the speed of data transfer, expressed in
bits per second (bps). Both UARTs must operate at about the same baud rate. The baud rate between
the transmitting and receiving UARTs can only differ by about 10% before the timing of bits gets too
far off.
3.6 Radio-frequency identification
A RFID system is made up of two parts: a tag or label and a reader. RFID tags or labels are
embedded with a transmitter and a receiver. The RFID components on the tags have two parts: a
microchip that stores and processes information, and an antenna to receive and transmit a signal. The
tag contains the specific serial number for one specific object.

Fig 3.6.1: RFID


3.6.1 Interfacing RFID program to LPC2148
#include<LPC214x.h>

#include "Serial.h"
#include "Lcdtask.h" #include<string.h> unsigned char code[8]="02557698"; int i=0;
unsigned char buff[10]; int ret;
int main (void)

uart1_init(); uart0_init(); init_lcd(); command_write(0x01); command_write(0x80);


putstring("Prashanth"); delay(10000); command_write(0x01);
command_write(0x80); putstring("Hariprasad"); uart0_puts("working");
while(1)

DEPT OF ECE,GEC, Huvinahadagali Page 18


EMBEDDED SYSTEM 2023-24

for(i=0;i<8;i++)

buff[i]=uart0_get key ();

buff[8]='\0'; command_write(0x01); putstring(buff); delay(5000);


uart0_puts(buff);

if(strcmp(buff,"02557698")==0)

if(ret==0)
{

command_write(0x01); command_write(0x80);
putstring("valid user");
delay(10000);
}

else

command_write(0x01); command_write(0x80);
putstring("invalid user"); delay(10000);
}

3.7 Keypad
A keypad is a set of buttons arranged in a block or "pad" which usually bear digits, symbols and
usually a complete set of alphabetical letters. If it mostly contains numbers then it can also be called
a numeric keypad. Here we are using 4 X 4 matrix keypad.

DEPT OF ECE,GEC, Huvinahadagali Page 19


EMBEDDED SYSTEM 2023-24

Fig 3.7.1: Keypad


The rows are connected to an output port and the columns are connected to an input port. To
detect a pressed key, the microcontroller grounds all rows by providing 0 to the output latch, and
then it reads the columns. If the data read from the columns is D3-D0=1111, no key has been
pressed and the process continues until a key press is detected. However, if one of the column bits
has a zero, this means that a key press has occurred. For example, if D3D0=1101, this means that a
key in the D1 column has been pressed.If the data read is all 1s, no key in that row is activated and
the process is moved to the next row. It grounds the next row, reads the columns, and checks for
any zero. This process continues until the row is identified. After identification of the row in which
the key has been pressed, the next task is to find out which column the pressed key belongs to.

3.8 PWM
Pulse width modulation (PWM) is a powerful technique for controlling analog circuits with a
processor's digital outputs. PWM is employed in a wide variety of applications, ranging from
measurement and communications to power control and conversion.

3.8.1 Calculations
 We know that, v=IR as the resistance decreases the voltage increases and vice versa,there we can
control voltage by varying resistance.
1
 𝑓= ⁄𝑇

 We know that the time period, T=Ton +Toff.

 DC=
 Vout = vmax*DC

3.9 GSM (Global System for Mobile Communication)


GSM is a digital mobile telephony system. GSM digitizes and compresses data, then sends it
down a channel with two other streams of user data, each in its own time slot. It operates at either
the 900 MHz or 1800 MHz frequency band.

DEPT OF ECE,GEC, Huvinahadagali Page 20


EMBEDDED SYSTEM 2023-24

The below figure shows how to interface the GSM with microcontroller. The GSM module is
communicate the microcontroller with mobile phones through UART. To communicate over
UART or USART, we just need three basic signals which are namely, RXD (receive), TXD
(transmit), GND (common ground).
GSM modem interfacing with microcontroller for SMS control of industrial equipment’s. The
sending SMS through GSM modem when interfaced with microcontroller or PC is much simpler as
compared with sending SMS through UART.
The transmit signal of serial port of microcontroller is connected with transmit signal (TxD) of the
serial interface of GSM Modem while receive signal of microcontroller serial port is connected with
receive signal (RxD) of serial interface of GSM Modem.

Fig 3.9.1: Pin assignment diagram of GSM.

3.10 Analog to digital converter


Analog to Digital Converter (ADC) is used to convert analog signal/voltage into its equivalent
digital number so that microcontroller can process that numbers and make it human readable. The
ADC characterized by resolution. The resolution of ADC indicates the number of digital values.
Let’s take example: In LPC2148 microcontroller we have in-built 10-bit ADC. So for 10-bit ADC
resolution is 10-bit and maximum value will be 1024. This means our digital value or discrete level
lies between 0 to 1023.

3.10.1: ADC in LPC2148 ARM7 Microcontroller


The ADC in LPC2148 ARM7 Microcontroller is 10-bit successive approximation analog to
digital converter. The features are listed as:
LPC2148 has two inbuilt ADC Modules, named as ADC0 & ADC1.

ADC0 has 6-Channels (AD0.1-AD0.6).

ADC1 has 8-Channels (AD1.0-AD1.7).

ADC operating frequency is 4.5 MHz (max.), operating frequency decides the conversion time.

DEPT OF ECE,GEC, Huvinahadagali Page 21


EMBEDDED SYSTEM 2023-24

Supports power down mode.

There are several registers which will be used to setup and configure ADC feature in LPC2148. The
two registers we will be concerning about: ADCR (A/D Control Register) and ADGDR (A/D
Global Data register).

Fig 3.12: Tabular column of register

3.10.2 Accelerometer
Accelerometer is an electromechanical device that measures the force of acceleration due to
gravity in g unit.
The ADXL335 measures acceleration along X, Y and Z axes and gives analog voltage output
proportional to the acceleration along these 3 axes.
Microcontrollers can process these voltages by converting them to digital signals using ADC.

Fig 3.10.2: Accelerometer

3.10.3 Temperature Sensor


A temperature sensor is a device, usually an RTD (resistance temperature detector) or a
thermocouple, that collects the data about temperature from a particular source and converts the
data into understandable form for a device or an observer and so on.

DEPT OF ECE,GEC, Huvinahadagali Page 22


EMBEDDED SYSTEM 2023-24

Fig 3.10.3: Temperature sensor

3.10.4Timer
LPC2148 comes loaded with two 32-bit-Timer blocks. Each Timer block can be used as a
‘Timer’ (like for e.g. triggering an interrupt every ‘t’ microseconds) or as a ‘Counter’ and can be

also used to demodulate PWM signals given as input.


A timer has a Timer Counter(TC) and Prescale Register(PR) associated with it. When Timer is
Reset and Enabled TC is set to 0 and incremented by 1 every ‘PR+1’ clock cycles. When it reaches
its maximum value it gets reset to 0 and hence restarts counting. Prescale Register is used to define
the resolution of the timer. If PR=0 then TC is incremented every 1 clock cycle of the peripheral
clock. If PR=1 then TC is incremented every 2 clock cycles of peripheral clock and so on. By
setting an appropriate value in PR we can make timer increment or count : every peripheral clock
cycle or 1 microsecond or 1 millisecond or 1 second and so on.

DEPT OF ECE,GEC, Huvinahadagali Page 23


EMBEDDED SYSTEM 2023-24

CHAPTER 4
4.1 PASSWORD BASED DOOR LOCK SYSTEM
4.1.1 INTRODUCTION:
In this project, we will learn how to make the Password-Based Security System Using Arduino &
Keypad. As thefts are increasing day by day security is becoming a major concern nowadays. So a
digital code lock can secure your home or locker easily. It will open your door only when the right
password is entered. The circuit of this project is very simple which contains Arduino, keypad
module, buzzer, Servo Motor, and LCD. Arduino controls the complete processes like taking a
password from the keypad module, comparing passwords, driving buzzer, rotating servo motor, and
sending status to the LCD display. The keypad is used for taking the password. The buzzer is used
for indications. Servo motor is used for opening the gate while rotating and LCD is used for
displaying status or messages on it.
4.1.2 Circuit Diagram & Connections
The circuit or the schematic of Password Based Door Lock Security System is fairly simple. You
can use the Fritzing Software to draw the schematic.

Figure 4.1 Password based door lock system

DEPT OF ECE,GEC, Huvinahadagali Page 24


EMBEDDED SYSTEM 2023-24

First of all, we will make a connection to the 4×3 Keypad. For connecting the keypad with the
Arduino we are using digital pins D1 to D7. Connect all seven pins of the keypad to analog pins D1
~ D7 of Arduino.

To connect the servo motor with the Arduino, use digital pin D9 of Arduino to output the PWM pin
of the servo motor. Now connect the positive wire of the buzzer to the pin D10 of Arduino and the
negative wire to the ground.

Now we will connect the 16×2 LCD to the Arduino.


 Connect pin 1,3,5,16 of LCD to the GND.
 Connect pin 2,15 of LCD to the VCC (5V).
 Connect pin 4 of LCD to pin A0 of Arduino.
 4. Connect pin 6 of LCD to pin A1 of Arduino.
 5. Connect pin 11 of LCD to pin A2 of Arduino.
 6. Connect pin 12 of LCD to pin A3 of Arduino.
 7. Connect pin 13 of LCD to pin A4 of Arduino.
 8. Connect pin 14 of LCD to pin A5 of Arduino.
 Here is another version of the Schematic designed using Easy EDA software. The Arduino UNO
Board is replaced by Arduino Nano Board.

Figure 4.2 Circuit connections

DEPT OF ECE,GEC, Huvinahadagali Page 25


EMBEDDED SYSTEM 2023-24

4.1.3 Components Required:


Follows are the list of components that you need for this project.

S.N. Components Quantity


 Arduino UNO Board 1
 4x3 Keypad 1
 16x2 LCD Display 1
 Potentiometer 10K 1
 SG90 Servo Motor 1
 Buzzer 5V 1
 Connecting Wires 20
 8 Breadboard 1

4.1.4 Working of Password Based Door Lock Security System


In this project, we have defined the default password “4567” in the Arduino. You can change it
via coding. When we enter a password, it will match it with the password stored in the Arduino. If it
is correct, then it will show ‘Access Granted, Welcome’ and then rotate the servo motor to 180
doors as the door is opened. It will then give 5 seconds time for entering via the door. Once 5
seconds is completed, the door will get locked automatically.
If the password is wrong, then it will show ‘Code Incorrect, Go Away’. The buzzer will also beep
once when any key is pressed.

Figure 4.3 Access password door lock

DEPT OF ECE,GEC, Huvinahadagali Page 26


EMBEDDED SYSTEM 2023-24

Fig 4.4 Enter the password

4.1.5 Working Principle of Arduino Based Door Lock System

For my purpose, I used a random password like “1234” by using the keypad. The working
principle is so simple. You just need to enter the password through the keypad provided. If the
password is matched with the Arduino, it sends a signal to the servo and the servo rotate
180 degrees and then the door will open. Also, the LCD display shows a message “Access
Granted”. But if the password does not match. The Arduino does not send any signal to the motor
and the door remains closed. This time the LCD display shows “Password Incorrect, Dismiss”. The
alarm is beep when any of the keys are pressed. You can change all these messages anytime from
the code.
4.1.6 Applications of Arduino Based Door Lock System

 It can be used at highly secure places to secure important documents.


 This circuit can be used as a door lock like keylocks.
 With some modifications, this project can be used as a password-based home appliances system.

4.1.7 Advantages of Arduino Based Door Lock System

o This project is very simple.

o The components are very common.

o Less power consumption.

o It is a very simple but good security system.

DEPT OF ECE,GEC, Huvinahadagali Page 27


EMBEDDED SYSTEM 2023-24

4.1.7 Disadvantages of Arduino Based Door Lock System

o This circuit can not be used remotely.

o By any chance you forget the password, the door can not be opened.

o Can’t possible to manually reset the password using keypad. You need to reupload the
code with new password using Arduino IDE software.

CONCLUSION

DEPT OF ECE,GEC, Huvinahadagali Page 28


EMBEDDED SYSTEM 2023-24

In this article, I’ve shown you how to build a password security lock Utilizing Arduino
Keypad, Keypad, and Servo motor.
The upgraded password-based door lock system using Arduino provides numerous
benefits, including convenience, security, and peace of mind. With its integration with
smartphones, biometric authentication, cloud connectivity, voice commands, battery backup,
machine learning algorithms, and home automation systems, the door lock system is a worthwhile
investment
for those looking to upgrade their home’s security and technology.

REFERENCE

DEPT OF ECE,GEC, Huvinahadagali Page 29


EMBEDDED SYSTEM 2023-24

 The working principle of an Arduino, Abuja, Electronics, Computer and Computation

 (ICECCO)
 11th International Conference Posted: 2014
 S Umbarkar , G Rajput , S Halder , P Har , S Mendgudle keypad based digital door lock security
system
 T K Gannavaram , V , R Bejgam , S B Keshipeddi , S Sunkari , V K Aluvala Conversion of Sound
Energy into Electrical Energy in Highly Populated Areas 6th International Conference on
Communication and Electronics Systems (ICCES) , p. 32 - 36 Posted: 2021
 T K Gannavaram , V , R Bejgam Brief Study and Review on the Next Revolutionary
Autonomous Vehicle Technology International Conference on Advance Computing and
Innovative Technologies in Engineering (ICACITE) , p. 34 - 37 Posted: 2021

DEPT OF ECE,GEC, Huvinahadagali Page 30

You might also like