0% found this document useful (0 votes)
37 views

Unit 2 - Microprocessor

The document discusses different methods for measuring electrical quantities like DC voltage, AC voltage, DC current, AC current, and temperature using a microprocessor. It describes the components and circuits used for measurement and conversion of analog signals to digital signals readable by the microprocessor, and provides examples of programs and look-up tables that could be used.

Uploaded by

senthil
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views

Unit 2 - Microprocessor

The document discusses different methods for measuring electrical quantities like DC voltage, AC voltage, DC current, AC current, and temperature using a microprocessor. It describes the components and circuits used for measurement and conversion of analog signals to digital signals readable by the microprocessor, and provides examples of programs and look-up tables that could be used.

Uploaded by

senthil
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

MICROPROCESSOR 8085 &

MICROCONTROLLER 8051
Measurement of DC Voltage

• 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 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.
• For satisfactory operation of peak detector circuit, the charging and discharging time constant must follow
the given condition.
CRD ≤ CRL
where,
CRD – charging time constant, CRL – discharging time constant, RD – resistance of forward bias diode,
RL – load resistance
• 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 below Fig.
• In this Measurement of Electrical Quantities section,
the program for dc voltage measurement in the range
of 0 to 5 V has been incorporated and displayed in the
mV range. Therefore, 0000 will be displayed for 0 V
and similarly 5000 will be displayed at 5 V dc input
voltage. While writing the program, the given steps are
followed for dc voltage measurement:
 Convert analog input voltage into digital form and store
in memory location
 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 x 2 + Initial address
 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.
• To measure 0 to 5 V dc, the A/D converter IC operates in unipolar mode and the digital equivalent value of 0-5 V
will be 00H to 80H.
• 00H is equivalent to 0 V and 80H is equivalent to 5 V.
• When an analog input voltage is converted to a digital equivalent by the A/D converter then the microprocessor
reads a digital equivalent voltage.
• The look-up table or multiplication factor will be used for calibration of digital equivalent voltage to display. The
resolution of 8-bit 0-5 V ADC is 20 mV.
• Then relationship between analog input voltage and hex output is

where, X is the decimal equivalent of a hex number.


• Two I/O ports, 8255-1 and 8255-2, are used for measurement of dc voltage.
• Port A and Port C of 8255-1 are used for ADC interfacing, and Port A and Port B of 8255-2 are used for display
interface.
• Assume Port A, and Port C upper of 8255-1 operate as input ports, and Port B and Port C lower as output
ports.
• It is also assumed that all ports of 8255-2 operate as output ports.
• The control word of 8255-1 is 98H and the control word of 8255-2 is 80H.
Measurement of AC Voltage
• 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. Then the diode can operate in ideal mode with zero cut-in voltage.
• If a conventional diode is used in feedback path of operational amplifier, high-frequency milivolt can be
rectified. This rectifier is known as precision rectifier. There are two types of precision rectifiers such as half-
wave rectifier and full-wave rectifier.
• The magnitude of ac voltage changes with time. So a sample hold circuit is required to maintain analog voltage
during the A/D conversion process.
• A bi-directional A/D converter must be used to measure positive as well as negative voltage to display the
instantaneous value of analog ac voltage.
• To measure the average as well as rms value of ac voltage, a precision rectifier is used to convert ac voltage to
dc.
• Then measure the dc voltage with the help of an A/D converter, 8255 and microprocessor and after proper
calibration it will be displayed in the address field of the microprocessor or in the seven-segment display.
• A similar process will be followed for writing program to measure the ac voltage.
• To measure high voltage, a Potential Transformer (PT) is required. The primary of PT is connected to high-
voltage supply and the output from PT secondary winding is fed to precision rectifier.
Measurement of AC Current
• In this Measurement of Electrical
Quantities, 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 periph-
eral interface IC.
• Current flow through the RS resistance is
zero as operational amplifier is virtually
grounded.
• Therefore, I2 current flows through resis-
tance R2 and output voltage is equal to V0 = -
I2R2.
• 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 is V1,
output voltage will be equal to V0 = – R2/R1
V1.
• 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.
• In the look-up table for each digital input signal due to corresponding input, current calibrated data must be
stored in two successive memory locations as given in Table 10.4.
• In ac current measurement, a Current Transformer (CT) may replace the sensor resistance. The current
transformer (CT) or a core-balanced transformer should be connected with a burden as depicted in Fig. 10.17. The
output signal in the voltage drop across the secondary of CT or burden resistance is applied to an A/D converter
through precision rectifier and peak detector circuit. Then the microprocessor measures analog voltage and displays
it in seven-segment display units.
• For dc current measurement, assume R = 0.1 Ω and maximum current I = 5 A. Then IR drop = 0.5 V. If an amplifier
is used to increase voltage with a gain = 10, output voltage will be 5 V. Subsequently, the look-up table for voltage
measurement can be used and current displayed in mill-amperes.
• In ac current measurement assume CT ratio = 10 : 1, and primary current IP = 10 A. Then current flow through
secondary IS = 1 A, and voltage across resistance VR = 0.1 V. Two amplifiers circuits will be used to produce 5 V
output. Gain of the first-stage amplifier is 10 and the second-stage amplifier gain is 5. Here full-scale analog voltage
is 5 V for 10 A current and its digital equivalent output is 80H. The program for voltage can be used in this case but
the look-up table must be modified. The modified look-up table is given below:
Temperature Measurement
• Temperature is widely measured and controlled in industrial process control system. For temperature measure-
ment, one of the following devices are used:

• 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.
• 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.
• 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.
• 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.
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

where, ΔL = L2-L1 change in length.

• 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 Fig. 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. That is, the conductor is not compressible.
• The resistance of a conductor is

where, L is its length, A is its area, and ρ is its resistivity.

You might also like