Vous êtes sur la page 1sur 50

A Project Report on

“AUTOMATIC MOTOR-BIKE STAND SLIDER”


By

Mr.Bansode Shubham Ujjwalkumar Exam No : [B150750891]

Mr.Ghuge Balaji Balasaheb Exam No : [B150750903]

Mr.Tikone Sagar Dipak Exam No : [B150750924]

Mr.Anpat Suraj Dattatray Exam No : [B150750888]

Guide

Prof. S. C. Mahadik

Department of Mechanical Engineering


Shahajirao Patil Vikas Pratishtan’s
S.B. Patil College of Engineering, Indapur
[2018 - 19]
CERTIFICATE
This is to certify that the project entitled
“AUTOMATIC MOTOR-BIKE STAND SLIDER”

Submitted by

Mr.Bansode Shubham Ujjwalkumar Exam No : [B150750891]

Mr.Ghuge Balaji Balasaheb Exam No : [B150750903]

Mr.Tikone Sagar Dipak Exam No : [B150750924]

Mr.Anpat Suraj Dattatray Exam No : [B150750888]

is a bonafide work carried out by them under the supervision of Prof. S.C.Mahadik and
it is approved for the partial fulfillment of Degree of Bachelor of Mechanical
Engineering of Savitribai Phule Pune University.

Date:
Place: SBPCOE, Indapur

Prof. S.C. Mahadik Internal Examiner


(Guide)

Prof. S. R. Kshirsagar Dr. P.D. Nemade


(Head of the department) (Principal)

External Examiner

Seal
Automatic bike stand

INTRODUCTION:

In all over world everywhere motorcycle are used. The side stand plays major roll
while the vehicle is in rest position. But it has some disadvantages takes place as
while the driver starting the motorcycle, there may be possibility of forget to release
the side stand this will caused to unwanted troubles. This is a new type of side stand
which is automatically retracting the side stand through some mechanical and
electronic arrangement. In this system microcontroller, speed sensor, dc battery is
used. Through the speed sensor, sensor sense the rotation of the wheel and sends
the signal to the microcontroller which is actuate the dc motor which is caused the
disengage the stand from the road. A motorcycle side stand is nearly universal
method of allowing a motorcycle rider to park his vehicle easily. If this stand is in the
park position while the motorcycle is ridden through left turn a serious hazard exists.
A new type stand side stand which is automatically retracting side stand is invented
to prevent such type of accidents. Side stand mounted behind bottom bracket and
can be bolted on either clamping the chain stays, or welded in to place as an integral
part of the frame.
The motorcycle side stand consists of steel rod held in both park and stopped
position by an over centered spring. It is to provide the stand stability and a support
to the motorcycle. Many side stand designs, attachments, mechanisms and rider
warning system. Some side stand retracts automatically when the motorcycle is
lifted off the support. Some retract if they contact the ground when the motorcycle
is moving. Many different concepts have been applied for this hazard

COMPONENT OF SYSTEM

1) Battery
2) DC motor
3) Push button
4) Microcontroller
5) Side stand
MOTOR DRIVER (L293D)

Features:
 Wide supply-voltage range: 4.5V to 36V
 Separate input- logic supply
 Internal ESD protection
 Thermal shutdown
 High-Noise-Immunity input
 Functional Replacements for SGS L293 and SGS L293D
 Output current 1A per channel (600 mA for L293D)
 Peak output current 2 A per channel (1.2 A for L293D)
 Output clamp diodes for Inductive Transient Suppression(L293D)

DESCRIPTION:

L293D is a dual H-bridge motor driver integrated circuit (IC). Motor drivers act as
current amplifiers since they take a low-current control signal and provide a higher-current
signal. This higher current signal is used to drive the motors.

L293D contains two inbuilt H-bridge driver circuits. In its common mode of
operation, two DC motors can be driven simultaneously, both in forward and reverse
direction. The motor operations of two motors can be controlled by input logic at pins 2 & 7
and 10 & 15. Input logic 00 or 11 will stop the corresponding motor. Logic 01 and 10 will
rotate it in clockwise and anticlockwise directions, respectively.

Enable pins 1 and 9 (corresponding to the two motors) must be high for motors to
start operating. When an enable input is high, the associated driver gets enabled. As a result,
the outputs become active and work in phase with their inputs. Similarly, when the enable
input is low, that driver is disabled, and their outputs are off and in the high-impedance state.

Block diagram:
FIG: BLOCK DIAGRAM OF L293D

Pin Diagram:
Pin description:
DC MOTOR

What is DC Motor?

A DC motor is an electric motor that runs on direct current (DC) electricity. In any electric
motor, operation is based on simple electromagnetism. A current-carrying conductor
generates a magnetic field; when this is then placed in an external magnetic field, it will
experience a force proportional to the current in the conductor, and to the strength of the
external magnetic field. As you are well aware of from playing with magnets as a kid,
opposite (North and South) polarities attract, while like polarities (North and North, South
and South) repel. The internal configuration of a DC motor is designed to harness the
magnetic interaction between a current-carrying conductor and an external magnetic field to
generate rotational motion.
Let's start by looking at a simple 2-pole DC electric motor (here red represents a
magnet or winding with a "North" polarization, while green represents a magnet or winding
with a "South" polarization).

Fig.4.8(c) DC motor

Every DC motor has six basic parts -- axle, rotor (a.k.a., armature), stator,
commutator, field magnet(s), and brushes. In most common DC motors, the external
magnetic field is produced by high-strength permanent magnets1. The stator is the stationary
part of the motor -- this includes the motor casing, as well as two or more permanent magnet
pole pieces. The rotor rotates with respect to the stator. The rotor consists of windings
(generally on a core), the windings being electrically connected to the commutator. The
above diagram shows a common motor layout -- with the rotor inside the stator (field)
magnets.
The geometry of the brushes, commutator contacts, and rotor windings are such that
when power is applied, the polarities of the energized winding and the stator magnet(s) are
misaligned, and the rotor will rotate until it is almost aligned with the stator's field magnets.
As the rotor reaches alignment, the brushes move to the next commutator contacts, and
energize the next winding. Given our example two-pole motor, the rotation reverses the
direction of current through the rotor winding, leading to a "flip" of the rotor's magnetic field,
driving it to continue rotating.

In real life, though, DC motors will always have more than two poles (three is a very
common number). In particular, this avoids "dead spots" in the commutator. You can imagine
how with our example two-pole motor, if the rotor is exactly at the middle of its rotation
(perfectly aligned with the field magnets), it will get "stuck" there. Meanwhile, with a two-
pole motor, there is a moment where the commutator shorts out the power supply (i.e., both
brushes touch both commutator contacts simultaneously). This would be bad for the power
supply, waste energy, and damage motor components as well. Yet another disadvantage of
such a simple motor is that it would exhibit a high amount of torque "ripple".
So since most small DC motors are of a three-pole design, let's tinker with the workings of
one via an interactive animation (JavaScript required):

You'll notice a few things from this -- namely, one pole is fully energized at a time
(but two others are "partially" energized). As each brush transitions from one commutator
contact to the next, one coil's field will rapidly collapse, as the next coil's field will rapidly
charge up (this occurs within a few microsecond). We'll see more about the effects of this
later, but in the meantime you can see that this is a direct result of the coil windings' series
wiring.

BATTERY

An electrical battery is a combination of one or more electrochemical cells, used to convert


stored chemical energy into electrical energy. The battery has become a common power
source for many household and industrial applications.

Batteries may be used once and discarded, or recharged for years as in standby
power applications. Miniature cells are used to power devices such as hearing aids and
wristwatches; larger batteries provide standby power for telephone exchanges or computer
data centers.

WORKING OF BATTERY:

A battery is a device that converts chemical energy directly to electrical energy. It


consists of a number of voltaic cells; each voltaic cell consists of two half cells connected in
series by a conductive electrolyte containing anions and cat ions. One half-cell includes
electrolyte and the electrode to which anions (negatively-charged ions) migrate, i.e. the anode
or negative electrode; the other half-cell includes electrolyte and the electrode to which cat
ions (positively-charged ions) migrate, i.e. the cathode or positive electrode. In the red ox
reaction that powers the battery, reduction (addition of electrons) occurs to cat ions at the
cathode, while oxidation (removal of electrons) occurs to anions at the anode. The electrodes
do not touch each other but are electrically connected by the electrolyte. Many cells use two
half-cells with different electrolytes. In that case each half-cell is enclosed in a container, and
a separator that is porous to ions but not the bulk of the electrolytes prevents mixing.
Each half cell has an electromotive force (or emf), determined by its ability to
drive electric current from the interior to the exterior of the cell. The net emf of the cell is the
difference between the emfs of its half-cells. Therefore, if the electrodes have emfs and, in
other words, the net emf is the difference between the reduction potentials of the half-
reactions.

The electrical driving force or across the terminals of a cell is known as the
terminal voltage (difference) and is measured in volts. The terminal voltage of a cell that is
neither charging nor discharging is called the open-circuit voltage and equals the emf of the
cell. Because of internal resistance, the terminal voltage of a cell that is discharging is smaller
in magnitude than the open-circuit voltage and the terminal voltage of a cell that is charging
exceeds the open-circuit voltage. An ideal cell has negligible internal resistance, so it would
maintain a constant terminal voltage of until exhausted, then dropping to zero. If such a cell
maintained 1.5 volts and stored a charge of one Coulomb then on complete discharge it
would perform 1.5 Joule of work. In actual cells, the internal resistance increases under
discharge, and the open circuit voltage also decreases under discharge. If the voltage and
resistance are plotted against time, the resulting graphs typically are a curve; the shape of the
curve varies according to the chemistry and internal arrangement employed.
An electrical battery is one or more electrochemical cells that convert stored chemical energy
into electrical energy. Since the invention of the first battery (or "voltaic pile") in 1800 by
Alessandro Volta, batteries have become a common power source for many household and
industrial applications. According to a 2005 estimate, the worldwide battery industry
generates US$48 billion in sales each year, with 6% annual growth. There are two types of
batteries: primary batteries (disposable batteries), which are designed to be used once and
discarded, and secondary batteries (rechargeable batteries), which are designed to be
recharged and used multiple times. Miniature cells are used to power devices such as hearing
aids and wristwatches; larger batteries provide standby power for telephone exchanges or
computer data centers.
Principle of operation
A battery is a device that converts chemical energy directly to electrical energy. It consists of
a number of voltaic cells; each voltaic cell consists of two half cells connected in series by a
conductive electrolyte containing anions and cations. One half-cell includes electrolyte and
the electrode to which anions (negatively charged ions) migrate, i.e., the anode or negative
electrode; the other half-cell includes electrolyte and the electrode to which cations
(positively charged ions) migrate, i.e., the cathode or positive electrode. In the redox reaction
that powers the battery, cations are reduced (electrons are added) at the cathode, while anions
are oxidized (electrons are removed) at the anode. The electrodes do not touch each other but
are electrically connected by the electrolyte. Some cells use two half-cells with different
electrolytes. A separator between half cells allows ions to flow, but prevents mixing of the
electrolytes.
Each half cell has an electromotive force (or emf), determined by its ability to drive electric
current from the interior to the exterior of the cell. The net emf of the cell is the difference
between the emfs of its half-cells, as first recognized by Volta. Therefore, if the electrodes
have emfs and , then the net emf is ; in other words, the net emf is the
difference between the reduction potentials of the half-reactions. The electrical driving force
or across the terminals of a cell is known as the terminal voltage (difference) and is
measured in volts. The terminal voltage of a cell that is neither charging nor discharging is
called the open-circuit voltage and equals the emf of the cell. Because of internal resistance,
the terminal voltage of a cell that is discharging is smaller in magnitude than the open-circuit
voltage and the terminal voltage of a cell that is charging exceeds the open-circuit voltage.
An ideal cell has negligible internal resistance, so it would maintain a constant terminal
voltage of until exhausted, then dropping to zero. If such a cell maintained 1.5 volts and
stored a charge of one coulomb then on complete discharge it would perform 1.5 joule of
work. In actual cells, the internal resistance increases under discharge, and the open circuit
voltage also decreases under discharge. If the voltage and resistance are plotted against time,
the resulting graphs typically are a curve; the shape of the curve varies according to the
chemistry and internal arrangement employed.
As stated above, the voltage developed across a cell's terminals depends on the energy release
of the chemical reactions of its electrodes and electrolyte. Alkaline and carbon-zinc cells have
different chemistries but approximately the same emf of 1.5 volts; likewise NiCd and NiMH
cells have different chemistries, but approximately the same emf of 1.2 volts. On the other
hand the high electrochemical potential changes in the reactions of lithium compounds give
lithium cells emfs of 3 volts or more.

Lead-acid

Tried, tested, and trusted, lead-acid batteries have been with us since the middle
of the 19th century. With an overall rating of 12 volts, they have six separate
cells, each producing 2 volts. Crudely reduced to its basic components, each cell
has a "spongy" lead metal electrode (negative), a lead dioxide electrode
(positive), and a sulfuric acid electrolyte. As the battery discharges, both
electrodes become coated with lead sulfate and the sulfuric acid is largely
converted into water, while electrons flow out around the external circuit to
provide power.

Lead-acid batteries made it possible to start cars without the help of a dangerous
and dirty hand crank. Normally, you never have to recharge them—because
your car does that automatically. The battery discharges (gives up a little of its
energy) to help the car's gasoline engine start up, and recharges (gets energy
back again) when the engine begins generating electrical energy through a
device called an alternator. As for disadvantages, lead-acid batteries are
relatively big, surprisingly heavy (try lifting one!), expensive, and can't be fully
charged and discharged too many times. Another problem is their use of toxic
lead metal, which can cause environmental problems when they're dumped in
landfills.

Nickel-cadmium

Nickel-cadmium (NiCd, pronounced "nicad") are widely used as replacements


for disposable 1.5-volt batteries in things like toys, flashlights, and power tools.
They're relatively cheap, can be charged and discharged hundreds of times, and,
properly treated, will last about a decade.
Although very dependable, it's often said that NiCd batteries need to be
discharged fully before you charge them up or the amount of charge they will
store (and their effective lifespan) can be greatly reduced. Opinions vary on
whether this is true and, if so, why it happens, but as a rule of thumb, regularly
discharging batteries completely and then recharging them is a good practice.
Another problem with NiCd batteries is the toxic cadmium metal they contain.
If they are buried in a landfill, instead of properly recycled, the cadmium can
escape into the soil and could potentially pollute watercourses nearby.

Nickel-metal-hydride (NiMH)

Nickel metal hydride batteries work in a similar way, but suffer less from the
so-called "memory effect." They became a popular alternative to NiCd batteries
in the 1990s, partly because of environmental concerns about cadmium. NiMH
batteries work more effectively in gadgets like cellphones, which are often
"topped-up" with a quick recharge instead of a complete discharge and recharge
(which is more typical with something like power tools).

Lithium-ion

Lithium-ion batteries are the fastest-growing type of rechargeables; there are


probably lithium-ion batteries in your cellphone, MP3 player, and
laptop computer. What's so good about lithium? It's a lightweight metal that
easily forms ions, so it's excellent for making batteries. The latest lithium-ion
batteries can store about twice as much energy as traditional NiCd
rechargeables, work at higher voltages, and are more environmentally friendly,
but don't last as long. Even so, they can be charged and discharged hundreds of
times and typically last several years, so they're great for everyday use in
electronic gadgets that aren't meant to last that long.

How do they work? When you plug a cellphone or laptop into the power supply,
the lithium-ion battery inside starts buzzing with chemical activity. The battery's
job is to store as much electricity as possible, as fast as possible. It does this
through a chemical reaction that shunts lithium ions (lithium atoms that have
lost an electron to become positively charged) from one part of the battery to
another. When you unplug the power and use your laptop or phone, the battery
switches into reverse: the ions move the opposite way and the battery gradually
loses its charge. Read more in our main article on how lithium-ion batteries
work.
EMBEDDED SYSTEMS

What is embedded system?


An Embedded System is a combination of computer hardware and software, and
perhaps additional mechanical or other parts, designed to perform a specific function. An
embedded system is a microcontroller-based, software driven, reliable, real-time control
system, autonomous, or human or network interactive, operating on diverse physical
variables and in diverse environments and sold into a competitive and cost conscious market.
An embedded system is not a computer system that is used primarily for processing,
not a software system on PC or UNIX, not a traditional business or scientific application.
High-end embedded & lower end embedded systems. High-end embedded system - Generally
32, 64 Bit Controllers used with OS. Examples Personal Digital Assistant and Mobile phones
etc .Lower end embedded systems - Generally 8,16 Bit Controllers used with an minimal
operating systems and hardware layout designed for the specific purpose. Examples Small
controllers and devices in our everyday life like Washing Machine, Microwave Ovens, where
they are embedded in.
SYSTEM DESIGN CALLS:

Figure 3.1(a)
EMBEDDED SYSTEM DESIGN CYCLE

Figure 3.1(b) “V Diagram”

Characteristics of Embedded System


• An embedded system is any computer system hidden inside a product other than a
computer.
• They will encounter a number of difficulties when writing embedded system software
in addition to those we encounter when we write applications
– Throughput – Our system may need to handle a lot of data in a short period of
time.
– Response–Our system may need to react to events quickly
– Testability–Setting up equipment to test embedded software can be difficult
– Debugability–Without a screen or a keyboard, finding out what the software is
doing wrong (other than not working) is a troublesome problem
– Reliability – embedded systems must be able to handle any situation without
human intervention
– Memory space – Memory is limited on embedded systems, and you must
make the software and the data fit into whatever memory exists
– Program installation – you will need special tools to get your software into
embedded systems
– Power consumption – Portable systems must run on battery power, and the
software in these systems must conserve power
– Processor hogs – computing that requires large amounts of CPU time can
complicate the response problem
– Cost – Reducing the cost of the hardware is a concern in many embedded
system projects; software often operates on hardware that is barely adequate
for the job.
• Embedded systems have a microprocessor/ microcontroller and a memory. Some
have a serial port or a network connection. They usually do not have keyboards,
screens or disk drives.

APPLICATIONS
1) Military and aerospace embedded software applications
2) C om m u ni c at i o n Ap p l i c at i on s
3) In d us t ri al aut om at i o n and p ro c es s co nt r ol s o ft w a r e
4) Mastering the complexity of applications.
5) Reduction of product design time.
6) Real time processing of ever increasing amounts of data.
7) Intelligent, autonomous sensors.
CLASSIFICATION
 Real Time Systems.
 RTS is one which has to respond to events within a specified deadline.
 A right answer after the dead line is a wrong answer

RTS CLASSIFICATION
 Hard Real Time Systems
 Soft Real Time System

HARD REAL TIME SYSTEM


 "Hard" real-time systems have very narrow response time.
 Example: Nuclear power system, Cardiac pacemaker.

SOFT REAL TIME SYSTEM


 "Soft" real-time systems have reduced constrains on "lateness" but still must operate
very quickly and repeatable.
 Example: Railway reservation system – takes a few extra seconds the data remains
valid.

RECTIFIER
A rectifier is an electrical device that converts alternating current (AC), which
periodically reverses direction, to direct current (DC), current that flows in only one
direction, a process known as rectification. Rectifiers have many uses including as
components of power supplies and as detectors of radio signals. Rectifiers may be made of
solid state diodes, vacuum tube diodes, mercury arc valves, and other components. The
output from the transformer is fed to the rectifier. It converts A.C. into pulsating D.C. The
rectifier may be a half wave or a full wave rectifier. In this project, a bridge rectifier is used
because of its merits like good stability and full wave rectification. In positive half cycle only
two diodes( 1 set of parallel diodes) will conduct, in negative half cycle remaining two diodes
will conduct and they will conduct only in forward bias only.

VOLTAGE REGULATOR 7805


Features
• Output Current up to 1A.
• Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V.
• Thermal Overload Protection.
• Short Circuit Protection.
• Output Transistor Safe Operating Area Protection.
Description
The LM78XX/LM78XXA series of three-terminal positive regulators are available in
the TO-220/D-PAK package and with several fixed output voltages, making them useful in a
Wide range of applications. Each type employs internal current limiting, thermal shutdown
and safe operating area protection, making it essentially indestructible. If adequate heat
sinking is provided, they can deliver over 1A output Current. Although designed primarily as
fixed voltage regulators, these devices can be used with external components to obtain
adjustable voltages and currents.

Internal Block Diagram


FIG 4.2(a): BLOCK DIAGRAM OF VOLTAGE REGULATOR

Absolute Maximum Ratings

TABLE 4.2(b): RATINGS OF THE VOLTAGE REGULATOR

FILTER

Capacitive filter is used in this project. It removes the ripples from the output of
rectifier and smoothens the D.C. Output received from this filter is constant until the mains
voltage and load is maintained constant. However, if either of the two is varied, D.C. voltage
received at this point changes. Therefore a regulator is applied at the output stage.
The simple capacitor filter is the most basic type of power supply filter. The use of
this filter is very limited. It is sometimes used on extremely high-voltage, low-current power
supplies for cathode-ray and similar electron tubes that require very little load current from
the supply. This filter is also used in circuits where the power-supply ripple frequency is not
critical and can be relatively high.below figure can show how the capacitor chages and
discharges.
LED

LEDs are semiconductor devices. Like transistors, and other diodes, LEDs are made out of
silicon. What makes an LED give off light are the small amounts of chemical impurities that
are added to the silicon, such as gallium, arsenide, indium, and nitride.
When current passes through the LED, it emits photons as a byproduct. Normal light bulbs
produce light by heating a metal filament until its white hot. Because LEDs produce photons
directly and not via heat, they are far more efficient than incandescent bulbs.
Not long ago LEDs were only bright enough to be used as indicators on dashboards or
electronic equipment. But recent advances have made LEDs bright enough to rival traditional
lighting technologies. Modern LEDs can replace incandescent bulbs in almost any
application.
LEDs are based on the semiconductor diode. When the diode is forward biased (switched on),
electrons are able to recombine with holes and energy is released in the form of light. This
effect is called electroluminescence and the color of the light is determined by the energy gap
of the semiconductor. The LED is usually small in area (less than 1 mm2) with integrated
optical components to shape its radiation pattern and assist in reflection.

LEDs present many advantages over traditional light sources including lower energy
consumption, longer lifetime, improved robustness, smaller size and faster switching.
However, they are relatively expensive and require more precise current and heat
management than traditional light sources.

Applications of LEDs are diverse. They are used as low-energy and also for replacements for
traditional light sources in well-established applications such as indicators and automotive
lighting. The compact size of LEDs has allowed new text and video displays and sensors to
be developed, while their high switching rates are useful in communications technology. So
here the role of LED is to indicate the status of the components like relays and power circuit
etc…
LED Circuits
To build LED circuits, it helps to be familiar with Ohm's law, and the concepts of voltage,
resistance, and current.

LEDs do not have resistance like a resistor does. LEDs have a dynamic resistance, that is
their resistance changes depending on how much current passes through them. But it's easiest
to think of them as having NO resistance. This means that if you just connect an LED to a
battery, you'll have a short circuit. That's bad. You would probably ruin your LED.

So an LED circuit needs some resistance in it, so that it isn't a short circuit. Actually we need
a very specific amount of resistance. Among the specifications for LEDs, a "maximum
forward current" rating is usually given. This is the most current that can pass through the
LED without damaging it, and also the current at which the LED will produce the most light.
A specific value of resistor is needed to obtain this exact current. There is one more
complication. LEDs consume a certain voltage. This is known as the "forward voltage drop",
and is usually given with the specs for that LED. This must be taken into account when
calculating the correct value of resistor to use. So to drive an LED using a voltage source and
a resistor in series with the LED, use the following equation to determine the needed
resistance:
Ohm's = (Source Voltage - LED Voltage Drop) / Amps

For example, to drive an LED from your car's 12v system, use the following values:

Source Voltage = 13.4 volts (12v car systems aren't really 12v in most cases)

Voltage Drop = 3.6 volts (Typical for a blue or white LED)

Desired Current = 30 milliamps (again, a typical value)

So the resistor we need is:

(13.4 - 3.6) / (30 / 1000) = 327 ohms

1N4007

Diodes are used to convert AC into DC these are used as half wave rectifier or full wave
rectifier. Three points must he kept in mind while using any type of diode.
1.Maximum forward current capacity
2.Maximum reverse voltage capacity
3.Maximum forward voltage capacity
Fig: 1N4007 diodes
The number and voltage capacity of some of the important diodes available in the
market are as follows:
 Diodes of number IN4001, IN4002, IN4003, IN4004, IN4005, IN4006 and IN4007
have maximum reverse bias voltage capacity of 50V and maximum forward current capacity
of 1 Amp.
 Diode of same capacities can be used in place of one another. Besides this diode of
more capacity can be used in place of diode of low capacity but diode of low capacity cannot
be used in place of diode of high capacity. For example, in place of IN4002; IN4001 or
IN4007 can be used but IN4001 or IN4002 cannot be used in place of IN4007.The diode
BY125made by company BEL is equivalent of diode from IN4001 to IN4003. BY 126 is
equivalent to diodes IN4004 to 4006 and BY 127 is equivalent to diode IN4007.

Fig:PN Junction diode

PN JUNCTION OPERATION
Now that you are familiar with P- and N-type materials, how these materials are joined together
to form a diode, and the function of the diode, let us continue our discussion with the
operation of the PN junction. But before we can understand how the PN junction works, we
must first consider current flow in the materials that make up the junction and what happens
initially within the junction when these two materials are joined together.

Current Flow in the N-Type Material

Conduction in the N-type semiconductor, or crystal, is similar to conduction in a copper


wire. That is, with voltage applied across the material, electrons will move through the crystal
just as current would flow in a copper wire. This is shown in figure 1-15. The positive
potential of the battery will attract the free electrons in the crystal. These electrons will leave
the crystal and flow into the positive terminal of the battery. As an electron leaves the crystal,
an electron from the negative terminal of the battery will enter the crystal, thus completing the
current path. Therefore, the majority current carriers in the N-type material (electrons) are repelled
by the negative side of the battery and move through the crystal toward the positive side of
the battery.

Current Flow in the P-Type Material

Current flow through the P-type material is illustrated. Conduction in the P material is
by positive holes, instead of negative electrons. A hole moves from the positive terminal of
the P material to the negative terminal. Electrons from the external circuit enter the negative
terminal of the material and fill holes in the vicinity of this terminal. At the positive terminal,
electrons are removed from the covalent bonds, thus creating new holes. This process
continues as the steady stream of holes (hole current) moves toward the negative terminal
RESISTORS

A resistor is a two-terminal electronic component designed to oppose an electric current by


producing a voltage drop between its terminals in proportion to the current, that is, in
accordance with Ohm's law:
V = IR
Resistors are used as part of electrical networks and electronic circuits. They are extremely
commonplace in most electronic equipment. Practical resistors can be made of various
compounds and films, as well as resistance wire (wire made of a high-resistivity alloy, such
as nickel/chrome).
The primary characteristics of resistors are their resistance and the power they can
dissipate. Other characteristics include temperature coefficient, noise, and inductance. Less
well-known is critical resistance, the value below which power dissipation limits the
maximum permitted current flow, and above which the limit is applied voltage. Critical
resistance depends upon the materials constituting the resistor as well as its physical
dimensions; it's determined by design.
Resistors can be integrated into hybrid and printed circuits, as well as integrated
circuits. Size, and position of leads (or terminals) are relevant to equipment designers;
resistors must be physically large enough not to overheat when dissipating their power.
A resistor is a two-terminal passive electronic component which implements electrical
resistance as a circuit element. When a voltage V is applied across the terminals of a resistor,
a current I will flow through the resistor in direct proportion to that voltage. The reciprocal of
the constant of proportionality is known as the resistance R, since, with a given voltage V, a
larger value of R further "resists" the flow of current I as given by Ohm's law:

Resistors are common elements of electrical networks and electronic circuits and are
ubiquitous in most electronic equipment. Practical resistors can be made of various
compounds and films, as well as resistance wire (wire made of a high-resistivity alloy, such
as nickel-chrome). Resistors are also implemented within integrated circuits, particularly
analog devices, and can also be integrated into hybrid and printed circuits.
The electrical functionality of a resistor is specified by its resistance: common
commercial resistors are manufactured over a range of more than 9 orders of magnitude.
When specifying that resistance in an electronic design, the required precision of the
resistance may require attention to the manufacturing tolerance of the chosen resistor,
according to its specific application. The temperature coefficient of the resistance may also be
of concern in some precision applications. Practical resistors are also specified as having a
maximum power rating which must exceed the anticipated power dissipation of that resistor
in a particular circuit: this is mainly of concern in power electronics applications. Resistors
with higher power ratings are physically larger and may require heat sinking. In a high
voltage circuit, attention must sometimes be paid to the rated maximum working voltage of
the resistor.
The series inductance of a practical resistor causes its behavior to depart from ohms
law; this specification can be important in some high-frequency applications for smaller
values of resistance. In a low-noise amplifier or pre-amp the noise characteristics of a resistor
may be an issue. The unwanted inductance, excess noise, and temperature coefficient are
mainly dependent on the technology used in manufacturing the resistor. They are not
normally specified individually for a particular family of resistors manufactured using a
particular technology. A family of discrete resistors is also characterized according to its form
factor, that is, the size of the device and position of its leads (or terminals) which is relevant
in the practical manufacturing of circuits using them.

Units
The ohm (symbol: Ω) is the SI unit of electrical resistance, named after Georg Simon
Ohm. An ohm is equivalent to a volt per ampere. Since resistors are specified and
manufactured over a very large range of values, the derived units of milliohm (1 mΩ = 10 −3
Ω), kilohm (1 kΩ = 103 Ω), and megohm (1 MΩ = 106 Ω) are also in common usage.
The reciprocal of resistance R is called conductance G = 1/R and is measured in
Siemens (SI unit), sometimes referred to as a mho. Thus a Siemens is the reciprocal of an
− 1
ohm: S = Ω . Although the concept of conductance is often used in circuit analysis,
practical resistors are always specified in terms of their resistance (ohms) rather than
conductance.

Theory of operation
Ohm's law
The behavior of an ideal resistor is dictated by the relationship specified in Ohm's law:

Ohm's law states that the voltage (V) across a resistor is proportional to the current (I)
passing through it, where the constant of proportionality is the resistance (R).
Equivalently, Ohm's law can be stated:

This formulation of Ohm's law states that, when a voltage (V) is present across a resistance
(R), a current (I) will flow through the resistance. This is directly used in practical
computations. For example, if a 300 ohm resistor is attached across the terminals of a 12 volt
battery, then a current of 12 / 300 = 0.04 amperes (or 40 milliamperes) will flow through that
resistor.

Series and parallel resistors


In a series configuration, the current through all of the resistors is the same, but the
voltage across each resistor will be in proportion to its resistance. The potential difference
(voltage) seen across the network is the sum of those voltages, thus the total resistance can be
found as the sum of those resistances:

As a special case, the resistance of N resistors connected in series, each of the same resistance
R, is given by NR.
Resistors in a parallel configuration are each subject to the same potential difference
(voltage), however the currents through them add. The conductances of the resistors then add
to determine the conductance of the network. Thus the equivalent resistance (Req) of the
network can be computed:

The parallel equivalent resistance can be represented in equations by two vertical lines "||" (as
in geometry) as a simplified notation. For the case of two resistors in parallel, this can be
calculated using:
As a special case, the resistance of N resistors connected in parallel, each of the same
resistance R, is given by R/N.
A resistor network that is a combination of parallel and series connections can be broken up
into smaller parts that are either one or the other. For instance,

However, some complex networks of resistors cannot be resolved in this manner, requiring
more sophisticated circuit analysis. For instance, consider a cube, each edge of which has
been replaced by a resistor. What then is the resistance that would be measured between two
opposite vertices? In the case of 12 equivalent resistors, it can be shown that the corner-to-
corner resistance is 5⁄6 of the individual resistance. More generally, the Y-Δ transform, or
matrix methods can be used to solve such a problem. One practical application of these
relationships is that a non-standard value of resistance can generally be synthesized by
connecting a number of standard values in series and/or parallel. This can also be used to
obtain a resistance with a higher power rating than that of the individual resistors used. In the
special case of N identical resistors all connected in series or all connected in parallel, the
power rating of the individual resistors is thereby multiplied by N.

Power dissipation
The power P dissipated by a resistor (or the equivalent resistance of a resistor network) is

calculated as:
The first form is a restatement of Joule's first law. Using Ohm's law, the two other forms can
be derived.
The total amount of heat energy released over a period of time can be determined from the
integral of the power over that period of time:

Practical resistors are rated according to their maximum power dissipation. The vast
majority of resistors used in electronic circuits absorb much less than a watt of electrical
power and require no attention to their power rating. Such resistors in their discrete form,
including most of the packages detailed below, are typically rated as 1/10, 1/8, or 1/4 watt.
Resistors required to dissipate substantial amounts of power, particularly used in power
supplies, power conversion circuits, and power amplifiers, are generally referred to as power
resistors; this designation is loosely applied to resistors with power ratings of 1 watt or
greater. Power resistors are physically larger and tend not to use the preferred values, color
codes, and external packages described below.
If the average power dissipated by a resistor is more than its power rating, damage to
the resistor may occur, permanently altering its resistance; this is distinct from the reversible
change in resistance due to its temperature coefficient when it warms. Excessive power
dissipation may raise the temperature of the resistor to a point where it can burn the circuit
board or adjacent components, or even cause a fire. There are flameproof resistors that fail
(open circuit) before they overheat dangerously.
Note that the nominal power rating of a resistor is not the same as the power that it
can safely dissipate in practical use. Air circulation and proximity to a circuit board, ambient
temperature, and other factors can reduce acceptable dissipation significantly. Rated power
dissipation may be given for an ambient temperature of 25 °C in free air. Inside an equipment
case at 60 °C, rated dissipation will be significantly less; a resistor dissipating a bit less than
the maximum figure given by the manufacturer may still be outside the safe operating area
and may prematurely fail.
VARIABLE RESISTORS
Adjustable resistors
A resistor may have one or more fixed tapping points so that the resistance can be
changed by moving the connecting wires to different terminals. Some wire wound power
resistors have a tapping point that can slide along the resistance element, allowing a larger or
smaller part of the resistance to be used.
Where continuous adjustment of the resistance value during operation of equipment is
required, the sliding resistance tap can be connected to a knob accessible to an operator. Such
a device is called a rheostat and has two terminals.

Potentiometer
A potentiometer is a manually adjustable resistor. The way this device works is relatively
simple. One terminal of the potentiometer is connected to a power source. Another is hooked up to
ground (a point with no voltage or resistance and which serves as a neutral reference point), while
the third terminal runs across a strip of resistive material. This resistive strip generally has a low
resistance at one end; its resistance gradually increases to a maximum resistance at the other end.
The third terminal serves as the connection between the power source and ground, and is usually
interfaced to the user by means of a knob or lever. The user can adjust the position of the third
terminal along the resistive strip in order to manually increase or decrease resistance. By
controlling resistance, a potentiometer can determine how much current flow through a circuit.
When used to regulate current, the potentiometer is limited by the maximum resistivity of the strip.

The power of this simple device is not to be underestimated. In most analog devices, a
potentiometer is what establishes the levels of output. In a loud speaker, for example, a
potentiometer directly adjusts volume; in a television monitor, it controls brightness.
A potentiometer can also be used to control the potential difference, or voltage, across a
circuit. The setup involved in utilizing a potentiometer for this purpose is a little bit more
complicated. It involves two circuits: the first circuit consists of a cell and a resistor. At one end,
the cell is connected in series to the second circuit, and at the other end it is connected to a
potentiometer in parallel with the second circuit. The potentiometer in this arrangement drops the
voltage by an amount equal to the ratio between the resistance allowed by the position of the third
terminal and the highest possible resistivity of the strip. In other words, if the knob controlling the
resistance is positioned at the exact halfway point on the resistive strip, then the output voltage will
drop by exactly fifty percent, no matter how high the potentiometer's input voltage. Unlike with
current regulation, voltage regulation is not limited by the maximum resistivity of the strip

CAPACITORS

A capacitor or condenser is a passive electronic component consisting of a pair of conductors


separated by a dielectric. When a voltage potential difference exists between the conductors,
an electric field is present in the dielectric. This field stores energy and produces a
mechanical force between the plates. The effect is greatest between wide, flat, parallel,
narrowly separated conductors.
An ideal capacitor is characterized by a single constant value, capacitance, which is
measured in farads. This is the ratio of the electric charge on each conductor to the potential
difference between them. In practice, the dielectric between the plates passes a small amount
of leakage current. The conductors and leads introduce an equivalent series resistance and the
dielectric has an electric field strength limit resulting in a breakdown voltage.
The properties of capacitors in a circuit may determine the resonant frequency and quality
factor of a resonant circuit, power dissipation and operating frequency in a digital logic
circuit, energy capacity in a high-power system, and many other important aspects.

A capacitor (formerly known as condenser) is a device for storing electric charge. The
forms of practical capacitors vary widely, but all contain at least two conductors separated by
a non-conductor. Capacitors used as parts of electrical systems, for example, consist of metal
foils separated by a layer of insulating film.
Capacitors are widely used in electronic circuits for blocking direct current while
allowing alternating current to pass, in filter networks, for smoothing the output of power
supplies, in the resonant circuits that tune radios to particular frequencies and for many other
purposes.
A capacitor is a passive electronic component consisting of a pair of conductors
separated by a dielectric (insulator). When there is a potential difference (voltage) across the
conductors, a static electric field develops in the dielectric that stores energy and produces a
mechanical force between the conductors. An ideal capacitor is characterized by a single
constant value, capacitance, measured in farads. This is the ratio of the electric charge on
each conductor to the potential difference between them.
The capacitance is greatest when there is a narrow separation between large areas of
conductor, hence capacitor conductors are often called "plates", referring to an early means of
construction. In practice the dielectric between the plates passes a small amount of leakage
current and also has an electric field strength limit, resulting in a breakdown voltage, while
the conductors and leads introduce an undesired inductance and resistance.

Theory of operation
Capacitance

Charge separation in a parallel-plate capacitor causes an internal electric field. A dielectric


(orange) reduces the field and increases the capacitance.

A simple demonstration of a parallel-plate capacitor


A capacitor consists of two conductors separated by a non-conductive region. The non-
conductive region is called the dielectric or sometimes the dielectric medium. In simpler
terms, the dielectric is just an electrical insulator. Examples of dielectric mediums are glass,
air, paper, vacuum, and even a semiconductor depletion region chemically identical to the
conductors. A capacitor is assumed to be self-contained and isolated, with no net electric
charge and no influence from any external electric field. The conductors thus hold equal and
opposite charges on their facing surfaces, and the dielectric develops an electric field. In SI
units, a capacitance of one farad means that one coulomb of charge on each conductor causes
a voltage of one volt across the device.
The capacitor is a reasonably general model for electric fields within electric circuits. An
ideal capacitor is wholly characterized by a constant capacitance C, defined as the ratio of
charge ±Q on each conductor to the voltage V between them:

Sometimes charge build-up affects the capacitor mechanically, causing its capacitance to
vary. In this case, capacitance is defined in terms of incremental changes:

Energy storage
Work must be done by an external influence to "move" charge between the conductors in a
capacitor. When the external influence is removed the charge separation persists in the
electric field and energy is stored to be released when the charge is allowed to return to its
equilibrium position. The work done in establishing the electric field, and hence the amount
of energy stored, is given by:

Current-voltage relation
The current i(t) through any component in an electric circuit is defined as the rate of flow of a
charge q(t) passing through it, but actual charges, electrons, cannot pass through the dielectric
layer of a capacitor, rather an electron accumulates on the negative plate for each one that
leaves the positive plate, resulting in an electron depletion and consequent positive charge on
one electrode that is equal and opposite to the accumulated negative charge on the other.
Thus the charge on the electrodes is equal to the integral of the current as well as proportional
to the voltage as discussed above. As with any antiderivative, a constant of integration is
added to represent the initial voltage v (t0). This is the integral form of the capacitor equation,

.
Taking the derivative of this, and multiplying by C, yields the derivative form,
.
The dual of the capacitor is the inductor, which stores energy in the magnetic field rather than
the electric field. Its current-voltage relation is obtained by exchanging current and voltage in
the capacitor equations and replacing C with the inductance L.
DC circuits
RC circuit

A simple resistor-capacitor circuit demonstrates charging of a capacitor.


A series circuit containing only a resistor, a capacitor, a switch and a constant DC source of
voltage V0 is known as a charging circuit. If the capacitor is initially uncharged while the
switch is open, and the switch is closed at t = 0, it follows from Kirchhoff's voltage law that

Taking the derivative and multiplying by C, gives a first-order differential equation,

At t = 0, the voltage across the capacitor is zero and the voltage across the resistor is V0. The
initial current is then i (0) =V0 /R. With this assumption, the differential equation yields

where τ0 = RC is the time constant of the system.


As the capacitor reaches equilibrium with the source voltage, the voltage across the resistor
and the current through the entire circuit decay exponentially. The case of discharging a
charged capacitor likewise demonstrates exponential decay, but with the initial capacitor
voltage replacing V0 and the final voltage being zero.
AC circuits
See also: reactance (electronics) and electrical impedance#Deriving the device specific
impedances
Impedance, the vector sum of reactance and resistance, describes the phase difference and the
ratio of amplitudes between sinusoidally varying voltage and sinusoidally varying current at a
given frequency. Fourier analysis allows any signal to be constructed from a spectrum of
frequencies, whence the circuit's reaction to the various frequencies may be found. The
reactance and impedance of a capacitor are respectively

where j is the imaginary unit and ω is the angular velocity of the sinusoidal signal. The - j
phase indicates that the AC voltage V = Z I lags the AC current by 90°: the positive current
phase corresponds to increasing voltage as the capacitor charges; zero current corresponds to
instantaneous constant voltage, etc.
Note that impedance decreases with increasing capacitance and increasing frequency. This
implies that a higher-frequency signal or a larger capacitor results in a lower voltage
amplitude per current amplitude—an AC "short circuit" or AC coupling. Conversely, for very
low frequencies, the reactance will be high, so that a capacitor is nearly an open circuit in AC
analysis—those frequencies have been "filtered out".
Capacitors are different from resistors and inductors in that the impedance is inversely
proportional to the defining characteristic, i.e. capacitance.
Parallel plate model

Dielectric is placed between two conducting plates, each of area A and with a separation of d.
The simplest capacitor consists of two parallel conductive plates separated by a dielectric
with permittivity ε (such as air). The model may also be used to make qualitative predictions
for other device geometries. The plates are considered to extend uniformly over an area A
and a charge density ±ρ = ±Q/A exists on their surface. Assuming that the width of the plates
is much greater than their separation d, the electric field near the centre of the device will be
uniform with the magnitude E = ρ/ε. The voltage is defined as the line integral of the electric
field between the plates

Solving this for C = Q/V reveals that capacitance increases with area and decreases with
separation

.
The capacitance is therefore greatest in devices made from materials with a high permittivity.

Several capacitors in parallel.


PUSH BUTTONS

Fig.4.8 (a): Push Buttons

A push-button (also spelled pushbutton) or simply button is a simple switch


mechanism for controlling some aspect of a machine or a process. Buttons are typically made
out of hard material, usually plastic or metal. The surface is usually flat or shaped to
accommodate the human finger or hand, so as to be easily depressed or pushed. Buttons are
most often biased switches, though even many un-biased buttons (due to their physical
nature) require a spring to return to their un-pushed state. Different people use different terms
for the "pushing" of the button, such as press, depress, mash, and punch.

Uses:
In industrial and commercial applications push buttons can be linked together by a
mechanical linkage so that the act of pushing one button causes the other button to be
released. In this way, a stop button can "force" a start button to be released. This method of
linkage is used in simple manual operations in which the machine or process have no
electrical circuits for control.
Pushbuttons are often color-coded to associate them with their function so that the
operator will not push the wrong button in error. Commonly used colors are red for stopping
the machine or process and green for starting the machine or process.
Red pushbuttons can also have large heads (mushroom shaped) for easy operation and
to facilitate the stopping of a machine. These pushbuttons are called emergency stop buttons
and are mandated by the electrical code in many jurisdictions for increased safety. This large
mushroom shape can also be found in buttons for use with operators who need to wear gloves
for their work and could not actuate a regular flush-mounted push button. As an aid for
operators and users in industrial or commercial applications, a pilot light is commonly added
to draw the attention of the user and to provide feedback if the button is pushed. Typically
this light is included into the center of the pushbutton and a lens replaces the pushbutton hard
center disk.
The source of the energy to illuminate the light is not directly tied to the contacts on
the back of the pushbutton but to the action the pushbutton controls. In this way a start button
when pushed will cause the process or machine operation to be started and a secondary
contact designed into the operation or process will close to turn on the pilot light and signify
the action of pushing the button caused the resultant process or action to start.
In popular culture, the phrase "the button" refers to a (usually fictional) button that a
military or government leader could press to launch nuclear weapons.

Push to ON button:

Fig. 4.8(b): push on button


Initially the two contacts of the button are open. When the button is pressed they become
connected. This makes the switching operation using the push button.
ATMEGA328

Introduction:

The Atmel ATmega328P is a 32K 8-bit microcontroller based on the AVR architecture. Many
instructions are executed in a single clock cycle providing a throughput of almost 20 MIPS at
20MHz. The ATMEGA328-PU comes in an PDIP 28 pin package and is suitable for use on
our 28 pin AVR Development Board.

The computer on one hand is designed to perform all the general purpose tasks on a single
machine like you can use a computer to run a software to perform calculations or you can
use a computer to store some multimedia file or to access internet through the browser,
whereas the microcontrollers are meant to perform only the specific tasks, for e.g.,
switching the AC off automatically when room temperature drops to a certain defined limit
and again turning it ON when temperature rises above the defined limit.

There are number of popular families of microcontrollers which are used in different
applications as per their capability and feasibility to perform the desired task, most common
of these are 8051, AVR and PIC microcontrollers. In this we will introduce you
with AVR family of microcontrollers.

Features include:

 High Performance, Low Power Design


 8-Bit Microcontroller Atmel® AVR® advanced RISC architecture
o 131 Instructions most of which are executed in a single clock cycle
o Up to 20 MIPS throughput at 20 MHz
o 32 x 8 working registers
o 2 cycle multiplier
 Memory Includes
o 32KB of of programmable FLASH
o 1KB of EEPROM
o 2KB SRAM
o 10,000 Write and Erase Cycles for Flash and 100,000 for EEPROM
o Data retention for 20 years at 85°C and 100 years at 25°C
o Optional boot loader with lock bits
 In System Programming (ISP) by via boot loader
 True Read-While-Write operation
o Programming lock available for software security
 Features Include
o 2 x 8-bit Timers/Counters each with independent prescaler and compare modes
o A single 16-bit Timer/Counter with an idependent prescaler, compare and
capture modes
o Real time counter with independent oscillator
o 10 bit, 6 channel analog to digital Converter
o 6 pulse width modulation channels
o Internal temperature sensor
o Serial USART (Programmable)
o Master/Slave SPI Serial Interface - (Philips I2C compatible)
o Programmable watchdog timer with independent internal oscillator
o Internal analog comparator
o Interrupt and wake up on pin change
 Additional Features Features
o Internal calibrated oscillator
o Power on reset and programmable brown out detection
o External and internal interrupts
o 6 sleep modes including idle, ADC noise reduction, power save, power down,
standby, and extended standby
 I/O and Package
o 23 programmable I/O lines
o 28 pin PDIP package
 Operating voltage:
o 1.8 - 5.5V
 Operating temperature range:
o 40°C to 85°C
 Speed Grades:
o 0-4 MHz at 1.8-5.5V
o 0-10 MHz at 2.7-5.5V
o 0-20 MHz at 4.5-5.5V
 Low power consumption mode at 1.8V, 1 MHz and 25°C:
o Active Mode: 0.3 mA
o Power-down Mode: 0.1 μA
o Power-save Mode: 0.8 μA (Including 32 kHz RTC)

Flash: 32 KBytes
EEPROM: 1 KBytes
SRAM: 2 KBytes
Max I/O Pins: 23
Frequency Max: 20 MHz
VCC: 1.8-5.5
10-bit A/D Channels: 6
Analog Comparator: Yes
16-bit Timers: 1
8-bit Timer: 2
Brown Out Detector: Yes
Ext Interrupts: 2
Hardware Multiplier: Yes
Interrupts: 26
ISP: Yes
On Chip Oscillator: Yes
PWM Channels: 6
RTC: Yes
Self Program Memory: Yes
SPI: 1
TWI: Yes
UART: 1
Watchdog: Yes
Pacakage: Lead Free PDIP 28

In our days, there have been many advancement in the field of Electronics and many cutting edge
technologies are being developed every day, but still 8 bit microcontrollers have its own role in the
digital electronics market dominated by 16-32 & 64 bit digital devices. Although powerful
microcontrollers with higher processing capabilities exist in the market, 8bit microcontrollers still
hold its value because of their easy-to-understand-operation, very much high popularity, ability to
simplify a digital circuit, low cost compared to features offered, addition of many new features in a
single IC and interest of manufacturers and consumers.

Today’s microcontrollers are much different from what it were in the initial stage, and the number of
manufacturers are much more in count than it was a decade or two ago. At present some of the
major manufacturers are Microchip (publication: PIC microcontrollers), Atmel (publication: AVR
microcontrollers), Hitachi, Phillips, Maxim, NXP, Intel etc. Our interest is upon ATmega32. It belongs
to Atmel’s AVR series micro controller family. Let’s see the features.
PIN count: Atmega32 has got 40 pins. Two for Power (pin no.10: +5v, pin no. 11: ground), two for
oscillator (pin 12, 13), one for reset (pin 9), three for providing necessary power and reference
voltage to its internal ADC, and 32 (4×8) I/O pins.
About I/O pins: ATmega32 is capable of handling analogue inputs. Port A can be used as either
DIGITAL I/O Lines or each individual pin can be used as a single input channel to the internal ADC of
ATmega32, plus a pair of pins AREF, AVCC & GND (refer to ATmega32 datasheet) together can make
an ADC channel.
No pins can perform and serve for two purposes (for an example: Port A pins cannot work as a
Digital I/O pin while the Internal ADC is activated) at the same time. It’s the programmers
responsibility to resolve the conflict in the circuitry and the program. Programmers are advised to
have a look to the priority tables and the internal configuration from the datasheet.

Digital I/O pins: ATmega32 has 32 pins (4portsx8pins) configurable as Digital I/O pins.
Timers: 3 Inbuilt timer/counters, two 8 bit (timer0, timer2) and one 16 bit (timer1).
ADC: It has one successive approximation type ADC in which total 8 single channels are selectable.
They can also be used as 7 (for TQFP packages) or 2 (for DIP packages) differential channels.
Reference is selectable, either an external reference can be used or the internal 2.56V reference can
be brought into action. There external reference can be connected to the AREF pin.
Communication Options: ATmega32 has three data transfer modules embedded in it. They are
 Two Wire Interface
 USART
 Serial Peripheral Interface
Analog comparator: On-chip analog comparator is available. An interrupt is assigned for
different comparison result obtained from the inputs.
External Interrupt: 3External interrupt is accepted. Interrupt sense is configurable.
Memory: It has 32Kbytes of In-System Self-programmable Flash program memory, 1024 Bytes
EEPROM, 2Kbytes Internal SRAM. Write/Erase Cycles: 10,000 Flash / 100,000 EEPROM.
Clock: It can run at a frequency from 1 to 16 MHz. Frequency can be obtained from external
Quartz Crystal, Ceramic crystal or an R-C network. Internal calibrated RC oscillator can also be
used.
More Features: Up to 16 MIPS throughput at 16MHz. Most of the instruction executes in a single
cycle. Two cycle on-chip multiplication. 32 × 8 General Purpose Working Registers
Debug: JTAG boundary scan facilitates on chip debug.
Programming: Atmega32 can be programmed either by In-System Programming via Serial
peripheral interface or by Parallel programming. Programming via JTAG interface is also
possible. Programmer must ensure that SPI programming and JTAG are not be disabled using
fuse bits; if the programming is supposed to be done using SPI or JTAG.
HARDWARE TESTING
CONTINUITY TEST:
In electronics, a continuity test is the checking of an electric circuit to see if current
flows (that it is in fact a complete circuit). A continuity test is performed by placing a small
voltage (wired in series with an LED or noise-producing component such as a piezoelectric
speaker) across the chosen path. If electron flow is inhibited by broken conductors, damaged
components, or excessive resistance, the circuit is "open".
Devices that can be used to perform continuity tests include multi meters which
measure current and specialized continuity testers which are cheaper, more basic devices,
generally with a simple light bulb that lights up when current flows.
An important application is the continuity test of a bundle of wires so as to find the two ends
belonging to a particular one of these wires; there will be a negligible resistance between the
"right" ends, and only between the "right" ends.
This test is the performed just after the hardware soldering and configuration has been
completed. This test aims at finding any electrical open paths in the circuit after the soldering.
Many a times, the electrical continuity in the circuit is lost due to improper soldering, wrong
and rough handling of the PCB, improper usage of the soldering iron, component failures and
presence of bugs in the circuit diagram. We use a multi meter to perform this test. We keep
the multi meter in buzzer mode and connect the ground terminal of the multi meter to the
ground. We connect both the terminals across the path that needs to be checked. If there is
continuation then you will hear the beep sound.

POWER ON TEST:
This test is performed to check whether the voltage at different terminals is according
to the requirement or not. We take a multi meter and put it in voltage mode. Remember that
this test is performed without microcontroller. Firstly, we check the output of the transformer,
whether we get the required 12 v AC voltage.
Then we apply this voltage to the power supply circuit. Note that we do this test
without microcontroller because if there is any excessive voltage, this may lead to damaging
the controller. We check for the input to the voltage regulator i.e., are we getting an input of
12v and an output of 5v. This 5v output is given to the microcontrollers’ 40th pin. Hence we
check for the voltage level at 40th pin. Similarly, we check for the other terminals for the
required voltage. In this way we can assure that the voltage at all the terminals is as per the
requirement.

BIBLIOGRAPHY

TEXT BOOKS REFERED

1. ATMEGA 328 Data Sheets.

WEBSITES

 www.atmel.com
 www.beyondlogic.org
 www.wikipedia.org
 www.howstuffworks.com
 www.alldatasheets.com

Vous aimerez peut-être aussi