Ece Record
Ece Record
INDEX
Study and Practical Analysis
1) Computer basics page 3
2) Data representations page 4
3) Data conversions and display systems page6
4) Soldering procedure page7
5) AC distribution page8
6) Basic electronics page9
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
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) 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:
3
Analog Digital
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
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]
4
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
4 bits =1 Nibble
8 bits = 1 Byte
1024bytes = 1 Kilo byte
1024 Kilobytes = 1 Mega byte
1024 Megabyte = 1 Giga byte
1024 Gigabyte = 1 Tetra byte
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:
er
In case of analog systems sound energy is converted into magnetic energy
ak
through microphone, amplifier and a coil at the transmission side. At the receiver end
e
In digital systems the sound energy is converted into digital form through er
microphone, amplifier, ADC at the transmission end. At the receiver end, the reverse ak
operation i.e. the digital data converted into sound energy through DAC, amplifier and e
loudspeaker. Compared to analog systems, the losses in Digital systems are less. p
S
M d
Amplifier ADC Digital DAC Amplifier
I u
Media
C Lo
6
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
14Segment display:
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 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:
9
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:
115W 920W
FU SE
C u rre n t C o il FU SE
Ph 4A
1
2
P o t e n t ia l C o il Energy 0.5A
Meter 4 2A
5
M a in s S w it c h
Nt
6.5A 6A 4A
FU SE
460W
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 [Pc & Cc]. If the mains are at
OFF state, the disc will not rotate.
EARTHING:
0V 230V
N P
230V
IMPORTANCE OF EARTHING:
It protects us from electric shocks.
It reduces EMI [Electro- magnetic induction].
It reduces RFI [Radio frequency interference.
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 ohm’s law, then the resistor is called as ‘Linear resistor’ and
the resistance offered by the resistor is called as ‘Linear resistance’. If it doesn’t obey the
Ohm’s 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 2
3
4
5
C
F I XE D R E S I S TO R V A R I A B L E R E S I S TO R TA P P E D R E S I S TO 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.
W represents wattage.
The symbol is
4K7J2W
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Ω
Ex:
1). 270KΩ, +/- 5%
Red violet yellow gold practical value: 268KΩ, ± 5%
2) 4.7KΩ, +/- 5%
Yellow violet red gold practical value:4.39KΩ, ± 5%
3) 39Ω, +/-1%
Orange white black brown practical value: 35Ω, ± 5%
1STband-first digit
2ndband-second digit
3rd band-third digit
4th band-multiplication factor
5th band-tolerance
Black 0 100=1
Brown 1 101=10 +/- 1%
Red 2 102 +/- 2%
Orange 3 103
Yellow 4 104
Green 5 105
Blue 6 106
Violet 7 107
Grey 8 108
White 9 109
Gold - 0.1 +/- 5%
Silver - 0.01 +/- 10%
No colour - - +/- 20%
Pink colour - - High stability
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
14
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.
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.
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
C=εA/d [ε=ε0εr]
C=ε0εrA/d
Where ε0 = absolute permittivity of air =8.8540X10-12F/M
εr = relative permittivity of medium
16
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:
C1
1
C2
B A TTE R Y
2
C3
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 = V 1 + V2 + V3
Q/C = Q/C1 + Q/C2 + Q/C3
Capacitors in parallel:
1
B A TTE R Y C1 C2 C3
2
17
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 Henry’s. The symbol for an inductor is
I N D U C TO R
.The inductance value of an inductor depends on number of turn’s core material etc.
There is no frequency for D.C. voltage.
The inductor is having a parameter called as inductive reactance (XL)
XL=2╥fL
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.
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
18
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
2
L I N E F I L TE R
3
Relays:
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.
19
5
3
4
1
2
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
20
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 5
4 8
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
21
5 1
S t e p D o w n TR A N S F O R M E R
VS < V P
NS < N P
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 5
4
8
S t e p U p TR A N S F O R M E R
VS > V P
NS > N P
Isolation transformer:
It is a 1: 1 transformer provides isolation between primary and secondary
1 5
4 8
TR A N S F O R M E R
VS = V P
NS = N P
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
1 5
4 8
TR A N S F O R M E R
230v, 12v, 1Amp
Auto transformer:
It is a transformer with one winding part only.
2 V a r ia c
5
3
4
1
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.
23
1 5
4 8
TR A N S F O R M E R
C e n t re Ta p
8 1
M u lt ip le T a p
3
9
10
4
5
7 11
I s o la t e d Ta p
Current Transformer:
24
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:
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
25
atoms. These are also called as acceptor impurities because they accept electrons from
conduction band.
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 p-
type. 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
26
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.
1 2
P N J U N C TI O N D I O D E
1 2
B A TTE R Y
1 2
B A TTE R Y
With increase in external voltage the Barrier potential increases. The junction offers very high
resistance (Almost infinite) ¤t 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:
27
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
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 EN ER 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.
28
LED
IR LED: It is forward bias operated diode used to generate infrared rays. This type of LED’s are
used in remote control systems, light vision cameras. These are manufacture with Gallium
Arsenide materials.
VC C
R E S I S TO R
IR LED
Laser Diode: It is forward operated diode used to generate Laser light. This type of are most
widely used in medical applications.
29
VC C
R E S I S TO R
LASER 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 I S TO R
2
P H O TO D I O D E
1
Applications:
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.
30
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 mean’s that the base is at positive
potential with respect to emitter.
1 1
2 2 N PN
3 PN P 3
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)
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.
31
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:
D1
1 2
1 5
C a p a c it o r
4 8
0 V -1 2 V
FULLWAVE:
1 5 1 2
6
+
1N 4007
AC230V
4 8 1 2
C a p a c it o r
1 2 V -0 V -1 2 V 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.
32
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
1
1 3
1 5 V IN VOU T
T7
GND
2 - + 4
AC 230V
4 8 330uF /25V 160uF /16V
2
1 2 V -0 V , 5 0 0 m A BR ID G E
3
Operational amplifier:
The above block diagram shows the basic operational amplifier simply called as Op-
Amp. The first stage of an Op-Amp differential amplifier has high input impedance and large
33
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.
7
3
+
6
2
-
IC 741
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:
1. inverting amplifier
2. Non- inverting amplifier
3. Summer
4. Sub tractor
5. Multiplier
6. Voltage follower
7. Current follower
8. Integrator
9. Differentiator
10. Comparator.
VC C
1K
4
7
D IS
R
3
2 Q
10K 6 TR
TH R 1K LED
5
CV
N E555
1500uF /25V 0.1uF
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
Applications:
VC C
10K
4
2
TR
R
3
7 Q
6 D IS
10K TH R 1K LED
VC C 5
CV
N E555
4 7 -^- 1500uF /25V 0.1uF
10uF /25V
3
2
1
TS O P 1 7 3 8
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=1.1 RC
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:
36
VC C VC C Opto Coupler
3 3 0 -^- 10K
2
Vout
LED P H O TO D I O D E
1
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. 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
VC C
10K
VC C
VC C
4
10K
3
V+
+
3.3K 1
OUT
2
V-
- LED
LM393 11
1
4.7K
t
2
Working:
VC C
10K
VC C
VC C
4
10K
3
V+
+
3.3K 1
OUT
2
V-
- LED
LM393
11
1
4.7K
t
2
Working:
DTMF
Features
• Full DTMF receiver
• Less than 35mW power consumption
• Industrial temperature range
• Uses quartz crystal or ceramic resonators
• Adjustable acquisition and release times
Applications
• PABX
• Central office
39
• Mobile radio
• Remote control
• Remote data entry
• Call limiting
• Telephone answering systems
• Paging systems
Pin Diagram
MICRO CONTROLLER
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.
3. Special Function Registers:
42
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.
4. 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.
5. 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.
6. Interrupt Control:
This unit alters the microcontroller’s 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’.
7. 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.
8. 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
purpose. The 8052 designs are available with wide range of frequencies, typically from
1MHz to 16 MHz
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)
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.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 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 8–A15) 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=10μF/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:
45
TR A N S F O R M E R 4007 +1 2 v VC C
1 5 L7805
AC230V 6 1 2
GND
4007 V IN VOU T
4 8 + +
1000/25 100/16
3
VC C
1 1
104p
9
8
7
6
5
4
3
2
2
3
4
5
6
7
8
9
VC C
1 40
2 P 1 . 0 / T2 VC C 31
3 P 1 . 1 / T2 -E X EA/VPP
4 P1.2 39
VC C 5 P1.3 P0.0/AD 0 38
6 P1.4 P0.1/AD 1 37 VC C
7 P1.5 P0.2/AD 2 36
+ 8 P1.6 P0.3/AD 3 35
10/16 P1.7 P0.4/AD 4 34
9 P0.5/AD 5 33
R ST P0.6/AD 6 32 R E S I S TO R
10 P0.7/AD 7
11 P 3 . 0 / R XD 30
8.2K 12 P 3 . 1 / TXD A L E / P R O G 29
13 P 3 . 2 / I N T0 PSEN
14 P 3 . 3 / I N T1 28
15 P 3 . 4 / T0 P2.7/A15 27
16 P 3 . 5 / T1 P2.6/A14 26 LED
17 P3.6/W R P2.5/A13 25
P3.7/R D P2.4/A12 24
19 P2.3/A11 23
VC C 18 XTA L 1 P2.2/A10 22
20 XTA L 2 P2.1/A9 21
GND P2.0/A8 BC 547
VC C
A T8 9 C 5 2 4148
9
8
7
6
5
4
3
2
1 11.0592 33p
33p
2
3
4
5
6
7
8
9
1
RET
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 9 th pin using a RC network with values R=8.2kΩ, C=10μF/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 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:
47
TR A N S F O R M E R 4007 +12v VC C
1 5 L7805
AC230V 6 1 2
V IN
GND
4007 VOU T
4 8 + +
1000/25 100/16
3
VC C
+
10/16
VC C
8.2K 1 1
VC C 104p
9
8
7
6
5
4
3
2
2
3
4
5
6
7
8
9
VC C
9
11 COM 8 1 40
12 8C 8B 7 2 P 1 . 0 / T2 VC C 31
13 7C 7B 6 3 P 1 . 1 / T2 -E X EA/VPP
14 6C 6B 5 4 P1.2 39
15 5C 5B 4 5 P1.3 P0.0/AD 0 38
16 4C 4B 3 6 P1.4 P0.1/AD 1 37
17 3C 3B 2 7 P1.5 P0.2/AD 2 36
18 2C 2B 1 8 P1.6 P0.3/AD 3 35
1C 1B P1.7 P0.4/AD 4 34
9 P0.5/AD 5 33
U LN 2803 R ST P0.6/AD 6 32
VC C 10 P0.7/AD 7
11 P 3 . 0 / R XD 30
12 P 3 . 1 / TXD A L E / P R O G 29
13 P 3 . 2 / I N T0 PSEN
14 P 3 . 3 / I N T1 28
15 P 3 . 4 / T0 P2.7/A15 27
VC C VC C 16 P 3 . 5 / T1 P2.6/A14 26
17 P3.6/W R P2.5/A13 25
P3.7/R D P2.4/A12 24
19 P2.3/A11 23
VC C 18 XTA L 1 P2.2/A10 22
3 3 0 -^- 10K 20 XTA L 2 P2.1/A9 21
GND P2.0/A8
VC C
A T8 9 C 5 2
9
8
7
6
5
4
3
2
1 11.0592 33p
2
33p
2
3
4
5
6
7
8
9
1
LED P H O TO D I O D E
1
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:
48
SW: JB P3.0,SW
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;
49
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 9 th pin using a RC network with values R=8.2kΩ, C=10μF/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 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
50
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.
Circuit:
TR A N S F O R M E R 4007 +12v VC C
1 5 L7805
AC230V 6 1 2
GND
4007 VIN VOU T
4 8 + +
1000/25 100/16
3
VC C
+
10/16
VC C
8.2K 1 1
104p
9
8
7
6
5
4
3
2
2
3
4
5
6
7
8
9
VC C
S w it c h
1 2 1 40
2 P 1 . 0 / T2 VC C 31
3 P 1 . 1 / T2 -E X EA/VPP
4 P1.2 39
5 P1.3 P0.0/AD 0 38
6 P1.4 P0.1/AD 1 37
7 P1.5 P0.2/AD 2 36
8 P1.6 P0.3/AD 3 35
P1.7 P0.4/AD 4 34
9 P0.5/AD 5 33
R ST P0.6/AD 6 32
10 P0.7/AD 7
11 P 3 . 0 / R XD 30
12 P 3 . 1 / TXD A L E / P R O G 29
13 P 3 . 2 / I N T0 PSEN
14 P 3 . 3 / I N T1 28 VC C
15 P 3 . 4 / T0 P2.7/A15 27
16 P 3 . 5 / T1 P2.6/A14 26
17 P3.6/W R P2.5/A13 25
P3.7/R D P2.4/A12 24 BC557 BC557
19 P2.3/A11 23
VC C 18 XTA L 1 P2.2/A10 22 1 16
20 XTA L 2 P2.1/A9 21 2 1B 1C 15
GND P2.0/A8 3 2B 2C 14
VC C 4 3B 3C 13
A T8 9 C 5 2 5 4B 4C 12 1 2
5B 5C
9
8
7
6
5
4
3
2
1 11.0592 33p 6 11
7 6B 6C 10
33p 7B 7C L in e a r M o t o r
2
3
4
5
6
7
8
9
1 8
COM
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
51
CLR P1.0
LCALL DELAY
CLR P1.0
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 9 th pin using a RC network with values R=8.2kΩ, C=10μF/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.
52
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.
Circuit:
TR A N S F O R M E R 4007 +1 2 v VC C
1 5 L7805
AC230V 6 1 2
V IN VOU T
GND
4007
4 8 + +
1 0 0 0 /2 5 1 0 0 /1 6
3
VC C
+
1 0 /1 6
VC C
8 .2 K 1 1
104p
+1 2 v
9
8
7
6
5
4
3
2
2
3
4
5
6
7
8
9
VC C 5
Phone
3
Line 10k 1 11 1 40 4
+ in + Q0 P 1 .0 /T2 VC C
2 12 2 31 1
3 in _ Q1 13 3 P 1 .1 /T2 -E X E A /V P P 2
gs Q2 P 1 .2 SW 1
104 j 100k 4 14 4 39 BC 547
V -re f Q3 15 5 P 1 .3 P 0 .0 /A D 0 38 4007
S tD VC C 6 P 1 .4 P 0 .1 /A D 1 37 4007
7 P 1 .5 P 0 .2 /A D 2 36 5
c m 8870 18 8 P 1 .6 P 0 .3 /A D 3 35 3
33p 65 Vcc 104p P 1 .7 P 0 .4 /A D 4 34 4
7 P DH
in 17 9 P 0 .5 /A D 5 33 1
os c 1 S t/G T R ST P 0 .6 /A D 6 32 2
P 0 .7 /A D 7 SW 2
3 .5 7 9 16 10
33p 8 ESt 330K 11 P 3 .0 /R XD 30 BC 547
os c 2 12 P 3 .1 /TXD A L E /P R O G 29 4148 4007
9 10 13 P 3 .2 /IN T0 PSEN
G nd TO E 14 P 3 .3 /IN T1 28
15 P 3 .4 /T0 P 2 .7 /A 1 5 27
16 P 3 .5 /T1 P 2 .6 /A 1 4 26
17 P 3 .6 /W R P 2 .5 /A 1 3 25
P 3 .7 /R D P 2 .4 /A 1 2 24
19 P 2 .3 /A 1 1 23
VC C 18 XTA L 1 P 2 .2 /A 1 0 22
20 XTA L 2 P 2 .1 /A 9 21
GND P 2 .0 /A 8
VC C
A T8 9 C 5 2
9
8
7
6
5
4
3
2
1 1 1 .0 5 9 2 33p
33p
2
3
4
5
6
7
8
9
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
53
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-
0-12 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 9 th pin using a RC network with values R=8.2kΩ, C=10μF/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.
54
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:
TR A N S F O R M E R 4007 +12v VC C
1 5 L7805
AC230V 6 1 2
GND
4007 VIN VOU T
4 8 + +
1000/25 100/16
3
VC C
+
10/16 VC C
VC C
R E S I S TO R V A R
VC C
8.2K 1 1
104p
14A
16 X 2 LCD
9
8
7
6
5
4
3
2
2
3
4
5
6
7
8
9
VC C 13A
12A
1 40 11A
2 P 1 . 0 / T2 VC C 31 10A
3 P 1 . 1 / T2 -E X EA/VPP 9A
4 P1.2 39 8A
5 P1.3 P0.0/AD 0 38 7A
6 P1.4 P0.1/AD 1 37 6A
7 P1.5 P0.2/AD 2 36 5A
8 P1.6 P0.3/AD 3 35 4A
P1.7 P0.4/AD 4 34 3A
9 P0.5/AD 5 33 2A
R ST P0.6/AD 6 32 1A
10 P0.7/AD 7
11 P 3 . 0 / R XD 30
12 P 3 . 1 / TXD A L E / P R O G 29
13 P 3 . 2 / I N T0 PSEN LC D
14 P 3 . 3 / I N T1 28
15 P 3 . 4 / T0 P2.7/A15 27
16 P 3 . 5 / T1 P2.6/A14 26
17 P3.6/W R P2.5/A13 25
P3.7/R D P2.4/A12 24
19 P2.3/A11 23
VC C 18 XTA L 1 P2.2/A10 22
20 XTA L 2 P2.1/A9 21
GND P2.0/A8
VC C
A T8 9 C 5 2
9
8
7
6
5
4
3
2
1 11.0592 33p
33p
2
3
4
5
6
7
8
9
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
;*********************************************************
55
LCALL LCDINI
MOV DPTR,#0900H
LCALL TLINE
MOV DPTR,#0910H
LCALL BLINE
ZZ: LJMP ZZ
;************************************************************
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
56
INC DPTR
INC R7
CJNE R7,#10H,NEXTCH
RET
;*******************************************************
BLINE: MOV P0,#00H
LCALL WRI
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;
57
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-
0-12 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 9 th pin using a RC network with values R=8.2kΩ, C=10μF/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.
58
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:
TR A N S F O R M E R 4007 +12v VC C
1 5 L7805
AC230V 6 1 2
V IN VOU T
GND
4007
4 8 + +
1000/25 100/16
3
VC C
+
10/16 VC C
VC C
VC C R E S I S TO R V A R
VC C
8.2K 1 1
1K 104p
IR LED P h o t o D io d e 14A
9
8
7
6
5
4
3
2
2
3
4
5
6
7
8
9
VC C 13A
16 X 2 LCD
12A
IN Sensor 1
P 1 . 0 / T2 VC C
40 11A
2 31 10A
3 P 1 . 1 / T2 -E X EA/VPP 9A
4 P1.2 39 8A
5 P1.3 P0.0/AD 0 38 7A
6 P1.4 P0.1/AD 1 37 6A
7 P1.5 P0.2/AD 2 36 5A
VC C 8 P1.6 P0.3/AD 3 35 4A
P1.7 P0.4/AD 4 34 3A
9 P0.5/AD 5 33 2A
R ST P0.6/AD 6 32 1A
1K 10 P0.7/AD 7
IR LED P h o t o D io d e 11 P 3 . 0 / R XD 30
OUT 12 P 3 . 1 / TXD A L E / P R O G
P 3 . 2 / I N T0 PSEN
29
Sensor 13
14 P 3 . 3 / I N T1 28
LC D
15 P 3 . 4 / T0 P2.7/A15 27
16 P 3 . 5 / T1 P2.6/A14 26
17 P3.6/W R P2.5/A13 25
P3.7/R D P2.4/A12 24
19 P2.3/A11 23
VC C 18 XTA L 1 P2.2/A10 22
20 XTA L 2 P2.1/A9 21
GND P2.0/A8
VC C
A T8 9 C 5 2
9
8
7
6
5
4
3
2
1 11.0592 33p
33p
2
3
4
5
6
7
8
9
Program :
;P0 =DISP DATA
; P2.5 = ENABLE
; p2.6 = READ/WRITE
; P2.7 = REG INS=0 /DATA=1
MOV P1,#FFH
MOV P2,#00H
MOV P3,#FFH
LCALL LCDINI
LCALL DEL
MOV DPTR,#0900H
LCALL TLINE
MOV DPTR,#0910H
LCALL BLINE
LCALL SSEC
MOV DPTR,#0920H
LCALL TLINE
MOV DPTR,#0930H
LCALL BLINE
MOV 33H,#00H
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
DJNZ R2,CSM2
DJNZ R1,CSM1
RET
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
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
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
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
63
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
CJNE R7,#10H,TKL
RET
polar 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:
TR A N S F O R M E R 4007 +12v VC C
1 5 L7805
AC230V 6 1 2
GND
4007 V IN VOU T
4 8 + +
1000/25 100/16
3
VC C
+
10/16 VC C
VC C
R E S I S TO R V A R
D1 VC C VC C
1 2 8.2K 1 1
104p
14A
9
8
7
6
5
4
3
2
2
3
4
5
6
7
8
9
103 VC C 13A
16 X 2 LCD
11
12
9
DC Voltage C a p a c it o r 12A
26 17 1 40 11A
R EF +
IN 0 D0 P 1 . 0 / T2 VC C
OE
VC C
27 14 2 31 10A
28 IN 1 D1 15 3 P 1 . 1 / T2 -E X EA/VPP 9A
1 IN 2 D2 8 4 P1.2 39 8A
2 IN 3 D3 18 5 P1.3 P0.0/AD 0 38 7A
3 IN 4 D4 19 6 P1.4 P0.1/AD 1 37 6A
4 IN 5 D5 20 7 P1.5 P0.2/AD 2 36 5A
5 IN 6 D6 21 8 P1.6 P0.3/AD 3 35 4A
IN 7 D7 P1.7 P0.4/AD 4 34 3A
7 9 P0.5/AD 5 33 2A
EOC R ST P0.6/AD 6 32 1A
10 P0.7/AD 7
10 22 11 P 3 . 0 / R XD 30
C LK ALE 6 12 P 3 . 1 / TXD A L E / P R O G 29
S TA R T 25 13 P 3 . 2 / I N T0 PSEN LC D
A0 24 14 P 3 . 3 / I N T1 28
A1 23 15 P 3 . 4 / T0 P2.7/A15 27
A2 16 P 3 . 5 / T1 P2.6/A14 26
16 17 P3.6/W R P2.5/A13 25
13 R EF - P3.7/R D P2.4/A12 24
GND 19 P2.3/A11 23
VC C VC C 18 XTA L 1 P2.2/A10 22
20 XTA L 2 P2.1/A9 21
AD C 0809 GND P2.0/A8
VC C
A T8 9 C 5 2
9
8
7
6
5
4
3
2
33p
2
3
4
5
6
7
8
9
1
7
8
4.7K
LM555 3
6
2
104p 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
66
LCALL WRI
RET
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
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
;************************************************************
69
ORG 0900H
DB 'COUNT: '
DB ' '
;*********************************************************
END;
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-
0-12 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 9 th pin using a RC network with values R=8.2kΩ, C=10μF/16V. A
crystal oscillator with 11.0592MHZ frequency is connected to pins 18 and 19. Two 33pF Non-
70
polar 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:
TR A N S F O R M E R 4007 +12v VC C
1 5 L7805
AC230V 6 1 2
V IN
GND
4007 VOU T
4 8 + +
1000/25 100/16
3
VC C
VC C
N TC
+
10/16 VC C
VC C
R E S I S TO R V A R
VC C VC C
103 8.2K 1 1
104p
14A
9
8
7
6
5
4
3
2
2
3
4
5
6
7
8
9
VC C VC C 13A
16 X 2 LCD
11
12
9
12A
26 17 1 40 11A
R EF+
IN 0 D0 P 1 . 0 / T2 VC C
OE
VC C
27 14 2 31 10A
28 IN 1 D1 15 3 P 1 . 1 / T2 -E X EA/VPP 9A
C
LD R 1 IN 2 D2 8 4 P1.2 39 8A
2 IN 3 D3 18 5 P1.3 P0.0/AD 0 38 7A
3 IN 4 D4 19 6 P1.4 P0.1/AD 1 37 6A
4 IN 5 D5 20 7 P1.5 P0.2/AD 2 36 5A
5 IN 6 D6 21 8 P1.6 P0.3/AD 3 35 4A
103 IN 7 D7 P1.7 P0.4/AD 4 34 3A
7 9 P0.5/AD 5 33 2A
EOC R ST P0.6/AD 6 32 1A
10 P0.7/AD 7
10 22 11 P 3 . 0 / R XD 30
C LK ALE 6 12 P 3 . 1 / TXD A L E / P R O G 29
S TA R T 25 13 P 3 . 2 / I N T0 PSEN LC D
A0 24 14 P 3 . 3 / I N T1 28
A1 23 15 P 3 . 4 / T0 P2.7/A15 27
A2 16 P 3 . 5 / T1 P2.6/A14 26
16 17 P3.6/W R P2.5/A13 25
13 R EF - P3.7/R D P2.4/A12 24
GND 19 P2.3/A11 23
VC C VC C 18 XTA L 1 P2.2/A10 22
20 XTA L 2 P2.1/A9 21
AD C 0809 GND P2.0/A8
VC C
A T8 9 C 5 2
9
8
7
6
5
4
3
2
33p
2
3
4
5
6
7
8
9
1
7
8
4.7K
LM555 3
6
2
104p 5
1
C?
104p
Circuit:
71
TR A N S F O R M E R 4007 +12v VC C
1 5 L7805
AC230V 6 1 2
V IN
GND
4007 VOU T
4 8 + +
1000/25 100/16
3
VC C
+
10/16 VC C
VC C
R E S I S TO R V A R
VC C
8.2K 1 1
104p
14A
9
8
7
6
5
4
3
2
2
3
4
5
6
7
8
9
VC C 13A
16 X 2 LCD
12A
1 40 11A
2 P 1 . 0 / T2 VC C 31 10A
3 P 1 . 1 / T2 -E X EA/VPP 9A
4 P1.2 39 8A
VC C 5 P1.3 P0.0/AD 0 38 7A
6 P1.4 P0.1/AD 1 37 6A
10/16 + 7 P1.5 P0.2/AD 2 36 5A
8 P1.6 P0.3/AD 3 35 4A
P1.7 P0.4/AD 4 34 3A
M A X2 3 2 9 P0.5/AD 5 33 2A
16
R ST P0.6/AD 6 32 1A
1A 7 9 10 P0.7/AD 7
T2 O U T R 2O U T P 3 . 0 / R XD
VC C
2A 8 10 11 30
3A R 2IN T2 I N 12 P 3 . 1 / TXD A L E / P R O G 29
11 13 13 P 3 . 2 / I N T0 PSEN LC D
12 T1 I N R 1IN 14 14 P 3 . 3 / I N T1 28
R 1O U T T1 O U T 15 P 3 . 4 / T0 P2.7/A15 27
1 16 P 3 . 5 / T1 P2.6/A14 26
3 C 1+ 17 P3.6/W R P2.5/A13 25
10/16 + 4 C 1- P3.7/R D P2.4/A12 24
5 C 2+ 19 P2.3/A11 23
10/16 + 2 C 2- VC C 18 XTA L 1 P2.2/A10 22
V+
GND
6 20 XTA L 2 P2.1/A9 21
V- GND P2.0/A8
VC C
A T8 9 C 5 2
15
9
8
7
6
5
4
3
2
1 11.0592 33p
2
3
4
5
6
7
8
9
+ 1
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
72
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
TLINE: MOV R1,#00H
SSS: CLR A
MOVC A,@A+DPTR
MOV R6,A
TXD
INC DPTR
INC R1
CJNE R1,#18H,SSS
RET
;****************************************