Académique Documents
Professionnel Documents
Culture Documents
This project report describes on the design, development and fabrication of one
demonstration unit of the project work “SCADA” IMPLEMENTED OVER POWER
TRANSFORMER WITH REMOTE MONITORING SYSTEM”.
Micro-controllers are also being used increasingly as tools for analysis and design of
control systems. The control engineer thus has much more powerful tools available now than
in the past. Digital computers are still in a state of rapid development because of the
progress in very large-scale integration (VLSI) technology. Thus substantial technological
improvements can be expected in the future.
Micro-controllers are "embedded" inside some other device so that they can control
the features or actions of the product. Another name for a micro-controller, therefore, is
"embedded controller". Micro-controllers are dedicated to one task and run one specific
program. The program is stored in ROM (read-only memory) and generally does not change.
Micro-controllers are often low-power devices. A battery-operated Microcontroller might
consume 50 milli watts. A micro-controller has a dedicated input device and often (but not
always) has a small LED or LCD display for output. A micro-controller also takes input from
the device it is controlling and controls the device by sending signals to different components
in the device.
The ground wave can exist when the transmitting and receiving are close to
the surface of the Earth and are vertically polarized. The sky wave represents energy that
reaches receiving antenna as a result of a bending of the wave path introduced by the
ionization in the upper atmosphere. The space wave represents energy that travels from the
transmitting to the Receiving Antenna in the Earths troposphere. The radio transmission at
frequencies above about 30MHz is normally the space wave propagation. The transmitter that
is frequency modulated find extensive use at frequencies above 40MHz.
In this project work, 100MHz carrier is considered and 100MHz F.M
transmitter is designed. The signals transmitted from the transmitter to the receiver are over
load, over Temperature and over voltage information.
Coming to the computers, the technology is so much advanced. Initially the PC era
started with Intel 8088/8086, then PC-XT with Intel 80286 and PC-AT with 80386 SX and
80386 DX, then with Intel 80486. Subsequently the new generation of Intel series has come
with ‘PENTIUM’ processors. In Pentium series, variety of devices have come i.e., (Pentium
– I) P – I, P – II, P – III, P – IV, P – Celeron, P – Pro etc. Today we are getting P- 4 or power
of 4 processors are available in the Market. Thus the need come to develop PC Based project
works in the field of monitoring and control system, which will serve the need of the
Industry.
The purpose of this project work is to present control theory that is relevant to the
analysis and design of computer controlled systems, with an emphasis on basic concepts and
ideas. It is assumed that a digital computer with reasonable software is available for
computations and simulations so that many tedious details can be left to the computer. The
control system design is also carried out up to the stage of implementation in the form of
computer programs in a high level language. One can view computer-controlled systems as
approximations of analog control systems, but this is a poor approach because the full
potential of computer control is not used. At best the results are only as good as those
obtained with analog control circuit.
The computer-controlled system contains essentially four parts, i.e., the process, the
analog to digital converter, the control algorithm, and the clock. The times when the
measured signals are converted to digital form are called the sampling instants; the time
between successive samplings is called the sampling period and is denoted by ‘h’. The output
from the process is a continuous time signal. The output is converted into digital form by
the A – D converter. The A – D converter can be included in the computer or regarded as a
separate unit, according to ones preference. The conversion is done at the sampling times.
The computer interprets the converted signal, as a sequence of numbers, processes the
measurements using an algorithm, and gives a new sequence of numbers. This sequence is
converted to an analog signal by a digital to analog converter. Notice that the system runs
open loop in the interval between the A – D and the D – A conversion. The real time clock in
the computer synchronizes the events. The digital computer operates sequentially in time and
each operation takes sometime. The computer-controlled system contains both continuous
time signals and sampled, or discrete time, signals such systems have traditionally been
called sampled data systems, and this term will be used here as a synonym for computer
controlled systems.
Now a days, we find lot of transformers are burning because of over loads,
voltage variations and transformer body temperature rising. The body temperature of a
transformer rises due to overloads and continuous long run, because of these reasons the
transformer may shutdown automatically. Particularly, in the rural areas we find shutdown
of transformers due to agricultural pump-sets, and we know it takes lot of time to repair and
it involves lot of cost. Hence, the transformer failure prevention is become essential for
smooth transmission and distribution.
For over voltage parameter monitoring, the input voltage to the transformer primary
is fed through autotransformer and the over voltage is checked. Normally the transformer
primary is designed to operate at 230V AC, but, if the voltage is more than 250V AC, then
there is a chance that the transformer primary winding may burn due to over voltage, to
protect from this, supply to the primary is provided through the relay contact, which in turn
breaks the supply to the transformer primary when the primary voltage exceeds more than
250V AC. Similarly for other two parameters, if the limits are crosses, the high logic signal
from the microcontroller energizes the relay and breaks the supply to the primary and
prevents from burning the transformer.
For monitoring the transformer body temperature or oil temperature (most of the
distribution transformers are oil cooled transformers) SL100 NPN transistor is used as a
temperature sensor and this transducer is wired with operational amplifier. Similarly for
monitoring the load current, the current transformer (CT) is used which gives the secondary
voltage proportional to the current flowing in the primary. The primary of the CT is
connected in series with the load (The details of these parameters will be described in detail
in later chapters).
Thus, this project work simulates the substation environment and any transformer
crosses any of these parameters, then the input to the transformer is disconnected and
prevents from burning the transformer. By implementing this kind of “SCADA” system
everywhere at the distribution transformer end, failures of the transformer can be minimized
and lot of revenue can be saved.
A transformer works on the principle of mutual induction between the two circuits
linked by a common magnetic flux. The first coil, in which the electric energy is fed from
the AC supply mains, is called primary winding, and the other, from which the energy is
drawn, is called secondary winding. If the primary is connected to AC supply an alternating
flux is set up in the laminated core. The flux links with the turns of both primary and
secondary windings, there by inducing e.m.fs, in these windings. The e.m.f induced in the
primary is self-induced e.m.f, and opposes the supply voltage. The e.m.f induced in the
secondary is the mutually induced e.m.f and is expanded in producing current in it. Thus the
electric energy is transformed electro magnetically from first coil to the second coil by virtue
of magnetic coupling. The magnetic coupling between the two circuits plays an important
part in the action of transformer.
Distribution transformer failures have been an expensive problem for the State
Electricity Departments, mainly in rural networks. Research centers and consultants have
done particular diagnosis studies and punctual solutions in order to reduce transformer
failures and improve network performance. Transformer failures have many causes and
variables involved, like natural phenomena (lightning, wind, and forest), no natural
phenomena (human errors), design, build (manufacturing problems, materials defects) and
transformers and networks (lines, protection equipment, and structures) maintenance.
For monitoring the load current continuously, Current Transformer (CT) is used. The
current transformer is used with its primary winding connected in series with load carrying
the current to be measured and, therefore, the primary current is dependant upon the load
connected to the system and is not determined by the load (burden) connected on the
secondary winding of the current transformer. The primary winding consists of very few
turns and, therefore, there is no appreciable voltage drop across it. The secondary winding of
the current transformer has larger number of turns, the exact number being determined by the
turn’s ratio. The ammeter, or wattmeter current coil, are connected directly across the
secondary winding terminals. Thus a current transformer operates its secondary winding
nearly under short circuit conditions. One the terminal of the secondary winding is earthed so
to protect equipment and personnel in the vicinity in the even of an insulation breakdown in
the current transformer.
The output of the CT is rectified, filtered and it is fed to A/D converter for converting
the analog information of current flowing through the CT primary into digital information,
which is accepted by the Micro-controller.
Transformer failures have many causes and one of the main causes is over voltage.
The primary of the distribution transformer or any other transformer primary is designed to
operate at certain specific voltage, if that voltage is more than the rated voltage, then
immediately the transformer primary may burn because of over voltage. To protect the
transformer, burning due to over voltage, this voltage monitoring and control circuit is used
in this project work.
In this project work for generating high voltage, autotransformer is used so that the
line voltage can be increased to more than 240V. For monitoring the line voltage, a step-
down transformer of 6V-0-6V center-tapped secondary is used as a line voltage sensor. As
this transformer primary voltage increases, according to that secondary voltage also raises,
and this secondary voltage is rectified, filtered and it is applied to the analog to digital
converter for converting the analog information in to the digital information.
TEMPERATURE SENSING CIRCUIT:
The methods of temperature measurement may be divided into two main classes
according as the exchange of heat between the testing body and the hot system takes place by
contact or by radiation across a space. In the contact methods, thermometers or
thermocouples are used and they are immersed in solids or liquids. The thermodynamic
equilibrium between the hot body and the testing body is established by material contact. In
the non-contact methods, the thermodynamic equilibrium is established by the radiation
emitted as excited atom and molecules in the hot body return to the ground state.
For monitoring the transformer body temperature, SL100 general purpose NPN
switching transistor is used and it is having ‘TIN’ metal body, so that it can absorb the heat
properly. This transistor can be placed over the transformer body, where the transformer
radiates maximum heat. The exact location where the transistor is to be installed using
suitable clamp should be determined on the ease of access and the degree of accuracy
obtainable at the given point.
As the peripheral signals usually are substantially different from the ones that micro-
controller can understand (zero and one), they have to be converted into a pattern which can
be comprehended by a micro-controller. This task is performed by a block for analog to
digital conversion or by an ADC. This block is responsible for converting an information
about some analog value to a binary number and for follow it through to a CPU block so that
CPU block can further process it.
This analog to digital converter (ADC) converts a continuous analog input signal, into
an n-bit binary number, which is easily acceptable to a computer.
As the input increases from zero to full scale, the output code stair steps. The width
of an ideal step represents the size of the least significant Bit (LSB) of the converter and
corresponds to an input voltage of VES/2n for an n-bit converter. Obviously for an input
voltage range of one LSB, the output code is constant. For a given output code, the input
voltage can be any where within a one LSB quantization interval.
An actual converter has integral linearity and differential linearity errors. Differential
linearity error is the difference between the actual code-step width and one LSB. Integral
linearity error is a measure of the deviation of the code transition points from the fitted line.
The errors of the converter are determined by the fitting of a line through the code
transition points, using least square fit, the terminal point method, or the zero base technique
to provide the reference line.
A good converter will have less than 0.5 LSB linearity error and no missing codes
over its full temperature range. In the basic conversion scheme of ADC, the un-known input
voltage VX is connected to one input of an analog signal comparator, and a time dependant
reference voltage VR is connected to the other input of the comparator.
In this project work ADC 0809 (8 Bit A/D converter) is used to convert an analog
voltage variations (according to the condition of the parameters) into digital pulses. This IC
is having built in multi-plexer so that channel selection can be done automatically.
MICRO-CONTROLLER:
Micro-controllers are "embedded" inside some other device so that they can control
the features or actions of the product. Another name for a micro-controller, therefore, is
"embedded controller". Micro-controllers are dedicated to one task and run one specific
program. The program is stored in ROM (read-only memory) and generally does not change.
Micro-controllers are often low-power devices. A battery-operated Microcontroller might
consume 50 milli watts. A micro-controller has a dedicated input device and often (but not
always) has a small LED or LCD display for output. A micro-controller also takes input from
the device it is controlling and controls the device by sending signals to different components
in the device.
DIGITAL DISPLAY:
The output of the micro-controller is used to drive the digital display, for this purpose
four 7-segment common anode displays are used for measuring the line voltage, transformer
body temperature and load current. These displays are used to display the data received from
the Microcontroller through the latches. The segments of each display are called A, B, up to
G. In order to reduce the numbers of connections needed to address each of the LED’s (Light
Emitted Diode), the anodes of the LED’s of each seven-segment display have been connected
together. The common anode for the first seven-segment display is called A1, A2 for the
second display, etc. In addition, the cathode pins from each display have been connected
together to form seven common terminals, called A, B, C, D, E, F and G, corresponding to
the seven-segments. In addition to the seven segments, decimal point is also arranged in this
common anode display.
For the three different parameters, three different tone frequencies are generated.
Supply to these three-tone generators, provided through three different relay contacts, and
these relays energizes automatically, if that particular parameter output exceeds its limit.
Three 555 timer IC’s are used for generating 1 KHz, 2 KHz and 3 KHz
separately. These IC’s are designed in ‘Astable Multi-vibrator’ Mode (self oscillators). The
outputs of all the three oscillators are clubbed together and fed to carrier oscillator as
modulating waves.
F.M. TRANSMITTER:
This block generates a continuous frequency of 100MHz, which is used to form a
permanent link between the transmitter and receiver, and this is known as carrier frequency.
The outputs of 1 KHz, 2 KHz and 3 KHz Tone generators are combined and are fed to this
F.M radio transmitter. This is a frequency modulated radio transmitter. The radiating power
of the transmitter is 20mw, and it is designed using BC 494 B high frequency switching
transistor. The detailed description is provided in the next chapter
FM RECEIVER:
The received signal or detected signal from the radio receiver, which is audio tone
signal of 1 KHz, 2 KHz and 3 KHz, is amplified with the help of a transformer coupled
amplifier. This amplifier can be used in the following three applications.
The transformer coupling provides the facility of impedance matching and thus
results in increased power gain. Further this method of coupling isolates the load impedance
circuit of the amplifier from the DC bios stabilization network of the succeeding stage.
This circuit is designed to generate DC voltage according to the input frequency, i.e.,
input frequency is proportional to the output voltage. In this block IC 4046 and IC 4053 are
used and the brief description about these two ICS is as follows:
IC 4046 phase locked loop IC; the phase locked loop (PLL) is an important building
block of linear system. The output from a PLL system can be obtained either as the voltage
signal VC (t) corresponding to the error voltage in the feed back loop, or as a frequency
signal at VCO output terminal. The voltage output is used in frequency discriminator
application whereas the frequency output is used in signal conditioning, frequency synthesis
or clock recovery applications.
Consider the case of voltage output, when PLL is locked to an input frequency, the
error voltage VC (t) is proportional to (fs – fo). If the input frequency is varied as in the case
of FM signal, VC will also vary in order to maintain the lock. Thus the voltage output serves
as a frequency discriminator, which converts the input frequency changes to voltage changes.
IC4053 MULTIPLEXER; the multi-plexer is a special combinational circuit that is
one of the most widely used standard circuits in digital design. The Multi-plexer (or data
selector) is a logic circuit that gates one out of several inputs to a single output. The output
selected is controlled by a set of select input. The following figure shows the block diagram
of a multi-plexer with ‘n’ input lines and one output line. For selecting one out of n inputs
for connection to the output, a set of ‘m’ select input is required where 2m=n.
Depending up on the digital code applied at the select inputs one out of n data sources
is selected and transmitted to a single output channel. Normally a strobe (or enable) input (G)
is incorporated which helps in cascading and it is generally active-low, which means it
performs its intended operation when it is low.
An analog to digital converter (ADC) converts a continuous analog input signal, into
an n-bit binary number, which is easily acceptable to a computer.
As the input increases from zero to full scale, the output code stair steps. The width
of an ideal step represents the size of the least significant Bit (LSB) of the converter and
corresponds to an input voltage of VES\2n for an n-bit converter. Obviously for an input
voltage range of one LSB, the output code, the input voltage can be anywhere within a one
LDB quantization interval.
An actual converter has integral linearity and differential linearity errors.
Differential linearity error is the difference between the actual code-step width and one LSB.
Integral linearity error is a measure of the deviation of the code transition points from the
fitted line.
The errors of the converter are determined by the fitting of a line through the code
transition points, using least square fit, the terminal point method, or the zero base technique
to provide the reference lien.
A good converter will have less than 0.5 LSB linearity error and no mission codes
over its full temperature range. In the basic conversion scheme of ADC, the un-known input
voltage VX is connected to one input of an analog signal comparator, and a time dependant
reference voltage VR is connected to the other input of the comparator.
In this project work ADC 0809 (8bit A/D converter) is used to convert an analog
voltage of frequency to voltage converter output in to an output binary word that can be used
by a computer.
PC BLOCK:
For monitoring and displaying of temperature and load current parameters ‘C’
language is used. This is custom built software. The advantage of using ‘C’ is, while there
are around 250 languages existing in the world of computers, today the software
professionals are showing increasing performance for ‘C’. According to one survey as much
as 75% of total software developed in the world today, is written in ‘C’ or C++. What makes
‘C’ such a success and popular is because it is simple, reliable, capable and easy to use. The
compactness of ‘C’ language is mainly due to the fact that it is a one-man language rather
than a product of the committees. “DENNIS RITCHIE” developed it at AT & T bell lab,
USA. The software details are provided in chapter – 6. Program for the project work copied
from ‘C++’ and converted into ‘C’.
This program is for reading 8 – channel ADC and two different parameters output is
converted into analog signal and it is fed to channel ‘O’ in the ADC i.e., the program is made
to read the frequency to voltage converter output.
CLOCK GENERATOR:
The clock generator circuit is designed using 555 Timer IC. This IC is configured in
Astable Mode of operation (free running oscillator). The frequency can be adjusted using
external resistor and capacitor. The required frequency is more than 100 KHz. The output of
this IC is fed to the A - D converter.
The complete block diagram of the project work is shown in the next page.
CIRCUIT ANALYSIS
The current transformer used in this project work is designed for 5Amps i.e., the
current flowing through the primary is restricted for 5Amps. But in practical a higher rating
transformer can be used according to the rated power of the distribution transformer. Most
common industrial CT’s have 5 to 10 Amp current outputs and can generate high voltage
levels when not connected to a burden resistor.
The CT used in this project work is nothing but a step-up transformer. This
transformer is designed in 1:50 ratio, so that the voltage developed across the secondary is 50
times more than the voltage induced at primary. The voltage induced at primary is
proportional to the load current. The CT secondary when it is open circuited, the voltage
developed across the open terminals may be very high because of the step-up ratio, and
therefore, the secondary winding of the CT should always be connected to a burden resistor.
The secondary AC signal, which is proportional to the current flowing through the primary,
due to transformer action, is rectified with the help of a diode (Half wave rectification) and
then filtered by a filter Capacitor This DC voltage is a variable voltage, which varies
according to the load current. The variable voltage from the CT secondary is fed to analog to
digital converter for converting the analog information into digital information. The output of
the A/D converter is fed to Micro-controller unit for taking the necessary action. The current
flowing through the CT primary can be measured, for this purpose, digital display is provided
at the output of the Micro-controller Chip. The following is the circuit diagram of load
sensing circuit.
In the above circuit, with the help of a 470 resistor connected across the CT
secondary, the ripple can be suppressed and real value can be obtained at the output of CT.
This voltage can be adjusted to the required level, for this purpose 2K variable resistor is
used and the final output taken from mid point of the preset. Since it is a protype module, in
this project work for the demonstration purpose, a small transformer of 12V secondary at
1amp rating is considered, and it is treated as distribution transformer. This transformer
secondary is used to drive the lamp load through the current transformer primary. For this
purpose two No.s of 12V 10W AC lamps are used, one lamp is treated as nominal load and
the other one is used to create a fault, i.e., the transformer secondary is designed to drive only
one amp load, if the load is more than one amp then the transformer may burn because of
over load, to protect the transformer burning due to the over load, the output of the load
monitoring circuit is used to drive the relay through the A/D converter and microcontroller.
This relay contact is used to break the supply at the primary side of the transformer; so that
once the transformer is overloaded automatically primary supply can be disconnected.
HIGH VOLTAGE MONITORING CIRCUIT:
The Line voltage-sensing circuit used in this project work is capable to measure up to
250V AC. For this purpose a step-down transformer of 6V-0-6V, 500mA, Center tapped
secondary is used for monitoring the line voltage continuously. In the prototype module, the
line voltage can be increased through the autotransformer, the output of the line voltage
sensing circuit is fed to micro-controller unit through the A/D converter, so that according to
the received digital information form the ADC, the micro-controller energizes relay. This
relay contact is used to break the supply to the feeder cable. In practical, the distribution
transformers primary is designed to operate at very higher voltage of 11KVA or 33KVA,
because, the output of the power generating station is very high. According to the main grid
voltage, the step-down transformer primary (for Monitoring the line voltage) can be
designed.
The output of the line voltage-sensing transformer is rectified and filtered for
obtaining pure DC voltage. The final output is taken from the mid point of 2K variable
resistor (Preset), so that the voltage applied to the A/D converter can be controlled. As the
line voltage varies, according to that output voltage also varies. This variable voltage from
the potential transformer (PT) is applied to the A/D converter. The applied voltage to the
ADC should not exceed more than 5V, so that the output voltage is clamped at +5V DC, for
this purpose, 1W, 5V zener is used. This circuit is designed such that, the voltage applied to
the transformer primary, if it is more than 245V AC then immediately the microcontroller
energizes the relay and breaks the supply to the primary, by which the transformer can be
protected burning due to the over voltage. Since it is a prototype module, the output of the
transformer is restricted for lower voltages for the demonstration purpose, but when it is
implemented for the real time applications, at that time the output of the distribution
transformer will be around 220V AC, and with the help of this kind of voltage control circuit,
the household electrical gadgets like TV, Fridge, Tube, Motor etc., can be protected burning
due to the over voltage.
In this block, two op-amps are used to form two different stages, the first stage is
configured as differential amplifier and the second stage is configured as gain amplifier. In
the first stage an ‘NPN’ General purpose transistor (SL100) is used as a temperature sensor
and this transistor is having ‘TIN’ metal body so that it can absorb the heat properly. This
transistor is connected in feed back loop (input to output). This first stage is designed in such
a way so that, as the transistor body temperature rises, according to the temperature, the base-
emitter or base-collector junction resistance decreases. This first stage is designed to generate
2mv/0C which is not sufficient for the calibration. Hence, using 2nd stage this voltage is
amplified, and the gain of the 2nd stage is 10, so that (2x10) 20mv per degree centigrade can
be obtained at the output of the second stage. This variable voltage (according to the
temperature) from the output of second stage is fed to the analog to digital converter for
converting the analog information in to the digital information and this digital information is
fed to the microcontroller for taking the necessary action.
The circuit design consists a basic transducer, which converts temperature in to
equalent voltage. For this, transistor ‘SL100’ is used as a sensor. The transistor junction (Base
& emitter or Base & collector) characteristics are depends upon the temperature. For a
transistor, the maximum average power that it can dissipate is limited by the temperature that
collector - base junction can with stand. Therefore, maximum allowable junction temperature
should not be exceeded. The average power dissipated in collector circuit is given by the
average of the product of the collector current and collector base voltage. At any other
temperature the de-rating curves are supplied by the manufacturer to calculate maximum
allowable power (Pj).
In the above circuit diagram with the help of 2K preset (variable resistor) connected
at the input of first stage, the initial room temperature corresponding output voltage can be
adjusted for the easy calibration. The output of the second stage is clamped with 5V zener
and the same output is fed to the A/D converter. For better understanding the following is the
further description along with formulas and equations.
For sensing the transformer body temperature, a sensor has to chosen based on the
following requirements.
1. Sensitivity and accuracy
2. Temperature Range
3. Desired life of Sensor
4. Budget
In the prototype module for the simulation purpose, ‘SL100’ NPN Transistor is used
as sensor because semiconductor Temperature sensor are best suited for embedded
applications as they tend to be electrically and mechanically more delicate than other
temperature sensor types.
In the present module, as the resistance property of the transistor cannot be used
directly for interfacing, this transistor is employed as a feedback element in the following
configuration
Let Rf be the resistance offered by the sensor under normal conditions
(i.e. at S.T.P). The first stage is configured in Non-inverting amplifier mode, whose output
voltage is given by
The second stage is designed as summing amplifier whose output is given by (Using
superposition Principle)
The output of the various parameters is fed to A/D converter. The channel selection
depends upon the address selection sent by the Micro-controller. This ADC is having three
address inputs to select one out of eight channels of the ADC. This ADC 0809 is a successive
approx. Analog to digital converter and the clock rate at which the conversion is fed from the
IC 555 timer configured as astable multi-vibrator. The digital output after conversion is fed to
Micro-controller
For ADC to start converting the data after selecting the channel by sending the
address inputs, the start conversion signal is to be sent by Micro-controller. Then ADC starts
converting the analog signals voltage into corresponding digital data. For Ex: The following
table shows the digital data corresponding to analog input.
After conversion, the ADC generates EOC (End of conversion). This indicates to
Micro-controller that the conversion is completed and takes the digital data corresponding to
analog input. The following is Circuit diagram of A/D Converter along with its clock
generator:
In the above circuit diagram 555 timer IC is used for generating the required clock pulses.
CLOCK GENERATOR:
The required clock for the ADC is generated using 555 Timer IC that is configured as
Astable multi-vibrator (Self Oscillator). In this mode of operation the required frequency can
be adjusted using two external components i.e., resistor and capacitor. Keeping capacitor
value constant where as by varying the value of resistor the frequency can be adjusted from
1Hz to 500KHz. Here the required frequency is 100 KHz approximately.
In the above circuit diagram 555 timer IC is used for generating the required clock
pulses. Frequency can be adjusted using variable resistor 100K (RB). In this circuit, the
external capacitor charges through RA+RB and discharges through RB. Thus the duty cycle
may be precisely set by the ratio of these two resistors. In this mode of operation, the
capacitor charges and discharges between 1/3 VCC and 2/3 VCC. As in the triggered mode,
the charge and discharge times, and therefore the frequency are independent of the supply
voltage. Here the timing resistor is now split into two sections, RA and RB, with the
discharge transistor (Pin 7) connected to junction of Ra and Rb. When the power supply is
connected, the timing capacitor C charges towards 2/3 VCC through Ra and Rb. When the
capacitor voltage reaches 2/3 VCC, the upper comparator triggers the flip-flop and the
capacitor starts to discharge towards ground through Rb. When the discharge reaches 1/3
VCC the lower comparator is triggered and a new cycle is started. The capacitor is then
periodically charged and discharged between 2/3 VCC and 1/3 VCC respectively. The output
state is high during the charging cycle for a time period t1, so that
The output state is LOW during the discharge cycle for a time period t2, given by
t2 = 0.693 RbC
T = t1 + t2
= 0.693 (Ra + 2Rb) C (Seconds)
MICRO-CONTROLLER:
Circumstances that we find ourselves in today in the field of micro-controllers had
their beginnings in the development of technology of integrated circuits. This development
has made it possible to store hundreds of thousands of transistors into one chip. That was a
prerequisite for production of microprocessors, and adding external peripherals such as
memory, input-output lines, timers and other made the first computers. Further increasing of
the volume of the package resulted in creation of integrated circuits. These integrated circuits
contained both processor and peripherals. That is how the first chip containing a
microcomputer, or what would later be known as a micro-controller came about.
MEMORY UNIT:
Memory is part of the micro-controller whose function is to store data. The easiest
way to explain it is to describe it as one big closet with lots of drawers. If we suppose that we
marked the drawers in such a way that they cannot be confused, any of their contents will
then be easily accessible. It is enough to know the designation of the drawer and so we will
know its contents for sure.
Memory components are exactly like that. For a certain input we get the contents of a
certain addressed memory location and that’s all. Two new concepts are brought to us:
addressing and memory location. Memory consists of all memory locations, and addressing
is nothing but selecting one of them. This means that we need to select the desired memory
location on one hand, and on the other hand we need to wait for the contents of that location.
Besides reading from a memory location, memory must also provide for writing onto it.
Supplying an additional line called control line does this. We will designate this line as R/W
(read/write). Control line is used in the following way: if r/w=1, reading is done, and if
opposite is true then writing is done on the memory location. Memory is the first element,
and we need a few operation of our micro-controller.
CENTRAL PROCESSING UNIT:
Let add 3 more memory locations to a specific block that will have a built in
capability to multiply, divide, subtract, and move its contents from one memory location onto
another. The part we just added in is called “central processing unit” (CPU). Its memory
locations are called registers.
Registers are therefore memory locations whose role is to help with performing
various mathematical operations or any other operations with data wherever data can be
found. Look at the current situation. We have two independent entities (memory and CPU)
that are interconnected, and thus any exchange of data is hindered, as well as its functionality.
If, for example, we wish to add the contents of two memory locations and return the result
again back to memory, we would need a connection between memory and CPU. Simply
stated, we must have some “way” through data goes from one block to another.
BUS:
That “way” is called “bus”. Physically, it represents a group of 8, 16, or more wires.
There are two types of buses: address and data bus. The first one consists of as many lines as
the amount of memory we wish to address, and the other one is as wide as data, in our case 8
bits or the connection line. First one serves to transmit address from CPU memory, and the
second to connect all blocks inside the micro-controller.
INPUT-OUTPUT UNIT:
Those locations we’ve just added are called “ports”. There are several types of ports:
input, output or bi-directional ports. When working with ports, first of all it is necessary to
choose which port we need to work with, and then to send data to, or take it from the port.
When working with it the port acts like a memory location. Something is simply
being written into or read from it, and it could be noticed on the pins of the micro-controller.
The following is the Circuit diagram of Digital Display Driven by the micro-controller
In the above circuit diagram, four common anode 7-Segment displays are used for
displaying the motor speed. The output of the Micro-controller is fed to digital display
through the latches, for this purpose IC 74573 is used, this is an octal transparent D-type
latches IC. To drive the displays independently 547 transistors are used. A seven segment
LED is a device for display of numbers and letters. It contains seven LED bars, which can be
turned on by placing the appropriate signals on the appropriate pins.
In order to produce a specific number, we must light the correct segments of the LED.
For example, to display the number 3, we must light segments a, b, c, d and g. By which we
understand that the pattern of lit and unlit segments can be formed into a binary number.
F.M TRANSMITTER:
To understand how radio wave are generated and radiated into space, consider
alternating currents of suitable frequency fed into conductor or wire of suitable length called
the antenna. Fast moving alternating currents produce a moving electric field around the
antenna. This field in turn produces a magnetic field at right angles to it. This combination of
electric and magnetic fields constitutes the radio wave or electro magnetic wave, which is a
form of radiant energy.
F.M RECEIVER:
The FM receiver is located at the remote end. The first stage of this remote end unit is
the F.M. Radio Receiver, which is designed with Phillips IC TEA 5591A. In the circuit
diagram an LED indicator is connected at Pin No.7 of 5591 IC, which glows brightly, if the
receiver is tuned perfectly with the transmitter.
The F.M. receiver, which operates at 100 MHz, will have an intermediate frequency
of 10.7 MHz and bandwidth of 200 KHz. This IC consists of a built in RF amplification
circuit. It matches the input impedance of the antenna. This IC consists of F.M. Detector
including amplifier of modulated signal (RF amplification). Two sections of LC are provided
and a ceramic filter is used to filter the IF of 10.7 MHz. The FM demodulator is basically a
frequency to amplitude converter, which converts the frequency deviation of the incoming
carrier into an AF (Audio frequency) amplitude variation identical to that of modulating
signal. In demodulation any change in amplitude of the signal fed to the FM demodulator is a
spurious signal. Therefore it must be removed, if distortion is to be avoided. A limiter is a
form of clipping device. It is quite possible for the amplitude limiter to be described to be
inadequate to its task, because signal strength variations may easily take average signal
amplitude outside the limiting range. As a result, further limiting is required. In practice, two
amplitude limiters are used in cascade. This arrangement increases the limiting range
satisfactory. To ensure that the signal fed to the limiter is within its range regardless of input
signal limiting range strength and also to prevent overloading of the amplifier, the AGC
(Automatic Gain Control) is used. Instead of designing a double limiter, the better
performance is obtained by using one limiter and AGC. The frequency-modulated signal is
fed to a tuned circuit whose resonant frequency is to one side of the center frequency (CF) of
the FM signal, the output of this tuned circuit will have an amplitude that depends on the
frequency deviation of the input signal. The following is the circuit diagram of F.M.
Receiver.
SIGNAL AMPLIFIER:
For maximum power output and impedance matching the audio frequency driver
transformer is used in the signal amplifier circuit. The design equation of a driver transformer
is
The signal, which is detected by the receiver, is further amplified with the help of
above audio amplifier. In this circuit, the input capacitor 0.1 MF permits complete input
power to flow into the base circuit. It also blocks the DC component to flow into the base
circuit. The 330K resistor works as a biasing resistor. The purpose of this biasing is as
follows.
A study of the transistor characteristics shows that the transistor function is most
linear when the transistor operates in its active region. The operating point may then be
suitably placed in this region by proper selection or dc potentials and currents through use of
external energy sources. With a properly selected operating point, the time varying
component of the AC input signal. Say base current in common emitter amplifier, results in
output signal of the same waveform. An improperly selected operating points results in an
output signal, which differs in waveform from the input signal, such an operative point is
unsatisfactory and should be rejected. The selection of suitable operating point is vital for
linear amplification. The 100 and 330K forms as a input resistance of the transformer
primary. For securing maximum transfer of power from the amplifier to the load, the source
impedance should match with the input impedance of the amplifier transferred to the primary
of the transformer. Similarly for maximum transfer of power from the amplifier to the load,
the output impedance of the amplifier is matched with the load impedance. To get large
output the two secondary signals are cascaded and output is taken for further processing. In +
VC half cycle, the top transistor circuit enables and in the –VC half cycle, the bottom
transistor circuit enables and total cycle gets amplified output signal.
The output of this signal amplifier is fed to the F/V converter.
The output of the signal amplifier is converted into DC voltage in proportion to the
tone frequency, with the help of phase locked loop IC 4046 and Multi-plexer IC 4053. The
amplified signal is fed to the in signal (Pin NO.14) of the device, which is the input of the
phase comparator. The other input of the phase comparator is fed from the internally
generated voltage controlled oscillator (VCO), whose frequency is set with the help of
external capacitor connected between Pin 6 and 7, here PLL is used for synchronization. The
output of the PLL is fed to the Multiplexer. The signals of the phase comparator – I and phase
comparator – II are fed so that the output is multi-plexed with the hlp of IC4053. The output
of the F/V converter is fed to the Analog to digital converter circuit for converting the Analog
information into digital pulses. The circuit design of phase locked loop with multiplexer and
its associated circuitry is shown below.
The information source and the destination point are usually separated in space. The
channel provides the electrical connection between the information source and the user. The
channel can have many deferent forms such as a microwave radio link over free space a pair
of wires, or an optical fiber. Regardless of its type the channel degrades the transmitted
single in a number of ways. The degradation is a result of signal distortion due to imperfect
response of the channel and due to undesirable electrical signals (noise) and interference.
Noise and signal distortion are two basic problems of electrical communication. The
transmitter and the receiver in a communication system are carefully designed to avoid signal
distortion and minimize the effects of noise at the receiver so that a faithful reproduction of
the message emitted by the source is possible.
The transmitter couples the input message signal to the channel. While it may
sometimes be possible to couple the input transducer directly to the channel, it is often
necessary to process and modify the input signal for efficient transmission over the channel.
Signal processing operations performed by the transmitter include amplification, filtering,
and modulation. The most important of these operations is modulation a process designed to
match the properties of the transmitted signal to the channel through the use of a carrier
wave.
Modulation is the systematic variation of some attribute of a carrier waveform such as
the amplitude, phase, or frequency in accordance with a function of the message signal.
Despite the multitude of modulation techniques, it is possible to identify two basic types of
modulation: the continuous carrier wave (CW) modulation and the pulse nodulation. In
continuous wave (CW) carrier modulation the carrier waveform is continuous (usually a
sinusoidal waveform), and a parameter of the waveform is changed in proportion to the
message signal. In pulse modulation the carrier waveform is a pulse waveform (often a
rectangular pulse waveform), and a parameter of the pulse waveform is changed in
proportion to the message signal. In both cases the carrier attribute can be changed in
continuous or discrete fashion. Discrete pulse (digital) modulation is a discrete process and is
best suited for messages that are discrete in nature such as the output of a teletypewriter.
However, with the aid of sampling and quantization, continuously varying (analog) message
signal can be transmitted using digital modulation techniques.
The main function of the receiver is extracting the input message signal from the
degraded version of the transmitted signal coming from the channel. The receiver performs
this function through the process of demodulation, the reverse of the transmitter’s modulation
process. Because of the presence of noise and other signal degradations, the receiver cannot
recover the message signal perfectly. Ways of approaching ideal recovery will be discussed
later. In addition to demodulation, the receiver usually provides amplification and filtering.
Based on the type of modulation scheme used and the nature of the output of
the information source, we can divide communication systems into three categories:
1.analog communication systems designed to transmit analog information using
analog modulation methods
2. Digital communication systems designed for transmitting digital information using
digital modulation schemes and
3. Hybrid systems that use digital modulation schemes for transmitting sampled and
quantized values of an analog message signal.
The overall purpose of the system is to transmit the messages (or sequences of
symbols) coming out of a source to a destination point at as high a rate and accuracy as
possible. The source and the destination point are physically separated in space and a
communication channel of some sort connects the source to the destination point. The
channel accepts electrical/electromagnetic signals, and the output of the channel is usually a
smeared or distorted version of the input due to the non-ideal nature of the communication
channel. In addition to the smearing, the information-bearing signal is also corrupted by
unpredictable electrical signals (noise) from both man-made and natural causes. The
smearing and noise introduce errors in the information being transmitted and limits the rate at
which information can be communicated from the source to the destination. The probability
of incorrectly decoding a message symbol at the receiver is often used as a measure of
performance of digital communication system. The main function of the coder, the
modulator, the demodulator, and the decoder is to combat the degrading effects of the
channel on the signal and maximized the information rate and accuracy.
INFORMATION SOURCE:
Information sources can be classified into two categories based on the nature
of their outputs: Analog information sources, and discrete information sources. Analog
information sources, such as a microphone actuated by speech, or a TV camera scanning a
scene, emit one or more continuous amplitude signals (or functions of time). The output of
discrete information sources such as a teletype or the numerical output of a computer consists
of a sequence of discrete symbols or letters. An analog information source can be
transformed onto a discrete information source through the process of sampling and
quantizing. Discrete information sources ate characterized by the following parameters:
1. Source alphabet (symbols or letters)
2. Symbol rate
3. Source alphabet probabilities
4. Probabilistic dependence of symbols in a sequence
From these parameters, we can construct a probabilistic model of the information
source and define the source entropy (H) and source information rate (R) in bits per symbol
and bits per second, respectively. The term bid is used to denote a binary digit.)
To develop a feel for what these quantities represent, let us consider a discrete
information source-a Teletype having 26 letters of the English alphabet plus six special
characters. The source alphabet for this example consists of 32 symbols. The symbol rate
refers to the rate at which the Teletype produces characters: for purposes of discussion, let us
assume that the Teletype operates at a speed of 10 characters or 10 symbols/sec. If the
Teletype is producing messages consisting of symbol sequences in the English language, then
we know that some letters will appear more often than others. We also know that the
occurrence of a particular letter in a sequence is somewhat dependent on the letters preceding
it. For example, the letter E will occur more often than letter Q and the occurrence of Q
implies that the next letter in the sequence will most probably be the letter U, and so forth.
These structural properties of symbol sequences can be characterized by probabilities of
occurrence of individual symbols by the conditional probabilities of occurrence of symbols.
To illustrate the above principle, assume that the input to the modulator consists of 0’s
and 1’s occurring at a rate of 1 bit/sec. The modulator can assign waveforms once every
second. Notice that the information contained in the input bit is now contained in the
frequency of the output waveform. To employ waveforms of longer duration, the modulator
can assign waveforms once every four seconds. The number of distinct waveforms the
modulator has to generate (hence the number of waveforms the demodulator has to detect)
increases exponentially as the duration of the waveforms increases. This leads to an increase
in equipment complexity and hence the duration cannot be increased indefinitely. The
number of waveforms used in commercial digital modulators available at the present time
ranges from 2 to 16.
Demodulator:
Modulation is a reversible process, and the demodulator accomplishes the extraction
of the message from the information bearing waveform produced by the modulator. For a
given type of modulation, the most important parameter of the demodulator is the method of
demodulation. There are a variety of techniques available for demodulating a given
modulated waveform: the actual procedure used determines the equipment complexity
needed and the accuracy of demodulation. Given the type and duration of waveforms used by
the modulator, the power level at the modulator, he physical and noise characteristics of the
channel, and the type of demodulation, we can derive unique relationship between data rate,
power bandwidth requirements, and the probability of incorrectly decoding a message bit. A
considerable portion of this text is devoted to the derivation of these important relationships
and their use in system design.
Channel Encoder/Decoder:
There are two methods of performing the channel coding operation. In the first
method, called the block coding method, the encoder takes a block of k information bits from
the source encoder and adds r error control bits. The number of error control bits added will
depend on the value of k and the error control capabilities desired. In the second method,
called the convolution coding method, the information bearing message stream is encoded in
a continuous fashion by continuously interleaving information bits and error control bits.
Both methods require storage and processing of binary data at the encoder and decoder.
While this requirement was a limiting factor in the early days of data communication, it is no
longer such a problem because of the availability of solid-state memory and microprocessor
devices at reasonable prices.
The important parameters of a channel encoder are the method of coding. Rate or
efficiency of the coder (as measured by the ratio of data rate at input to the data rate at the
output), error controls capabilities, and complexity of the encoder.
The channel decoder recovers the information bearing bits from the coded binary
stream. The channel decoder also performs error detection and possible correction. The
decoder operates either in a block mode or in a continuous sequential mode depending on the
type of coding used in the system. The complexity of the decoder and the time delay involved
in the decoder are important design parameter.
THEORY RELATED TO DISTRIBUTION TRANSFORMERS
The transformer is a device, which transfers electrical energy from one electrical to
another electrical circuit through the medium of magnetic field and without a change in the
frequency. The electric circuit, which receives energy from the supply mains, is called
primary winding and the other circuit, which delivers electric energy to the load, is called the
secondary winding. Actually, the transformer is an electromagnetic energy conversion device,
since the energy received by the primary is first converted to magnetic energy and it is then
reconverted to useful electrical energy in the other circuits. Thus primary and secondary
windings of a transformer are not connected electrically, but are coupled magnetically. This
coupling magnetic field allows the transfer of energy in either direction, from high voltage to
low voltage circuits or from low voltage to high voltage circuits. If the transfer of energy
occurs at the same voltage, the purpose of the transformer is merely to isolate the two electric
circuits and this use is very rare in power applications. If the secondary winding has more
turns than the primary winding, then the secondary voltage is higher than the primary voltage
and the transfer is called a step-up transformer. In case the secondary winding has less turns
than the primary winding, then the secondary voltage is lower than the primary voltage and
the transformer is called a step-down transformer. Note that a step-up transformer can be
used as a step-down transformer, in which case the secondary of step-up transformer
becomes the primary of step-down transformer. Actually a Transformer can be termed a step-
up or step-down transformer only after it has been put into service. Therefore, when referring
to the windings of a particular transformer, the terms high-voltage winding and low voltage
winding should be used instead of primary and secondary windings.
A transformer is the most widely used device in both low and high current circuits. As
such, transformers are built in an amazing range of sizes. In electronic, measurement and
control circuits, transformer size may be so small that it weighs only a few tens of grams
whereas in high voltage power circuits, it may weigh hundreds tones.
There are two general types of transformers, the core type and the shell type. These
two types differ from each other by the manner in which the windings are wound around the
magnetic core. A transformer works on the principle of electro magnetic induction.
According to the principle, an e.m.f. is induced in a coil if it links a changing flux.
A distribution transformer should have a small value of voltage regulation, so that the
terminal voltage at the consumer’s premises doesn’t vary widely as the load changes. For a
transformer of large voltage regulation, the voltage at the consumer’s terminals will fall
appreciably with the increase in load. This has a detrimental effect on the operation of the
fluorescent tubes, TV sets, Refrigerator Motors etc., since these are designed to operate
satisfactorily at a constant voltage. Thus the distribution transformers should be designed to
have a low value of leakage impedance.
The transformer efficiency can be calculated if the total loses in the transformer are
known. Power transformers are used at the sending and receiving ends of a long, high voltage
power transmission line for stepping up or stepping down the voltage. These transformers are
manipulated to operate almost always at or near their rated capacity. Therefore, power
transformers are disconnected during light load periods. In view of this, a power transformer
is designed to have maximum efficiency at or near its full load KVA. Hence the choice of a
power transformer, out of a large numbers of competing transformers, should be based on full
load efficiency.
Distribution transformers are those, which change the voltage to a level suitable for
utilization purposes at the consumer’s premises. A power transformer does not come in direct
contact with the consumer’s terminals, whereas a distribution transformer must have its
secondary directly connected with the consumer’s terminals. The load on a distribution
transformer varies over a wide range during a 24-hour day. For example, a distribution
transformer in a residential colony may have practically little or no load during a
considerable portion of the daytime, but in the evenings, the load may be near its rated
capacity. Note that the primary of distribution transformers are always energized and,
therefore, the core loss takes place continuously. In view of this, the distribution transformers
are designed to have very low value of core loss. But for reduced core loss Pc (Pc is constant
load voltage) the maximum efficiency may occur at about one-half of its rated KVA. Thus a
distribution transformer should not be judged by its full load efficiency, which is usually
much less than its maximum efficiency. However, the choice of a distribution transformer,
out of a large number of competing transformers, can be based on energy efficiency.
While testing the transformer polarity, on the primary side of two ending transformer,
one terminal is positive with respect to the other terminal at any one instant. At the same
instant one terminal of the secondary winding is positive with respect to the other terminal.
These relative polarities of the primary and the secondary terminals at any instant must be
known if the transformers are to be operated in parallel or are to be used in a polyphase
circuit.
The back-to-back test on single Phase transformers requires to identical units, where
two primaries are connected in parallel, are energized at rated voltage and rated frequency.
For performing the load test on single-phase transformers, two identical units are
essential, whereas the load test on three phase transformers can be carried out on a single
unit.
A transformer, in which a part of the winding is common to both the primary and
secondary circuits, is called an autotransformer. In a two winding transformer, primary and
secondary windings are electrically isolated, but in an auto transformer the two windings are
not electrically isolated. The main dis-advantage of an autotransformer is due to the direct
electrical connection between the low tension and high-tension sides.
Most digital panel Meters (DPM) and digital multi-meters (DMM) use either the
single integration or duel-slope integration methods for the A/D conversion process. The
single slope integrator is simple, but is limited to those applications that can tolerate accuracy
of one or two percent.
An example of single slope integrator A/D converter is shown in the next page, while
its timing diagram is shown below that.
These circuits are not A/D Converters in the strictest sense, but are very good for
representing analog data in a form that can be tape recorder on a low cost audio- machine, or
transmitted over radio. The V/F converter output can also be used for direct input to a
computer if a binary counter is used to measure the output frequency. Two forms of V/F
converter are common. One is a voltage-controlled oscillator (VCO), that is, a regular
oscillator circuit in which the output frequency is a function of an input controls voltage. If
the VCO is connected to a binary or binary coded decimal (BCD) counter, then the VCO
becomes a V/F form of A/D converter. The integrator, which causes the integrator output to
begin charging capacitor, the output voltage of the integrator will begin to rise. As soon as
this voltage rises a few milli-volts above ground potential the comparator output snaps HIGH
– Positive. A HIG comparator output causes the control circuit to enable the counter, which
begins to count pulses. The following is the block diagram of voltage to frequency converter
Counter type A/D Converter:
A counter type A/D converter (Also called “servo” or “ramp” A/D converters)
consists of a comparator, voltage output DAC, binary counter, and the necessary control
logic. When the start command is received, the control logic resets the binary counter,
enables the clock, and begins counting. The counter outputs control the DAC inputs, so the
DAC output voltage will begin to rise when the counter begins to increment. As long as
analog input voltage Vx is less than Vref (The DAC output), the comparator output is HIGH,
when Vx and Vref are equal, however, the comparator output goes low, which turns off the
clock and stops the counter output at this time represents the value of Vx. The following is
the block diagram of binary A/D converter.
SUCCESSIVE APPROXIMATION A/D CONVERTERS:
Successive approximation A/D conversion is best suited for many applications where
speed is important. This type of A/D converter requires only N+1 clock cycles to make the
conversion, and some designs allow truncation of the conversion process after fewer cycles if
the final value is found prior to N+1 Cycles. The successive approximation converter
operates by making several successive trails at comparing the analog input voltage with a
reference generated by a DAC.
The parallel A/D Converter is probably the fastest A/D circuit known; indeed, the
very fastest ordinary commercial products use this method. Some sources call the parallel
A/D converter the “flash” circuit because of its inherent high speed. The parallel A/D
converter consists of a blank of (2N-1) voltage comparators biased by reference potential
Vref though a resistor Network that keeps the individual comparators 1-LSB a port. Since the
input voltage is applied to all the comparators simultaneously, the speed of conversion is
limited essentially by slow rate of the slowest comparator in the bank, and also by the
decoder circuit propagation time. The decoder converts the output code to binary code
needed by the computers. The A/D converter is a circuit that is used to produce a binary
number output that represents an analog voltage applied to the input.
DETAILS ABOUT MICORCONTROLLER
The micro-controller is a chip, which has a computer processor with all its support
functions, memory (both program storage and RAM), and I/O built in to the device. These
built in functions minimize the need for external circuits and devices to be designed in the
final applications.
Along with micro-controllers getting faster, smaller and more power efficient they are
also getting more and more features. Often, the first version of micro-controller will just have
memory and simple digital I/O, but as the device family matures, more and more part
numbers with varying features will be available.
With all the 8051 manufacturer’s products taken into account, there are over two
hundred different 8051 part numbers, each with different features and capabilities. For most
applications, we will be able to find a device within the family that meets our specifications
with a minimum of external devices, or an external but which will make attaching external
devices easier, both in terms of wiring and programming.
For many micro-controllers, programmers can be built very cheaply, or even built in
to the final application circuit eliminating the need for a separate circuit. Also simplifying
this requirement is the availability of micro-controllers with SRAM and EEPROM for
control store, which will allow program development without having to remove the micro-
controller from the application circuit.
Different types of Micro-controllers:
Creating applications for micro-controllers is completely different than any other
development job in computing and electronic. In most other applications, we probably have a
number of sub systems and interfaces already available for our use. This is not the case with
a Micro-controller, where we are responsible
a) Power distribution
b) System clocking
c) Interface design and wiring
d) Systems programming
e) Application programming
f) Device programming
These work items might seem obvious, but having to do them all is really quite
profound in modern computing system development. In no other aspect of electronics are all
these requirements found. The process is also made more enjoyable by learning how to work
with the features built into the devices that are designed to simplify the task of directly
connecting to other devices. Often, very useful applications can be created using a micro-
controller and a few passive components.
Embedded micro-controllers:
When all the hardware required to run the application is provided on the chip, it is
referred to as an embedded micro-controller. All that is typically required to operate the
device is power, reset, and a clock. Digital I/O pins are provided to allow interfacing with
external devices. This complete hardware on a chip is extremely useful for some applications.
Embedded micro-controllers are now replacing some very common devices like 555
timers because they are actually cheaper to use in applications and they are much more
precise and easier to control
Micro-controller memory types:
Control storage:
In a PC, when we execute an application, we read the application from disk and store
it into an allocated section of memory. In a micro-controller, this is not possible because there
is no disk to read from. The application that is stored in non-volatile memory is always the
only software the micro-controller will execute. Having the program always available in
memory makes the writing of its some what different than PC or work station applications.
CHIP TECHNOLOGIES:
Micro-controllers, like all other electronic products, are growing smaller, running
faster, requiring less power, and are cheaper. This is primarily due to improvements in the
manufacturing process and technologies used (and not the adoption of different computer
architectures). Virtually all micro-controllers built today use CMOS (complementary metal
oxide semiconductor) logic technology to provide the computing functions and electronic
interfaces. CMOS is a push-pull technology in which a PMOS and NMOS transistor are
paired together. The following is the circuit diagram of push-pull configuration
When the input signal is low, the PMOS transistor will be conducting and the NMOS
transistor will be ‘off’. This means that the switch (or transistor) at Vcc will be ‘ON’,
providing Vcc at the signal out. If a high voltage is input to the gate, then the PMOS
transistor will be turned off and the NMOS transistor will be turned on, pulling the output
line to ground. During a state transition, a very small amount of current will flow through the
transistors. As the frequency of operation increases, current will flow more often in a given
period of time (put another way, the charge transferred per unit time, which is defined as
“current”, will increase). This increased current flow will result in increased power
consumption by the device. Therefore, a CMOS device should be driven at the slowest
possible speed, to minimize power consumption.
An important point with all logic families understands the switching point of the input
signal. For CMOS devices, this is typically 1.4Volts to one half of Vcc. However, it can be at
different levels for different devices. Before using any device, it is important to understand
what the input threshold level is. CMOS can interface directly with most positive logic
technologies, although we must be careful of low voltage logic, to make sure that a high can
be differentiated from a low in all circumstances.
Programming the Atmel AT89Cx051 series of 8051 micro-controllers uses some what
of a different algorithm than what is used for the standard 40-pin devices. The AT89C51
algorithm is actually quite simple to implement. This programmer hardware can also be used
to program AVR 20-pin micro-controllers.
The programming can be described as erasing the control store and then presenting
bytes to the micro-controller and latching it in. After the byte is latched in, the programmer
waits for the byte to be saved into control store before reading it back and incrementing the
AT89Cx051’s program counter to receive the next byte.
To begin the programming cycle, the AT 89C51 is powered up with the Reset and
XTAL1 pins held low. Then, +5V is applied to Reset and the PROG pin. At this point, the
program counter inside the AT89C51 is reset to zero. After power up, the first thing we
should do is a chip erase, to prepare the control store for the next program (all the control
store bytes are loaded with 0FFh). This is accomplished by setting high and to low (this will
be characterized as HLLL to show how the control signals are set) and pulsing PROG low for
at least 10 msec.
With the chip erased, the control store can be programmed. Note that Reset is cycled
between +5V and +12V for writes and reads. This means that the Reset driver has to be a
circuit that can output 0V, 5V, and 12V to the Reset Pin.
The lock bits are used to limit access to the application in control store of a
programmed part. If lock bit 1 is programmed, then the flash control store cannot be updated
until it is erased again. If bit 2 is programmed, the verify fuction (read back) will return
invalid data (this is copy protection for the chip , there is no encryption array in the
AT89Cx51) again until the control store on the chip is erased. For obvious reasons, these two
bits should not be programmed until the application programming is complete.
Often in application programming, there will be gaps in the code, which means there
are areas that are not programmed. The AT89Cx51’s program counter can be incremented (by
pulsing XTAL1) to skip over these areas. To carry this out, the programmer’s control
software will have to keep track of the current value of the program counter as it works
through programming the device.
AT89Cx051
Programmer Circuit:
For many other devices (including the PIC Micro and even the 68HCxx), there are
actually quite a few simple circuits available for simply programming the Micro-controller.
While not attempting to fill the gap, a perfect programmer circuit can be design and it can be
used for all the AT89Cx51 applications.
One nice feature of the programmer is its ability to be used in-circuit, it can be wired
into a prototype circuit and have the AT89Cx051 run without having to pull the chip in an out
of the programmer as circuits are being developed. Another feature is that this circuit could
be used for programming 20-pin Atmel AVR micro-controllers in parallel mode.
The circuit itself is pretty simple and can be blocked out, with the programmer
connected to an IBM –compatible PC via the parallel port. An adaptor with at least 16V
peak-to-peak supplies power. The power circuit provides switched +5 and +12V for the
8051’s Vcc and Reset (0 V, +5 V or +12 V). The programmer control block controls the
power circuit. If Reset is being driven by something other than 0 V, the programmer drivers
are active.
With this circuit, it is found that, when going from +12V to +5V on Reset, 30 micro
sec was needed. If we end up writing our own software for this circuit, we may have to make
sure that we have a long enough delay before attempting to read back what was written.
Going from 0 V to +5V or +12V (or from +5V to +12V) took less than a micro sec.
The programmer control block is used to control the power applied to the device
being programmed as well as to its Reset (as noted in the previous paragraph) and the
programming mode of AT89Cx51. A 74LS374 is used with data being latched in from the
PC’s parallel port. The output of the ‘374 is always enabled, but all the lines going to the
AT89Cx51 (with the exception of the power and Reset, which are independently controlled)
pass through a 74LS244, which allows the AT89Cx51 to be pulled from the circuit without
turning off the power to the programmer.
The ‘244 is also used to pass the RDY/_BSY signal back to the PC to allow the
programmer to poll the RDY/_BSY to determine when the programming operation has
finished.
The PC should have a parallel port capable of bi-directional I/O, and we used a
switch-box dual male DB-25 connector cable. This cable is used for connecting a PC’s
parallel port to a printer sharing switch box. On two of the Db- 25 connectors, each pin is
directly connected (i.e., pin 1 is connected to Pin 1, pin 2 to pin 2, and so on), which makes
wiring to the application easier.
The final circuit probably looks pretty complex; however, by following the nets, we
can find that it’s actually quite simple and easy to understand. What might be surprising is the
component reference numbers (they don’t go in any order in the schematic). They are not in
any kind of logical order because we developed this raw card.
ASSEMBLY LANGUAGE:
Where the “ pay me now, pay me later” rule comes into effect is if we are developing
8051 applications professionally. Spending time on assembly language programming is
probably costing you money over doing it in a high-level language.
For learning the 8051 or any other Micro-controller or computer processor, assembly
language is, as per the author opinion, the best way of doing it. Before going to an
experiment, we will get a good feeling for how the 8051 processes instructions and how it
works.
Assembly language programming is the process of writing code that uses assembler
statement, which are the actual instructions the 8051’s processor executes (the smallest unit
of granularity).
Along with assembler statement, directives are added to the source file to control the
operation of the assembly process. Macros and conditional assembly statements are types of
directives that can help you develop code unique to our application. Macros are labels that
are replaced with code; they’re similar to subroutines, except the subroutine code is copied
directly into the source before the assembly operation. Conditional assembly statements are
“if/else/end if” statements that execute during assembly and, depending on the conditions,
not allow certain sections of code to be assembled.
A completed assembly language source file is assembled into a listing file (showing
how the assembly program converted the source into bits for the processor) and an object, or
hex, file, which are the actual bits and bytes to be burned into the 8051. Assembly language
programming is the lowest form of: “human-readable” source code-processing possible.
Interpreters and compilers take high-level language statements and convert them directly into
processor instructions without the programmer being involved.
Now, if we are well heeled and don’t want to do the drudgery of assembly language
programming, we could buy a compiler, but we will never use the full potential of the 8051.
Knowing and being proficient in assembly language programming will allow us to enhance
our high-level language applications by allowing us to add code that will reduce the number
of cycles required to execute, reduce the number of bytes required for the program, or
enhance the operation of the application.
HARDWARE DETAILS
The IC’s and other important components used in this project work, procured from
the Hyderabad Electronics Market. The details or data sheets of the IC’s are down loaded
from the Internet. The following are the web sites that can be browsed for collecting the data
sheets.
1. www. Texas Instruments.com
2. www. National semiconductors.com
3. www. Fairchild semiconductors.com
The following are the IC’s and other important components used in this project work
POWER SUPPLY:
The required DC levels are derived from the mains supply for this purpose a step-
down transformer of 12V-0-12V center tapped secondary transformer is used. The current
rating of the transformer is 750 ma at secondary. The secondary is rectified and filtered to
generate 12V smooth DC which is un-regulated voltage and which is required to drive the
buzzer and relay. With help of positive voltage regulators, a constant voltage source of +5V
and +9V are derived, for this purpose 7805 and 7809 3Pin Voltage regulators are used so that,
though the mains supply varies from 170V to 250V, the output DC levels remains constant.
The following is the circuit diagram of power supply.
MICROCONTROLLER SOFTWARE
;>
ORG 0000H ;START OF PROG..
LJMP START
START:
MOV P1,#0FFH
MOV P2,#00H
SETB P3.7
MOV P0,#00H
MOV SP,#60H
MOV DSP_C,#00H
MOV TMOD,#01H
MOV IE,#82H
MOV buf1,#0C0H
MOV buf2,#0C0H
MOV buf3,#0C0H
MOV buf4,#0C0H
SETB TR0
MOV R7,#01H
MAIN:
CLR A0 ;\\SELECTING THE VOLTAGE CHANNEL-2\\
SETB A1
CLR A2
LCALL GET_ADC
MOV A,TEMP_ADC
LCALL H_D
LCALL STR_SEG
MOV LV2,DSP2
MOV LV3,DSP3
MOV LV4,DSP4
MOV A,TEMP_ADC
CJNE A,#0F0H,L1
L1: JC li1
setb vvv
ljmp here1
li1: clr vvv
here1:
CLR A0 ;\\SELECTING THE TEMP.. CHANNEL-0\\
CLR A1
CLR A2
LCALL GET_ADC
MOV A,TEMP_ADC
LCALL H_D
LCALL STR_SEG
MOV T2_2,DSP2
MOV T2_3,DSP3
MOV T2_4,DSP4
MOV A,TEMP_ADC
CJNE A,#32H,L8
L8: JC li3
setb ttt2
ljmp here2
li3: clr ttt2
HERE2:
SETB A0 ;\\SELECTING THE CURRENT CHANNEL-1\\
CLR A1
CLR A2
LCALL GET_ADC
MOV A,TEMP_ADC
LCALL H_D
LCALL STR_SEG
MOV CT2,DSP2
MOV CT3,DSP3
MOV CT4,DSP4
MOV A,TEMP_ADC
CJNE A,#64H,LS3
LS3: JC li4
setb ccc1
MOV R7,#03H
ljmp here3
li4: clr ccc1
HERE3:
JB P3.7,LAZ
LCALL DELAY1
INC R7
LAZ: MOV A,R7
CJNE A,#01,LAZ1
MOV BUF1,#0C1H
MOV BUF2,LV2
MOV BUF3,LV3
MOV BUF4,LV4
LAZ1: CJNE A,#00H,LAZ2
LAZ2: CJNE A,#02H,LAZ3
MOV BUF1,#0c6h
MOV BUF2,T2_2
MOV BUF3,T2_3
MOV BUF4,T2_4
LAZ3: CJNE A,#03H,LAZ4
MOV BUF1,#88H
MOV BUF2,CT2
MOV BUF3,CT3
MOV a,CT4
ANL a,#7Fh
mov buf4,a
LAZ4: CJNE A,#04H,LAZ5
MOV R7,#00H
LAZ5: jb vvv,lt1
jb ttt2,lt3
jb ccc1,lt4
clr rly
clr buz
ljmp main
lt1: setb rly
SETB buz
ljmp main
lt3: setb rly
SETB buz
ljmp main
lt4: setb rly
SETB buz
ljmp main
;>
;>
DISPLAY:
MOV A,DSP_C
CJNE A,#00H,H1
MOV P0,BUF4
SETB P2.6
CLR P2.5
CLR P2.4
CLR P2.3
H1: CJNE A,#01H,H2
MOV P0,BUF3
CLR P2.6
SETB P2.5
CLR P2.4
CLR P2.3
H2:CJNE A,#02H,H3
MOV P0,BUF2
CLR P2.6
CLR P2.5
SETB P2.4
CLR P2.3
H3:CJNE A,#03H,H4
MOV P0,BUF1
CLR P2.6
CLR P2.5
CLR P2.4
SETB P2.3
H4:INC DSP_C
MOV A,DSP_C
CJNE A,#04H,H5
MOV DSP_C,#00H
H5:MOV TL0,#00H
MOV TH0,#0F0H
RET
;>
GET_ADC:
SETB ALE
NOP
NOP
SETB SOC
LCALL D1
CLR ALE
NOP
NOP
CLR SOC
EOZ: JB P3.6,EOZ
EOCZ: JNB P3.6,EOCZ
SETB OE
MOV A,P1
MOV TEMP_ADC,A
NOP
NOP
CLR OE
RET
;>
H_D:
CLR A
MOV R0,#00H ;\\STR THE VALUE UPPER\\
MOV R1,#00H ;\\STR VALUE LOWER\\
MOV R2,#00H
MOV R2,TEMP_ADC
MOV A,TEMP_ADC
CJNE A,#00H,Z0
MOV R0,#00H
MOV R1,#00H
RET
Z0: CLR A
LA2: CLR C
INC A
ADD A,#00H
DA A
JNC LA1
INC R0
LA1: DJNZ R2,LA2
MOV R1,A
RET
;>
STR_SEG:
MOV A,R1
ANL A,#0FH
LCALL SEGMNT
MOV DSP2,A
MOV A,R1
ANL A,#0F0H
SWAP A
LCALL SEGMNT
MOV DSP3,A
MOV A,R0
ANL A,#0FH
LCALL SEGMNT
MOV DSP4,A
RET
;>
SEGMNT:
CJNE A,#00H,LA3
MOV A,#ZERO
LA3:CJNE A,#01H,LA4
MOV A,#ONE
LA4:CJNE A,#02H,LA5
MOV A,#TWO
LA5:CJNE A,#03H,LA6
MOV A,#THREE
LA6:CJNE A,#04H,LA7
MOV A,#FOUR
LA7:CJNE A,#05H,LA8
MOV A,#FIVE
LA8:CJNE A,#06H,LA9
MOV A,#SIX
LA9:CJNE A,#07H,LA10
MOV A,#SEVEN
LA10:CJNE A,#08H,LA11
MOV A,#EIGHT
LA11:CJNE A,#09H,LA12
MOV A,#NINE
LA12:RET
;>
D1:
MOV R3,#01H
DJNZ R3,$
RET
;>
DELAY:
MOV R4,#0FFH
DJNZ R4,$
RET
;>
DELAY3:
MOV R4,#30H
Z2: MOV R5,#20H
Z1: MOV R6,#10H
DJNZ R6,$
DJNZ R5,Z1
DJNZ R4,Z2
RET
;>
DELAY1:
MOV R5,#64H
LX1: MOV R6,#54H
DJNZ R6,$
DJNZ R5,LX1
RET
;>
END
COMPUTER SOFTWARE
#include <stdio.h>
#include <dos.h>
#include <bios.h>
#include <conio.h>
#include <graphics.h>
#define LOWER_NIBBLE 3
#define UPPER_NIBBLE 2
#define ADC_CONTROL 1
#define RESET 4
#define HIGH 0xc0
#define STC 0x01
#define ALE 0x02
#define OE 0x04
#define IPRT 0x379
#define OPRT 0x378
#define CPRT 0x37A
char ch;
int maxx, maxy;
int buz_sts;
main()
{
int errorcode,posbak;
int gdriver=DETECT, gmode;
initgraph(&gdriver, &gmode, " "); /* chek path */
errorcode = graphresult();
if (errorcode != grOk)
{
printf("Graphics error: %s\n", grapherrormsg(errorcode));
printf("Press any key to halt:");
getch();
exit(1); /* terminate with an error code */
}
maxx = getmaxx();
maxy = getmaxy();
print();
show();
setcolor(CYAN);
rectangle(6,6,maxx-6,maxy-6);
setcolor(LIGHTCYAN);
rectangle(7,7,maxx-7,maxy-7);
setcolor(BLACK);
rectangle(8,8,maxx-8,maxy-8);
setcolor(LIGHTCYAN);
rectangle(9,9,maxx-9,maxy-9);
setcolor(CYAN);
rectangle(10,10,maxx-10,maxy-10);
setcolor(RED);
rectangle(100, 400, maxx-100, maxy-200);
setcolor(LIGHTRED);
rectangle(101, 401, maxx-101, maxy-201);
setcolor(YELLOW);
rectangle(102, 402, maxx-102, maxy-202);
setcolor(LIGHTRED);
rectangle(103, 403, maxx-103, maxy-203);
setcolor(RED);
rectangle(104, 404, maxx-104, maxy-204);
setcolor(RED);
rectangle(105, 405, maxx-105, maxy-205);
setcolor(LIGHTRED);
rectangle(106, 406, maxx-106, maxy-206);
setcolor(YELLOW);
rectangle(107, 407, maxx-107, maxy-207);
setcolor(LIGHTRED);
rectangle(108, 408, maxx-108, maxy-208);
setcolor(RED);
rectangle(109, 409, maxx-109, maxy-209);
}
void show()
{
settextstyle(1,0,1);
setcolor(LIGHTRED);
outtextxy(maxx-(maxx-200),maxy-(maxy-40),"PC BASED SCADA
MONITERING");
setcolor(7);
line(200,62,465,62);
setcolor(7);
line(200,64,465,64);
void rdadc()
{
int temp;
int ct1, ct2 = 0,ct3=0;
int VOLT = 0;
float x1, y1;
float t2;
strt: while(!kbhit())
{
flushall();
VOLT = read_ADC(0);
x1 = VOLT * 5;
y1 = x1 / 255;
setcolor(WHITE);
gotoxy(13, 8);printf("Input voltage = %.1f volts",y1);
//delay(10);
if(y1 <= 0.4 )
{
buz_sts = 0;
gotoxy(30,19);printf(" ");
gotoxy(30,22);printf(" SYSTEM NORMAL CONDITION
");
delay(10);
}
else
{
// gotoxy(30,19);printf(" SYSTEM ABNORMAL CONDITION ");
if((y1 >= 0.8) && (y1 <= 1.5))
{
if (ct2 >= 8)
{
buz_sts = 0xC0;
gotoxy(30,22);printf(" SYSTEM OVERLOAD
");
delay(10);
ct2=0;
}
ct2++;
}
if(y1>=4.8 )
{
buz_sts = 0;
gotoxy(30,19);printf(" ");
gotoxy(30,22);printf(" SYSTEM DISCONECT ");
delay(1);
}
ch=bioskey(0);
if(ch!='x'&&ch!='X')goto strt;
}
int read_ADC(int cnt)
{
int temp, ct1;
temp= cnt<<3;
}
int send_byte(int addr,int dat)
{
int x;
outp(OPRT,dat);
delay(1);
outp(CPRT,addr);
delay(1);
outp(CPRT,RESET);
delay(1);
}
int read_sts()
{
int lb;
lb=inp(IPRT);
delay(1);
return ((lb&0x08)>>3);
}
FABRICATION DETAILS
The fabrication of one demonstration unit is carried out in the following sequence:
1. Finalizing the total circuit diagram, listing out the components and their sources of
procurement.
2. Procuring the components, testing the components and screening the components.
3. Making layout, preparing the inter connection diagram as per the circuit diagram,
preparing the drilling details, cutting the laminate to the required size.
4. Drilling the holes on the board as per the component layout, painting the tracks on the
board as per inter connection diagram.
5. Etching the board to remove the un-wanted copper other than track portion. Then
cleaning the board with water, and solder coating the copper tracks to protect the tracks
from rusting or oxidation due to moisture.
6. Assembling the components as per the component layout and circuit diagram and
soldering components.
7. Integrating the total unit inter wiring the unit and final testing the unit.
8. Keeping the unit ready for demonstration.
The Basic raw material in the manufacture of PCB is copper cladded laminate. The laminate
consists of two or more layers insulating reinforced materials bonded together under heat and
pressure by thermo setting resins used are phenolic or epoxy. The reinforced materials used are
electrical grade paper or woven glass cloth. The laminates are manufactured by impregnating thin
sheets of reinforced materials (woven glass cloth or electrical grade paper) with the required resin
(Phenolic or epoxy). The laminates are divided into various grades by National Electrical
Manufacturers association (NEMA). The nominal overall thickness of laminate normally used in
PCB industry is 1.6mm with copper cladding on one or two sides. The copper foil thickness is 35
Microns (0.035mm) OR 70 Microns (0.070 mm).
The next stage in PCB fabrication is artwork preparation. The artwork (Mater drawing) is
essentially a manufacturing tool used in the fabrication of PCB’s. It defines the pattern to be
generated on the board. Since the artwork is the first of many process steps in the Fabrication of
PCBs. It must be very accurately drawn. The accuracy of the finished board depends on the
accuracy of artwork. Normally, in industrial applications the artwork is drawn on an enlarged scale
and photographically reduced to required size. It is not only easy to draw the enlarged dimensions
but also the errors in the artwork correspondingly get reduced during photo reduction. For ordinary
application of simple single sided boards artwork is made on ivory art paper using drafting aids.
After taping on a art paper and phototraphy (Making the –ve) the image of the photo given is
transformed on silk screen for screen printing. After drying the paint, the etching process is carried
out. This is done after drilling of the holes on the laminate as per the components layout. The
etching is the process of chemically removing un-wanted copper from the board.
The next stage after PCB fabrication is solder masking the board to prevent the tracks from
corrosion and rust formation. Then the components will be assembled on the board as per the
component layout.
The next stage after assembling is the soldering the components. The soldering may be
defined as process where in joining between metal parts is produced by heating to suitable
temperatures using non-ferrous filler metals has melting temperatures below the melting
temperatures of the metals to be joined. This non-ferrous intermediate metal is called solder. The
solders are the alloys of lead and tin.
REFERENCES:
The following are the references made during the development of this project
work.
Text Books:
(1) Linear Integrated Circuits – : D. Roy Choudhury, Shail Jain
(2) Power Electronics - By: SEN
(3) Relays and their applications - By: M.C.SHARMA
(4) Op-Amps Hand Book - By: MALVIND
(5) Mechanical and Industrial Measurements - By: R.K. Jain
(6) Computer Controlled System - By: Karl J.ASTROM
(7) Programming and Customizing the 8051 Micro-controller
- By: Myke Predko
(8) The concepts and Features of Micro-controllers - By: Raj Kamal
(9) C++ An Introduction to Programming -
By: JESSE LIBERTY . JIM KEOGH
(10) ‘C’ ALL Clear - By: RAVINDRA
(11) Basic Radio and Television. BY: S.P. SHARMA
(12) Fundamentals of Radio Communication BY: A. SHEINGOLD
(13) The IC 555 Timer applications source book
By: HOWARD M.BERLIN
Catalogs :
(1) TEXAS - LINEAR IC’s manual
(2) SIGNETICS - DIGITAL IC’s manual
Journals:
(1) Electronic Design (2) Electronics for you
(3) Electronics Text. (4) Practical Electronics
COMPLETE CIRCUIT DIAGRAM WITH LIST OF COMPONENTS