Sie sind auf Seite 1von 40

CONTENTS

INTRODUCTION _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
POWER SUPPLY SEGMENT

POWER SUPPLY SEGMENT _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

FEMALE CONNECTOR _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

VOLTAGE REGULATOR _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

CAPACITOR _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

RESISTOR _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

LED _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

CONTROLLER SEGMENT

CONTROLLER SEGMENT _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

MCU BASE _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

MCU _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

PIN CONFIGURATION _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

CONNECTION _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

INPUT SEGMENT

KEYPAD_ _ _ _ _ _ _ __ _ _ _ _ __ _ _ _ __ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

OPERATIONAL SEGMENT _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

PROJECT ON BOARD _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

CIRCUIT DIAGRAM _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

CONCLUSION _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

REFERENCES _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ __
DOOR LOCKING USING KEYPAD BASED PASSWORD
Personal safes are revolutionary locking storage cases that open with just the touch of your
finger. The keypad to open doors in the private or business sector allows keyless access to our
house, apartment, office, factory, warehouse or workshop. Everybody wants that only authorized
person access their personal things. Many traditional things like locks were used for a long time.
But there are some problems with the traditional locks. For example if it is required to
authenticate 100 persons, each individuals must have their separate keys. But it is inconvenient
to handle and care. Now the embedded technologies have many solutions for the security without
the physical keys. This system is one of the latest solutions for security. This is a password
based security system. This project is carried over using the embedded technology.

This system can be divided into different segments as:-

Power supply segment

Controller segment

Input segment

Display segment

Operational segment
POWER SUPPLY
Description:
Power supply is the circuit from which we get a desired dc voltage to run the other circuits. The voltage
we get from the main line is 230V AC but the other components of our circuit require 5V DC. Hence a
step-down transformer is used to get 12V AC which is later converted to 12V DC using a rectifier. The
output of rectifier still contains some ripples even though it is a DC signal due to which it is called as
Pulsating DC. To remove the ripples and obtain smoothed DC power filter circuits are used. Here a
capacitor is used. The 12V DC is rated down to 5V using a positive voltage regulator chip 7805. Thus a
fixed DC voltage of 5V is obtained.

A 5V regulated supply is taken as followed:

Each of the blocks is described in more detail below:

 Transformer - steps down high voltage AC mains to low voltage AC.


 Rectifier - converts AC to DC, but the DC output is varying.
 Smoothing - smoothes the DC from varying greatly to a small ripple.
 Regulator - eliminates ripple by setting DC output to a fixed voltage.

TRANSFORMER
Transformer is the electrical device that converts one voltage to another with little loss of power.
Transformers work only with AC. There are two types of transformers as Step-up and Step-down
transformer. Step-up transformers increase voltage, step-down transformers reduce voltage. Most power
supplies use a step-down transformer to reduce the dangerously high mains voltage to a safer low voltage.
Here a step down transformer is used to get 12V AC from the supply i.e. 230V AC.

RECTIFIERS

A rectifier is a circuit that converts AC signals to DC. A rectifier circuit is made using diodes. There are
two types of rectifier circuits as Half-wave rectifier and Full-wave rectifier depending upon the DC
signal generated.

Half-wave Rectifier: It is the rectifier circuit that rectifies only half part of the AC signal. It uses only a
single diode. It only uses only positive part of the AC signal to produce half-wave varying DC and
produce gaps when the AC is negative.
Full-wave Rectifier: It is also called as Bridge Rectifier. A bridge rectifier can be made using four
individual diodes, but it is also available in special packages containing the four diodes required. It is
called a full-wave rectifier because it uses the total AC wave (both positive and negative sections).
SMOOTHING

Smoothing is performed by a large value electrolytic capacitor connected across the DC supply to act as a
reservoir, supplying current to the output when the varying DC voltage from the rectifier is falling. The
diagram shows the unsmoothed varying DC (dotted line) and the smoothed DC (solid line). The capacitor
charges quickly near the peak of the varying DC, and then discharges as it supplies current to the
output. Here a capacitor of 330uF is used as a smoothing circuit.

VOLTAGE REGULATION

Voltage regulators produce fixed DC output voltage from variable DC (a small amount of AC on it).
Normally we get fixed output by connecting the voltage regulator at the output of the filtered DC. It
can also used in circuits to get a low DC voltage from a high DC voltage (for example we use 7805
to get 5V from 12V). There are two types of voltage regulators
1. fixed voltage regulators (78xx, 79xx)

2. Variable voltage regulators (LM317)

In fixed voltage regulators there is another classification

1. Positive voltage regulators

2. Negative voltage regulators

POSITIVE VOLTAGE REGULATORS:


This includes 78xx voltage regulators. The most commonly used ones are 7805 and 7812. 7805 gives
fixed 5V DC voltage if input voltage is in (7.5V-20). You may sometimes have questions like, what
happens if input voltage is <7.5 V or some 3V, the answer is that regulation won't be proper. Suppose if
input is 6V then output may be 5V or 4.8V, but there are some parameters for the voltage regulators like
maximum output current capability, line regulation etc. won't be proper. Remember that electronics
components should be used in the proper voltage and current ratings as specified in datasheet. You can
work without following it, but you won't be able to get some parameters of the component.

NEGATIVE VOLTAGE REGULATORS:


Mostly available negative voltage regulators are of 79xx family. The mainly available 79xx IC's are
7905,7912 1.5A output current ,short circuit protection, ripple rejection are the other features of 79xx IC's.

Many of the fixed voltage regulators have 3 leads and look like power transistors, such as the 7805 (+5V
1A) regulator shown on the above. If adequate heat sinking is provided then it can deliver up to maximum
1A current. For an output voltage of 5v-18v the maximum input voltage is 35v and for an output voltage
of 24V the maximum input voltage is 40V.For 7805 IC, for an input of 10v the minimum output voltage is
4.8V and the maximum output voltage is 5.2V. The typical dropout voltage is 2V.

CAPACITOR:-
A capacitor (formerly known as condenser) is a passive electronic component consisting of a
pair of conductors separated by a dielectric (insulator). An ideal capacitor is characterized by a
single constant value, capacitance, measured in farads. This is the ratio of the electric charge on
each conductor to the potential difference between them.

Electrolytic Capacitors:-

Electrolytic Capacitors are generally used when very large capacitance values are required.
Electrolytic types of capacitors are polarized. Electrolytic Capacitors are generally used in DC
power supply circuits due to their large capacitances and small size to reduce the ripple voltage
or for coupling and decoupling applications.

Fig 10. Cross section view & symbol Fig 11. Outer view

Of electrolytic capacitor
CERAMIC CAPACITOR

This type is very popular non polarized capacitor that is small and inexpensive but has poor
temperature stability and poor accuracy. It contains a ceramic dielectric and a phenolic coating.
It is often used for bypass and coupling applications. Tolerances range from +/-5 to +/-100
percent, while capacitances range from 1 pf to 2.2 uF, with maximum voltage rating from 3 V
to 6 kV.

MYLAR CAPACITOR

It is a non polarized capacitor that is reliable, inexpensive, and has low leakage current but
poor temperature stability. Capacitances range from 0.001 to 10 uF, with voltage ratings from
50 to 600 V.

MICA CAPACITOR
This type is an extremely accurate device with very low leakage currents. It is
constructed with alternate layers of metal foil and mica insulation, stacked and encapsulated.
These capacitors have small capacitances and are often used in high frequency circuits (eg. : RF
circuits). They are very stable under variable voltage and temperature conditions. Tolerances
range from +/-0.25 to +/-5 percent. Capacitances range from 1 pf to 0.01 uF, with maximum
voltage ratings from 100 V to 2.5 kV.

References:-
1. www.extremeelectronics.com
2. www.google.com

RESISTOR
A resistor is a two terminal electronic component that restricts the flow of current in the circuit &
produce a voltage across its terminals that are proportional to the electric current through it in
accordance with ohm’s law.

V = IR
Resistors can be categorized in two types
 Fixed resistors
 Variable resistors
Fixed resistors have their fix value. These are the most common type of resistor. These
resistors are cheap and reliable and stability is high.

KINDS OF FIXED RESISTORS: -


CARBON FILM RESISTOR: -
The most popular resistor type. This resistor made by depositing a carbon film onto a small
ceramic cylinder. A small spiral groove cut into the film controls the amount of carbon between
the leads, hence setting the resistance. Such resistors show excellent reliability, excellent
solderability, noise stability, moisture stability, and heat stability. Typical power ratings range
from 1/4 to 2 W. Resistances range from about 10 Ohm to 1 MOhm, with tolerances around 5 %.

CORBON COMPOSITION: -
This type is also popular. Its made from a mixture of carbon powder and glue like binder. To
increase the resistance, less carbon is added. These resistors show predictable performance, low
inductance, and low capacitance. Power ratings range from about 1/4 to 2 W. Resistances range
from 1 Ohm to about 100 MOhm, with tolerances around +/- 5 percent.

METAL FILM OXIDE: -

This type is general purpose resistor. It uses a ceramic core coated with a metal oxide film.
These resistors are mechanically and electrically stable and readable during high temperature
operation. They contain a special paint on their outer surfaces making them resistant to flames,
solvents, heat, and humidity. Typical resistances range from 1 Ohm to 200 kOhm, with typical
tolerances of +/- 5 percent.
PRECISION METAL FILM: -

This type is very accurate, ultra low noise resistor. It uses a ceramic substrate coated with a
metal film, all encased in an epoxy shell. These resistors are used in precision devices, such as
test instruments, digital and analog devices, and audio and video devices. Resistances range from
about 10 Ohm to 2 MOhm, with power rating from 1/4 to about 1/2 W, and tolerances of +/- 1
percent.
FOIL RESISTORS: -
Foil resistors are similar in characteristics to metal film resistors. Their main advantages are better
stability and lower temperature coefficient of resistance (TCR). They have excellent frequency
response, low TCR, good stability, and are very accurate. They are manufactured by rolling the
same wire materials as used in precision wire wound resistors to make thin strips of foil. This foil
is then bonded to a ceramic substrate and etched to produce the value required. They can be
trimmed further by abrasive processes, chemical machining, or heat treating to achieve the desired
tolerance. Their main disadvantage is that the maximum value is less than metal film resistors.

Grid resistor: -
In heavy-duty industrial high-current applications, a grid resistor is a large convection-cooled
lattice of stamped metal alloy strips connected in rows between two electrodes. Such industrial
grade resistors can be as large as a refrigerator; some designs can handle over 500 amperes of
current, with a range of resistances extending lower than 0.04 ohms. They are used in applications
such as dynamic braking and load banking for locomotives and trams, neutral grounding for
industrial AC distribution, control loads for cranes and heavy equipment, load testing of
generators and harmonic filtering for electric substations.
HIGH POWER WIRE WOUND

These resistors are used for high power applications. Types include vitreous enamel coated,
cement, and aluminium housed wire wound resistors. Resistive elements are made from a resistive
wire that is coiled around a ceramic cylinder. These are the most durable of the resistors, with high
heat dissipation and high temperature stability. Resistances range from 0.1 Ohm to about 150
kOhm, with power ratings from around 2 W to as high as 500 W, or more.

VARIABLE RESISTORS (PRESET):-

Variable resistors provide varying degrees of resistance that can be set with the turn of a knob.
Special kinds of variable resistors include potentiometers, rheostats, and trimmers. Potentiometers
and rheostats are essentially the same thing, but rheostats are used specially for high power AC
electricity, whereas potentiometers typically are used with lower level DC electricity. Both
potentiometers and rheostats are designed for frequent adjustment. Trimmers, on the other hand,
are miniature potentiometers that are adjusted infrequently and usually come with pins that can be
inserted into pcb. They are used for fine tuning circuits (eg. : fine tuning a circuit that goes astray
as it ages), and they are usually hidden within a circuits enclosure box. Variable resistors come
with 2 or 3 terminals. There are 2 kinds of taper, ie. : Linear tapered and nonlinear tapered
(logarithmic). The 'taper' describes the way in which the resistance changes as the control knob is
twisted. Linear taper usually has coded as 'A' while nonlinear tapes has coded as 'B'.

PHOTORESISTORS AND THERMISTORS:-

These are special types of resistors that change resistance when heat or light is applied. Photo-
resistors are made from semi-conductive materials, such as cadmium sulfide. Increasing the light
level will decrease the resistance. This type also called LDR (Light Dependent Resistor).
Thermostats are temperature sensitive resistors. Increasing the temperature will decrease the
resistance (in most cases). This type also called Thermostat NTC (Negative Temperature
Coefficient). The reciprocal type is Thermostat PTC (Positive Temperature Coefficient).
Increasing the temperature will increase its resistance.

Value of the resistors can be calculated by the standard color coding. Resistors have minimum 3
colors and maximum 6 colors on its body. In resistors having 6 colors last color represents the
maximum power.
LED
A light-emitting diode (LED) is a semiconductor light source. LEDs are used as indicator lamps in
many devices. Longer leg of LED represents the anode and the shorter is cathode. LED ratings are
specified by current, not voltage.

Fig 7. LED

SPECIFICATIONS OF LEDS:-

TYPE COLOUR If(max) Vf (Typ.)


STANDARD RED 30mA 1.7V
STANDARD BRIGHT RED 30mA 2.0V
STANDARD YELLOW 30mA 2.1V
STANDARD GREEN 25mA 2.2V
HIGH INTENSITY BLUE 30mA 4.5V
SUPER BRIGHT RED 30mA 1.85V
CONTROLLER SEGMENT
CONTROLLER SEGMENT

This controller segment is used to control all the operations. It is the most important part of

any automatic or embedded system.

A. COMPONENTS USED

SN. COMPONENTS RATING QUANTITY

1. Microcontroller base 40 pins 3

2. Microcontroller AVR ATmega32 1

2. Microcontroller AVR ATmega16 2

3. Capacitor 10uf 1

Microcontroller base:-

Microcontroller base is a 40pin IC Socket. It is used for holding the microcontroller. Since
microcontroller is mounted on this base so there is no need of soldering the microcontrollers.
This is the most significant advantage of using the base. In short it prevents the
microcontroller from the overheating at the time of soldering. Microcontroller base is used for
safe handling the most sensitive part(Pins) of Microcontrollers.
Fig 8 40 pin IC base

Microcontrollers:-
Microcontroller is a cheap, universal integrated circuit that could be programmed and used in
any field of electronics, device or wherever needed. Micro suggests that the device is small,
and controller tells us that the device might be used to control objects, processes, or events.
Another term to describe a microcontroller is embedded controller, because the
microcontroller and its support circuits are often built into, or embedded in, the devices they
control. This is also true for this project. All the input output devices have to interface with it.
Generally three types of microcontrollers are used in embedded Systems,
1. 8051
2. PIC
3. AVR

What is what in the microcontroller?

All the operations within the microcontroller are performed at high speed and quite simply, but the
microcontroller itself would not be so useful if there are not special circuits which make it complete. In
continuation, we are going to put our attention to them.
READ ONLY MEMORY (ROM)

Read Only Memory (ROM) is a type of memory used to permanently save the program being
executed. The size of the program that can be written depends on the size of this memory. ROM
can be built in the microcontroller or added as an external chip, which depends on the type of the
microcontroller. Both options have some disadvantages. If ROM is added as an external chip, the
microcontroller is cheaper and the program can be considerably longer. At the same time, a
number of available pins is reduced as the microcontroller uses its own input/output ports for
connection to the chip.

RANDOM ACCESS MEMORY (RAM)

Random Access Memory (RAM) is a type of memory used for temporary storing data and
intermediate results created and used during the operation of the microcontrollers. The content of
this memory is cleared once the power supply is off. For example, if the program performs an
addition, it is necessary to have a register standing for what in everyday life is called the “sum” .
For that purpose, one of the registers in RAM is called the "sum" and used for storing results of
addition. The size of RAM goes up to a few KBs.

ELECTRICALLY ERASABLE PROGRAMMABLE ROM (EEPROM)

The EEPROM is a special type of memory not contained in all microcontrollers. Its contents may
be changed during program execution (similar to RAM), but remains permanently saved even
after the loss of power (similar to ROM). It is often used to store values, created and used during
operation (such as calibration values, codes, values to count up to etc.), which must be saved after
turning the power supply off. A disadvantage of this memory is that the process of programming is
relatively slow. It is measured in milliseconds.
SPECIAL FUNCTION REGISTERS (SFR)

Special function registers are part of RAM memory. Their purpose is predefined by the
manufacturer and cannot be changed therefore. Since their bits are physically connected to
particular circuits within the microcontroller, such as A/D converter, serial communication module
etc., any change of their state directly affects the operation of the microcontroller or some of the
circuits. For example, writing zero or one to the SFR controlling an input/output port causes the
appropriate port pin to be configured as input or output. In other words, each bit of this register
controls the function of one single pin.
PROGRAM COUNTER

Program Counter is an engine running the program and points to the memory address containing
the next instruction to execute. After each instruction execution, the value of the counter is
incremented by 1. For this reason, the program executes only one instruction at a time just as it is
written. However…the value of the program counter can be changed at any moment, which causes
a “jump” to a new memory location. This is how subroutines and branch instructions are executed.
After jumping, the counter resumes even and monotonous automatic counting +1, +1, +1…

CENTRAL PROCESSOR UNIT (CPU)

As its name suggests, this is a unit which monitors and controls all processes within the
microcontroller and the user cannot affect its work. It consists of several smaller subunits, of
which the most important are:

 Instruction decoder is a part of the electronics which recognizes program instructions and
runs other circuits on the basis of that. The abilities of this circuit are expressed in the
"instruction set" which is different for each microcontroller family.
 Arithmetical Logical Unit (ALU) performs all mathematical and logical operations upon
data.
 Accumulator is an SFR closely related to the operation of ALU. It is a kind of working desk
used for storing all data upon which some operations should be executed (addition, shift
etc.). It also stores the results ready for use in further processing. One of the SFRs, called
the Status Register, is closely related to the accumulator, showing at any given time the
"status" of a number stored in the accumulator (the number is greater or less than zero
etc.).

INPUT/OUTPUT PORTS (I/O PORTS)

In order to make the microcontroller useful, it is necessary to connect it to peripheral devices.


Each microcontroller has one or more registers (called a port) connected to the microcontroller
pins.
OSCILLATOR

Even pulses generated by the oscillator enable harmonic and synchronous operation of all circuits
within the microcontroller. It is usually configured as to use quartz-crystal or ceramics resonator
for frequency stabilization. It can also operate without elements for frequency stabilization (like
RC oscillator). It is important to say that program instructions are not executed at the rate imposed
by the oscillator itself, but several times slower. It happens because each instruction is executed in
several steps. For some microcontrollers, the same number of cycles is needed to execute any
instruction, while it's different for other microcontrollers. Accordingly, if the system uses quartz
crystal with a frequency of 20MHz, the execution time of an instruction is not expected 50nS, but
200, 400 or even 800 nS, depending on the type of the microcontroller!
PROGRAM

Unlike other integrated circuits which only need to be connected to other components and turn
the power supply on, the microcontrollers need to be programmed first. This is a so called "bitter
pill" and the main reason why hardware-oriented electronics engineers stay away from
microcontrollers. It is a trap causing huge losses because the process of programming the
microcontroller is basically very simple.

In order to write a program for the microcontroller, several "low-level" programming languages
can be used such as Assembly, C and Basic (and their versions as well). Writing program
procedure consists of simple writing instructions in the order in which they should be executed.
There are also many programs running in Windows environment used to facilitate the work
providing additional visual tools.

INTERRUPTS

Electronics is usually faster than physical processes it should keep under control. This is why the
microcontroller spends most of its time waiting for something to happen or execute. In other
words, when some event takes place, the microcontroller does something. In order to prevent the
microcontroller from spending most of its time endlessly checking for logic state on input pins
and registers, an interrupt is generated. It is the signal which informs the central processor that
something attention worthy has happened. As its name suggests, it interrupts regular program
execution. It can be generated by different sources so when it occurs, the microcontroller
immediately stops operation and checks for the cause. If it is needed to perform some operations,
a current state of the program counter is pushed onto the Stack and the appropriate program is
executed. It's the so called interrupt routine.
In this project AVR ATmega16 microcontroller is used.

IMPORTANT FEATURES OF AT MEGA 16:-


- 8-bit Microcontroller

- Advanced RISC Architecture:-

- 131 Powerful Instructions

- 32 x 8 General Purpose Working Registers

- Fully Static Operation

- Up to 16 MIPS Throughput at 16 MHz

- 16K Bytes of In-System Self-Programmable Flash

Endurance: 10, 0 00 Write/Erase Cycles

- 512 Bytes EEPROM

Endurance: 100,000 Write/Erase Cycles

- 1K Byte Internal SRAM

- Four PWM Channels

- 8-channel, 10-bit ADC

- Programmable Serial USART

- On-chip Analogue Comparator

- External and Internal Interrupt Sources

- I/O and Packages:-

32 Programmable I/O Lines

40-pin PDIP, 44-lead TQFP

- Operating Voltages:-

2.7 - 5.5V for AT mega 16L


4.5 - 5.5V for AT mega 16

- Speed Grades:-

0 - 8 MHz for ATmega16L

- Power Consumption @ 1 MHz, 3V, and 25°C :-

For ATmega16L

Active: 1.1 mA

Idle Mode: 0.35 mA

Power-down Mode: < 1 µA


PIN CONFIGURATION:-

Fig. 9 Pin configuration of AT mega 16


AT mega 16 can be divided into four ports:-

1. PORT A:- from pin 33 to 40

2. PORT B:- from pin 1 to 8

3. PORT C:- from pin 22 to 29

4. PORT D:- from pin 14 to 21

Each port is an 8 bit bidirectional I/O port. Some pins of AT mega 16 also have some special
function.
PORT A can used as bi-directional port as well as ADC. In this project, we are utilizing the various
functions given in the At mega 16 MCU. The various functions which are utilized in this project are:
 ADC
 I/o Operation
 Interrupts
 USART
 Reset
Based on these functions and assembling the proper codes in the Microcontrollers, We made an
executable model for a full proof Security System.

References:-
1. Datasheet of ATmega16 microcontroller
2. Atmel AVR Microcontroller primer : programing and intrefacing - Steven F
Barrett, Daniel J Pack
3. www.google.com
CONNECTIONS

Fig. 11 General Connections of microcontroller

In this section VCC (pin 10) and AVCC (pin 30) of microcontroller is shorted and connected to the output
pin of the 7805. There are two ground terminals (pin 11 and pin 31) present in microcontroller which is
connected with the ground of the 7805. A 10uf capacitor is connected with the ground and AREF of
microcontroller.
INPUT SEGMENT

In this project keypad is used as input device.

4X4 KEYPAD
Keyboards are organized in a matrix of rows and columns. The CPU accesses both rows and
columns through ports. Therefore, with an 8-bit port, a 4 x 4 matrix of keys can be connected to a
microprocessor. When a key is pressed, a row and a column make a contact. Otherwise, there is
no connection between rows and columns.

The rows are connected to an output port and the columns are connected to an input port.
It is the function of the microcontroller to scan the keyboard continuously to detect and identify
the key pressed. 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 columns is D3 – D0 = 1111,
no key has been pressed and the process continues till key press is detected. If one of the column
bits has a zero, this means that a key press has occurred.

Starting with the top row, the microcontroller grounds it by providing a low to row D0 only. It
reads the columns, 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 find out which column the pressed key belongs to.
OPERATIONAL SEGMENT:

This segment shows us what are the applications performed by this circuit. In this part a motor is
driven through the motor driver IC L293D. This motor will be used for various applications. It can
open the gate and other applications can be performed. This is the main purpose of this project to
authenticate more than one person to open the gate.

L293D: MOTOR DRIVER

DC motor drives are used for many speed and position control systems where their excellent
performance, ease of control and high efficiency are desirable characteristics. DC motor speed control
can be achieved using L293D or H-bridge circuits.

H-BRIDGE:
 H Bridge is capable of driving a DC motor in both the directions.

Based on the switch states, direction of the motor can be changed


PIN DIAGRAM OF L293D:
A simple schematic for interfacing a DC motor using L293D is shown
below.

As you can see in the circuit, three pins are needed for interfacing a DC motor (A, B, Enable).
If you want the o/p to be enabled completely then you can connect Enable to VCC and only 2
pins needed from controller to make the motor work.

As per the truth table mentioned in the image above it is fairly simple to program the
microcontroller. It is also clear from the truth table of BJT circuit and L293D the
programming will be same for both of them, just keeping in mind the allowed combinations
of A and B.
CIRCUIT DIAGRAM:
CODE:
DESCRIPTION:
Here in this project we are using a microcontroller Atmega 16 which works as the brain of our
project. First we have made a power supply unit which takes the AC input from the mains and
convert it into the 5v dc. There is a 12-0-12 step-down transformer used in this circuit which
converts the 230v, 50 Hz AC mains into 12V AC. Now we have used a bridge rectifier circuit
which converts the 12 v ac into 12 v dc. This 12 v dc is fed to the input of 7805 ic which
regulates this voltage to 5 volt which is needed to drive our microcontroller as well as the other
circuitry used. Our microcontroller takes the input from the 4x4 keypad which is connected to
the one port of microcontroller i.e. PORTA. A motor which is connected to the gate takes its
input from microcontroller which is after taking the correct input as password from the keypad
starts to move resulting in the opening of gate for some time.

CONCLUSION:-
This project will create a revolution in the field of manually operated devices by replacing the same
with the automatic devices. In this system, keypad technology is used for the security purpose. This
can be a better replacement of the traditional locking. It is more reliable, convenient and safe. It has a
wide range of applications. It can be widely used in offices and home securities. This project can be
implemented for industrial Purposes.

REFERENCES:-

1. Datasheet of 7805

2. Data sheet of touch screen sensor

3. Datasheet of ATmega16 microcontroller

4. Atmel AVR Microcontroller primer : programing and intrefacing -


Steven F Barrett, Daniel J Pack

5. Electronics device and circuit theory- R. L. Boylestad


Websites:-
6. http://www.electronics-tutorials.ws/index.html
7. http://dsaprojects.110mb.com/electronics/data_book/capacitors.html
8. www.google.com

Das könnte Ihnen auch gefallen