Professional Documents
Culture Documents
ON
BACHELOR OF TECHNOLOGY IN
Submitted By:-
Keshaw kumar Sharma 14BTECE005
Ajay kumar Rai 14BTECE006
Prakhar Tripathi 14BTECE012
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.
Head of Department
Prof. A.K. Jaiswal
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.
ACKNOWLEDGEMENT
1. INTRODUCTION 1
1.1 Introduction to embedded system 2
6. PROBLEM FACED 10
7. TABLE OF COMPONENTS 11
8. HARDWARE DESCRIPTION 11
8.2.4 Led 23
8.2.5 Resistors 27
8.2.6 Capacitors 30
8.2.7 IR sensor 34
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.
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.
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.
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.
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 .
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:
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.
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.
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
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
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.
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.
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.
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.
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
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.
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.
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
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
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).
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.
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.
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.
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.
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
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
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.
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.
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.
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.
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);
if(s1>400)
{
digitalWrite(2,LOW);
digitalWrite(3,HIGH);
lcd.setCursor(0,0);
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.