You are on page 1of 52

A Project Report

ON

MOTION BASED AUTOMATIC DOOR OPENER

Submitted in partial fulfillment of the requirement of the degree of

BACHELOR OF TECHNOLOGY IN

ELECTRONICS AND COMMUNICATION ENGINEERING

Submitted By:-
Keshaw kumar Sharma 14BTECE005
Ajay kumar Rai 14BTECE006
Prakhar Tripathi 14BTECE012

PROJECT ADVISOR PROJECT COORDINATOR


ER. PRINU C. PHILIP ER. NEELESH AGRAWAL
(ASSISTANT PROFESSOR) (ASSISTANT PROFESSOR)

DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING


SHEPHERD INSTITUTE OF ENGINEERING &TECHNOLOGY
SAM HIGGINBOTTOM UNIVERSITY OF AGRICULTURE TECHNOLOGY &
SCIENCES NAINI, ALLAHABAD-211007

CERTIFICATE
This is to certify that keshaw sharma(14btece005) ,ajay kumar rai(14btece006) and
prakhar tripathi(14btece012), student of btech in electronics and communication
engineerings carried out the work presented in the project of the Training entitled
‘‘MOTION BASED AUTOMATIC DOOR’’as a part of 4th year program of
bachelor of technology in of btech in Electronics and Communication Engineering
from Sam HIigginbottom Institute of Agriculture Technology and Sciences
,Allahabad,under my supervision.

PROJECT ADVISOR PROJECT COORDINATOR


Er. Prinu C. Philip Er. Neelesh Agrawal

Head of Department
Prof. A.K. Jaiswal

DEPARTMENT OF ELECTRONICS & COMMUNICATION ENGINEERING


SHEPHERD INSTITUTE OF ENGINEERING &TECHNOLOGY
SAM HIGGINBOTTOM UNIVERSITY OF AGRICULTURE TECHNOLOGY &
SCIENCES NAINI, ALLAHABAD-211007
ACKNOWLEDGEMENT

It has come out to be a sort of great pleasure and experience for me to work on the project
“MOTION BASED AUTOMATIC DOOR”.I wish to express my indebtedness to those helped us
i.e the faculty of our institute Mr. Prinu C. Philip the preparation of the manual script of the
text .this would not have been made without his help and precious suggestion.finally,I also
warmly thank my colleagues who encouraged us to extent,which made the project succesfull.

NAME OF THE STUDENTS ID. NO. SIGNATURE

KESHAW KUMAR SHARMA 14BTECE005 ……………….

AJAY KUMAR RAI 14BTECE006 ……………….

PRAKHAR TRIPATHI 14BTECE012 ……………….


CONTENTS
Chapter Topic Page No.
CERTIFICATE

ACKNOWLEDGEMENT

1. INTRODUCTION 1
1.1 Introduction to embedded system 2

1.1 .2 Characteristics of embedded system 2

1.1.3 Processors in embedded system 3

2. DESIGN CONCEPT AND APPLICATION 3

3. BLOCK DIAGRAM OF PROJECT MODEL DESIGNED 4

3.1 Block diagram description 5

4. OVERALL CIRCUIT DIAGRAM 5

4.1 Circuit diagram description 6

4.2 Flow chart 6

5. PCB LAYOUT OF THE MAIN CIRCUIT 7

5.1 PCB-(USED in the 1920’s) 8

5.2 PCB-the evolution of the production process 8

6. PROBLEM FACED 10

6.1 Problem faced on hardware 10

7. TABLE OF COMPONENTS 11

8. HARDWARE DESCRIPTION 11

8.1 Component list 11

8.2 Component description 12

8.2.1 Stepdown transformer 12

8.2.2 Voltage regulator 15


8.2.3 Crystal oscillator 19

8.2.4 Led 23

8.2.5 Resistors 27

8.2.6 Capacitors 30

8.2.7 IR sensor 34

8.2.8 L293D motor driver IC 35

8.2.9 Diode 38

9. FUTURE IMPROVEMENTS 41
APPENDIX

1. Software program

2. Data sheet
1. INTRODUCTION:
Automatic doors are doors which open automatically when approached by someone, rather than
needing to be opened manually with a door handle or bar. Our system puts forward an automatic
and precise door opening system based on human movement sensing near the door. Well opening
a door in places like hotels, Shopping complexes and offices can be a tedious task and sometimes
requires hiring a person just for the sake of opening door whenever a person arrives. Well this
project proposes a system that allows for automatic door opening solution by sensing human
presence near it .Our system achieves this functionality with the help of PIR sensors.PIR stands
for passive infrared sensors. Every live body emits some infrared energy. This energy is sensed
by a PIR sensor from a good distance .This signal is then processed and door is opened and
closed based on this data. When a living being arrives with in the sensor range, it detects its
presence and sends out a command that opens the door. The door then automatically closes after
a specific time delay if there is no further motion near the door.

The system can be later enhanced by integrating counter mechanism so as to keep track of the
number of persons inside the facility.

Advantages of automatic door:

1. For people in wheelchairs and other disabled individuals, automatic doors are an
immense boon.since conventional doors can be very hard to work with.it may be
impossible to open a conventional door while seated in a wheelchair or navigating with
crutches.
2. In hospital and scientific labs, automatic door can be used to secure an area by ensuring
that the doors are shut at all times,while reducing the risk of cross-contamination since
people do not need to handle the doors to pass through them.
3. Automatic doors can also be useful in ware houses and other facilities where people
frequently have their hands full, contributing to safety and efficiency by making it easier
for people to get around.
4. It reduces human labour and prevents the situation of inconvenience.

1
1.1 INTRODUCTION TO EMBEDDED SYSTEM:
A precise definition of embedded system is not easy. Simply stated, all computing systems other
than general purpose computer (with monitor, keyboard, etc.) are embedded systems. Systems is
a way of working,organizing or perform one or many tasks according to a fixed set of
rules,program or plan .In other words ,an arrangement in which all units assemble and work
together according to a program or plan.An embedded system is a system that has software
embedded into hardware ,which makes a system dedicated for an application or specific part of
an application or product or part of a larger system .it processes a fixed set of pre-programmed
instructions to control electromechanical equipment which may be part of an even larger system.

A general purpose definition of embedded system is that they are devices used to control,
monitor or assist the operation of equipment, machinery or plant.’’Embedded’’ reflects the facts
that they are an integral part of the system.

An embedded system is an engineering artifact involving computation that is subject to physical


constraints arising through interactions of computational processes with the physical
world.Reaction constraints originate from the behavioural requirements and specify
deadlines,throughput ,and jitter whereas execution constraints originate from the implementation
requirements and put bounds on available processor speeds,power ,memory and hardware failure
rates.The key to embedded system design is to obtain desired functionality under both kinds of
constraints.

1.1.2 CHARACTERISTICS OF EMBEDDED SYSTEM:

a) Embedded system are application specific and single functioned; application known apriori,
the programs are executed repeatedly.

b) Efficiency is of paramount importance for embedded system .They is optimized for energy,
code size, execution time, weight and dimensions, and cost.

c)Embedded systems are typically designed to meet real time constraints; a real time system
reacts to stimuli from the controlled object within the time interval dictated by the environment
.for the real time systems,right answers arriving too late are wrong.

2
d) Embedded systems often interact (sense, manipulate and communicate) with external world
through sensors and actuators and hence are typically reactive systems; a reactive system is in
continual interaction with the environment and executes at a pace determined by that
environment.

e) They generally have minimal or no user interface.

1.1.3 PROCESSORS IN EMBEDDED SYSTEMS:

Embedded system contains processing core. A processor is an important unit in the embedded
system hardware .it is the heart of the embedded system .Embedded processors can be broken
into two broad categories:

a) Ordinary microprocessors use separate integrated circuits for memory and peripherals.
b) Microcontroller has many more peripherals on chip, reducing power consumption, size
and cost.

2. DESIGN CONCEPT AND APPLICATION:


The proposed innovative door control system is mainly based on human detection and intention
analysis.the project is designed for automatic door opening system using PIR sensor Opening and
closing of doors is always a tedious job,especially in places like shopping malls,hotels and
theatres where a person is always required to open the door for visitors. For people in wheel
chairs and other disable individual automatic doors are an immense boon, since conventional
door can be very hard to work with. It may be impossible to open a conventional door while
seated in a wheelchair or navigating with crutches.Automatic door can also be useful in
warehouse and other facilities where people frequently have their hands full, contributing to
safety and efficiency by making it easier for people To get around . this project proposes a system
of automatic opening and closing of door by sensing any body movement near the door. This is
achieved with help of a PIR (passive infrared) sensor. A live body generally emits infrared
energy which is sensed by the PIR sensor from a considerable distance. this sensing signal is fed
to a microcontroller to operate a door motor through motor driver IC.when a body approaches
within the operating range of the sensor,it sends a logical command to open the door .the door
3
Automatically closes with a fixed time delay. If there is no further movement within the PIR
operating range. Interrupt signal are used through limit switches to avoid locked rotor condition
of the motor.
Further this project can be enhanced interfacing a counting arrangement for keeping a record of
entry and exit of people at particular place. This can be achieved by interfacing the system with
an EEPROM (non-volatile memory) to avoid loss of stored data even if the power fails.

3. BLOCK DIAGRAM OF PROJECT MODEL DESIGNED:

Fig No.1 Block Diagram of Motion Based Automatic Door Opener Circuit

4
3.1BLOCK DIAGRAM DESCRIPTION:
While any moving object is sensed by the PIR it develops logic high at its output which gets
inverted by the transistor used to develop a logic low at pin 1 of MC.the output from the PIR i.e.,
passive infrared detector is amplified to a transistor BC547,the output of which at the collector is
connected to pin 1 of the MC.The program is so returned that it delivers appropriate input to the
driver L293D as explained above, to run the motor as it indicate if motor rotates one direction
and vice versa indicating door open and close .

4. OVERALL CIRCUIT DIAGRAM:

Fig No.2 circuit diagram of automatic door opener

5
4.1 CIRCUIT DIAGRAM DESCRIPTION:
The circuit connection of an automatic door opening systems is shown above. Here, PIR sensor
consists of three terminals such as Vcc, Dout and GND. Where, Dout pin is directly connected to
pin14 (A0) of Arduino UNO. An LCD display is used to display the status. LCD display pins RS
and EN are connected to 12 and 13 pins of Arduino. Data pins namely D0 to D7 are connected to
Arduino digital pins 8, 9, 10, 11 and RW is directly connected to GND terminal. Motor driver
L293D is connected to pin0 and pin1 of Arduino for opening & closing the door .Here in the
above circuit, a motor is used for a door.
When a live body approaches in the operating range of the PIR sensor, it sends a signal to open
the door. The door routinely closes with a particular time delay. If there is no extra movement
within the operating range of a PIR sensor. Interrupt indications are used through limit switches
to avoid the motor’s locked rotor condition.
4.2 FLOW CHART:

Fig No.3 Flow Chart of automatic door opener


6

5. PCB LAYOUT OF THE MAIN CIRCUIT:


Fig No.4 PCB layout of the main circuit

To define what a PC board is, we have to look back at history that traces the evolution of
printed circuit boards back to the early 20th century. The first PCB patents for
"printed wire" were issued in the early 1900's but PCBs that we would recognize first
came into use after World War II. In 1925, Charles Ducas of the United States
submitted a patent application for a method of creating an electrical path directly on
an insulated surface by printing through a stencil with electrically conductive inks.
Hence the name "printed wiring" or "printed circuit." An Austrian scientist, Dr Paul
Eisler, is credited with making the first operational printed wiring board in 1943. It
was used as a replacement for bulky radio tube wiring.

7
5.1 PCB – (USED IN THE 1920's):
The earliest PCB's (printed circuit boards) were made from materials like Bakelite, Masonite,
layered cardboard and even thin wooden planks. Holes were drilled into the material and then
flat brass "wires" were riveted or bolted onto the board. Connections to components were usually
made by pressing the end of the brass trace onto a hollow rivet and the component's leads were
simply pressed into the open end of the rivet. Occasionally small nuts and bolts were used in
place of the rivets. These types of PCBs were used in early tube style radios and gramophones in
the 1920's.
By the 50's and early 60's laminates using different types of resins mixed with all sorts of
different materials were being introduced but the pcbs were still single sided. The circuitry was
on one side of the board and the components on the other. The advantages of the PCB over bulky
wiring and cables made it a prime choice for new products being brought into the market place.
But the largest influence on the evolution of the printed wiring board came from the government
agencies responsible for new weapons and communication equipment. Wire ended components
were being used in some of the applications. In the beginning the leads of the components were
held in place on the board by using small nickel plates welded to the lead after it was placed
through the hole.

5.2 PCB - THE EVOLUTION OF THE PRODUCTION PROCESS:


Eventually processes were developed that would plate copper onto the walls of the drilled holes.
That allowed circuits on both sides of the board to be connected electrically. Copper had replaced
brass as the metal of choice because of its ability to carry electrical current, relatively low cost
and ease of manufacturing. In 1956 the US Patent Office issued a patent for the "Process of
Assembling Electrical Circuits" that was sought by a small group of scientists represented by the
US Army. The patented process involved using a base material like melamine to which a layer of
copper foil had been securely laminated. A drawing was made of the wiring pattern and then
photographed onto a zinc plate. The plate was used to create a printing plate for an offset printing
press. An acid resistant ink was printed onto the copper foil side of the board that was etched to
remove the exposed copper leaving the "printed wire" behind. Other methods like using stencils,
screening, hand printing and rubber stamping were also proposed to deposit
8
The ink pattern. Holes were then punched in patterns using dies to match the position of the
component wire leads or terminals. The leads were inserted through the non-plated holes in the
laminate material and then the card was dipped or floated on a bath of molten solder. The solder
would coat the traces as well as connecting the leads of the components to the traces. They also
used tinned eyelets, rivets and washers to attach various types of components to the board. Their
patent even has a drawing showing two single sided boards stacked on top of each other with a
standoff holding them apart. There are components on the top side of each board and one
component shown with its leads extending through the top board into holes on the bottom board,
connecting them together, a rough attempt at making the first multi-layer. Much has changed
since then. With the advent of plating processes that allowed whole walls to be plated came the
first double sided boards. Surface mount pad technology, something we associate with the 1980's
was actually being explored twenty years earlier in the 60's. Solder masks were being applied as
early as 1950 to help reduce the corrosion that was occurring to traces and components. Epoxy
compounds were spread over the surface of the assembled boards similar to what we know now
as conformal coating. Eventually the inks were being screen printed onto the panels before
assembling the boards. Areas that were meant to be soldered were blocked out on the screens. It
helped keep the boards clean, reduce corrosion and oxidation but the tin/lead coating used to coat
the traces would melt during the soldering process causing the mask to flake off. Because of the
wide spacing of the traces it was seen more as a cosmetic problem than a functional issue. By the
1970's circuitry and spacing was becoming smaller and smaller and the tin/lead coating that was
still being used to coat the traces on the boards began fusing traces together during the soldering
process.
Hot air soldering methods began in the late 70's allowing the tin/lead to be stripped after etching
eliminating the problem. Solder mask could then be applied over the bare copper circuits and
leave only the plated holes and pads free to be coated with solder. As holes continued to get
smaller and trace work became more densely packed solder mask bleed and registration issues
brought on dry film masks. They were primarily used in the US while the first photo-image able
masks were being developed in Europe and Japan. In Europe the solvent based "Probimer" ink
was applied by curtain coating the entire panel. The Japanese centered on screen processes using
various aqueous developed LPIs. All of three of these mask types used standard UV exposure
9
Units and photo tools to define the pattern on the panel. By the mid 1990's the aqueous
developed liquid photo-image able masks were dominating the industry with specialized
equipment designed specifically for their application.
The increased complexities and densities that were driving the evolution of solder mask were
also forcing the development of layers of copper traces laminated between layers of dielectric
materials. 1961 marked the first use of multi-layer pcbs in the United States. The development of
the transistor and the miniaturization of other components drew more and more manufacturers
into using printed circuit boards for an increasing number of consumer products. Aerospace
equipment, flight instrumentation, computers and telecommunication products as well as defense
systems and weapons all began to take advantage of the space saving that a multi-layer circuit
board provided. Surface mount devices were being designed that wers wilenth the size and
weight of the comparable through whole components. Followed by the invention of integrated
circuits the circuit board has continued to shrink in almost every way. Rigid boards and cable
applications have given way to flexible circuit boards or combinations of rigid and flexible
PCBs. These and other advancements will keep the manufacture of printed circuit boards a
dynamic field for many years.
6. PROBLEMS FACED:
Various genuine problems were faced during the course of completing this project. Those normal
and genuine problems are not addressed in this section .only the major problems we came across
while completing our project are addressed in this section.
6.1 PROBLEM FACED ON HARDWARE:
To realize a system using real time electronics components are much more difficult than to derive
their theoretical concept. The commercially available IC’s and electronic components were not
that reliable as we thought it would be .Hence many errors and obstacle were faced during their
use.
After getting started with our project we realize the simplicity of the circuitry was just a myth.
The synchronization of the hardware is with the software succeeded after several serious
attempts .with some modules the circuitry worked out on first attempt which we felt lucky. On
the other hand, most of the modules did not work on several attempts and caused massive loss of
our time even on days.
10
7. TABLE OF COMPONENTS:

AUTOMATIC DOOR OPENER


S.NO. NAME OF SIZE SENSIVITY POWER
COMPONENT RANGE SUPPLY
1. Arduino UNO Rectangular NO 5v to perfect
power supply
2. IR sensor Rectangular Up to 20 feet (6 5v-12v input
meters) voltage for most
modules
3. Driver IC 19.8mm to NO 4.5v to 36v
6.3mm

8. HARDWARE DESCRIPTION:
8.1 COMPONENTS LIST:
1. Transformer: Step down Transformer (220/12)
2. Voltage Regulator :IC 7805
3. Crystal oscillator:11.0592MHz
4. LED
5. Resistor: 470ohm(for LED),8.2 K(for power on reset circuit.),10K (for
sensor),Potentiometer(100K)
6. Capacitor:1000 u f (for power supply),10 u f (reset ckt.),3.3 p F (for crystal oscillator)
7. Infrared sensor
8. Motor driver IC
9. Diodes
10. Transistor
11. Arduino UNO
12. 16*2 LCD display

11
8.2 COMPONENT DESCRIPTION:
8.2.1 STEP DOWN TRANSFORMER:
The step down transformer is used to provide this low voltage value which is suitable for
electronics supplying. It transforms home voltage from primary to a low voltage on the
secondary side which is used for the electronic supplying. If electronic devices are designed to
have higher nominal power, transformers with high operating frequency are used (kHz-s). The
transformers with higher nominal power value and 50/60 Hz nominal frequency would be too
large and heavy. Also, the daily used battery chargers use the step-down transformer in its design.
This is a very useful device, indeed. With it, we can easily multiply or divide voltage and current
in AC circuits. Indeed, the transformer has made long-distance transmission of electric power a
practical reality, as AC voltage can be “stepped up” and current “stepped down” for reduced wire
resistance power losses along power lines connecting generating stations with loads.
Voltage levels are reduced by transformers for safer operation and less expensive equipment. A
transformer that increases voltage from primary to secondary (more secondary winding turns
than primary winding turns) is called a step-up transformer. Conversely, a transformer designed
to do just the opposite is called a step-down transformer.

Fig.No.5 step down transformer


In case you were wondering, it is possible to operate either of these transformer types
12
backwards (powering the secondary winding with an AC source and letting the primary
winding power a load) to perform the opposite function: a step-up can function as a step-down
and vice-versa. However, as we saw in the first section of this chapter, efficient operation of a
transformer requires that the individual winding inductances be engineered for specific
operating ranges of voltage and current, so if a transformer is to be used “backwards” like this
it must be employed within the original design parameters of voltage and current for each
winding, lest it prove to be inefficient (or lest it be damaged by excessive voltage or
current!).Transformers are often constructed in such a way that it is not obvious which wires
lead to the primary winding and which lead to the secondary. One convention used in the
electric power industry to help alleviate confusion is the use of “H” designations for the
higher-voltage winding (the primary winding in a step-down unit; the secondary winding in a
step-up) and “X” designations for the lower-voltage winding. Therefore, a simple power
Transformer will have wires labeled “H1”, “H2”, “X1”, and “X2”.
Fig.No.6 Motor generator illustrates the basic principle of the transformer.
In such a machine, a motor is mechanically coupled to a generator, the generator designed to
produce the desired levels of voltage and current at the rotating speed of the motor. While both
motors and generators are fairly efficient devices, the use of both in this fashion compounds
their inefficiencies so that the overall efficiency is in the range of 90% or less. Furthermore,
because motor/generator sets obviously require moving parts, mechanical wear and balance
are factors influencing both service life and performance. Transformers, on the other hand, are
able to convert levels of AC voltage and current at very high efficiencies with no moving

13
Parts, making possible the widespread distribution and use of electric power we take for
granted. In all fairness it should be noted that motor/generator sets have not necessarily been
obsoleted by transformers for all applications. While transformers are clearly superior over
motor/generator sets for AC voltage and current level conversion, they cannot convert one
frequency of AC power to another, or (by themselves) convert DC to AC or visa-versa.
Motor/generator sets can do all these things with relative simplicity, albeit with the limitations
of efficiency and mechanical factors already described. Motor/generator sets also have the
unique property of kinetic energy storage: that is, if the motor’s power supply is momentarily
interrupted for any reason, its angular momentum (the inertia of that rotating mass) will
maintain rotation of the generator for a short duration, thus isolating any loads powered by the
generator from “glitches” in the main power system.
Looking closely at the numbers in the SPICE analysis, we should see a correspondence
between the transformer’s ratio and the two inductances. Notice how the primary inductor (l1)
has 100 times more inductance than the secondary inductor (10000 H versus 100 H), and that
the measured voltage step-down ratio was 10 to 1. The winding with more inductance will
have higher voltage and less current than the other. Since the two inductors are wound around
the same core material in the transformer (for the most efficient magnetic coupling between
the two), the parameters affecting inductance for the two coils are equal except for the number
of turns in each coil. If we take another look at our inductance formula, we see that inductance
is proportional to the square of the number of coil turns:

So, it should be apparent that our two inductors in the last SPICE transformer example

14

Circuit—with inductance ratios of 100:1—should have coil turn ratios of 10:1, because 10
squared equals 100. This works out to be the same ratio we found between primary and
secondary voltages and currents (10:1), so we can say as a rule that the voltage and current
transformation ratio is equal to the ratio of winding turns between primary and secondary.
Fig.No.7 Step-down transformer: (many turns: few turns).
The step-up/step-down effect of coil turn ratios in a transformer (Figure above) is analogous to
gear tooth ratios in mechanical gear systems, transforming values of speed and torque in much
the same way

8.2.2 VOLTAGE REGULATOR 7805:


All voltage sources cannot able to give fixed output due to fluctuations in the circuit. For getting
constant and steady output, the voltage regulators are implemented. The integrated circuits which
are used for the regulation of voltage are termed as voltage regulator ICs. Here, we can discuss
aboutIC7805.The voltage regulator IC 7805 is actually a member of 78xx series of voltage
regulator ICs. It is a fixed linear voltage regulator. The xx present in 78xx represents the value of
the fixed output voltage that the particular IC provides. For 7805 IC, it is +5V DC regulated
power supply. This regulator IC also adds a provision for a heat sink. The input voltage to this
voltage regulator can be up to 35V, and this IC can give a constant 5V for any value of input less
than or equal to 35V.which is the threshold limit. It is a fixed linear voltage regulator.

15
Fig.No.8 LM7805

PIN 1-INPUT : The function of this pin is to give the input voltage. It should be in the range
of 7V to 35V. We apply an unregulated voltage to this pin for regulation. For 7.2V input, the PIN
achieves a maximum efficiency.
PIN 2-GROUND: We connect the ground to this pin. For output and input, this pin is equally
neutral (0V).
PIN 3-OUTPUT: This pin is used to take the regulated output. It will be

 HEAT DISSIPATION IN IC 7805:


In IC 7805 voltage regulator, lots of energy is exhausted in the form of heat. The difference in
the value of input voltage and output voltage comes as heat. So, if the difference between input
voltage and the output voltage is high, there will be more heat generation. Without a heat sink,
this too much heat will cause malfunction.
We call, the bare minimum tolerable difference between the input and output voltage to keep the
output voltage at the proper level as dropout voltage. It is better to keep the input voltage 2 to 3V
greater than the output voltage, or a suitable heat sink should be placed to dissipate excess heat.
We have to calculate the heat sink size properly. The following formula will give an idea of this

calculation. Now, we
can analyze the relation of generated heat and the input voltage value in this regulator with the
following two examples.

16
Assume a system with input voltage 16V and required output current be 0.5A. So, heat generated
Thus, 5.5W heat energy is wasted and the actual energy used
that is almost double energy is wasted as heat. Next, we can consider

the case when input is lower, say 9V. In this case, heat generated From this,
we can conclude that for high input voltage, this regulator IC will become inefficient.

 INTERNAL BLOCK DIAGRAM OF 7805 VOLTAGE REGULATOR:


The internal block diagram of IC 7805 is represented in figure below: The block diagram
comprises of an error amplifier, series pass element, current generator, reference voltage, current
generator, starting circuit, SOA protection and thermal protection.

Fig.No.9 Internal Block Diagram of 7805 Voltage Regulator

Here Operating amplifier performs as error amplifier. The Zener diode is used for giving the
reference voltage. It is shown below.

17
Fig.No.10 Zener diode

Transistor is the series pass element here. It is used for dissipating additional energy in the form
of heat. It controls the output voltage by controlling the current among the input and output. SOA
is the Safe Operating Area. It is in fact the conditions of voltage and current in which the
equipment is expected to work without any self-damage. Here for the SOA protection, bipolar
transistor is implemented with a series resistor and an auxiliary transistor. Heat sink is
implemented for thermal protection when there is high supply voltage.
 REGULATED POWER SUPPLY CIRCUIT:
The voltage regulator 7805 and the other components are arranged in the circuit as shown in
figure.

Fig.No.11 Regulated Power Supply Circuit

18
The purposes of coupling the components to the IC7805 are explained below. C 1- It is the bypass
capacitor, used to bypass very small extent spikes to the earth. C 2 and C3- They are the filter
capacitors. C2 is used to make the slow changes in the input voltage given to the circuit to the
steady form. C3 is used to make the slow changes in the output voltage from the regulator in the
circuit to the steady form. When the value of these capacitors increases, stabilization is enlarged.
But these capacitors single-handedly are unable to filter the very minute changes in the input and
output voltages. C4- like C1, it is also a bypass capacitor, used to bypass very small extent spikes
to the ground or earth. This is done without influencing other components.
 APPLICATIONS OF VOLTAGE REGULATOR 7805 IC:
 Current regulator
 Regulated dual supply
 Building circuits for Phone charger, UPS power supply circuits, portable CD player etc
 Fixed output regulator
 Adjustable output regulator etc.

8.2.3 CRYSTAL OSCILLATOR:


A crystal oscillator is an electronic oscillator circuit which is used for the mechanical resonance
of a vibrating crystal of piezoelectric material. It will create an electrical signal with a given
frequency. This frequency is commonly used to keep track of time for example: wrist watches
are used in digital integrated circuits to provide a stable clock signal and also used to stabilize
frequencies for radio transmitters and receivers. Quartz crystal is mainly used in radio-frequency
(RF) oscillators. Quartz crystal is the most common type of piezoelectric resonator, in oscillator
circuits we are using them so it became known as crystal oscillators. Crystal oscillators must be
designed to provide a load capacitance.
There are different types of oscillator electronic circuits which are in use they are namely: Linear
oscillators – Hartley oscillator, Phase-shift oscillator, Armstrong oscillator, Clapp
oscillator, Colpitts oscillator. Relaxation oscillators – Royer oscillator, Ring oscillator,
Multivibrator and Voltage Controlled Oscillator (VCO). Soon we are going to discuss in detail
about crystal oscillator like, working and applications of a crystal oscillator.

19
 CRYSTAL OSCILLATOR CIRCUIT DIAGRAM:
The above figure is a 20psc New 16MHz Quartz Crystal Oscillator and it is a one kind of crystal
oscillators that works with 16MHz frequency.

Fig.No.12 Crystal Oscillator


Generally bipolar transistors or FETs are used in construction of Crystal oscillator circuits. This
is because operational amplifiers can be used in different low frequency oscillator circuits which
are below 100 KHz but operational amplifiers do not have the bandwidth to operate. It will be a
problem at the higher frequencies that are matched to crystals which are above 1MHz.To
overcome this problem Colpitts crystal oscillator is designed. It will work at higher Frequencies.
In this Oscillator, the LC tank circuit that provides the feedback oscillations has been replaced by
a quartz crystal.

Fig.No.13 Crystal Oscillator Circuit Diagram

20
 CRYSTAL OSCILLATOR WORKING:
Crystal oscillator circuit usually works on the principle of the inverse piezoelectric effect. The
applied electric field will produce a mechanical deformation across some materials. Thus, it
utilizes the vibrating crystal’s mechanical resonance that is made with a piezoelectric material for
generating an electrical signal of a particular frequency.
Usually quartz crystal oscillators are highly stable, consists of good quality factor (Q), they are
small in size, and are economically related. Hence, quartz crystal oscillators circuits are more
superior compared to other resonators like LC circuits, turning forks. Generally
in Microprocessors and Micro controllers we are using an 8MHz crystal oscillator.
The equivalent electrical circuit is also describes the crystal action of the crystal. Just look at the
equivalent electrical circuit diagram shown in the above. The basic components used in the
circuit, inductance L represents crystal mass, capacitance C2 represents compliance, and C1 is
used to represent the capacitance that is formed because of crystal’s mechanical
moulding,resistance R represents the crystal’s internal structure friction, The quartz crystal
oscillator circuit diagram consists of two resonances such as series and parallel resonance, i.e.,
two resonant frequencies.

F
ig.No.14 Crystal Oscillator Working
The series resonance occurs when the reactance produced by capacitance C1is equal and
opposite to the reactance produced by inductance L. The fr and fp represents series and parallel
resonant frequencies respectively, and the values of ‘fr’ and ‘fp’ can be determined by using the
following equations shown in the figure below.

21
 APPLICATION OF CRYSTAL OSCILLATOR:
There are various applications for crystal oscillator in various fields and some of crystal
oscillator applications are given below

 COLPITTS CRYSTAL OSCILLATOR APPLICATION:


Colpitts Oscillator is used to generate a sinusoidal output signal at very high frequencies. This
oscillator can be used as the different types of sensors such as temperature sensor Because of
SAW device which we are using in Colpitts circuit it senses directly from its surface.

Fig.No.15 Colpitts crystal oscillator application

The applications of the Colpitts oscillators mainly involve where the wide range of frequencies is
used. Also used in undamped and continuous oscillation condition. Using some devices in
Colpitts circuit, we can achieve greater temperature stability and high frequency.
Colpitts used for the development of mobile communications and radio communications.

 APPLICATIONS OF ARMSTRONG CRYSTAL OSCILLATOR:


This circuit was popular until the 1940s. These are widely used in the regenerative radio
receivers.In that input, radio frequency signal from the antenna is coupled magnetically into the
tank circuit through an additional winding, and feedback is reduced to gain control in the
feedback loop. Finally, it produces a narrow-band radio-frequency filter and amplifier. In this
Crystal oscillator LC resonant circuit is replaced with feedback loops.

22
Fig.No.16Armstrong Crystal Oscillator
 IN MILITARY AND AEROSPACE:
For the efficient communication system, Crystal Oscillators are used in military and aerospace.
The communication system is to establish and for the navigation purpose and electronic warfare
in the guidance systems
 IN RESEARCH AND MEASUREMENT:

The crystal oscillators are used in research and measurement for the celestial navigation and the
space tracking purpose, in medical devices and in the measuring instruments.

 INDUSTRIAL APPLICATIONS OF CRYSTAL OSCILLATOR:

There are many industrial applications of the crystal oscillator. They are widely used in
computers, instrumentation, digital systems, in phase locked loop systems, modems, marine, and
telecommunications, in sensors and also in disk drives.
Crystal Oscillator is also used in engine controlling, clock and to trip computer, stereo, and in
GPS systems. This is an automotive application.
Crystal oscillators are used in many consumer goods. For example, cable television systems,
video cameras, personal computers, toys and video games, cellular phones, radio systems. This is
Consumer Application of Crystal Oscillator.
8.2.4 LIGHT EMITING DIODE:
The lighting emitting diode is a p-n junction diode. It is a specially doped diode and made up of a

23
Special type of semiconductors. When the light emits in the forward biased, then it is called as a
light emitting diode.
Fig.No.17 light emitting diode

 WORKING OF LIGHT EMITTING DIODE:

The light emitting diode simply, we know as a diode. When the diode is forward biased, then the
electrons & holes are moving fast across the junction and they are combining constantly,
removing one another out. Soon after the electrons are moving from the n-type to the p-type
silicon, it combines with the holes, then it disappears. Hence it makes the complete atom & more
stable and it gives the little burst of energy in the form of a tiny packet or photon of light.

24
Fig.No.18 Working of Light Emitting Diode

The above diagram shows how the light emitting diode works and the step by step process of the
diagram.

 From the diagram, we can observe that the N-type silicon is in red color and it contains
the electrons, they are indicated by the black circles.
 The P- type silicon is in the blue color and it contains holes, they are indicated by the
white circles.
 The power supply across the p-n junction makes the diode forward biased and pushing
the electrons from n-type to p-type. Pushing the holes in the opposite direction.
 Electron and holes at the junction are combined.
 The photons are given off as the electrons and holes are recombined.
 TYPES OF LIGHT EMITTING DIODES:
There are different types of light emitting diodes present and some of them are mentioned
below.

25
 Gallium Arsenide (GaAs) – infra-red
 Gallium Arsenide Phosphide (GaAsP) – red to infra-red, orange
 Aluminium Gallium Arsenide Phosphide (AlGaAsP) – high-brightness
red, orange-red, orange, and yellow
 Gallium Phosphide (GaP) – red, yellow and green
 Aluminium Gallium Phosphide (AlGaP) – green
 Gallium Nitride (GaN) – green, emerald green
 Gallium Indium Nitride (GaInN) – near ultraviolet, bluish-green and
blue
 Silicon Carbide (SiC) – blue as a substrate
 Zinc Selenide (ZnSe) – blue
 Aluminium Gallium Nitride (AlGaN) – ultraviolet

 WORKING PRINCIPLE OF LED:


The working principle of the Light emitting diode is based on the quantum theory. The quantum
theory says that when the electron comes down from the higher energy level to the lower energy
level then, the energy emits from the photon. The photon energy is equal to the energy gap
between these two energy levels. If the PN-junction diode is in the forward biased, The above
diagram shows how the light emitting diode works and the step by step process of the diagram.

 From the diagram, we can observe that the N-type silicon is in red color and it contains
the electrons, they are indicated by the black circles.
 The P- type silicon is in the blue color and it contains holes, they are indicated by the
white circles.
 The power supply across the p-n junction makes the diode forward biased and pushing
the electrons from n-type to p-type. Pushing the holes in the opposite direction.
 Electron and holes at the junction are combined.
 The photons are given off as the electrons and holes are recombined.

The flow of current in the semiconductors is caused by the both flow of free electrons in the
opposite direction of current and flow of electrons in the direction of the current. Hence there
will be recombination due to the flow of these charge carriers. The recombination indicates that
the electrons in the conduction band jump down to the valence band. When the electrons jump
from one band to another band the electrons will emit the electromagnetic energy in the form of
photons and the photon energy is equal to the forbidden energy gap.
26

For an example, let us consider the quantum theory, the energy of the photon is the product of
both Planck constant and frequency of electromagnetic radiation. The mathematical equation is
shown.

Eq = hf.

8.2.5 RESISTORS:
When you first learn about electricity, you discover that materials fall into two basic categories
called conductors and insulators. Conductors (such as metals) let electricity flow through them;
insulators (such as plastics and wood) generally do not. But nothing's quite so simple, is it? Any
substance will conduct electricity if you put a big enough voltage across it: even air, which is
normally an insulator, suddenly becomes a conductor when a powerful voltage builds up in the
clouds—and that's what makes lightning. Rather than talking about conductors and insulators, it's
often clearer to talk about resistance: the ease with which something will let electricity flow
through it. A conductor has low resistance, while an insulator has much higher resistance.
Devices called resistors let us introduce precisely controlled amounts of resistance into electrical
circuits. Let's take a closer look at what they are and how they work!

Electricity flows through a material carried by electrons, tiny charged particles inside atoms.
Broadly speaking, materials that conduct electricity well are ones that allow electrons to flow
freely through them. In metals, for example, the atoms are locked into a solid, crystalline
structure (a bit like a metal climbing frame in a playground). Although most of the electrons
inside these atoms are fixed in place, some can swarm through the structure carrying electricity
with them. That's why metals are good conductors: a metal puts up relatively little resistance to
electrons flowing through it. Plastics are entirely different. Although often solid, they don't have
the same crystalline structure. Their molecules (which are typically very long, repetitive chains
called polymers) are bonded together in such a way that the electrons inside the atoms are fully
occupied. There are, in short, no free electrons that can move about in plastics to carry an electric
current. Plastics are good insulators: they put up a high resistance to electrons flowing through
them.
This is all a little vague for a subject like electronics, which requires precise control of electric
27
Currents. That's why we define resistance more precisely as the voltage in volts required making
a current of 1 amp flow through a circuit. If it takes 500 volts to make 1 amp flow, the resistance
is 500 ohms (written 500 Ω). You might see this relationship written out as a mathematical
equation:
V=I×R
This is known as Ohm's Law for German physicist Georg Simon Ohm (1789–1854).

 HOW RESISTORS WORK:

People who make electric or electronic circuits to do particular jobs often need to introduce
precise amounts of resistance. They can do that by adding tiny components called resistors. A
resistor is a little package of resistance: wire it into a circuit and you reduce the current by a
precise amount. From the outside, all resistors look more or less the same. As you can see in the
top photo on this page, a resistor is a short, worm-like component with colored stripes on the
side. It has two connections, one on either side, so you can hook it into a circuit.
What's going on inside a resistor? If you break one open, and scratch off the outer coating of
insulating paint, you might see an insulating ceramic rod running through the middle
with copper wire wrapped around the outside. A resistor like this is described as wire-wound.
The number of copper turns controls the resistance very precisely: the more copper turns, and the
thinner the copper, the higher the resistance. In smaller-value resistors, designed for lower-power
circuits, the copper winding is replaced by a spiral pattern of carbon. Resistors like this are much
cheaper to make and are called carbon-film. Generally, wire-wound resistors are more precise
and more stable at higher operating temperatures.

 RESISTOR COLOR CODES:

You can figure out the resistance of a resistor from the pattern of colored bands.
1. On most resistors, you'll see there are three rainbow-colored bands, then a space, then a
fourth band colored brown, red, gold, or silver.
2. Turn the resistor so the three rainbow bands are on the left.

28

3. The first two of the rainbow bands tell you the first two digits of the resistance. Suppose
you have a resistor like the one shown here, with colored bands that are brown, black,
and red and a fourth golden band. You can see from the color chart below that brown
means 1 and black means 0, so the resistance is going to start with "10". The third band is
a decimal multiplier: it tells you how many powers of ten to multiply the first two
numbers by (or how many zeros to add on the end, if you prefer to think of it that way).
Red means 2, so we multiply the 10 we've got already by 10 × 10 = 100 and get 1000.
Our resistor is 1000 ohms.
4. The final band is called the tolerance and it tells you how accurate the resistance value
you've just figured out is likely to be. If you have a final band colored gold, it means the
resistance is accurate to within plus or minus 5 percent. So while the officially stated
resistance is 1000 ohms, in practice, the real resistance is likely to be anywhere between
950 and 1050 ohms.

5. If there are five bands instead of four, the first three bands give the value of the
resistance, the fourth band is the decimal multiplier, and the final band is the tolerance.
Five-band resistors quoted with three digits and a multiplier, like this, are necessarily
more accurate than four-band resistors, so they have a lower tolerance value.
Fig.No.19 resistor color codes
29

8.2.6 CAPACITORS:
Stare into the sky most days and you'll see some huge capacitors floating over your head.
Capacitors (sometimes known as condensers) are energy-storing devices that are widely used
in televisions, radios, and other kinds of electronic equipment. Tune a radio into a station, take a
flash photo with a digital camera, or flick the channels on your HDTV and you're making good
use of capacitors. The capacitors that drift through the sky are better known as clouds and,
though they're absolutely gigantic compared to the capacitors we use in electronics, they store
energy in exactly the same way. Let's take a closer look at capacitors and how they work.

Fig.No.20 A small capacitor in a transistor radio circuit.


Take two electrical conductors (things that let electricity flow through them) and separate them
with an insulator (a material that doesn't let electricity flow very well) and you make a capacitor:
something that can store electrical energy. Adding electrical energy to a capacitor is
called charging; releasing the energy from a capacitor is known as discharging.
A capacitor is a bit like a battery, but it has a different job to do. A battery uses chemicals to store
electrical energy and release it very slowly through a circuit; sometimes (in the case of a quartz
watch) it can take several years. A capacitor generally releases its energy much more rapidly—
often in seconds or less. If you're taking a flash photograph, for example, you need your camera
to produce a huge burst of light in a fraction of a second. A capacitor attached to the flash gun
charges up for a few seconds using energy from your camera's batteries. (It takes time to charge a
capacitor and that's why you typically have to wait a little while.) Once the capacitor is fully
charged, it can release all that energy in an instant through the xenon flash bulb. Zap!
30
Capacitors come in all shapes and sizes, but they usually have the same basic components. There
are the two conductors (known as plates, largely for historic reasons) and there's the insulator in
between them (called the dielectric). The two plates inside a capacitor are wired to two electrical
connections on the outside called terminals, which are like thin metal legs you can hook into an
electric circuit.
You can charge a capacitor simply by wiring it up into an electric circuit. When you turn on the
power, an electric charge gradually builds up on the plates. One plate gains a positive charge and
the other plate gains an equal and opposite (negative) charge. If you disconnect the power, the
capacitor keeps hold of its charge (though it may slowly leak away over time). But if you
connect the capacitor to a second circuit containing something like an electric motor or a flash
bulb, charge will flow from the capacitor through the motor or lamp until there's none remaining
on the plates.
Although capacitors effectively have only one job to do (storing charge), they can be put to all
sorts of different uses in electrical circuits. They can be used as timing devices (because it takes a
certain, predictable amount of time to charge them), as filters (circuits that allow only certain
signals to flow), for smoothing the voltage in circuits, for tuning (in radios and TVs), and for a
variety of other purposes. Large super capacitors can also be used instead of batteries.

 CAPACITORS AND CAPACITANCE:


The amount of electrical energy a capacitor can store is called its capacitance. The capacitance of
a capacitor is a bit like the size of a bucket: the bigger the bucket, the more water it can store; the
bigger the capacitance, the more electricity a capacitor can store. There are three ways to
increase the capacitance of a capacitor. One is to increase the size of the plates. Another is to
move the plates closer together. The third way is to make the dielectric as good an insulator as
possible. Capacitors use dielectrics made from all sorts of materials. In transistor radios, the
tuning is carried out by a large variable capacitor that has nothing but air between its plates. In
most electronic circuits, the capacitors are sealed components with dielectrics made
of ceramics such as mica and glass, paper soaked in oil, or plastics such as Mylar.

31

 CAPACITANCE:

The size of a capacitor is measured in units called farads (F), named for English electrical
pioneer Michael Faraday (1791–1867). One farad is a huge amount of capacitance so, in
practice, most of the capacitors we come across are just fractions of a farad—typically
microfarads (millionths of a farad, written μF), nanofarads (thousand-millionths of a farad
written nF), and picofarads (million millionths of a farad, written pF). Super capacitors store far
bigger charges, sometimes rated in thousands of farads.

 WHY DO CAPACITORS STORE ENERGY?

If you find capacitors mysterious and weird, and they don't really make sense to you, try thinking
about gravity instead. Suppose you're standing at the bottom of some steps and you decide to
start climbing. You have to heave your body up, against Earth's gravity, which is an attractive
(pulling) force. As physicists say, you have to "do work" to climb a ladder (work against the
force of gravity) and use energy. The energy you use isn't lost, but stored by your body as
gravitational potential energy, which you could use to do other things (whizzing down a slide
back to ground level, for example).
What you do when you climb steps, ladders, mountains, or anything else is work against Earth's
gravitational field. A very similar thing is going on in a capacitor. If you have a positive electrical
charge and a negative electrical charge, they attract one another like the opposite poles of two
magnets—or like your body and Earth. If you pull them apart, you have to "do work" against this
electrostatic force. Again, just like with climbing steps, the energy you use isn't lost, but stored
by the charges as they separate. This time it's called electrical potential energy. And this, if
you've not guessed by now, is the energy that a capacitor stores. Its two plates hold opposite
charges and the separation between them creates an electric field. That's why a capacitor stores
energy.

 WHY DO CAPACITORS HAVE TWO PLATES?

As we've already seen, capacitors have two conducting plates separated by an insulator. The
32
Bigger the plates, the closer they are, and the better the insulator in between them, the more
charge a capacitor can store. But why are all these things true? Why don't capacitors just have
one big plate? Let's try and find a simple and satisfying explanation.
Suppose you have a big metal sphere mounted on an insulating, wooden stand. You can store a
certain amount of electric charge on the sphere; the bigger it is (the bigger its radius), the more
charge you can store, and the more charge you store, the bigger the potential (voltage) of the
sphere. Eventually, though, you'll reach a point where if you add so much as a single extra
electron (the smallest possible unit of charge), the capacitor will stop working. The air around it
will break down, turning from an insulator to a conductor: charge will zap through the air to
Earth (ground) or another nearby conductor as a spark—an electric current—in a mini bolt of
lightning. The maximum amount of charge you can store on the sphere is what we mean by its
capacitance. The voltage (V), charge (Q), and capacitance are related by a very simple equation:

C = Q/V

So the more charge you can store at a given voltage, without causing the air to break down and
spark, the higher the capacitance. If you could somehow store more charge on the sphere without
reaching the point where you created a spark, you would effectively increase its capacitance.
How might you do that?
Forget about the sphere. Suppose you have a flat metal plate with the maximum possible charge
stored on it and you find the plate is at a certain voltage. If you bring a second identical plate up
close to it, you'll find you can store much more charge on the first plate for the same voltage.
That's because the first plate creates an electric field all around it that "induces" an equal and
opposite charge on the second plate. The second plate therefore reduces the voltage of the first
plate. We can now store more charge on the first plate without causing a spark. We can keep on
doing that until we reach the original voltage. With more charge (Q) stored for exactly the same
voltage (V), the equation C = Q/V tells us that we've increased the capacitance of our charge
storing device by adding a second plate, and this is essentially why capacitors have two plates
and not one. In practice, the extra plate makes a huge difference—which is why all practical
capacitors have two plates.

33
8.2.7 IR SENSOR:
An infrared sensor is an electronic device that emits in order to sense some aspects of the
surroundings. An IR sensor can measure the heat of an object as well as detects the motion.
These types of sensors measures only infrared radiation, rather than emitting it that is called as
a passive IR sensor. Usually in the infrared spectrum, all the objects radiate some form of
thermal radiations. These types of radiations are invisible to our eyes, which can be detected by
an infrared sensor. The emitter is simply an IR LED (Light Emitting Diode) and the detector is
simply an IR photodiode which is sensitive to IR light of the same wavelength as that emitted by
the IR LED. When IR light falls on the photodiode, the resistances and these output voltages,
change in proportion to the magnitude of the IR light received.

Fig.No.21 IR Sensor

 IR SENSOR CIRCUIT DIAGRAM AND WORKING PRINCIPLE:


An infrared sensor circuit is one of the basic and popular sensor modules in an electronic device.
This sensor is analogous to human’s visionary senses, which can be used to detect obstacles and
it is one of the common applications in real time. This circuit comprises of the following
components
 LM358 IC 2 IR transmitter and receiver pair
 Resistors of the range of kilo ohms.
 Variable resistors.
34
 LED (Light Emitting Diode).

Fig.No.22 IR Sensor Circuit


In this project, the transmitter section includes an IR sensor, which transmits continuous IR rays
to be received by an IR receiver module. An IR output terminal of the receiver varies depending
upon its receiving of IR rays. Since this variation cannot be analyzed as such, therefore this
output can be fed to a comparator circuit. Here an operational amplifier (op-amp) of LM 339 is
used as comparator circuit.
When the IR receiver does not receive a signal, the potential at the inverting input goes higher
than that non-inverting input of the comparator IC (LM339). Thus the output of the comparator
goes low, but the LED does not glow. When the IR receiver module receives signal to the
potential at the inverting input goes low. Thus the output of the comparator (LM 339) goes high
and the LED starts glowing. Resistor R1 (100 ), R2 (10k ) and R3 (330) are used to ensure that
minimum 10 mA current passes through the IR LED Devices like Photodiode and normal LEDs
respectively. Resistor VR2 (preset=5k) is used to adjust the output terminals. Resistor VR1
(preset=10k) is used to set the sensitivity of the circuit Diagram. Read more about IR sensors.
8.2.8 L293D MOTOR DRIVER IC:

L293D is a typical Motor driver or Motor Driver IC which allows DC motor to drive on either
direction. L293D is a 16-pin IC which can control a set of two DC motors simultaneously in any
direction. It means that you can control two DC motor with a single L293D IC. Dual H-bridge
35

Motor Driver integrated circuit (IC).

 CONCEPT:
It works on the concept of H-bridge. H-bridge is a circuit which allows the voltage to be flown in
either direction. As you know voltage need to change its direction for being able to rotate the motor
in clockwise or anticlockwise direction, hence H-bridge IC are ideal for driving a DC motor.
In a single L293D chip there are two h-Bridge circuit inside the IC which can rotate two dc motor
independently. Due its size it is very much used in robotic application for controlling DC motors.
Given below is the pin diagram of a L293D motor controller.
There are two Enable pins on l293d. Pin 1 and pin 9, for being able to drive the motor, the pin 1 and
9 need to be high. For driving the motor with left H-bridge you need to enable pin 1 to high. And for
right H-Bridge you need to make the pin 9 to high. If anyone of the either pin1 or pin9 goes low then
the motor in the corresponding section will suspend working. It’s like a switch.
TIP: you can simply connect the pin16 VCC (5v) to pin 1 and pin 9 to make them high.

 L293D PIN DIAGRAM:


Fig.No.23 L293d Pin Diagram
36

 WORKING OF L293D:
There are 4 input pins for l293d, pin 2,7 on the left and pin 15 ,10 on the right as shown on the pin
diagram. Left input pins will regulate the rotation of motor connected across left side and right input
for motor on the right hand side. The motors are rotated on the basis of the inputs provided across the
input pins as LOGIC 0 or LOGIC 1.
In simple you need to provide Logic 0 or 1 across the input pins for rotating the motor.
 L293D LOGIC TABLE:
Let’s consider a Motor connected on left side output pins (pin 3,6). For rotating the motor in
clockwise direction the input pins has to be provided with Logic 1 and Logic 0.
• Pin 2 = Logic 1 and Pin 7 = Logic 0 | Clockwise Direction
• Pin 2 = Logic 0 and Pin 7 = Logic 1 | Anticlockwise Direction
• Pin 2 = Logic 0 and Pin 7 = Logic 0 | Idle [No rotation] [Hi-Impedance state]
• Pin 2 = Logic 1 and Pin 7 = Logic 1 | Idle [No rotation]
In a very similar way the motor can also operate across input pin 15, 10 for motor on the right hand
side.
Fig.No.24 Circuit Diagram For l293d motor driver IC controller
37
 VOLTAGE SPECIFICATION:
VCC is the voltage that it needs for its own internal operation 5v; L293D will not use this
voltage for driving the motor. For driving the motors it has a separate provision to provide motor
supply VSS (V supply). L293d will use this to drive the motor. It means if you want to operate a
motor at 9V then you need to provide a Supply of 9V across VSS Motor supply.
The maximum voltage for VSS motor supply is 36V. It can supply a max current of 600mA per
channel. Since it can drive motors Up to 36v hence you can drive pretty big motors with this
l293d.VCC pin 16 is the voltage for its own internal Operation. The maximum voltage ranges
from 5v and up to 36v.
8.2.9 DIODE:
A diode is a device which only allows unidirectional flow of current if operated within a rated
specified voltage level. A diode only blocks current in the reverse direction while the reverse
voltage is within a limited range otherwise reverse barrier breaks and the voltage at which this
breakdown occurs is called reverse breakdown voltage. The diode acts as a valve in the
electronic and electrical circuit. A P-N junction is the simplest form of the diode which behaves
as ideally short circuit when it is in forward biased and behaves as ideally open circuit when it is
in the reverse biased. Beside simple PN junction diodes, there are different types of diodes
although the fundamental principles are more or less same. So a particular arrangement of diodes
can convert AC to pulsating DC, and hence, it is sometimes also called as a rectifier.

 SYMBOL OF DIODE:
The symbol of a diode is shown below, the arrowhead points in the direction of conventional
current flow.

Fig.No.25 Symbol of diode


38
We can create a simple PN junction diode by doping donor impurity in one portion and acceptor
impurity in other portion of silicon or germanium crystal block. These make a p n junction at the
middle part of the block beside which one portion is p-type (doped with trivalent or acceptor
impurity), and another portion is n-type (doped with pentavalent or donor impurity).

It can also be formed by joining a p-type (intrinsic semiconductor doped with a trivalent
impurity) and n-type semiconductor (intrinsic semiconductor doped with a pentavalent impurity)
together with a special fabrication technique such that a p-n junction is formed. Hence, it is a
device with two elements, the p-type forms anode and the n-type forms the cathode. These
terminals are brought out to make the external connections.
 WORKING PRINCIPLE OF DIODE:
 UNBIASED DIODE:
N-side will have a significant number of electrons, and very few holes (due to thermal excitation)
whereas the p side will have a high concentration of holes and very few electrons. Due to this, a
process called diffusion takes place. In this process free electrons from n side will diffuse
(spread) into the p side and recombine with holes present there, leaving positive immobile (not
moveable) ions in n side and creating negative immobile ions in p side of the diode. Hence, there
will be uncovered positive donor ions in n-type side near the junction edge. Similarly, there will
be uncovered negative acceptor ions in p-type side near the junction edge. Due to this, numbers
of positive ions and negative ions will accumulate on n-side and p-side respectively. This region
so formed is called as depletion region due to the “depletion” of free carriers in the region. Due
to the presence of these positive and negative ions a static electric field called as barrier potential
is created across the pn junction of the diode. It is called as "barrier potential" because it acts as a
barrier and opposes the further migration of holes and electrons across the junction.

 FORWARD BIASED DIODE:


In a PN junction diode when the forward voltage is applied i.e. positive terminal of a source is
connected to the p-type side, and the negative terminal of the source is connected to the n-type
side, the diode is said to be in forward biased condition. We know that there is a barrier potential
across the junction. This barrier potential is directed in the opposite of the forward applied -

39
Voltage. So a diode can only allow current to flow in the forward direction when forward applied
Voltage is more than barrier potential of the junction. This voltage is called forward biased
voltage. For silicon diode, it is 0.7 volts. For germanium diode, it is 0.3 volts. When forward
applied voltage is more than this forward biased voltage, there will be forward current in the
diode, and the diode will become short circuited. Hence, there will be no more voltage drop
across the diode beyond this forward biased voltage, and forward current is only limited by the
external resistance connected in series with the diode. Thus, if forward applied voltage increases
from zero, the diode will start conducting only after this voltage reaches just above the barrier
potential or forward biased voltage of the junction. The time, taken by this input voltage to reach
that value or in other words, the time, taken by this input voltage to overcome the forward biased
voltage is called recovery time.

 REVERSE BIASED DIODE:


Now if the diode is reverse biased i.e. positive terminal of the source is connected to the n-type
end, and the negative terminal of the source is connected to the p-type end of the diode, there
will be no current through the diode except reverse saturation current. This is because at the
reverse biased condition the depilation layer of the junction becomes wider with increasing
reverse biased voltage. Although there is a tiny current flowing from n-type end to p-type end in
the diode due to minority carriers. This tiny current is called reverse saturation current. Minority
carriers are mainly thermally generated electrons and holes in p-type semiconductor and n-type
semiconductor respectively. Now if reverse applied voltage across the diode is continually
increased, then after certain applied voltage the depletion layer will destroy which will cause a
huge reverse current to flow through the diode. If this current is not externally limited and it
reaches beyond the safe value, the diode may be permanently destroyed. This is because, as the
magnitude of the reverse voltage increases, the kinetic energy of the minority charge carriers also
increase. These fast moving electrons collide with the other atoms in the device to knock-off
some more electrons from them. The electrons so released further release much more electrons
from the atoms by breaking the covalent bonds. This process is termed as carrier multiplication
and leads to a considerable increase in the flow of current through the p-n junction. The
associated phenomenon is called Avalanche Breakdown.
40

9. FUTURE IMPROVEMENTS:
 Our project “AUTOMATIC DOOR OPENING AND CLOSING” is mainly intended to
Automated security access operations using a mobile phone.
 The mobile phone present in the system uses auto answer function to lift the call. Each
key in the mobile phone transmits two tones with different frequencies when pressed.
 These transmitted frequencies are decoded using DTMF decoder and the decoded value is
fed as input to micro controller which in turn operates Stepper Motor to which the
Open/close of Door. The input value to the micro controller will be checked and
respective operation of that key will be performed like Open/close of Door. When the
user enters the wrong password then the system automatically sends alerting SMS
messages to the predefined authority number.

 The main disadvantage of this project is that the person who is operating the door doesn’t
know the status of the door whether it is opened or closed. This drawback can be
eliminated by introducing a GSM module, through which intimation on the status of
operated door can be sent.

APPENDIX

1. SOFTWARE PROGRAM:
#include "LiquidCrystal.h"
LiquidCrystal lcd(13,12,11,10,9,8);

void setup()

Serial.begin(9600);

lcd.begin(16,2);

pinMode(2,OUTPUT);

pinMode(3,OUTPUT);

41

void loop()

int s1=analogRead(A0);

Serial.println(s1);

delay(100);

if(s1<400)

digitalWrite(2,HIGH);

digitalWrite(3,LOW);

lcd.setCursor(0,0);

lcd.print("DOOR CLOSE ");

if(s1>400)

{
digitalWrite(2,LOW);

digitalWrite(3,HIGH);

lcd.setCursor(0,0);

lcd.print("DOOR OPEN ");

delay(3000);

2. DATA SHEET:

ARDUINO UNO:
Overview:
The Arduino Uno is a microcontroller board based on the ATmega328 (datasheet). It has 14
digital
Input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic
Resonator, a USB connection, a power jack, an ICSP header, and a reset button. It contains
everything needed to support the microcontroller; simply connect it to a computer with a USB
cable or power it with a AC-to-DC adapter or battery to get started.
The Uno differs from all preceding boards in that it does not use the FTDI USB-to-serial driver
chip. Instead, it features the Atmega16U2 (Atmega8U2 up to version R2) programmed as a USB-
to-serial converter.
Revision 2 of the Uno board has a resistor pulling the 8U2 HWB line to ground, making it easier
to put into DFU mode.
Revision 3 of the board has the following new features:
 1.0 pin out: added SDA and SCL pins that are near to the AREF pin and two other new pins
Placed near to the RESET pin, the IOREF that allow the shields to adapt to the voltage provided
From the board. In future, shields will be compatible both with the board that use the AVR,
which operate with 5V and with the Arduino Due that operate with 3.3V. The second one is a not
connected pin that is reserved for future purposes.
 Stronger RESET circuit.
 Atmega 16U2 replace the 8U2.
"Uno" means one in Italian and is named to mark the upcoming release of Arduino 1.0. The Uno
and version 1.0 will be the reference versions of Arduino, moving forward. The Uno is the latest
in a series of USB Arduino boards, and the reference model for the Arduino platform; for a
comparison with previous versions, see the index of Arduino boards.
Summary
Microcontroller ATmega328
Operating Voltage 5V
Input Voltage (recommended) 7-12VInput Voltage (limits) 6-20V
Digital I/O Pins 14 (of which 6 provide PWM output)
Analog Input Pins 6
DC Current per I/O Pin 40 mA
DC Current for 3.3V Pin 50 mA
Flash Memory 32 KB (ATmega328) of which 0.5 KB used by boot loader
SRAM 2 KB (ATmega328)
EEPROM 1 KB (ATmega328)
Clock Speed 16 MHz
Schematic & Reference Design
EAGLE files: arduino-uno-Rev3-reference-design.zip (NOTE: works with Eagle 6.0 and newer)
Schematic: arduino-uno-Rev3-schematic.pdf
Note: The Arduino reference design can use an Atmega8, 168, or 328, Current models use an
ATmega328, but an Atmega8 is shown in the schematic for reference. The pin configuration is
identical on all three processors.
Power
The Arduino Uno can be powered via the USB connection or with an external power supply. The
power source is selected automatically.
External (non-USB) power can come either from an AC-to-DC adapter (wall-wart) or battery.
The adapter can be connected by plugging a 2.1mm center-positive plug into the board's power
jack. Leads from a battery can be inserted in the Gnd and Vin pin headers of the POWER
connector.
The board can operate on an external supply of 6 to 20 volts. If supplied with less than 7V,
however, the 5V pin may supply less than five volts and the board may be unstable. If using
more than 12V, the voltage regulator may overheat and damage the board. The recommended
range is 7 to 12 volts.
The power pins are as follows:
 VIN. The input voltage to the Arduino board when it's using an external power source (as
Opposed to 5 volts from the USB connection or other regulated power source). You can supply
Voltage through this pins, or, if supplying voltage via the power jack, access it through this pin.
 5V.This pin outputs a regulated 5V from the regulator on the board. The board can be supplied
With power either from the DC power jack (7 - 12V), the USB connector (5V), or the VIN pin of
The board (7-12V). Supplying voltage via the 5V or 3.3V pins bypasses the regulator, and can
Damage your board. We don't advise it.
 3V3. A 3.3 volt supply generated by the on-board regulator. Maximum current draw is 50 mA.
 GND. Ground pins.
Memory
The ATmega328 has 32 KB (with 0.5 KB used for the boot loader). It also has 2 KB of SRAM
and 1 KB of EEPROM (which can be read and written with the EEPROM library).
Input and Output Each of the 14 digital pins on the Uno can be used as an input or output, using
pin Mode (), digital Write (), and digital Read () functions. They operate at 5 volts. Each pin can
provide or receive a maximum of 40 mA and has an internal pull-up resistor (disconnected by
default) of 20-50 kOhms. In , some pins have specialized functions:
 Serial: 0 (RX) and 1 (TX). Used to receive (RX) and transmit (TX) TTL serial data. These
pins are connected to the corresponding pins of the ATmega8U2 USB-to-TTL Serial chip.
 External Interrupts: 2 and 3. These pins can be configured to trigger an interrupt on a low
Value, a rising or falling edge, or a change in value. See the attach Interrupt () function for
Details.
 PWM: 3, 5, 6, 9, 10, and 11. Provide 8-bit PWM output with the analog Write () function. 
SPI: 10 (SS), 11 (MOSI), 12 (MISO), 13 (SCK). These pins support SPI communication
Using the SPI library.
 LED: 13. There is a built-in LED connected to digital pin 13. When the pin is HIGH value, the
LED is on, when the pin is LOW, it's off.
The Uno has 6 analog inputs, labeled A0 through A5, each of which provide 10 bits of resolution
(i.e. 1024 different values). By default they measure from ground to 5 volts, though is it possible
to change the upper end of their range using the AREF pin and the analogReference () function.
Additionally, some pins have specialized functionality:
 TWI: A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire library.
There are a couple of other pins on the board:
 AREF. Reference voltage for the analog inputs. Used with analog Reference ().
 Reset. Bring this line LOW to reset the microcontroller. Typically used to add a reset button to
Shields which block the one on the board.
See also the mapping between Arduino pins and ATmega328 ports. The mapping for the
Atmega8, 168, and 328 is identical.
Communication:
The Arduino Uno has a number of facilities for communicating with a computer, another
Arduino, or other microcontrollers. The ATmega328 provides UART TTL (5V) serial
communication, which is available on digital pins 0 (RX) and 1 (TX). An ATmega16U2 on the
board channels this serial communication over USB and appears as a virtual com port to
software on the computer. The '16U2 firmware uses the standard USB COM drivers, and no
external driver is needed. However, on Windows, an .inf file is required. The Arduino software
includes a serial monitor which allows simple textual data to be sent to and from the Arduino
board. The RX and TX LEDs on the board will flash when data is being transmitted via the USB-
to-serial chip and USB connection to the computer (but not for serial communication on pins 0
and 1).
A Software Serial library allows for serial communication on any of the Uno's digital pins.
The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino software
includes a Wire library to simplify use of the I2C bus; see the documentation for details. For SPI
communication, use the SPI library.
Programming:
The Arduino Uno can be programmed with the Arduino software (download). Select "Arduino
Uno from the Tools > Board menu (according to the microcontroller on your board). For details,
see the reference and tutorials. The ATmega328 on the Arduino Uno comes preburned with a
bootloader that allows you to upload new code to it without the use of an external hardware
programmer. It communicates using the original STK500 protocol (reference, C header files).
You can also bypass the bootloader and program the microcontroller through the ICSP (In-
Circuit Serial Programming) header; see these instructions for details.
The ATmega16U2 (or 8U2 in the rev1 and rev2 boards) firmware source code is available. The
ATmega16U2/8U2 is loaded with a DFU bootloader, which can be activated by:
 On Rev1 boards: connecting the solder jumper on the back of the board (near the map of Italy)
And then resetting the 8U2.
 On Rev2 or later boards: there is a resistor that pulling the 8U2/16U2 HWB line to ground,
Making it easier to put into DFU mode.
You can then use Atmel's FLIP software (Windows) or the DFU programmer (Mac OS X and
Linux) to load a new firmware. Or you can use the ISP header with an external programmer
(overwriting the DFU boot loader). See this user-contributed tutorial for more information.
Automatic (Software) ResetRather than requiring a physical press of the reset button before an
upload, the Arduino Uno is designed in a way that allows it to be reset by software running on a
connected computer. One of the hardware flow control lines (DTR) of the ATmega8U2/16U2 is
connected to the reset line of the ATmega328 via a 100 nanofarad capacitor. When this line is
asserted (taken low), the reset line drops long enough to reset the chip. The Arduino software
uses this capability to allow you to upload code by simply pressing the upload button in the
Arduino environment. This means that the boot loader can have a shorter timeout, as the
lowering of DTR can be well-coordinated with the start of the upload.
This setup has other implications. When the Uno is connected to either a computer running Mac
OS X or Linux, it resets each time a connection is made to it from software (via USB). For the
following halfsecond or so, the bootloader is running on the Uno. While it is programmed to
ignore malformed data (i.e. anything besides an upload of new code), it will intercept the first
few bytes of data sent to the board after a connection is opened. If a sketch running on the board
receives one-time configuration or other data when it first starts, make sure that the software with
which it communicates waits a second after opening the connection and before sending this data.
The Uno contains a trace that can be cut to disable the auto-reset. The pads on either side of the
trace can be soldered together to re-enable it. It's labeled "RESET-EN". You may also be able to
disable the auto-reset by connecting a 110 ohm resistor from 5V to the reset line; see this forum
thread for details.
USB Over current Protection:
The Arduino Uno has a resettable polyfuse that protects your computer's USB ports from shorts
and over current. Although most computers provide their own internal protection, the fuse
provides an extra layer of protection. If more than 500 mA is applied to the USB port, the fuse
will automatically break the connection until the short or overload is removed.
Physical Characteristics:
The maximum length and width of the Uno PCB are 2.7 and 2.1 inches respectively, with the
USB connector and power jack extending beyond the former dimension. Four screw holes allow
the board to be attached to a surface or case. Note that the distance between digital pins 7 and 8
is 160 mil (0.16"), not an even multiple of the 100 mil spacing of the other pins.

You might also like