Download as pdf or txt
Download as pdf or txt
You are on page 1of 38

Application of 8085 Microprocessor

The advantages of microprocessor-based design of a system are given below:


• The manufacturing costs of the electronic products are generally lower, but the
typical microprocessor- based designs cost 60 to 20 per cent of their TTL
implementation costs.
• The time and cost for the original development can be substantially lowered. Due
to applications of microprocessors, the design time can be reduced by about two
thirds. Presently, numbers of software are available to design a prototype system
before implementation of the final product. Therefore, the design cycle will continue
to decrease.
• Consequently, microprocessor-based products can be brought to the market very
early as per consumer requirement.
• Microprocessor-based products have many complex functional capabilities and
these products can be provided at reasonable cost. Therefore, the realization of better
products for the same or lower prices are possible.
• The smaller number of components in a microprocessor system increase the
reliability of the final product.
Speed Control of DC Motor
The speed of a dc motor can be controlled by varying the duty cycle of the transistor.
Each duty cycle has a definite ON time and OFF time.

When the transistor is ON, the voltage applied across the armature of a dc motor and
motor accelerates. If the transistor is OFF, no voltage across the dc motor and motor
decelerates.

While ON and OFF of transistor cycle is repeated continuously at a fixed frequency,


the motor will run at a definite constant speed as fixed average voltage is applied.
But motor instantaneous speed will be variable due to voltage or load fluctuation.
Speed Control of DC Motor
Assume motor load torque is constant and ON or OFF period of the armature voltage
remains constant. If Ton and Toff are the on-period and off-period of the transistor
respectively, the duty ratio, δ can be expressed as

The speed of a dc motor is directly proportional to the average voltage applied across
armature. Therefore, speed will be changed with variation in duration of on- or off-
period of the armature voltage.
Speed Control of DC Motor
The dc motor speed can be controlled either open loop or closed loop.
The open speed control of the dc motor is shown in Figure. In open-loop control
strategy, the pulse duration generated by the microprocessor is fixed.
But in closed-loop control, the microprocessor generates pulse, which will be
controlled by using software. In this method, the speed of the dc motor can be
controlled.
Speed Control of DC Motor
The schematic block diagram of the closed-loop speed control of a dc motor is
shown in Figure. In this control scheme, by controlling the turn-on period of the
supply voltage the average armature voltage can be controlled.
Speed Control of DC Motor
The microprocessor-based controller is used to generate the controllable pulse and
the program of the dc motor closed loop speed control can be developed by the
following steps.
Step 1 Initialize Port A as input port and Port B and Port C as output ports.
Step 2 Initialize the on time delay (Ton) in register pair or memory location.
Initialize the off time delay (Toff) in the register pair or memory location. Initialize C
register as counter.
Step 3 Send 1 high to Port B0 and call ON time delay subroutine to execute time
delay program.
Step 4 Send 0 low to Port B0 and call OFF time delay subroutine to execute time
delay program.
Step 5 Decrement D register. If D ! 0, repeat steps 3 to 5 for initial starting of dc
motor.
Step 6 When the dc motor is rotating at a certain speed, tacho-generator generates dc
voltage, which is fed to ADC for analog to digital conversion.
Speed Control of DC Motor
Step 7 The microprocessor reads the ADC output and subtracts or compare from a
reference input corresponding to speed. If the output speed is less than the reference
speed, increase in time is by a very small duration or is proportionate to error in
speed. This is done through incrementing the content of on time delay register. When
output is more than reference, decrease in time is by small duration or proportionate
to difference between reference and actual.
Step 8 Load C register with a count value.
Step 9 Send 1 PB0 and call for on time delay subroutine with new on time delay.
Step 10 Send 0 to PB0 and call for the off time delay which is not changed or
remains unchanged.
Step 11 Decrement C register. If not equal to zero, repeat steps 9 to 11.
Step 12 Jump to Step 7 and repeat the process.
Speed Control of DC Motor
The output voltage waveform at specified Ton and Toff is shown in Figure.
Program for DC Motor Control (Open-Loop)
Program for speed control for DC Motor (closed-loop)
Program for speed control for DC Motor (closed-loop)
Program for speed control for DC Motor (closed-loop)
Microprocessor based Data Acquisition System
Microprocessor based Data Acquisition System
Measurement of Physical Quantities
Nowadays, physical quantities such as force, displacement, acceleration, velocity,
speed, temperature, pressure, flow and level, etc., are measured and displayed using
microprocessors and interfacing devices in industry.

For the measurement of any physical quantity, transducers are used to convert energy
from motion, displacement, acceleration, velocity, flow, pressure, level, heat, light,
sound and any other physical quantities into electrical energy.

A transducer consists of sensor and signal conditioning circuit. Most commonly used
transducers are potentiometers, capacitive and inductive transducers, level transducers,
strain gauge, accelerometer, Linear Variable Differential Transformer (LVDT),
piezoelectric crystals and diaphragm, etc.

Electrical output of a transducer is very small and it is not in measurable condition;


therefore it should be amplified by using amplifiers.
Microprocessor based Data Acquisition System
Measurement of Physical Quantities
Figure shows the schematic block diagram of a physical quantity measurement.

The output electrical signal from transducer is fed to an A/D converter, which converts
analog signal to digital form and then applies to the 8085 microprocessor through
8255 PPI.

The 8085 microprocessor reads this digital data and displays it in seven-segment
display. When it is required to measure and display more than one physical quantity, a
multiplexer should be incorporated in between transducers and the A/D converter.
Microprocessor based Data Acquisition System
Temperature Measurement
Temperature is widely measured and controlled in industrial process control system.
For temperature measurement, one of the following devices are used:

(a) Typical Platinum


Resistance thermometers
(b) Disk thermistor
(c) Threaded thermistor
(d) Sheathed PRT
Microprocessor based Data Acquisition System
Temperature Measurement
Platinum wires are frequently used in resistance thermometers for industrial
application because of their greater resolution, and mechanical and electrical stability
as compared to copper or nickel wires.
A change in temperature causes a change in resistance. The resistance thermometer is
placed in an arm of a Wheatstone bridge to get a voltage proportional to temperature.

A thermistor is a semiconductor device fabricated from a sintered mixture of metal


alloys, having a large negative temperature coefficient. A thermistor is used in a
Wheatstone bridge to get a voltage proportional to temperature. The thermistor is a
thermally sensitive variable resistor made of semiconductor material.

The substance used may be oxides of nickel, copper, manganese, iron, cobalt, etc.,
usually a high negative temperature coefficient. It can be used in the range of –100 to
+100° C for greater accuracy as compared to a platinum resistance thermometer.
Positive thermistors are also used but in the low range of 50°C to + 100°C.
Microprocessor based Data Acquisition System
Temperature Measurement
A thermocouple is used as a sensor for temperature measurement. The output of a
thermocouple is directly proportional to the furnace temperature, which is in millivolt
range.
As output voltage is not in a measurable condition, it must be amplified using an
instrumentation amplifier. The amplified voltage is applied to an A/D converter.

The microprocessor sends a start of conversion signal to the A/D converter through
the port of 8255 PPI. When an A/D converter completes conversion, it sends an end-
of-conversional signal to the microprocessor. Having received an end-of-conversion
signal from the A/D converter, the microprocessor reads the output of the A/D
converter, which is a digital quantity proportional to the temperature to be measured.
Then the microprocessor displays the measured temperature.
Microprocessor based Data Acquisition System
Temperature Measurement
In industry, the most widely used temperature transducer is the thermocouple.
This temperature transducer works on the principle that contact potential between two
dissimilar metals changes with temperature.
When two dissimilar metals are joined and the junctions are placed at two different
temperatures, an emf is induced which will be used for temperature measurement.
Thermocouple materials for different ranges of temperature are given below:
Microprocessor based Data Acquisition System
Strain Measurement
Strain is the change in shape of an object due to some force. Assume an object in two
conditions: with and without a force applied. When an external force is applied along
a dimension, there will be some deformation in the object.

Let L1 be the length of the object along the dimension when no force is applied and
L2 be the length when the force is applied. Then the object’s strain is
Microprocessor based Data Acquisition System
Strain Measurement
A stain transducer is used for strain measurement. Strain gauge is a stain transducer
and is used to measure strains and stresses in any structures.
A strain gauge is a flexible card with strip of some copper–nickel alloy conductor
wires arranged in special pattern as shown in Figure. The grids of fine wires forming a
strain gauge are cemented to a thin paper membrane. The strain gauge is mounted on
the object being measured.
A strain-gauge conductor is usually made of metal or semiconductor. The pattern is
chosen in such a way that the conductor maintains an almost constant volume with
strain.
Microprocessor based Data Acquisition System
Strain Measurement
The resistance of a conductor is R = ρ (L/A), where L is its length, A is its area, and ρ
is its resistivity.

Assume force causes length of the conductor to decrease. Since volume does not
change much, area must increase. Thus, resistance decreases.
The model function of resistance is equal to R1 = R0 (1 + Gfε) where Gf is a constant
and known as the gauge factor which is the ratio

and may be considered as the sensitivity of the sensor, R0 is resistance without strain,
R1 is resistance due to strain, and f is strain.

The sensitivity of a strain gauge is very low which is approximately 1% over full
operating range. But it is very important that the above change must be accurately
detected.
Microprocessor based Data Acquisition System
Strain Measurement

The sensor bridge usually consists of four


identical sensor elements. Assume that only
one of these is sensitive to the strain, which can
be measured, and other sensors are ‘dummy’
sensors.
For example, for a maximum of 1% change in
resistance, the output voltage is about
0.0025VB. This is approximately 2.5 mV for a
10 V supply. Therefore, the range of V0 in this
case is 0–2.5 mV.
Microprocessor based Data Acquisition System
Strain Measurement

In some cases, the strain in two places on the object will be of equal magnitude but of
opposite sign. For example, a cantilever beam is as shown in Figure.
The upper part of the beam is stretched (positive strain) and the lower part of the beam
is compressed (negative strain). The two strain gauges, therefore, form complementary
pairs.
Microprocessor based Data Acquisition System
Strain Measurement
Figure shows the block diagram for strain measurement when two gauges are mounted
to a cantilever beam.
Due to change in resistance, bridge output voltage changes and its magnitude is
directly proportional to strain. Then output of the bridge is fed to a instrumentation
amplifier and amplified to a certain voltage in the range of 0–5 V so that it can be
processed by the microprocessor. Output is 0 V for no strain and 5 V for the maximum
strain.
When four strain gauges are mounted in a cantilever beam, the output voltage
increases two times. A look-up table between the hex code of digital voltage and strain
is stored in memory. After converting the analog voltage into digital form through an
A/D converter, find the strain from the look-up table and display it in seven-segment
display unit.
Measurement of Electrical Quantities
Voltage Measurement
Figure shows the schematic block diagram of dc voltage measurement.
Firstly, the dc voltage is applied to the peak detector circuit to detect the peak value of
dc voltage when the dc voltage varies instantaneously.
Usually, the average and rms values of input voltage are directly proportional to peak
of dc voltage.

When input voltage is positive, output of the peak detector


operational amplifier drives the diode D, and the
capacitor C will be charged to the positive peak
value of dc input voltage. In this circuit, when
the diode D is forward bias, operational
amplifier operates as a voltage follower. If input
voltage becomes negative, the diode D is
reverse biased and voltage across the capacitor
C will be retained as the capacitor discharges
through resistance RL only.
Measurement of Electrical Quantities
Voltage Measurement
The output of the peak detector
circuit is fed to the A/D converter.
Subsequently, analog dc voltage
is applied to the analog input
terminal of the A/D converter.
The output of the A/D converter
is digital equivalent to the analog
input voltage.
The outputs of the A/D converter
are connected to the I/O ports of
8255 and the microprocessor can
read this digital output of ADC
through 8255 and transfer the
digital data to the accumulator.
ADC interfacing with 8255 and
the microprocessor is illustrated
in Fig.
Measurement of Electrical Quantities
Voltage Measurement
For writing the program, the given steps are followed for dc voltage measurement:
1. Convert analog input voltage into digital form and store in memory location
2. Find the memory location of the look-up table where the calibrated data of digital
equivalent voltage is stored. The address is calculated from the following expressions.
Actual address = Hex code of analog input voltage × 2 + Initial address
3. Call data stored in the two consecutive memory locations and display in the address
field of the microprocessor kit or in the seven-segment display.
Measurement of Electrical Quantities
Voltage Measurement
Measurement of Electrical Quantities
Voltage Measurement
The schematic block diagram of ac voltage measurement (peak value) is illustrated in
Fig.
A rectifier is used to convert ac voltage into dc voltage. Therefore, rectifier output is a
dc voltage source, which can be represented as constant voltage source in series with a
resistance.
In a microprocessor-based system, it is necessary to rectify millivolt high-frequency
signal. When conventional diodes are used in a rectifier circuit, there is always some
voltage drop across forward bias diode 0.2 V for Ge diode and 0.7 V for Si diode, so
that a milivolt signal cannot be able to forward bias the conventional diode.

The switching speed of a conventional diode is also low. If a diode is used in the
forward path of an operational amplifier, cut-in-voltage of diode will be divided by the
open-loop gain, which is very large in an operational amplifier.
Measurement of Electrical Quantities
Current Measurement
In current measurement, firstly the current must be converted into voltage using I to V
converter and then voltage is measured by the microprocessor with the help of an A/D
converter and 8255 programmable peripheral interface IC.

Figure shows the dc current-to-voltage


converter circuit.
Current flow through the RS resistance is zero
as operational amplifier is virtually grounded.

Therefore, I2 current flows through resistance


R2 and output voltage is equal to V0 = –I2R2.
Measurement of Electrical Quantities
Current Measurement
The ac current-to-voltage converter circuit using Current Transformer (CT) and
operational amplifier is depicted in Fig.
If output voltage at secondary of (CT) isV1, output voltage will be equal to Vo =-
(R2/R1)V1
Measurement of Electrical Quantities
Current Measurement
Figure shows the current measurement of a dc motor. For the measurement of current,
the current signal is converted to voltage signal. A very low resistance of
approximately 0.1 ohms may be connected in series with the load. Then voltage across
the resistance should be equal to 0.1 times of load current (I). After amplifying by ten
times, the amplifier output voltage must be equal to the current. Then output analog
voltage is applied to the input of the peak detector circuit so that it can deliver 5 volts
when 5 A current flows though the circuit. Thereafter, by measuring voltage, we can
measure analog input current in digital form. The program for voltage measurement
may be used in current measurement also. But there will be some changes in the look-
up table.
Measurement of Electrical Quantities
Power Factor Measurement
The current waveform is either lag or lead from the voltage waveform by a phase
angle (z). The power factor is a cosine of phase angle i.e., cos z.
Therefore, the power factor will be either lagging or leading. Figure shows the
schematic block diagram interface for frequency measurement.
Measurement of Electrical Quantities
Power Factor Measurement
To measure the power factor, first of all phase angle is measured.
After measuring phase angle, the power factor can be measured. Generally, the phase
angle is well-known in terms of count value.
Therefore digital value of the counter can be converted into power factor with the help
of a look-up table and displayed in seven-segment display.
Actually, the look-up table is the relationship between the count value and power
factor and it is used for better accuracy and simplification of program.
Measurement of Electrical Quantities
Power Measurement
To find the power consumption in a circuit, the power is calculated from the
expression
P = VI cos φ when the voltage and current waveforms are sinusoidal.
Usually, the instantaneous value of the voltage is V cos φ when current reaches the
peak.
To get a pulse at the moment of peak current, a phase shifter and zero-cross detector
are generally used.
Firstly, the current signal is fed to the phase shifter to obtain a 90° phase shift. After
that the output of the phase shifter is applied to the zero-cross detector.
The microprocessor detects the rising edge of ZCD square wave output, the
microprocessor generates a sample and hold signal so that V cos φ voltage is applied
to A/D converter.
At this instant, the microprocessor sends a command to the multiplexer to select
Channel 1, and the instantaneous value of the voltage V cos φ is fed to an A/D digital
converter.
Then the A/D converter converts V cos φ into its digital equivalent value and stores in
memory location.
Measurement of Electrical Quantities
Power Measurement
Reactive power can be expressed as

To measure the reactive power, initially V sin φ and I are measured by microprocessor
and then VI sin φ is determined.
At the instant of zero current, the instantaneous value of the voltage is V sin φ. To
detect the instant of zero current, current signal is fed to ZCD and converted into
square wave.
The microprocessor reads and examines the ZCD output to detect the rising edge of
square wave. When the microprocessor detects the rising edge of ZCD square wave,
the microprocessor generates a sample and hold signal so that V sinφ voltage is
applied to an A/D converter.
At this instant the microprocessor also sends a command to the multiplexer to select
Channel 2 and the instantaneous value of the voltage, V sinφ is fed to an A/D digital
converter.
A/D converter converts V sinφ into digital equivalent value. Afterwards, the current is
also converted into digital form using the same A/D converter.
Subsequently, call the multiplication subroutine to determine the VI sinφ ratio and
display the reactance value in seven-segment display.

You might also like