Sie sind auf Seite 1von 71

1

Report on Industrial Training


Program
Designed & Developed by
Microlink Peripheral Controls (P)
Ltd.
Vijayawada, AP, India.
Ph: 0866-6613090,6633090
9246400662/3/4

INDEX
Study and Practical Analysis
1) Computer basics
3
2) Data representations
page 4
3) Data conversions and display systems
page6
4) Soldering procedure
page7
5) AC distribution
page8
6) Basic electronics
7) Electronic Components (resistors-types, applications)
page11
8) Capacitors-types, applications
page14
9) Inductors-types, applications
page17
10)
Semiconductors-types, applications
page24
11)
Digital electronics
page 30
12)
Power supplies
page31
13)
Op amps- applications
page32
14)
555 Timer- applications
page33
15)
Opto couplers- applications
page35
16)
Comparators- applications
page36
17)
DTMF
page38
18)
Micro controller (AT89C52)
page39

page

page9

Design and Development of Application


Pages 44 to 71
1) Design a circuit to flicker an LED light with 50% duty cycle and write a
program for it.
2) Design a circuit to display the numbers 0 to 9 in a 7-segment display using
micro controller in both ascending and descending order.

3
3) Design a project to drive the DC linear motor with direction control and write
a program for it.
4) Develop an interfacing circuit between GSM/CDMA mobile and micro
controller using DTMF network for remote switching operation.
5) Design and develop a parallel communication protocol between 16X2 LCD
and micro controller.
6) Construct a project to count the no. of visitors entered into the auditorium
and display it in LCD using microcontroller.
7) Design and develop a micro controller based circuit for measurement of DC
voltage, AC voltage, AC current using ADC0809.
8) Design and develop a micro controller based circuit for measurement of
temp, light intensity using ADC0809.
9) Develop an RS-232 protocol to establish a serial UART communication
between PC and micro controller.

COMPUTER:
Computer is nothing but a computing device. It is used for many applications.
They are divided into two types based on applications.
1. Analog
2. Digital
COMPUTER

Analog

Digital

Special purpose

General purpose

ANALOG COMPUTER:
Analog computer is one which is having one scale and pointer .The pointer
is always moving on the scale [All Electromechanical systems]. Analog systems are
also called as continuous systems.
Examples: Thermometer, Analog multi meter, Ammeter, Energy meter etc.
DIGITAL COMPUTER:
Digital computer is one in which the entire process is carried out through
binary digits. There are 2 types of digital computers.

1. Special purpose digital computer


2. General purpose digital computer

Special purpose digital computer: It is a one designed for a specific purpose, we


cant alter its functioning.
E.g. Calculator, weighing machines etc.
General purpose digital computer: It is for generalized applications. Any type of
special purpose application can be designed by a general purpose computer.
E.g. personal computer.

NUMBER SYSTEM:
The following number systems are widely used. They are,
Binary [0 and 1]
Octal [0 to 7]
Decimal [0 to 9]
Hexa decimal [0 to F]
Decimal:
The decimal system contains ten unique symbols from 0 to 9. Since counting in
decimal involves 10 symbols, we say that its base or radix is 10. Each symbol in the
number is called digit.
Binary:
The binary number system is a positional weighted system. The base or radix of this
number system is 2. The symbols used are 0 and 1. A binary number consists of a
sequence of bits, each of which is either 0 or 1.
Advantages:
System data recognisation
Simple data transmission
Easy data storage
So people are widely using binary number system.
Disadvantages:
It requires more length.
Octal:
The octal number system was extensively used by early mini computers. It is
also a positional weighted system. Its base or radix is 8. It has 8 independent symbols
from 0 to 7. Since its base 8=2 3, every 3 bit group of binary can be represented by an
octal digit.

Hexa decimal:
Hexa decimal is the advanced system of binary. The Hexa decimal number
system is the professional weighted system. The base or radix of this number system is
16, that means, it has 16 symbols used from 0 to 9 and A to F. In this A to F represents
the decimal digits from 10 to 15.
DATA
The information is nothing but a data, that includes,
Text matter
Graphics
Voice

DATA REPRESENTATION AND MEASUREMENTS:


In digital system data is represented in 0s and 1s.
In this
Bit 1 = 5v (3.5 to 5v)
70% of 5v
Bit 0 = 0v (0 to 1.5v)
30% of 5v
4 bits
8 bits
1024bytes
1024 Kilobytes
1024 Megabyte
1024 Gigabyte

=1 Nibble
= 1 Byte
= 1 Kilo byte
= 1 Mega byte
= 1 Giga byte
= 1 Tetra byte

REPRESENTATION OF TEXT MATTER:


For text matter representation people will go for ASCII [American Standard
Code for Information Interchange]. In that, 256 combinations are there form 00H-FFH
(00-255 in decimal).
In those 256, 0-127 indicates general characters like A-Z, a-z, 0-9, [&, *, ^, >, < , .
,].
128-255 indicates text mode graphics like >>, << etc.
NOTE:
Another standard is SCAN CODE. It is used in keyboards only.
REPRESENTATION OF GRAPHICS:
To increase the originality of picture, the following factors must be increased.
1. Number of pixels per unit area.
2. Number of bits representing a pixel.
In that we represent a colour to every pixel. The colour is may be 8 bit or 16 bit.

REPRESENTAION OF VOICE:
In case of analog systems sound energy is converted into magnetic energy
through microphone, amplifier and a coil at the transmission side. At the receiver end
the reverse operation is performed.

Amplifier

C
O
I
L

Magnet
ic
Energy

C
O
I
L

Amplifier

Loud
Spe
aker

M
I
C

In digital systems the sound energy is converted into digital form through
microphone, amplifier, ADC at the transmission end. At the receiver end, the reverse
operation i.e. the digital data converted into sound energy through DAC, amplifier and
loudspeaker. Compared to analog systems, the losses in Digital systems are less.

Amplifier

ADC

Digital
Media

DAC

Amplifier

Loud
Spe
aker

M
I
C

DATA CONVERSIONS:
Binary to Decimal and Decimal to Binary
Octal to Decimal and Decimal to Octal
Hexadecimal to decimal and decimal to Hexadecimal
Octal to Binary and Binary to Octal
Hexadecimal to binary and binary to Hexadecimal
7 Segment code:

PORT

It is used in 7 segment display. These displays are two types


a) Common anode
b) Common cathode
The segment of the digits is connected to a common port and negative to the ground.
Signal limits the current while source gives the required current.

14Segment display:

Segmental dot matrix display:

Full dot matrix:

There are 3 categories of display systems.


1. LCD
2. LED
3. Fluorescent tube light type
SOLDERING PROCEDURE
Tools required:
Soldering iron
Lead
Flux
PCB
Petrol thinner or white petrol cleaning material.
SOLDERING PROCEDURE:
Soldering iron tip must be very cleaned by using file.
Apply lead on the tip.
Apply little bit flux at solder area.
Put soldering iron beside the point at the rate of 45degrees.
Wait for few seconds.
Remove the soldering iron and wait for some time.

NOTE:
The soldering lead and PCB surface must be very cleaned.
DE SOLDERING PROCEDURE:
De soldering wick (shield wire with flux).
De soldering pump.
PCB TYPES:
Single sided PCB.
Double sided PCB.
PTH (pin through hole) PCB.
Multi layer.
BASIC PCB MATERIALS:
Paper epoxy material.
Glass epoxy material.
TERMS RELATEDTO PCB:
Copper clad [raw PCB].
Legend [Printing symbols on PCB].
Solder mask [Paint applied on bottom side except soldering point].
Tinning [Applied lead on copper tracks].

Basic electronics
Voltage:
The potential difference between the two pints is called voltage. It is denoted by V and
their units are volts.
Current:
The flow of electrons in one direction along any path or around any circuit is called
electric current. It is denoted by I and its units are Ampere.
Power:
Power is nothing but a product of voltage and current. It is the ratio of electric work done
in the electric circuit for unit time.
Electric power = Electric work done / Time taken
Power = VI
Units for power are watts.
DC Voltage:
The voltage which remains constant in direction w.r.t time and may or may not have
constant magnitude is knows as direct (or) steady voltage.
E.g.: Battery, generator, solar panel system.

AC voltage:
The voltage which changes in magnitude as well as direction wart time is known as
Alternative voltage.

Materials:
The electrical properties of different materials can be explained in terms of the electrons
having energies in the valence band and conduction band, because the electrons lying in the
lower energy bands which are normally filled, play no role in the conduction process.
Insulators:
Insulators are the solid materials which are bad conductors of electricity. E.g.: wood, plastic,
rubber.
In terms of energy bands, Insulators
Have full valance band
Have an empty conduction band
Have a wide forbidden energy gaps
So in case of insulators a very large amount of energy must be supplied to electrons to cross
from the valance band to the conduction band.
Conductors:
Conductors are the solid materials which are good conductors of electricity. In terms of
energy bands conductors have,
No forbidden energy gap between valence band and conduction band.
E.g.: Copper, Aluminum, Gold.
Semi Conductors:
Semi conductors are the solid materials which are neither good conductors nor bad
conductors of electricity.
E.g.: Silicon, Germanium.
So in case of Semiconductors a very little amount of energy is sufficient to move electrons
from valence band to conduction band. This energy is available at room temperature itself.

A.C DISTRIBUTION:

10

115W

FU SE

C u r r e n t C o il

FU SE

Ph

Energy
Meter

4A

2
P o t e n t ia l C o il

920W

0.5A

2A

M a in s S w it c h

Nt

6.5A

6A

4A

FU SE
460W

The above diagram shows the single phase A.C Distribution


which consists of a potential coil and current coil to which the mains and fuses are
connected. The loads are connected at the output. If the mains are at ON state, the disc
will rotate due to the torque produced by the two coils [P c & Cc].
If the mains are at
OFF state, the disc will not rotate.
EARTHING:
E

0V

230
V
N

230
V

Earthing refers to connecting an electrical conductor to earth which is assumed to have


zero electric potential.
(OR)
Earthing means connecting the neutral point of supply system or the non-current
carrying metal part s used in electrical distribution system to the general mass of the
earth by a wire of negligible resistance in such a manner that at all times an electrical
discharge of electrical energy takes place without danger. This brings the body of
equipment to zero potential and thus will avoid the shock to the operator
IMPORTANCE OF EARTHING:
It protects us from electric shocks.

11

It reduces EMI [Electro- magnetic induction].


It reduces RFI [Radio frequency interference.
Checking the Earthing:
Voltage between Nt to E:
0V
= Excellent
<5V
= Good
>5V<10V = Satisfactory
>10V
= Not Acceptable.

Basic Electronic Components


RESISTORS:
Resistor is one of the basic electronic components found in almost all electronic
circuits. As its name suggests, a resistor resists or opposes the flow of current through it. The
property exhibited by the resistor is known as resistance. It is represented by the letter R and
its units are ohms. If it obey the ohms law, then the resistor is called as Linear resistor and
the resistance offered by the resistor is called as Linear resistance. If it doesnt obey the
Ohms law, i.e [V=IR] the resistor is called as Non-Linear resistor and the resistance is called
as Non-Linear resistance. The resistor symbol is as follows.
1

F IX E D R E S IS T O R

V A R IA B L E R E S IS T O R

2
3
4
5

C
T A P P E D R E S IS T O R

Features of resistors:
These are two terminal, passive bilateral elements.
The effect of resistance is same for both AC and DC.
Use of resistors:
To limit current.
To establish proper values of currents in circuits.
To provide voltage drop.
To provide load.
Specification of resistors:
1. Ohmic value: It represents value of the resistance.
2. Tolerance : It represents percentage of variation in the ohmic value.
3. Wattage
: It represents power handling capacity of a resistor.
Eg: 10K, +/- 5%, Watt.

Ohmic Value, Tolerance, Power handling capacity


Colour coding of resistors:
For identification of specifications we have different codes. They are

12

BS 1825 code[British Standard],


SMR coding [Surface Mounted Resistor],
3 band colour coding,
4 band colour coding.

1. BS1825 CODE:
It is a Britain standard coding method using for knowing the value of resistors. In this,
R, E - ohms.
K
- Kilo ohms
M
- Mega ohms
J, K, F, G represents tolerance value
J
- +/- 5%
K
- +/- 10%
F
- +/- 1%
G
-+/- 2%
W represents wattage.
The symbol is
4K7J2
W
Ex: 4K7J2W
Equivalent resistance: 4.7k, +/-5%
2. SMR coding:
It is a surface mounted resistor coding system which is useful to know the value of the
Resistor. In this system the tolerance and wattage is printed on bulk pack.
EX:
103
10 *103 Ohms = 10K
3. THREE BAND COLOUR CODE:
It is a system is used to know the value of resistance. In this system the resistor
Contains 3 colour bands on its body.

1st colour 1st digit


2nd colour 2nd digit
3rd colour multiplication factor
4th colour tolerance
Ex:
1). 270K, +/- 5%
Red violet yellow gold

practical value: 268K, 5%

13

2) 4.7K, +/- 5%
Yellow violet red gold

practical value:4.39K, 5%

3) 39, +/-1%
Orange white black brown

practical value: 35, 5%

4. FOUR BAND COLOUR CODE:

1STband-first digit
2ndband-second digit
3rd band-third digit
4th band-multiplication factor
5th band-tolerance

COLOUR
Black
Brown
Red
Orange
Yellow
Green
Blue
Violet
Grey
White
Gold
Silver
No colour
Pink colour

EX:

DIGIT

MULTIPLIER

0
1
2
3
4
5
6
7
8
9
-

100=1
101=10
102
103
104
105
106
107
108
109
0.1
0.01
-

1. 275 K 1%
Red Violet Green Orange Brown
2.

28.5 K 1%

TOLERANCE

+/- 1%
+/- 2%

+/- 5%
+/- 10%
+/- 20%
High stability

Practical value:272K 1%

Practical value:27.23K 1%

14
Red gray green red brown
3.

28.5 1%
Red grey green gold brown

Classification of resistors:
Basically resistors are divided into two types namely fixed resistors and variable
resistors. These two types are further classified into different types are shown below

CAPACITORS
CAPACITOR:
A Capacitor or condenser is a two terminal passive component which
Has the ability to store electric charge and it opposes instantaneous change of voltage in the
circuit. Capacitor blocks the passage of direct current (D.C) and allows the alternating current
(A.C) through it. A capacitor essentially consists of two conducting surfaces separated by an
insulating medium called dielectric.

15

Capacitance is the property exhibited by a capacitor and may be defined as, The ability of a
capacitor to store electric charge per unit potential difference. It is measured in Farads. But, in
real world, all the generalized usage conditions demands much smaller units measured in milli,
micro, nano, pico farads.
The circuit symbol is
The quantity of charge Q is proportional to the applied voltage v in volts.
i.e. Q V
Q = CV
C= Q/V
The unit of capacitance farad is too large for practical purposes hence much smaller
units like micro farad, nanofarad, picofarad, are generally employed.
1farad = 1Coulomb / 1volt
1F=10-6F, 1nF=10-9F, 1mF=10-3F, 1pF=10-12F
Types of capacitors:
Capacitors can be classified into various types based on the di-electric material used in them.
They are:
Mica capacitors
ceramic capacitors
paper capacitors
Electrolytic capacitors
Air capacitors
Aluminium capacitors
Tantalum Electrolytic capacitors
Variable capacitors
Tuning capacitors
Trimming capacitors
Specification of Capacitor:
Capacitance value
Tolerance
Dielectric constant
Dielectric strength
Power factor
Temperature coefficient
Voltage rating (Withstanding voltage)
Leakage resistance/Leakage current
Factors affecting the capacitor:

16
Capacitance is directly proportional to the area of the plates in square meters.
Capacitance depends on to the permittivity of the medium between the plates and
Capacitance is inversely proportional to the distance between the plates in meters.
C=A/d

[=0r]

C=0rA/d
Where 0 = absolute permittivity of air =8.8540X10-12F/M
r = relative permittivity of medium
Variable capacitors:
The capacitors whose capacitance value can be varied are known as variable
capacitors. These are of two types. They are
1. Tuning capacitors
2. Trimming capacitors (or) untunned capacitors
Losses in capacitors:
There are mainly 3 types of losses that will occur in a capacitor. They are
Leakage resistance
Absorption losses
Power factor
Di-electric losses
Combination of Capacitors:
Capacitors may be connected in series or in parallel in order to decrease or increase the total
capacitance value.
Capacitors in Series:

C 1

C 2

B A T T E R Y

C 3

C=1/C1+1/C2+1/C3
C1, C2, C3 = capacitance of three capacitors.
V1, V2, V3 = voltage drops across C1, C2, and C3
V = applied voltage
In series combination, charge (Q) on all capacitors is same, but voltage drops are different.
V = V1 + V2 + V3
Q/C = Q/C1 + Q/C2 + Q/C3

17

Capacitors in parallel:

C 1

C 2

C 3

B A TTE R Y

C1, C2, C3 = capacitances of three capacitors


Q1, Q2, Q3 = charge on three capacitors
V = applied voltage
In parallel combination p.d across each capacitor is same but charge on each is
different.
Q = Q1 + Q2 + Q3
CV = C1V + C2V + C3V
C = C1+C2+ C3

INDUCTORS
INDUCTORS:
Inductor is an electro magnetic energy concentrator formed by wounding an
insulated Copper wire on the core material. The inductor has got a property called as
inductance. Inductance is measured in Henrys. The symbol for an inductor is
IN D U C T O R

.The inductance value of an inductor depends on number of turns core material etc.
There is no frequency for D.C. voltage.
The inductor is having a parameter called as inductive reactance (XL)
XL=2fL

The over all resistance of inductor is called as impedance.


Z=R2+(XL)2
Where,
Z=Impedance
R=Resistance of coil
XL=Inductive reactance
Properties of inductors:
The inductor opposes A.C. and allows D.C.

18

At the time ( t=0sec) the inductor acts as a open circuit


At the time (t=1sec) the inductor acts as a close circuit
The current limiting factors of inductors are
Frequency
Inductance value
D.C. resistance

The current flowing through inductor


In
A.C.
I=V/Z

Z=R2+XL2

In D.C

I=V/R

The current limiting factors of inductors are


1. Frequency.
2. Inductance value.
3. D.C. resistance.
Applications of Inductors:Inductors are used by so many electronic devices. They are
Chokes
Line filters
Electro mechanical relays
Motors
Generators
Transformers
Chokes:
Choke is an AC voltage dropper. It is used in tube lights etc.

Line filters:
Line filters determine high frequency noise from AC 230V. The symbol
Of a line filter is

Relays:

L IN E F IL T E R

19
Relay is an electrically operated switch. Relay can be defined as a device opens
or closes an auxiliary circuit under some predetermined condition in the main circuit. The object
of relay is to act as a sort of electric magnifier i.e., it enables a comparatively weak current to
bring into operation a much stronger current.
3
1
2

5
4

R ELAY SPD T

Classification of Relays:
Relay can be classified according to the principle of operation, polarization and application as
Based on the principle of operation
Electro thermal relays
Electromagnetic relays
Solid state relays
Hybrid relays (combination of both (b) and (c))
Based on the polarization
Polarized relays
Ex: Telegraph relays
Non polarized relays Ex: Telephone relays
Based on the application
Commercial relays
Industrial relays
Military relays
Communication relays
Railways relays
Specifications of relays:
Type of relay (NO, NC, CO)
Coil operating Voltage
Coil Resistance
Contact current
Eg: 1CO, 12V, 400ohms, 5A
Applications of relays:
Circuit selection and switching in various system
Automatic control process in industrial plants
Semi-automatic processes in industrial plants
Mathematical functions in computers
Traffic control signals
Temperature controllers
Electric motor switches
Automatic stabilizers
Televisions
Industries
Contact materials:
Low contact resistance
High electrical and thermal conductivity
High melting point

20
Long operating life and
Should not oxidize in atmosphere
Types of contacts:
Make contact (or) normally open contact (abbreviated as N/O): It close when the relay
gets energized.
Break contact (or) normally closed contact (abbreviated as N/C): It gets broken when the
relay is energized.
Change-over contact: In this, the movable contact which while changing over its position
by the operation of the relay, breaks with one contact and makes with the other.
Make-before-break contact: In this type, when the relay is operated, one normally broken
contact is first made when it is operated, then only a second normally made contact is
broken.
Transformers:
A transformer is a static device (or stationary) piece of apparatus by means of which electrical
power in one circuit is transformed in to electrical power of the save frequency in another circuit.
It can rise or lower the voltage in a circuit but with a corresponding decrease or increase in
current. The physical bias of a transformer is Mutual Induction between two circuits linked by a
common magnetic flux.
The first coil, in which electric energy is fed from the A.C supply mains, is called primary
winding and the other from which energy is drawn out, is called secondary winding.
In brief, a transformer is a device that transformer electrical power from one circuit to another
It does so without a change of frequency
It accomplish this by electro magnetic induction
Where the two electronic circuits are in mutual inductance to each other.
1

TR A N S F O R M E R

Types of Transformers:
Transformer is a device converts AC to AC in following manner
Step down transformer
Step up transformer
Isolation transformer
Auto transformer
Power transformer
Step down transformer:
Transformer is a linear device. In this type of transformer the secondary voltage always less
than the primary voltage.

21

S te p D o w n T R A N S F O R M E R

VS < VP
NS < NP
Where,VS = Secondary voltage
VP = Primary voltage
NS = No of turns of secondary
Np = No of turns of primary
Step up transformer:
In this type the secondary voltage is always greater than the primary voltage.
1

S te p U p T R A N S F O R M E R

VS > VP
NS > NP
Isolation transformer:
It is a 1: 1 transformer provides isolation between primary and secondary
1

TR A N S F O R M E R

VS = VP
NS = NP
If voltage reduces at the output then it is step down transformer.
If voltage increases at the output then it is step up transformer.
If input voltage is equal to output voltage then it is isolation transformer

22

TR AN S F O R M E R
230v, 12v, 1Amp
Auto transformer:
It is a transformer with one winding part only.

2
5
3
4
1

V a r ia c

It is a transformer with one winding part only. common to both primary and secondary, in
this transformer the primary and secondary are not electrically isolated from each other as is
the case with a two winding transformer. Because of one winding it uses less copper and hence
is cheaper. It is used where transformation ratio differs little from unity.
Losses in a transformer:
i) Core (or) Iron loss:
It includes both hysterisis loss and eddy Current loss. The core loss is
practically the same at all loads.
ii) Copper loss:
This loss is due to ohmic resistance of the transformer windings.
Current Relations of transformers:
Vp/Vs = Is/Ip =
Np/Ns
If the no. of turns increases, it results in increase in the coil resistance which makes current
decrement.
Transformers types:
Single tapped transformer:
It is an ordinary transformer. In this type of transformer it contains two Output terminals.
1

TR A N S F O R M E R

Centre tapped transformer:

23
In this type of transformer it contains three output terminals. From 1&2 terminals of secondary
windings we get positive voltage and from 2&3 terminals we get the output voltage as negative.
From 1&3 terminals we get the sum of voltage at the 1&2 terminals and the voltage at the 2&3
terminals.
5

1
6
4
8
C e n tre

T a p

Multi tapped transformer:


It will contain 3 or more output terminals. It produces different outputs at the
different terminals from 1 to 4 of the secondary windings.
4

3
2
8

1
M u lt ip le T a p

Isolated tapped transformer:


In this type of transformer the output is same as the applied voltage.It is used for provide
between the input and output.
1

2
3

9
10

4
5
6
7

11
I s o la t e d T a p

Current Transformer:
It is setup transformer. It used measure the high currents. The primary windings of the
current transformer must have 2 or 3 windings. In this in terms of voltage we calculate the
current. In this we increase the current depending on the number of secondary windings.
Voltage Transformer:
It is a step down transformer, used to measure high voltages. In this transformer we
decrease the voltage depending on the number of secondary windings.
SEMICONDUCTORS
SEMICONDUCTORS:

24
Semiconductors are solid materials whose electrical properties lie in between conductors
and insulators. All semiconductors are negative temperature coefficient materials i.e resistance
of semi conductors decreases with increase in temperature and vice versa. These are half filled
valency electrons.
Example: Silicon, Germanium
The process of adding impurities to the pure semi conductors is called Doping.
Depending on the process of doping, semi conductors are classified into two types.
1. Intrinsic semiconductors
2. Extrinsic semiconductors
Intrinsic semiconductors:
A Semiconductor in its pure form is called intrinsic semiconductor. In
intrinsic semi conductor, equal no. of electrons and holes will be available at room temperature.
So current conduction takes place by both electrons and holes equally. It has poor conductivity
because of less no. of free charge carriers.
Eg: pure silicon, pure germanium.

S
i

Extrinsic semiconductors:
Impure or doped semi conductors are called as extrinsic semiconductors. These
have more conductivity because of more no. of free charge carriers. The current conduction of
these semiconductors depends upon level of impurity or amount of doping. The impurities may
be pentavalent or trivalent atoms. The atoms whose valence electrons are five are called as
Pentavalent atoms. These are also called as donor impurities because they donate electrons
to the conduction band. The atoms whose valence electrons are three are called as trivalent
atoms. These are also called as acceptor impurities because they accept electrons from
conduction band.
TYPES OF EXTRINSIC SEMICONDUCTORS:
Depending upon the type of impurities added these are further divided
into two types. Namely
1. N-TYPE
2. P-TYPE
N-TYPE SEMICONDUCTORS:
These are formed by adding pentavalent impurities such as Arsenic (33),
to pure semiconductor like germanium (32). These are the donor materials.

25

P-TYPE SEMICONDUCTORS:
These are formed by adding trivalent impurities such as boron (5)
to pure semiconductor like silicon (14). These are acceptor materials.

A
l

FORMATION OF PN JUNCTION:
When P and N type materials are placed together then the free
electron in n-type material is combine with the hole i.e free electrons are diffuse from N region to
P- region to N-region. Then positive charge developed in N-type & negative charge in the ptype. At the junction potential barrier is formed. The barrier voltage is 0.3v for Ge and 0.7v for
Si .The barrier potential opposes the flow of majority charge carriers from one side to another
side and it assist the flow of minority charge carriers in crossing the P-N junction. The barrier
potential can be decreased or increased by applying external voltage.

P N J U N C T IO N D IO D E

P-N JUNCTION WITH FORWARD BIAS:


If the positive voltage is connected to the p-side or anode
and negative voltage is connected to the n-side or cathode then the P-N junction is said to be
forward biased. In forward bias holes in the p side and electrons in the N-side are compelled to
move towards the junction. As a result the width of the depletion region is reduced. With the

26
increase in external voltage the barrier voltage decreases smaller and smaller and at one
particular external voltage the barrier potential totally disappears. Then the junction offers very
low resistance.
P N J U N C T IO N D IO D E F O R W A R D B IA S
1
2

2
B A TTE R Y

1. With the increase in external voltage the barrier potential decreases.


2. The junction offers low resistance (almost zero resistance)
3. Forward current
P-N JUNCTION WITH REVERSR BIAS:
If the positive terminal is connected to the N-type (or) cathode and
negative terminal is connected to the P-type (or) anode then the PN junction is said to be
Reverse biased. In reverse bias the majority charge carriers will be attracted towards the
external voltage without crossing the PN junction. These majority carriers will leave the
immobile ions at the junction. Thus the width of depletion region increases. As a result there is
no current due to majority charge carriers When the PN junction is reverse biased.
P N J U N C T IO N D IO D E R E V E R S E B IA S

2
B A TTE R Y

With increase in external voltage the Barrier potential increases. The junction offers very high
resistance (Almost infinite) &current flow is low.Very little amount of current (In the order of Nano
& Micro ampere flows which can be treated as zero) due to minority carriers.
DIODE SPECIFICATIONS:
Maximum forward current (IF max): It is the maximum forward current through the diode
when it is conducting.
Peak inverse voltage (PIV): This is the maximum reverse voltage that a diode can
withstand without being destroyed.
Maximum forward voltage drop (VF): It gives the maximum forward voltage drop for a
given forward current.
Recovery time: It is the time taken by a diode to change its state from forward bias to
reverse and vice versa.
Applications:
Used in rectifier circuits for converting A.C current into D.C current.
Used as signal diodes in Modulation & Demodulation circuits.
Used as regulators.
Used in Radio &T.V receivers in tuning circuits.
Used in Digital logic gates.
Light emitting diodes used as visual displays

27

OTHER DIODES
Zener diode: Zener diode is the heavily doped silicon or germanium PN junction diode . It is
always operated in the breakdown region. By varying the doping level it is possible to produce
Zener diodes with breakdown voltages from about 2v to 200v. Zener diode is heavily doped PN
junction diode which is operated in the reverse bias only. The operation depends on the Zener
breakdown voltage. The breakdown voltage is based on the doping concentration. If the doped
concentration increases Zener breakdown voltage decreases & vice versa.
If the Zener diode is operated in the forward bias, the characteristics are same as that of
a rectifier diode.
Zener diode is always operated in reverse bias mode.
Zener breakdown voltage is defined as the reverse voltage at which current increases
suddenly& sharply.
After breakdown takes place the voltage across Zener diode remains constant at Vz.
The main application of Zener diode is VOLTAGE REGULATER. The diode regulates the
o/p voltage according to the load.
Z E N E R D IO D E

SPECIFICATIONS :
Breakdown voltage.
Wattage
Ex: 5.6v (ZBV);1W(Max. Power)
LIGHT EMITTING DIODE: It is a forward bias operated diode. The energy is required to
generate an electron hole pair, Due to recombination of this electrons & holes an energy is
liberated from its junction in the form of light. Light emitting device (LED) converts electrical
energy into optical energy.
LED

Gallium phosphide
Red
Magnesium Phosphide
- Green Light
Gallium arsenide
Infrared Radiations
Gallium arsenide Phosphide Red (or) Yellow
Under forward bias if forward voltage increases then the electrons & holes combines each other
at the junction and results radiation of light energy. The efficiency of light generating increases
with increasing current or by decreasing temperature i,e The generating light is directly
proportional to current applied and inversely proportional to temperature.
Applications:
Instrument displays.
Telephone exchange.
Over load indications.
Digital watches.
Specifications of LED:
Colour.

28
Size.
Voltage.
Max .current
Ex: Red, 5mm, 3V, 5mA
IR LED: It is forward bias operated diode used to generate infrared rays. This type of LEDs are
used in remote control systems, light vision cameras. These are manufacture with Gallium
Arsenide materials.
VC C

R E S IS T O R

IR L E D

Laser Diode: It is forward operated diode used to generate Laser light. This type of are most
widely used in medical applications.
VC C

R E S IS TO R

L A S E R D IO D E

Photo Diode: A Photo diode is a two terminal PN junction device which operates in the reverse
bias on PHOTO CONDUCTIVE EFFECT. When there is no light applied current in the diode is
called Dark current. As light intensity increases the reverse current also increases. Hence the
diode current is directly proportional to reverse bias current & light intensity.
VC C

R E S IS TO R

P H O TO D IO D E

Applications:

29
Light operated switches.
Light detector.
High speed counting & switching.
Encoders.
Decoders.
Alarm circuits.
TRANSISTORS:
Transistor is a three layers, two junction & three terminal semiconductor device. A
transistor may be regarded as two back to back PN junctions in a single piece of semiconductor.
The two junctions give rise to three regions. The middle region is called Base & the outer two
regions are called as Emitter & Collector. The PN junction b/w Emitter & Base is called Emitter
Base region (or) Emitter region. The PN junction b/w collector & base is called Collector region
(or) Collector Base region. Emitter is one of the transistors which emit majority charge carriers
into base region. Physical area of emitter is < collector & > base. Doping concentration is more
than collector & base. Base is the middle region of the transistor which is very thin & lightly
doped as compared to either emitter or collector. Collector is third region which collects the
charge carriers emitted by the electrons trough the base. Doping concentration of Collector >
Base < Emitter>Collector.
Collector region is made physically larger than emitter & base to dissipate much heat
generated.
Transistor is a variable resistor whose resistance between emitter and collector lies
between zero and infinity. The value of this resistance is continuously changes with changes in
base current.
If there is no base current, then the transistor offers infinity resistance b/w collector & emitter.
This state is known as Cut off state acts as open switch. If the base current goes on increasing
the resistance b/w collector & emitter is decreases from infinity to zero. Then this state is known
as Active state . In this state transistor acts as an amplifier. If there is a maximum base
current the R value is zero. It is known as Saturation state and the transistor acts as Closed
Switch. Depending on the type of material added the transistors are classified into two types.
1) NPN transistor
2) PNP transistor
For NPN transistor arrow points from base to emitter means that the base is at positive
potential with respect to emitter.
2

1
3

PN P

1
3

N PN

In transistor the emitter current IE is equal to sum of base current IB and collector current Ic i.e.
IE=IB+IC.
Transistor Testing:
With respect to base collector, emitter forward bias test>>B-C, B-E=Forward bias.
With respect to base collector, emitter forward bias test>>B-C, B-E=Reverse bias.
Collector & Emitter forward bias (or) Reverse bias.
Transistor Specifications:
Maximum collector to emitter voltage (Vce max).
Maximum collector current (Ic max)

30
Maximum power dissipation (PDmax)
Transistor Applications:
Used as amplifiers.
4. Modulators.
Oscillators.
5. Relay drivers.
Mixers.
6. Switching circuits.
These are the applications of a Transistor.

DIGITAL ELECTRONICS

In digital electronics the total circuit operations are performed by using Logic Gates. In
Logic Gates the most widely used gates are NAND and NOR gates. These gates are
called UNIVERSAL GATES as these are used to implement any gate such as AND, OR
& NOT.
AND GATE:
It is used as multiplier. The output of this gate is HIGH only when the two
inputs are at active high. The output is LOW when any one of the input is low.
OR GATE:
It is used as adder. The output of this gate is HIGH when any one of the input is
at active high. The output is LOW when two inputs are at active low.
NOT GATE:
It used as inverter. If the input is high, the output is LOW. If the input is
low, the output is HIGH.
EX-OR GATE:
It is also called as EXCLUSIVE OR gate. Output of this gate is = A`B+AB`

POWER SUPPLIES
HALF WAVE:

D 1

C a p a c it o r

0 V -1 2 V

1. The above figure shows Half Wave rectifier.


2. Half Wave Rectifier consists of Ordinary transformer, 1N4007diodes (1).
3. The input is applied to the primary windings of the transformer and one
diode connected in series to the secondary.
4. During the positive half cycle of the AC input signal the diode D1 is forward
biased which results the Positive cycle is rectified.
5. During the Negative half cycle of the AC input signal the diode D1 is reverse
biased which results the negative half cycle is not rectified.
6. Hence the Half wave rectifier rectified only one half cycle.

31

FULLWAVE:
1

AC230V

6
4

1 2 V -0 V -1 2 V

1N 4007
1

C a p a c it o r

1N 4007

1. The above figure shows Full Wave Rectifier.


2. Full Wave Rectifier consists of Center tapped transformer, 1N4007diodes (2).
3. The input is applied to the primary windings of the transformer and two diodes
connected in series to the secondary.
4. During the positive half cycle of the AC input signal the diode D1 is forward biased
and diode D2 is reverse biased which results the Positive cycle is rectified.
5. During the Negative half cycle of the AC input signal the diode D2 is forward biased
and diode D1 is reverse biased which results the negative half cycle is rectified.
6. Hence the full wave rectifier rectifies full cycle.
BRIDGE RECTIFIER:
7805
5
2
4

+ 4

V IN

VO U T

3 3 0 u F /2 5 V

1 6 0 u F /1 6 V
2

AC 230V

T7

G N D

1
1

B R ID G E
3

1 2 V -0 V , 5 0 0 m A

The above figure shows the Bridge Rectifier with 5v

1.
regulation.

Bridge Rectifier is also called as Ordinary Full Wave

2.
Rectifier.

It consists of one ordinary transformer, 1N4007 diodes

3.
(4) and 7805 regulator.
4.
5.
6.
7.
8.

The input is applied to the primary windings of the


transformer and bridge circuit is connected to the secondary.
During the Positive half cycle of the A.C input signal,
the diodes D1 and D3 are forward biased & D2 and D4 are reverse biased, which
results the positive half cycle rectification.
During the Negative half cycle of the A.C input signal,
the diodes D2 and D4 are forward biased & D1 and D3 are reverse biased, which
results the negative half cycle rectification.
Hence Bridge Rectifier rectifies the full cycle of the A.C
input signal.
The output of the rectifier is connected to 7805
Regulator.

32
In this 78 represents the positive voltage and 05

9.
represents 5v output.

Hence we obtain 5v at the output of bridge rectifier.

10.
Operational amplifier:

Differentia
l input
stage

Intermediat
e stage

Level
shifting

Output
Stage

The above block diagram shows the basic operational amplifier simply called as OpAmp. The first stage of an Op-Amp differential amplifier has high input impedance and large
gain. The second stage is intermediate stage provides the additional gain to the output of
differential amplifier. A level shifting circuit / level translate circuit is placed between second and
final stage to eliminate DC component without entering in to the output stage. By eliminating DC
level at the final stage. The output voltage is varying between the 0 to reference voltage. Thus
preventing any undesired DC current entering into load.

3
2

IC 7 4 1

The above figure shows the symbol of Op-Amp in which it has two inputs namely non
inverting input with positive sign and inverting input with negative sign. If the signal is given to
inverting input the OP-Amp is said to be Inverting amplifier. If the input is given to the non
inverting input then the Op-Amp is said to be Non-inverting amplifier.

The above figure shows the pin diagram of the Op-Amp (IC 741) which is an 8 pin DIP IC.
Functions of Op-Amp:

33
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.

inverting amplifier
Non- inverting amplifier
Summer
Sub tractor
Multiplier
Voltage follower
Current follower
Integrator
Differentiator
Comparator.

Astable multi Vibrator:


VC C

7
10K

2
6
5

1 5 0 0 u F /2 5 V

0 .1 u F

D IS

1K

TR
TH R

3
1K

LED

C V

N E555

The astable multivibrator using IC 555 is shown above during the


charging period the transistor it is held open by the flipflop and the capacitor charges through
the resistor Ra& Rb when the voltage across the capacitor reaches the reference level of the
upper comparator the comparator changes the state of the flipflop and this turns on the
transistor.
The capacitor discharges through resistor Rb until its voltage reaches the
reference level of the comparator. This comparator changes the state of the flipflop again which
turns off the transistor the charging time of the capacitor is determined by
T1= C[RA+RB]
The capacitor discharges from 2/3 Vcc forwards 0V hence the discharge period
of the capacitor is determined by
T2= (CRB log 0-2/3 Vcc) / 0-1/3 Vcc
T2= 0.7 RB C

34
The total time period is given by
T= T1+T2 = 0.7 (RA+2RB) C
Applications:
1. Used in Timing circuits.
2.

Used in hobby circuits.

Mono stable Multivibrator:

VC C

2
7
6

10K
VC C

TR

10K

D IS
TH R

3
1K

LED

C V

N E555
4 7 - ^3

1 5 0 0 u F /2 5 V

0 .1 u F

1 0 u F /2 5 V

2
1
TS O P 1738

Mono stable multivibrator using IC 555 is shown above. In the absence of


trigger input the timing capacitor C is held in the discharged state. In this state the output is low.
If the trigger voltage is above the threshold level then the state of the circuit may change.
(VT>VTH) when the negative going trigger pulse is applied at trigger terminal and if it is greater
than 1/3 VCC then the flipflop will set and the transistor will cutoff. Causing discharge capacitor
starts charging exponentially it is given by,
V=VCC (1-e-t/RC)
When the voltage at the threshold terminal is greater than 2/3 V CC the flip
flop will reset which makes transistor T1 to ON. Causing discharge of the capacitor C. the
trigger pulse width must be less than the timing signal for proper operation of the timer. The
mono stable timing period can be varied by a voltage applied to the control terminal and is given
by,
T=RC log [Vcc/ (Vcc-Vcc)]
T=1.1 RC

35
Applications:
1. It produces stretched rectangular wave hence is used in timing circuits and control
circuits.
2. It is used in auto cut voltage stabilizer.
Opto-coupler:

VC C

Opto Coupler

VC C

10K

3 3 0 - ^-

Vout
P H O T O D IO D E

LED

Principle:
An opto-coupler is a solid state component which light emitter (led) the light path and
the light detector are contained in a light tight encapsulation. The photo detector may be photo
diode, photo transistor or a photo thermistor.
Working:
When current flows in the diode the emitted light is directed to the photo transistor and
causes current flow in transistor since the coupling is optical. There is a high degree of isolation.
Typically the transistor current is about 60% of the led input current
The Opto isolator provides complete isolation between the i/p & o/p signals. This
feature allows it to be used as an interface between high voltage and low voltage systems.
Applications:
1.
2.
3.
4.
5.
Comparator:

In fiber optic communication


To reduce common ground connection
In switching applications
In chopping applications
It is used where electronic isolation is required

36

1. The above fig(a) shows the pin diagram of the LM393 comparator
2. This diagram comparator internally consists of two comparators
3. The main application of the LM393 comparator is, it compares the input voltage and
gives the output as active high or active low
Temperature stability using LM393 comparator:

V C C

10K
V C C

V+

10K

V C C

3 .3 K
-

V-

O U T
2

LE D

11

LM 393

4 .7 K

Working:
1. The above fig(b) shows the thermistor in LM393 comparator
2. From the figure at the 3rd pin of the comparator two equal values of the resistors are
connected in the potential divider manner.
3. From this connection we get 2.5v at the 3rd pin
4. This 2.5v voltage is treated as the reference voltage of the comparator for
comparison
5. The LDR and resistor are connected in potential divider network manner.

37
6. The thermistor is a NTC type I, e the temperature increases resistance decreases
and voltage across the thermistor is also decreases.
7. This voltage is applied across the 2nd pin of the comparator.
8. Then the comparator compares the voltage with the ref voltage and gives the output.
9. If V1>V2 the led will glow.
10. If v1=v2 or v1<v2 the comparator produce negative voltage.
Then the LED comes under reverse bios and will not glow.
Light intensity monitoring using LM393 comparator:

V C C

10K
V C C

V+

10K

V C C

3 .3 K
-

V-

O U T
2

LE D

11

LM 393

4 .7 K

Working:
1. The above fig(b) shows the thermistor in LM393 comparator
2. From the figure at the 3rd pin of the comparator two equal values of the resistors are
connected in the potential divider manner.
3. From this connection we get 2.5v at the 3rd pin
4. This 2.5v voltage is treated as the reference voltage of the comparator for
comparison
5. The LDR and resistor are connected in potential divider network manner.
6. The thermistor is a NTC type I, e the temperature increases resistance decreases
and voltage across the thermistor is also decreases.
7. This voltage is applied across the 2nd pin of the comparator.
8. Then the comparator compares the voltage with the ref voltage and gives the output.
9. If V1>V2 the led will glow.
10. If v1=v2 or v1<v2 the comparator produce negative voltage.
Then the LED comes under reverse bios and will not glow.
DTMF
Features
Full DTMF receiver
Less than 35mW power consumption

38
Industrial temperature range
Uses quartz crystal or ceramic resonators
Adjustable acquisition and release times
Applications
PABX
Central office
Mobile radio
Remote control
Remote data entry
Call limiting
Telephone answering systems
Paging systems
Pin Diagram

MICRO CONTROLLER
Microcontrollers are generally dedicated for specific applications. A microcontroller may
take
an Input from the device it is controlling and controls the device by sending signals
to different components in the device. Microcontroller normally contains a processor, memory,
serial ports, and necessary logic circuits to perform the specific function.

39
A microcontroller is a computer (or) processor (CPU) with most of the necessary
chips on board. The actual processor used to implement a microcontroller can vary widely. In
many products, such as microwave ovens, the demand on the CPU is fairly low and price is an
important consideration. In these cases, manufactures turn to dedicated microcontroller chipsdevices that were originally designed to be low-cost, small low power, embedded CPUs. The
Intel 8052 is good example for it. Microcontroller normally contains RAM, ROM, Timer-counter,
serial I/O Ports, Oscillator etc.
THE BLOCK DIAGRAM OF A GENERAL MICRO CONTROLLER IS AS FOLLOWS:

Features of AT89C52 Microcontroller


Total pins
= 40
External Memory Interface
Data lines
= 08
Address lines
= 16
I/O lines
= 32
Interrupt lines
= 03
Registers
= 34(8-bit) & 02(16-bit)
Internal ROM
= 8K Bytes
Internal RAM
= 256B (256 x 8-Bit Internal RAM )
Flags
= 04

40

Timer / Counter
= 03 (16-bit)
Serial port(UART)
= 01 (Programmable Serial Channel )
Parallel ports
= 04
Endurance
= 1,000 Write/Erase Cycles
Operating Range = 0 Hz to 24 MHz
Three-level Program Memory Lock
Eight Interrupt Sources
Low Power Idle and Power Down Modes

Functional block diagram of 8052 microcontroller:


The 8052 is a 40 pin chip with NMOS (N-channel metal oxide silicon) technology. The
functional block diagram of 8052 can be represented in several ways.

1. Central Processing Unit (CPU) :


The CPU of 8052 is capable in performing arithmetic and logical operation,
subtraction, multiplication, division, logical AND, OR, EX-OR, rotate, clear and
complement. This CPU can do
Bit wise as well as byte wise manipulations.
The 8052 contains several registers, such as accumulator, B-, data pointer, program
counter, stack pointer, and program status- word (PSW).
2. Internal Memory:
In general CPU requires program codes and relevant data while performing a task.
In order to make them available the 8052 has two types of internal memories, i.e.: RAM
and ROM.

41

3.

4.

5.

6.

7.

8.

The i-RAM is of 256 bytes. It is divided into three parts, such as:
i.
32 resisters in four banks of 8 each.
ii.
16 resisters bit addressable.
iii.
80 resisters byte addressable.
The i-ROM is of 8KBin size ranging from 0000H to 0FFFH.
Special Function Registers:
The 8052 has several Special Function Registers (SFRs) known as A, B, DPTR,
PSW, IP, IE, TCON, SCOON, PCON, P0,P1,P2,P3, SBUF etc. all these are byte
addressable and some of them are bit addressable also. The SFRs can be
accessed by their names or by their addresses. These are useful in accessing
I/O Ports, timer/counters, UART, Power Controlling etc.
Timers / counters:
The 8052 has two timers / counters. Many microcontroller applications are
requires the counting of external events happened around the microcontroller or
in maintaining the time delays between the actions occurred inside of the
microcontroller. Counters are used to count the events where as timers are used
to maintain time delays between the actions.
This unit has two 16-bit registers named as T0 & T1. Since the 8052 is a 8-bit
controller, these registers are also byte addressable i.e., low byte and high byte
(TL0, TL1& TH0, TH1)
Two SFRs TMOD and TCON are used to monitor the nature of working of the
said registers T0 & T1.
Serial port:
This unit provides serial data transfer. This feature is required in certain
communications with other communications with other computers and while
accessing with some peripherals like printer.
A SEF known as SBUF is used to hold the data transfer and after serial data
transfer. Two other SFRs, SCON and PCON are used to determine the baud
rate, transmission, reception, etc. In fact SBUF has two 8-bit registers, one for
holding the data while transmission. Another register receives the data and
carries during reception. The serial data communication can be held in one of the
four modes.
Interrupt Control:
This unit alters the microcontrollers attention from one task to some other. This may
generate in the inside of the 8052 or provided from the external sources. The 8052 has
eight interrupts. These interrupts either all or selectively enabled / disabled through a
SFR IE. Further the priority among these can be determined by another SFR IP.
I/O Ports:
In 8052, there are four I/O ports with 8 lines of each. Some of these ports can be
configured as an Input or as an Output port. In addition port 3 performs some specified
functions. Special circuits like latch, buffer and driver are built in these ports to perform
the said actions.
Oscillator and Clock:
In order to synchronize all the internal operations of the microcontroller, an on-chip
oscillator is used. However requires an external oscillator to run the on- chip oscillator to
run the on-chip oscillator. A quartz crystal oscillator is connected as an input to the said

42
purpose. The 8052 designs are available with wide range of frequencies, typically from
1MHz to 16 MHz
Register structure of 8052:
Registers are used to store the data temporarily. The data may be of opcodes or
operands or address of a memory location or address of a peripheral.
The 8052 has wide range of registers. These are classified as
Bit addressable
(or) byte addressable
General purpose
(or) special function
8-bit length
(or) 16 bit length
Independent
(or) dependent (part of RAM)
Pin diagram of 8052:

The Pin diagram of 8052micro controller is shown in above fig. it is available in a 40 pin
plastic and ceramic packages. All 40 pins are easily distinguishable a carrying the specific
functions. It is worth noted that the 32 pins will have two different functions. A brief discussion of
these pins is explained here under.
Pin 1-8: P1.0- P1.7: A total of 8 lines named as port-1 and used for input or output.
Pin 9: RESET: Active HIGH input used to reset the microcontroller and terminate all activities.
Pin 10-17: P 3.0 P 3.7: A total of lines named as port-3 and used for input or output. In
addition, these lines provide special functions, as listed below.
*P 3.0 (RD) : Data received in serial form.
*P 3.1(TD) : Data transmitted in serial form.
*P 3.2 (INTO): Hardware interrupts of vectored location 0003H.
*P3.3 (INTI): Hardware interrupts of vectored location 0013H.

43
*P3.4 (T O): Pulse input given to the Counter 0.
*P 3.5(T I): Pulse input given to the Counter-1.
*P 3.6 (WR) : A control signal activates memory (I/O device) for read operation.
Pin 18-19 (XTL1 & XTL2) : A quartz crystal oscillator and capacitors formed age s pulse
generator and is connected to inputs X T A L 1 & X T A L 2 to run the on- chip oscillator.
Pin 20 (GND): This is a return (ground) pin for the supply.
Pin 21-28: P 2.0- p2.7(Ag-A15) : A total of 8 lines named as port and used for input and output. In
addition, these lines provide high order address byte (An 8A15) through which the 8052 can
access 64K bytes memory.
Pin 29: (PSEN) : Program Store Enable is an output pin used to access the external program
memory (ROM) while connecting it to OE terminal of ROM chip.
Pin 30 : (ALE) : Address Latch Enable is an output pin used to latch the low order address
byte (A0-A7). This is for demultiplexing the address and data.
Pin 31: (EA): External Access is an input pin used to access the external program code
memory (ROM) only. If this is at Vcc level then the 8052 can access 4K bytes of internal ROM
(000H-0FFFH) and external ROM of 60K bytes (1000H-FFFFH).
Pin 32-39: P 0.0 P 0.7(A D0- a D7): A total of 8 lines named as port-0 and used for input and
output. In addition these lines also provide a dual function carrying of address (low order byte)
and data (D0-D7). ALE pin indicates that these lines are having either address or data. When
ALE =1, these lines represents the low order address byte otherwise data byte.
Pin 40: Vcc : This is a +5V supply voltage pin.

Design a circuit to flicker an LED light with 50% duty cycle and write a program
for it.
The main concept of this project is to generate a 50% duty cycle square wave indicated
by the blinking of a LED connected to the micro controller. It is constructed using 12-0-12 centre
tapped transformer, 7805 voltage regulator, 1N4007 rectifier diodes, 2200uF/25V & 470uF/16V
filtering capacitors, AT89c52 micro controller, BC547 NPN transistor and a 3mm LED.
Here we used an AT89C52 microcontroller from the 8051 family. A 3mm red LED is
connected to the P2.0 of micro controller. The micro controller is provided with a reset logic for
9th pin using a RC network with values R=8.2k, C=10F/16V. A crystal oscillator with
11.0592MHZ frequency is connected to pins 18 and 19. Two 33pF Non-polar ceramic capacitors
are used on both the legs of crystal to the ground to eliminate the noise signal.
The LED is connected to P2.0 using a general purpose NPN driver transistor
BC547 with base resistor 10k for limiting the base current. A 1k is used in series with LED for
its forward current limitation. We write a program to configure the port 2 as output port and
continuously set and clear the P2.0 with one second delay.
Circuit diagram:

44
+12v

4007

AC230V

1
4007

1 0 0 0 /2 5

V IN

VO U T

1 0 0 /1 6

VC C
L7805
G N D

TR A N S F O R M E R
1
5

VC C
104p
VC C
1
2
3
4
5
6
7
8

VC C

1 0 /1 6

1
2
3
4
5
6
7
8
9

9
8
7
6
5
4
3
2

9
10
11
12
13
14
15
16
17

8 .2 K

19
18
20

VC C

P
P
P
P
P
P
P
P

1 .0 /T2
VC C
1 .1 /T 2 -E X E A /V P P
1 .2
1 .3
P 0 .0 /A D 0
1 .4
P 0 .1 /A D 1
1 .5
P 0 .2 /A D 2
1 .6
P 0 .3 /A D 3
1 .7
P 0 .4 /A D 4
P 0 .5 /A D 5
R ST
P 0 .6 /A D 6
P 0 .7 /A D 7
P 3 .0 /R XD
P 3 .1 /TXD A L E /P R O G
P 3 .2 /IN T 0
PSEN
P 3 .3 /IN T 1
P 3 .4 /T0
P 2 .7 /A 1 5
P 3 .5 /T1
P 2 .6 /A 1 4
P 3 .6 /W R
P 2 .5 /A 1 3
P 3 .7 /R D
P 2 .4 /A 1 2
P 2 .3 /A 1 1
XTA L1
P 2 .2 /A 1 0
XTA L2
P 2 .1 /A 9
G N D
P 2 .0 /A 8

40
31
39
38
37
36
35
34
33
32

VC C

R E S IS T O R

30
29
28
27
26
25
24
23
22
21

LED

BC 547

1 1 .0 5 9 2

33p

33p

Program: 1) Blinking of LED


p2.0-LED
;******************STARTING MODULE*********************
ORG 0000H
LJMP START
;****************MAIN MODULE*************************
START:
ORG 0050H
SETB P2.0
LCALL DELAY
CLR P2.0
LCALL DELAY
ACALL START
;********************DELAY MODULE**********************
DELAY:
MOV R7,#FFH
L3 : MOV R6,#FFH
L2 : MOV R5,#FFH
L1 : DJNZ R5,L1
DJNZ R6,L1
DJNZ R7,L1
RET

4148

2
3
4
5
6
7
8
9

9
8
7
6
5
4
3
2

VC C
A T89C 52

45
END;
2) Flickering of LED for 10 times when switch at P1.0 is pressed.
;***************STARTING MODULE********************
ORG 0000H
LJMP START
;******************MAIN MODULE***********************
ORG 0050H
BLINK :
MOV R0,#0AH
START:
SETB P2.0
LCALL DELAY
CLR P2.0
LCALL DELAY
DJNZ R0, START
HERE:
SJMP HERE
;******************DELAY MODULE*************************
DELAY:
MOV R7,#05H
L3 : MOV R6,#FFH
L2 : MOV R5,#FFH
L1 : DJNZ R5,L1
DJNZ R6,L2
DJNZ R7,L3
RET
END;

Design a circuit to display the number of persons entering into the auditorium in
a 7-segment display using micro controller.
The main concept of this project is to display the number of persons entering into a room in a
seven segment display connected to the micro controller. It is constructed using 12-0-12 centre
tapped transformer, 7805 voltage regulator, 1N4007 rectifier diodes, 2200uF/25V & 470uF/16V
filtering capacitors, AT89c52 micro controller, common anode 7-segment display.
Here we used an AT89C52 microcontroller from the 8051 family. The micro controller is
provided with a reset logic for 9th pin using a RC network with values R=8.2k, C=10F/16V. A
crystal oscillator with 11.0592MHZ frequency is connected to pins 18 and 19. Two 33pF Nonpolar ceramic capacitors are used on both the legs of crystal to the ground to eliminate the
noise signal.

The project is having an opto coupler designed using an IRLED and Photo Diode
connected to P1.0. This opto coupler senses the obstruction occurring and displays the
count in the 7-segment display connected to P2.
Circuit Diagram:

46

AC230V

6
8

VC C
L7805
1

4007

V IN

1 0 0 0 /2 5

VO U T

2
1 0 0 /1 6

+12v

4007

G N D

TR AN SF O R M ER
1
5

VC C

1 0 /1 6

VC C

9
8
7
6
5
4
3
2

1
1
1
1
1
1
1
1

1
2
3
4
5
6
7
8

C
C
C
C
C
C
C
C

VC C

9
8
7
6
5
4
3
2
1

1
2
3
4
5
6
7
8
9

U LN 2803

VC C

VC C

8
7
6
5
4
3
2
1

C O M
8B
7B
6B
5B
4B
3B
2B
1B

1
1
1
1
1
1
1
1

VC C

0
1
2
3
4
5
6
7

19
18
20

VC C
3 3 0 - ^-

104p

2
3
4
5
6
7
8
9

8 .2 K

VC C

10K

P
P
P
P
P
P
P
P

1
1
1
1
1
1
1
1

.0 /T 2
VC C
.1 /T 2 -E X E A /V P P
.2
.3
P 0 .0 /A D 0
.4
P 0 .1 /A D 1
.5
P 0 .2 /A D 2
.6
P 0 .3 /A D 3
.7
P 0 .4 /A D 4
P 0 .5 /A D 5
R ST
P 0 .6 /A D 6
P 0 .7 /A D 7
P 3 .0 /R X D
P 3 .1 /T XD A L E /P R O G
P 3 .2 /IN T 0
PSEN
P 3 .3 /IN T 1
P 3 .4 /T 0
P 2 .7 /A 1 5
P 3 .5 /T 1
P 2 .6 /A 1 4
P 3 .6 /W R
P 2 .5 /A 1 3
P 3 .7 /R D
P 2 .4 /A 1 2
P 2 .3 /A 1 1
XTA L1
P 2 .2 /A 1 0
XTA L2
P 2 .1 /A 9
G N D
P 2 .0 /A 8

40
31
3
3
3
3
3
3
3
3

9
8
7
6
5
4
3
2

30
29
2
2
2
2
2
2
2
2

8
7
6
5
4
3
2
1

1 1 .0 5 9 2

33p

A T89C 52

33p
P H O T O D IO D E

LED

Program:
P3.0 =Switch
;******************STARTING MODULE**********************
ORG 0000H
LJMP START
;******************MAIN MODULE****************************
ORG 0050H
START:
MOV P1,#00H
xx:MOV R0,#FFH
YY:
INC RO
LCALL DISP
CJNE R0,#0AH,YY
LJMP xx
DISP:
SW:JB P3.0,SW

2
3
4
5
6
7
8
9

9
8
7
6
5
4
3
2

VC C
1

47
LCALL DELAY
JB P3.0,SW
SW1:
JNB P3.0,SW1
LCALL DELAY
JB P3.0,SW1
D0:CJNE R0,#00H,D1
MOV P1,#3FH
RET
D1:CJNE R0,#01H,D2
MOV P1,#06H
RET
D2:CJNE R0,#02H,D3
MOV P1,#5BH
RET
D3:CJNE R0,#03H,D4
MOV P1,#4H
RET
D4:CJNE R0,#04H,D5
MOV P1,#66H
RET
D5:CJNE R0,#05H,D6
MOV P1,#6DH
RET
D6:CJNE R0,#06H,D7
MOV P1,#7DH
RET
D7:CJNE R0,#07H,D8
MOV P1,#07H
RET
D8:CJNE R0,#08H,D9
MOV P1,#7FH
RET
D9:CJNE R0,#09H,D10
MOV P1,#6FH
D10:RET
;*************************DELAY*****************************
DELAY:
MOV R7,#FFH
DJNE R7,$
RET
END;

48

Design a project to drive the DC linear motor with direction control and write a
program for it.
The main concept of this project is to display the number of persons entering into a room
in a seven segment display connected to the micro controller. It is constructed using 12-0-12
centre tapped transformer, 7805 voltage regulator, 1N4007 rectifier diodes, 2200uF/25V &
470uF/16V filtering capacitors, AT89c52 micro controller,BC557 PNP transistor, ULN2803, and
12V linear motor.
Here we used an AT89C52 microcontroller from the 8051 family. The micro controller is
provided with a reset logic for 9th pin using a RC network with values R=8.2k, C=10F/16V. A
crystal oscillator with 11.0592MHZ frequency is connected to pins 18 and 19. Two 33pF Nonpolar ceramic capacitors are used on both the legs of crystal to the ground to eliminate the
noise signal.
The kit is constructed with ULN2803 Darlington 8 transistor packs using as motor driver
along with two PNP driver transistors BC557 used as protection transistors. The logic is
developed so that, when the two inputs are 0,0 the motor is at OFF state and (1,0), (0,1) as two
directional controls inputs for forward and reverse directions.

49

Circuit:

AC230V

4007

VC C
L7805

1 0 0 0 /2 5

V IN

VO U T

1 0 0 /1 6

+12v

4007

G N D

TR A N S F O R M ER
1
5

VC C

1 0 /1 6

VC C
1

S w it c h
1

104p

2
3
4
5
6
7
8
9

9
8
7
6
5
4
3
2

8 .2 K

VC C

1
2
3
4
5
6
7
8
9
1
1
1
1
1
1
1
1

0
1
2
3
4
5
6
7

19
18
20

VC C

P
P
P
P
P
P
P
P

1
1
1
1
1
1
1
1

.0/T2
VC C
.1 /T 2 -E X E A /V P P
.2
.3
P 0 .0/A D 0
.4
P 0 .1/A D 1
.5
P 0 .2/A D 2
.6
P 0 .3/A D 3
.7
P 0 .4/A D 4
P 0 .5/A D 5
R ST
P 0 .6/A D 6
P 0 .7/A D 7
P 3 .0/R XD
P 3 .1 /T X D A L E /P R O G
P 3 .2 /IN T 0
PSEN
P 3 .3 /IN T 1
P 3 .4/T0
P 2 .7 /A 1 5
P 3 .5/T1
P 2 .6 /A 1 4
P 3 .6/W R
P 2 .5 /A 1 3
P 3 .7/R D
P 2 .4 /A 1 2
P 2 .3 /A 1 1
XTA L1
P 2 .2 /A 1 0
XTA L2
P 2 .1 /A 9
G N D
P 2 .0 /A 8

40
31
3
3
3
3
3
3
3
3

9
8
7
6
5
4
3
2

30
29
2
2
2
2
2
2
2
2

8
7
6
5
4
3
2
1

VC C

BC557

1 1 .0 5 9 2

33p

33p

A T89C 52

2
3
4
5
6
7
8
9

9
8
7
6
5
4
3
2

VC C
1

1
2
3
4
5
6
7
8

1
2
3
4
5
6
7

B
B
B
B
B
B
B

1
2
3
4
5
6
7

C O M
U LN 2003

Program:
;**************STARTING MODULE***********************
ORG 0000H
LJMP START
;*******************MAIN MODULE********************
ORG 0050H
START:

JB P3.0,START

LCALL DELAY
JB P3.0,START
SW1:

JNB P3.0,SW1

LCALL DELAY
JNB P3.0,SW1
SETB P1.0
CLR P1.0
LCALL DELAY
CLR P1.0

C
C
C
C
C
C
C

1
1
1
1
1
1
1

6
5
4
3
2
1
0

BC557

2
L in e a r M o t o r

50
SETB P1.1
LCALL DELAY
CLR P1.0
SETB P1.1
LCALL DELAY
;********************DELAY MODULE**************************
DELAY:

MOV R7,#05H

L3 :

MOV R6,#FFH

L2 :

MOV R5,#FFH

L1 :

DJNZ R5,L1

DJNZ R6,L2
DJNZ R7,L3
RET
;********************************************************
END;
Develop an interfacing circuit between GSM/CDMA mobile and micro controller using
DTMF network for remote switching operation.
The main concept of this project is to display the number of persons entering into a room
in a seven segment display connected to the micro controller. It is constructed using 12-0-12
centre tapped transformer, 7805 voltage regulator, 1N4007 rectifier diodes, 2200uF/25V &
470uF/16V filtering capacitors, AT89c52 micro controller, DTMF decoder CM8870, BC547 NPN
transistors, 12V electromechanical Relays.
Here we used an AT89C52 microcontroller from the 8051 family. The micro controller is
provided with a reset logic for 9th pin using a RC network with values R=8.2k, C=10F/16V. A
crystal oscillator with 11.0592MHZ frequency is connected to pins 18 and 19. Two 33pF Nonpolar ceramic capacitors are used on both the legs of crystal to the ground to eliminate the
noise signal.
The phone line is taken from the mobile earphones and is connected to the DTMF
decoder IC CM8870. The decoder generates a 4-bit BCD code along with a strobe (STB) signal
for each DTMF code received. This is connected to P1 of micro controller and the outputs are
connected to P0 of micro controller.

51
Circuit:

4007

VCC
L7805
1

1 0 0 0 /2 5

V IN

VOUT

2
1 0 0 /1 6

+12v

4007

GND

TR AN SF O R M ER
1
5
AC230V

VCC

1 0 /1 6

VCC
1

Phone
Line

10k

104 j

1
2
3
4

100k

33p

33p

65
7
3 .5 7 9

8
9

in +
in _
gs
V -re f

Q0
Q1
Q2
Q3
S tD
cm 8870

inP DH
osc 1
osc 2
G nd

Vcc
S t/G T
ESt
TO E

11
12
13
14
15
18
17
16

104p

VCC
1
2
3
4
5
6
7
8

VCC
104p

9
10
11
12
13
14
15
16
17

330K

10

19
18
20

VCC

P
P
P
P
P
P
P
P

1 .0 /T 2
VCC
1 .1 /T 2 -E X E A /V P P
1 .2
1 .3
P 0 .0 /A D 0
1 .4
P 0 .1 /A D 1
1 .5
P 0 .2 /A D 2
1 .6
P 0 .3 /A D 3
1 .7
P 0 .4 /A D 4
P 0 .5 /A D 5
RST
P 0 .6 /A D 6
P 0 .7 /A D 7
P 3 .0 /R XD
P 3 .1 /T XD A L E /P R O G
P 3 .2 /IN T 0
PSEN
P 3 .3 /IN T 1
P 3 .4 /T 0
P 2 .7 /A 1 5
P 3 .5 /T 1
P 2 .6 /A 1 4
P 3 .6 /W R
P 2 .5 /A 1 3
P 3 .7 /R D
P 2 .4 /A 1 2
P 2 .3 /A 1 1
XTA L1
P 2 .2 /A 1 0
XTA L2
P 2 .1 /A 9
GN D
P 2 .0 /A 8

40
31

1
2

39
38
37
36
35
34
33
32

BC 547
4007

1
2

30
29

BC 547
4148

28
27
26
25
24
23
22
21

33p

AT89C 52

33p

Program:
;***************STARTING MODULE************************
ORG 0000H
LJMP START
;********************MAIN MODULE**************************
ORG 0050H
START:
MOV P1,#00H
AA:
JB P3.0,AA
LCALL DELAY
JB P3.0,AA
K1:
SETB P1.0
CLR P1.0
K2:
JB P3.0,K2
LCALL DELAY
JB P3.0,K2
BB:
JNB P3.0,BB
LCALL DELAY
CLR P1.0
CLR P1.1
K3:
JB P3.0,K3
LCALL DELAY
JB P3.0,K3

2
3
4
5
6
7
8
9

9
8
7
6
5
4
3
2

1 1 .0 5 9 2

5
4
SW 1

4007
3

VCC
1

+12v

2
3
4
5
6
7
8
9

9
8
7
6
5
4
3
2

8 .2 K

4007

5
4
SW 2

52
K4:
JNB P3.0,K4
LCALL DELAY
JNB P3.0,K4
SETB P1.0
CLR P1.0
LJMP START
;*******************DELAY**********************************
DELAY:
MOV R7,#FFH
DJNE R7,$
RET
;*************************************************************
END;

Design and develop a parallel communication protocol between 16X2 LCD and micro
controller.
The main concept of this project is to display the data to be displayed in a 16X2
segmental dot matrix LCD display connected to the micro controller. It is constructed using 12-012 centre tapped transformer, 7805 voltage regulator, 1N4007 rectifier diodes, 2200uF/25V &
470uF/16V filtering capacitors, AT89c52 micro controller, 16X2 dot matrix LCD display.
Here we used an AT89C52 microcontroller from the 8051 family. The micro controller is
provided with a reset logic for 9th pin using a RC network with values R=8.2k, C=10F/16V. A
crystal oscillator with 11.0592MHZ frequency is connected to pins 18 and 19. Two 33pF Nonpolar ceramic capacitors are used on both the legs of crystal to the ground to eliminate the
noise signal.
The LCD display is having three control lines (RS, RW, and E), eight data lines (D0-D7)
and three voltage lines (Vcc, Gnd and Vee/Contrast). The control lines are connected to P2.5,
P2.6 and P2.7 respectively. The data lines are connected to P0.
Circuit:

53

TR A N S F O R M E R
1
5

+12v

4007

V IN

4007

V O U T

2
1 0 0 /1 6

1 00 0/25

G N D

AC230V

VC C
L7805

V C C

1 0 /1 6

VC C

VC C
R E S IS T O R V A R

V C C
1

2
3
4
5
6
7
8
9

104p
V C C
1
2
3
4
5
6
7
8
9
1
1
1
1
1
1
1
1

0
1
2
3
4
5
6
7

19
18
20

V C C

P
P
P
P
P
P
P
P

1
1
1
1
1
1
1
1

.0 /T 2
V C C
.1 /T 2 -E X
E A /V P P
.2
.3
P 0 .0 /A D 0
.4
P 0 .1 /A D 1
.5
P 0 .2 /A D 2
.6
P 0 .3 /A D 3
.7
P 0 .4 /A D 4
P 0 .5 /A D 5
R ST
P 0 .6 /A D 6
P 0 .7 /A D 7
P 3 .0 /R XD
P 3 .1 /T XD A L E /P R O G
P 3 .2 /IN T 0
PSE N
P 3 .3 /IN T 1
P 3 .4 /T 0
P 2 .7 /A 1 5
P 3 .5 /T 1
P 2 .6 /A 1 4
P 3 .6 /W R
P 2 .5 /A 1 3
P 3 .7 /R D
P 2 .4 /A 1 2
P 2 .3 /A 1 1
XTA L1
P 2 .2 /A 1 0
XTA L2
P 2 .1 /A 9
G N D
P 2 .0 /A 8

40
31
3
3
3
3
3
3
3
3

9
8
7
6
5
4
3
2

30
29
2
2
2
2
2
2
2
2

33p

33p

A T89C 52

2
3
4
5
6
7
8
9

9
8
7
6
5
4
3
2

1 1 .0 5 9 2

4
3
2
1
0
9
8
7
6
5
4
3
2
1

A
A
A
A
A
A
A
A
A
A
A
A
A
A

LC D

8
7
6
5
4
3
2
1
V C C

1
1
1
1
1

16 X 2 LCD

9
8
7
6
5
4
3
2

8 .2 K

Program:
P0=DISP DATA
P2.7=RS
P2.6=R/W
P2.5=EN
;*****************STARTING MODULE*************************
ORG 0000H
LJMP START
;*******************MAIN MODULE*************************
ORG 0050H
START:
MOV P0,#FFH
MOV P1,#FFH
MOV P2,#FFH
MOV P3,#FFH
;*********************************************************
LCALL LCDINI
MOV DPTR,#0900H
LCALL TLINE
MOV DPTR,#0910H
LCALL BLINE
ZZ:
LJMP ZZ

54
;************************************************************
LCDINI:
CLR P2.5
MOV P0,#30H
LCALL WRI
MOV P0,#30H
LCALL WRI
MOV P0,#30H
LCALL WRI
MOV P0,#38H
LCALL WRI
MOV P0,#01H
LCALL WRI
MOV P0,#01H
LCALL WRI
MOV P0,#01H
LCALL WRI
MOV P0,#02H
LCALL WRI
MOV P0,#0CH
LCALL WRI
MOV P0,#1CH
LCALL WRI
MOV P0,#38H
LCALL WRI
MOV P0,#06H
LCALL WRI
MOV P0,#01H
LCALL WRI
RET
;*******************HEADER WRITE**************************
TLINE: MOV P0,#80H
LCALL WRI
MOV R7,#00H
NEXTCH:
CLR A
MOVC A,@A+DPTR
MOV P0,A
LCALL WRD
INC DPTR
INC R7
CJNE R7,#10H,NEXTCH
RET
;*******************************************************
BLINE: MOV P0,#00H
LCALL WRI

55
MOV P0,#00H
NCH:
CLR A
MOVC A,@A+DPTR
MOV P0,A
LCALL WRD
INC DPTR
INC R7
CJNE R7,#10H,NCH
RET
;****************INSTRUCTION/DATA WRITE*****************
WRI: CLR P2.7
CLR P2.6
SETB P2.5
MOV R0,#FFH
DJNZ RO,$
CLR P2.5
MOV R0,#FFH
DJNZ R0,$
RET
WRD: SETB P2.7;REGISTER SELECT
CLR P2.6;READ WRITE
SETB P2.5;ENABLE
MOV R0,#FFH
DJNZ R0,$
CLR P2.5
CLR P2.6
CLR P2.7
MOV R0,#FFH
DJNZ R0,$
RET
;************************************************************
ORG 0900H
DB 'MICRO LINK INFO '
DB 'POLY TRAINING '
END;
CODE(HEX) COMMAND TO INSTRUCTION REGISTER
01:
02:
04:
06:
05:
07:

CLEAR DISPLAY
RETURN HOME
DECREMENT CURSOR(Shift cursor to left)
INCREMENT CURSOR(Shift cursor to right)
SHIFT DISPLAY RIGHT
SHIFT DISPLAY LEFT

56
08:
A:
C:
E:
F:
10:
14:
18:
1c:
80:
co:
38:

DISPLAY OFF,CUSOR OFF


DISPLAY OFF,CUSOR ON
DISPLAY ON,CUSOR OFF
DISPLAY ON,CUSOR BLINKING
DISPLAY ON,CUSOR BLINKING
SHIFT CURSOR POSITION TO LEFT
SHIFT CURSOR POSITION TO RIGHT
SHIFT THE ENTIRE POSITION TO THE LEFT
SHIFT THE ENTIRE POSITION TO THE RIGHT
FORCE CURSOR TO BEGINNING TO FIRST LINE
FORCE CURSOR TO BEGINNING TO 2nd LINE
2 LINES AND 5*7 MATRIX

Construct a project to count the no. of visitors entered into the auditorium and display it
in LCD using microcontroller
The main concept of this project is to display the data to be displayed in a 16X2
segmental dot matrix LCD display connected to the micro controller. It is constructed using 12-012 centre tapped transformer, 7805 voltage regulator, 1N4007 rectifier diodes, 2200uF/25V &
470uF/16V filtering capacitors, AT89c52 micro controller, 16X2 dot matrix LCD display, an IR
LED and Photo diode.
Here we used an AT89C52 microcontroller from the 8051 family. The micro controller is
provided with a reset logic for 9th pin using a RC network with values R=8.2k, C=10F/16V. A
crystal oscillator with 11.0592MHZ frequency is connected to pins 18 and 19. Two 33pF Nonpolar ceramic capacitors are used on both the legs of crystal to the ground to eliminate the
noise signal.
The LCD display is having three control lines (RS, RW, and E), eight data lines (D0-D7)
and three voltage lines (Vcc, Gnd and Vee/Contrast). The control lines are connected to P2.5,
P2.6 and P2.7 respectively. The data lines are connected to P0. The optical sensors designed
using IRLED and Photo Diode are connected to P1.0 and P1.2 and are configured as IN and
OUT sensors respectively.
Circuit:

57

AC230V

4007

VC C
L7805

1 0 0 0 /2 5

V IN

VO U T

2
1 0 0 /1 6

+12v

4007

G N D

TR A N S F O R M E R
1
5

VC C

1 0 /1 6

VC C
VC C

VC C

R E S IS T O R V A R
VC C
1

104p

IN Sensor

1
2
3
4
5
6
7
8

VC C

9
1K

OUT
Sensor

IR L E D

VC C

10
11
12
13
14
15
16
17

P h o t o D io d e

19
18
20

VC C

P
P
P
P
P
P
P
P

1
1
1
1
1
1
1
1

.0 /T 2
VC C
.1 /T 2 -E X E A /V P P
.2
.3
P 0 .0 /A D 0
.4
P 0 .1 /A D 1
.5
P 0 .2 /A D 2
.6
P 0 .3 /A D 3
.7
P 0 .4 /A D 4
P 0 .5 /A D 5
R ST
P 0 .6 /A D 6
P 0 .7 /A D 7
P 3 .0 /R XD
P 3 .1 /T XD A L E /P R O G
P 3 .2 /IN T 0
PSEN
P 3 .3 /IN T 1
P 3 .4 /T 0
P 2 .7 /A 1 5
P 3 .5 /T 1
P 2 .6 /A 1 4
P 3 .6 /W R
P 2 .5 /A 1 3
P 3 .7 /R D
P 2 .4 /A 1 2
P 2 .3 /A 1 1
XTA L1
P 2 .2 /A 1 0
XTA L2
P 2 .1 /A 9
G N D
P 2 .0 /A 8

40
31
39
38
37
36
35
34
33
32
30
29

33p

Program :
;P0
=DISP DATA
; P2.5 = ENABLE
; p2.6 = READ/WRITE
; P2.7 = REG INS=0 /DATA=1
;P1.0 = UP COUNTER INPUT PULSE
;P1.1 = DOWN COUNTER INPUT PULSE
;**********************************************
ORG 0000H
LJMP START
ORG 0050H
START:
MOV P0,#FFH
MOV P1,#FFH
MOV P2,#00H
MOV P3,#FFH
LCALL LCDINI
LCALL DEL
MOV DPTR,#0900H
LCALL TLINE
MOV DPTR,#0910H
LCALL BLINE

33p

AT89C 52

2
3
4
5
6
7
8
9

9
8
7
6
5
4
3
2

1 1 .0 5 9 2

A
A
A
A
A
A
A
A
A
A
A
A
A
A

LC D

28
27
26
25
24
23
22
21
VC C

14
13
12
11
10
9
8
7
6
5
4
3
2
1

16 X 2 LCD

P h o t o D io d e

9
8
7
6
5
4
3
2

IR L E D

2
3
4
5
6
7
8
9

8 .2 K

1K

58
LCALL SSEC
MOV DPTR,#0920H
LCALL TLINE
MOV DPTR,#0930H
LCALL BLINE
MOV 33H,#00H
TOP: LCALL COUNT
CJNE R4,#01H,TOPD
MOV R7,33H
CJNE R7,#FFH,LXX1
DEC 33H
LXX1: INC 33H
MOV R7,33H
LCALL CONVERT
LCALL DISP
LCALL BEEP
LJMP TOP
XX1: SETB P2.1
LJMP TOP
;-----------------------TOPD: CJNE R4,#02H,TOP
MOV R7,33H
CJNE R7,#00H,MXX1
INC 33H
MXX1: DEC 33H
MOV R7,33H
LCALL CONVERT
LCALL DISP
LCALL BEEP
LJMP TOP
;*****************************
BEEP: SETB P2.0
LCALL SEC
CLR P2.0
RET
;-----------------------SSEC:
MOV R1,#1FH
CSM1:
MOV R2,#FFH
CSM2:
MOV R3,#FFH
CSM3:
DJNZ R3,CSM3

59
DJNZ R2,CSM2
DJNZ R1,CSM1
RET
SEC:
DSM1:
DSM2:
DSM3:

MOV R1,#01H
MOV R2,#FFH
MOV R3,#FFH
DJNZ R3,DSM3
DJNZ R2,DSM2
DJNZ R1,DSM1
RET
;----------------------------CONVERT:
MOV 32H,#30H
MOV 31H,#30H
MOV 30H,#30H
NDEC: DEC R7
CJNE R7,#FFH,INC1
RET
INC1: INC 30H
MOV A,30H
CJNE A,#3AH,NDEC
MOV 30H,#30H
INC 31H
MOV A,31H
CJNE A,#3AH,NDEC
MOV 31H,#30H
INC 32H
LJMP NDEC
;**********************************
DISP: CLR p2.7
CLR p2.6
MOV P0,#8CH
LCALL WRI
MOV P0,32H
LCALL WRD
MOV P0,31H
LCALL WRD
MOV P0,30H
LCALL WRD
RET
;*************************************
COUNT: MOV R4,#00H

60
CX1:

JNB P1.0,CX3
LCALL DEL
JNB P1.0,CX1
LCALL DEL
CX2: JB P1.0,CX2
LCALL DEL
JB P1.0,CX2
MOV R4,#01H
RET
;-----------------CX3: JNB P1.1,CX1
LCALL DEL
JNB P1.1,CX3
LCALL DEL
MCX2: JB P1.1,MCX2
LCALL DEL
JB P1.1,MCX2
MOV R4,#02H
RET
;********** LCD INI ****************
LCDINI:
CLR P0.0
CLR P0.1
CLR P0.2
CLR P2.5
CLR p2.7
CLR p2.6
MOV P0,#30H
LCALL WRI
CLR p2.7
CLR p2.6
MOV P0,#38H
LCALL WRI
CLR p2.7
CLR p2.6
MOV P0,#01H
LCALL WRI

61

CLR p2.7
CLR p2.6
MOV P0,#02H
LCALL WRI
CLR p2.7
CLR p2.6
MOV P0,#0CH
LCALL WRI
CLR p2.7
CLR p2.6
MOV P0,#1CH
LCALL WRI
CLR p2.7
CLR p2.6
MOV P0,#38H
LCALL WRI
CLR p2.7
CLR p2.6
MOV P0,#06H
LCALL WRI
CLR p2.7
CLR p2.6
MOV P0,#01H
LCALL WRI
RET
;---------------------------TLINE: CLR p2.7
CLR p2.6
MOV P0,#80H
LCALL WRI
MOV R7,#00H
TKL:
CLR A
MOVC A,@A+DPTR
MOV P0,A
LCALL WRD
INC DPTR
INC R7

62
CJNE R7,#10H,TKL
RET
BLINE: CLR p2.7
CLR p2.6
MOV P0,#C0H
LCALL WRI
MOV R7,#00H
BKL:
CLR A
MOVC A,@A+DPTR
MOV P0,A
LCALL WRD
INC DPTR
INC R7
CJNE R7,#10H,BKL
RET
;******** INSTRUCTION /DATA WRITE *********
WRI: SETB P2.5
MOV R0,#FFH
DJNZ R0,$
CLR P2.5
MOV R0,#FFH
DJNZ R0,$
RET
WRD: SETB p2.7 ; REGISTER
CLR p2.6 ;READ WRITE
SETB P2.5 ;ENABLE
MOV R0,#FFH
DJNZ R0,$
CLR P2.5
CLR p2.6
CLR p2.7
RET
;******************************
DEL:
MOV R5,#FFH
DJNZ R5,$
RET
;*******************************************
ORG 0900H
DB 'BIDIRECTIONAL '

63
DB 'V.C POWER CTRL '
DB 'VISITORS:
'
DB '
'
;********************************************
END;

Design and develop a micro controller based circuit for measurement of DC


voltage, AC voltage, AC current using ADC0809.
The main concept of this project is to display the data to be displayed in a 16X2
segmental dot matrix LCD display connected to the micro controller. It is constructed using 12-012 centre tapped transformer, 7805 voltage regulator, 1N4007 rectifier diodes, 2200uF/25V &
470uF/16V filtering capacitors, AT89c52 micro controller, eight channel eight bit ADC0809,
NE555, 16X2 dot matrix LCD display.
Here we used an AT89C52 microcontroller from the 8051 family. The micro controller is
provided with a reset logic for 9th pin using a RC network with values R=8.2k, C=10F/16V. A
crystal oscillator with 11.0592MHZ frequency is connected to pins 18 and 19. Two 33pF Nonpolar ceramic capacitors are used on both the legs of crystal to the ground to eliminate the
noise signal.

The ADC 0809 is having eight data lines (D0-D7) and three address lines (A, B,
C) along with three control lines (ALE, START, EOC). The input is given to one of the
eight analog inputs and the clock is provided to CLK pin which is generated using a 555
connected in astable mode. The data is collected through P1 and is converted into
ASCII code and then displayed on the LCD.
Circuit:

64

AC230V

4007

VC C
L7805

1 0 0 0 /2 5

V IN

VO U T

2
1 0 0 /1 6

+12v

4007

G N D

TR A N SF O R M ER
1
5

VC C

1 0 /1 6

VC C

VC C
R E S IS TO R V A R

9
11
12

C a p a c it o r

26
27
28
1
2
3
4
5
7
10

16
13

IN
IN
IN
IN
IN
IN
IN
IN

0
1
2
3
4
5
6
7

D
D
D
D
D
D
D
D

0
1
2
3
4
5
6
7

1
1
1
8
1
1
2
2

7
4
5

1
2
3
4
5
6
7
8

8
9
0
1

EO C
C LK

ALE
STAR T
A0
A1
A2

2
6
2
2
2

1
1
1
1
1
1
1
1

2
5
4
3

R EFG N D

A D C 0809
1

1 1 .0 5 9 2

4 .7 K
6
2
104p

LM 555

33p
7

P
P
P
P
P
P
P
P

1
1
1
1
1
1
1
1

.0 /T2
VC C
.1 /T 2 -E X E A /V P P
.2
.3
P 0 .0 /A D 0
.4
P 0 .1 /A D 1
.5
P 0 .2 /A D 2
.6
P 0 .3 /A D 3
.7
P 0 .4 /A D 4
P 0 .5 /A D 5
R ST
P 0 .6 /A D 6
P 0 .7 /A D 7
P 3 .0 /R XD
P 3 .1 /TXD A L E /P R O G
P 3 .2 /IN T 0
PSEN
P 3 .3 /IN T 1
P 3 .4 /T0
P 2 .7 /A 1 5
P 3 .5 /T1
P 2 .6 /A 1 4
P 3 .6 /W R
P 2 .5 /A 1 3
P 3 .7 /R D
P 2 .4 /A 1 2
P 2 .3 /A 1 1
XTA L1
P 2 .2 /A 1 0
XTA L2
P 2 .1 /A 9
G N D
P 2 .0 /A 8

40
31
3
3
3
3
3
3
3
3

9
8
7
6
5
4
3
2

30
29
2
2
2
2
2
2
2
2

33p

1
1
1
1
1

4
3
2
1
0
9
8
7
6
5
4
3
2
1

A
A
A
A
A
A
A
A
A
A
A
A
A
A

LC D

8
7
6
5
4
3
2
1
VC C

9
8
7
6
5
4
3
2

10K

0
1
2
3
4
5
6
7

19
18
20

VC C

VC C

104p
VC C

16 X 2 LCD

8 .2 K

O E
VC C
R EF+

DC Voltage

103

2
3
4
5
6
7
8
9

VC C

A T89C 52

2
3
4
5
6
7
8
9

D 1

9
8
7
6
5
4
3
2

VC C

5
1

C ?
104p

Program:
; ^^^^^^^^^^^^^^^ Write an assembly language program for ADC ^^^^^^^^^^^^^^
P2.5= ENABLE
P2.6= READ/WRITE
P2.7= REGISTER SELECT
INS=0/DATA=1
P1= DATA OF ADC 8BIT
P3.2 =ALE
P3.3= START
P3.4=A
P3.5=B
;********** STARTING MODULE **********************************
ORG 0000H
LJMP START
ORG 0050H
START: MOV P0,#FFH
MOV P1,#FFH
MOV P2,#FFH
MOV P3,#FFH
;*******************MAIN MODULE ********************************
MAIN: LCALL LCD INI
LCALL HDISP

65

TOP:

LCALL VSEN
LCALL CONVERT
LCALL DISP
LJMP TOP
;************** ************** LCD INI *********************************
LCD INI:
CLR P2.5
MOV P0,#30H
LCALL WRI
MOV P0,#30H
LCALL WRI
MOV P0,#30H
LCALL WRI
MOV P0,#38H
LCALL WRI
MOV P0,#01H
LCALL WRI
MOV P0,#01H
LCALL WRI
MOV P0,#02H
LCALL WRI
MOV P0,#0CH
LCALL WRI
MOV P0,#1CH
LCALL WRI
MOV P0,#38H
LCALL WRI
MOV P0,#06H
LCALL WRI
MOV P0,#01H
LCALL WRI
RET
;***************************** VSEN ******************************
VSEN: MOV P1,#FFH
CLR P3.4
CLR P3.5
SETB P3.2
SETB P3.3
LCALL DEL
CLR P3.2

66

CLR P3.3
LCALL DEL
LCALL DEL
SETB P3.2; ALE
LCALL DEL
SETB P3.3; START
LCALL DEL
CLR P3.2
LCALL SEC
MOV R7,P1
RET
;********************** CONVERT ***************************
CONVERT:
MOV 32H,#00H
MOV 31H,#00H
MOV 30H,#00H
;******************** NDEC **********************************
NDEC: DEC R7
CJNE R7,#FFH, INC1
MOV A,30H
ADD A,#30H
MOV 30H,A
MOV A,31H
ADD A,#30H
MOV 31H,A
MOV A,32H
ADD A,30H
MOV 32H,A
RET
;******************INCREMENT*****************************
INC1: INC 30H
MOV A, 30H
CJNE A, #0AH, NDEC
MOV 30H, #00H
INC 31H
MOV A,31H
CJNE A, #0AH, NDEC

67

MOV 31H,#00H
INC 32H
LJMP NDEC
;***********************DISPLAY*******************************
DISP: MOV P0,#8AH
LCALL WRI
MOV P0, 32H
LCALL WRD
MOV P0, 31H
LCALL WRD
MOV P0,30H
LCALL WRD
RET
;************************ HDISP ************************************
HDISP:
MOV DPTR,#0900H
LCALL TLINE
MOV DPTR,#0910H
LCALL BLINE
RET
;*****************************************************
SEC: MOV R1,#03H
CSM1:MOV R2,#FFH
CSM2:MOV R3,#FFH
CSM3:DJNZ R3,CSM3
DJNZ R2,CSM2
DJNZ R1,CSM1
RET
;************************************************************
ORG 0900H
DB 'COUNT:
'
DB '
'
;*********************************************************
END;

68

Design and develop a micro controller based circuit for measurement of temp, light
intensity using ADC0809.
The main concept of this project is to display the data to be displayed in a 16X2
segmental dot matrix LCD display connected to the micro controller. It is constructed using 12-012 centre tapped transformer, 7805 voltage regulator, 1N4007 rectifier diodes, 2200uF/25V &
470uF/16V filtering capacitors, AT89c52 micro controller, eight channel eight bit ADC0809,
NE555, 16X2 dot matrix LCD display.
Here we used an AT89C52 microcontroller from the 8051 family. The micro controller is
provided with a reset logic for 9th pin using a RC network with values R=8.2k, C=10F/16V. A
crystal oscillator with 11.0592MHZ frequency is connected to pins 18 and 19. Two 33pF Nonpolar ceramic capacitors are used on both the legs of crystal to the ground to eliminate the
noise signal.

The ADC 0809 is having eight data lines (D0-D7) and three address lines (A, B,
C) along with three control lines (ALE, START, EOC). The input is given to one of the
eight analog inputs and the clock is provided to CLK pin which is generated using a 555
connected in astable mode. The data is collected through P1 and is converted into
ASCII code and then displayed on the LCD.
Circuit:

69

AC230V

4007

VC C
L7805
V IN

1 0 0 0 /2 5

VO U T

1 0 0 /1 6
3

+12v

4007

G N D

TR AN SF O R M ER
1
5

VC C

VC C

N TC

1 0 /1 6

VC C

VC C
R E S IS T O R V A R

VC C
1

9
11
12
103

IN
IN
IN
IN
IN
IN
IN
IN

0
1
2
3
4
5
6
7

D
D
D
D
D
D
D
D

0
1
2
3
4
5
6
7

17
14
15
8
18
19
20
21

1
2
3
4
5
6
7
8

C LK

16
13

P
P
P
P
P
P
P
P

.0 /T 2
VC C
.1 /T 2 -E X E A /V P P
.2
.3
P 0 .0 /A D 0
.4
P 0 .1 /A D 1
.5
P 0 .2 /A D 2
.6
P 0 .3 /A D 3
.7
P 0 .4 /A D 4
P 0 .5 /A D 5
R ST
P 0 .6 /A D 6
P 0 .7 /A D 7
P 3 .0 /R X D
P 3 .1 /T X D A L E /P R O G
P 3 .2 /IN T 0
PSEN
P 3 .3 /IN T 1
P 3 .4 /T 0
P 2 .7 /A 1 5
P 3 .5 /T 1
P 2 .6 /A 1 4
P 3 .6 /W R
P 2 .5 /A 1 3
P 3 .7 /R D
P 2 .4 /A 1 2
P 2 .3 /A 1 1
XTA L1
P 2 .2 /A 1 0
XTA L2
P 2 .1 /A 9
G N D
P 2 .0 /A 8

EO C

10

ALE
S TA R T
A0
A1
A2

1
1
1
1
1
1
1
1

22
6
25
24
23

R EFG N D

AD C 0809

1
1
1
1
1
1
1
1

3
3
3
3
3
3
3
3

9
8
7
6
5
4
3
2

30
29
2
2
2
2
2
2
2
2

LC D

8
7
6
5
4
3
2
1

1 1 .0 5 9 2

A T89C 52

33p

33p

104p

LM 555

6
2

7
4 .7 K

A
A
A
A
A
A
A
A
A
A
A
A
A
A

VC C
1

9
8
7
6
5
4
3
2

10K

0
1
2
3
4
5
6
7

19
18
20

VC C

VC C

14
13
12
11
10
9
8
7
6
5
4
3
2
1

40
31

2
3
4
5
6
7
8
9

LD R

O E
VC C
R EF+

26
27
28
1
2
3
4
5

104p
VC C

16 X 2 LCD

8 .2 K
9
8
7
6
5
4
3
2

103
VC C

2
3
4
5
6
7
8
9

VC C

C ?
104p

Develop an RS-232 protocol to establish a serial UART communication between PC and


micro controller.

Circuit:
+12v

4007

V IN

4007

1 0 0 0 /2 5

VO U T

2
1 0 0 /1 6

VC C
L7805

G N D

TR AN S F O R M ER
1
5
AC230V

VC C

1 0 /1 6

VC C
VC C
R E S IS T O R V A R
VC C

2
3
4
5
6
7
8
9
1
2
3
4
5
6
7
8

VC C
+

11
12
1
3
4
5
2
6

+
1 0 /1 6

9
R 2O U T
T 2 IN

T1 IN
R 1O U T

R 1 IN
T1O U T

VC C

T2O U T
R 2 IN

C
C
C
C
V
V

1
1
2
2
+
-

+
+
-

9
10

1
1
1
1
1
1
1
1

13
14

0
1
2
3
4
5
6
7

19
18
20

VC C

P
P
P
P
P
P
P
P

1
1
1
1
1
1
1
1

.0 /T 2
VC C
.1 /T 2 -E X E A /V P P
.2
.3
P 0 .0 /A D 0
.4
P 0 .1 /A D 1
.5
P 0 .2 /A D 2
.6
P 0 .3 /A D 3
.7
P 0 .4 /A D 4
P 0 .5 /A D 5
R ST
P 0 .6 /A D 6
P 0 .7 /A D 7
P 3 .0 /R XD
P 3 .1 /T XD A L E /P R O G
P 3 .2 /IN T 0
PSEN
P 3 .3 /IN T 1
P 3 .4 /T 0
P 2 .7 /A 1 5
P 3 .5 /T 1
P 2 .6 /A 1 4
P 3 .6 /W R
P 2 .5 /A 1 3
P 3 .7 /R D
P 2 .4 /A 1 2
P 2 .3 /A 1 1
XTA L1
P 2 .2 /A 1 0
XTA L2
P 2 .1 /A 9
G N D
P 2 .0 /A 8

40
31
3
3
3
3
3
3
3
3

9
8
7
6
5
4
3
2

30
29
2
2
2
2
2
2
2
2

9
8
7
6
5
4
3
2

15
+

1 0 /1 6

1 1 .0 5 9 2

33p

AT89C 52

33p
1

2
3
4
5
6
7
8
9

1 0 /1 6

1
1
1
1
1

4A
3A
2A
1A
0A
9A
8A
7A
6A
5A
4A
3A
2A
1A

LC D

8
7
6
5
4
3
2
1
VC C

1 0 /1 6

7
8

16

M A X232
1A
2A
3A

G N D

1 0 /1 6

104p
VC C

16 X 2 LCD

1
9
8
7
6
5
4
3
2

8 .2 K

70
Program:

TXD:

MACRO

JNB TI,$
CLR TI
MOV SBUF,R6
MACEND
RXD:

MACRO

JNB RI,$
CLR RI
MOV R7,SBUF
MACEND
;*****************************************
ORG 0000H
LJMP START
ORG 0050H
START: MOV P1,#FFH
MOV P2,#FFH
MOV P3,#FFH
MOV P0,#FFH
LCALL SPINI
MOV DPTR,#0900H
LCALL TLINE
SS:

LJMP SS

SPINI: MOV A,#00H


MOV TCON,#40H
MOV TMOD,#20H
MOV SCON,#52H
MOV IE,#9AH
MOV TL1,#FDH
MOV TH1,#FDH
RET

71

TLINE: MOV R1,#00H


SSS:

CLR A

MOVC A,@A+DPTR
MOV R6,A
TXD
INC DPTR
INC R1
CJNE R1,#18H,SSS
RET
;****************************************
ORG 0900H
DB 'KES POLYTECHNIC COLLEGE'
END

Das könnte Ihnen auch gefallen