Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
MEASUREMENT SET UP
A PROJECT REPORT
Submitted by
ARUN KUMAR.S
(105914144005)
RAJESH KUMAR.M
(105914144039)
RAJSHEKAR.S
(105914144040)
SEENIVASAGAN.R
(105914144046)
BACHELOR OF ENGINEERING
IN
MECHANICAL ENGINEERING
SIGNATURE
SIGNATURE
T.KATHIRAVAN B.E
SUPERVISOR
Assistant professor
Mechanical Engineering
Mechanical Engineering
Madurai- 625020.
Madurai- 625020.
INTERNAL EXAMINER
EXTERNAL EXAMINER
3
ACKNOWLEDGEMENT
ABSTRACT
This project can be used for measuring, controlling and acquisition of the
temperatures in the engineering systems. The project is used mainly to observe the
source temperature by sensor and to generate graph between temperature and time
by using the program in the microcontroller. Graphs can be drawn between a
temperature and time. The graph can be used for knowing the deviations.
The acquisited data in the project can be used for controlling the temperature
and its deviation in the IC engines, Boilers, and other engineering equipments.
TABLE OF CONTENTS
CHAPTER NO
PAGE NO.
TITLE
ABSTRACT
iv
LIST OF TABLES
viii
LIST OF FIGURES
ix
1.
2.
INTRODUCTION
1.1 Temperature
SENSOR
4
2.1 Sensor
2.6 Function
3.
10
11
12
2.10 Construction
12
13
2.12 Applications
13
2.13 History
13
15
20
21
4.
5.
and working
21
25
27
4.1 PIC16F877A
28
4.2 RS232
30
GRAPHICAL DISPLAY
36
5.1 Graphical LCD 128*64
5.2 Interfacing of 16F877A with 128*64
7
37
Graphical Display
6.
PROCEDURE
37
42
6.1 Procedure
43
COST ESTIMATION
44
CONCLUSION
45
LIST OF TABLES
PAGE NO
TABLE 4.1.1
FEATURES OF PIC16F877A
29
TABLE 4.2.1
SIGNALS IN RS232
33
TABLE 4.2.2
PIN ASSIGNMENTS
33
LIST OF FIGURES
PAGENO
FIG 2.10.1
CONSTRUCTION OF RTD
12
FIG 2.14.1
Pt100 SENSOR
16
FIG 3.2.1
24
FIG 3.3.1
TEMPERATURE READER
(CONTROLLER)
26
FIG 4.1.1
PIC16F877A
30
FIG 4.2.1
RS232 CABLE
35
FIG 5.1.1
37
FIG5.2.1
FIG 6.1
41
10
43
CHAPTER1
INTRODUCTION
1
1.1 Temperature:
Temperature is a physical quantity that is a measure of hotness and coldness
on a numerical scale. It is a measure of the thermal energy per particle of matter or
radiation; it is measured by a thermometer, which may be calibrated in any of
various
temperature
scales:
Celsius,
Fahrenheit,
Kelvin,
etc.
(very
briefly!)
as
hot
as
the
Sun.
said
to
be
in
thermal
equilibrium.
CHAPTER 2
SENSOR
2.1 Sensor:
A sensor (also called detector) is a converter that measures a physical
quantity and converts it into a signal which can be read by an observer or by an
(today
mostly
electronic)
instrument.
For
example,
a mercury-in-glass
The sensitivity is then defined as the ratio between output signal and
measured property. For example, if a sensor measures temperature and has a
voltage output, the sensitivity is a constant with the unit [V/K]; this sensor is linear
because the ratio is constant at all points of measurement.
2.2 Sensor deviations:
If the sensor is not ideal, several types of deviations can be observed:
1)
2)
3)
4)
5)
6)
7)
8)
9)
Sensitivity error
An offset or bias.
Non linearity.
Dynamic error.
Drift (telecommunication).
Long term drift
Noise
Hysteresis
Aliasing errors.
thermometers,
also
called resistance
temperature
temperature
becomes
very
non-linear
at
temperatures
over
572 F
temperature-to-electrical
resistance
relationship
for
platinum
resistance
thermometers is IEC 60751:2008, ASTM E1137 is also used in the United States.
By far the most common devices used in industry have a nominal resistance of
100 ohms at 0 C, and are called Pt100 sensors ('Pt' is the symbol for platinum).
The sensitivity of a standard 100 ohm sensor is a nominal 0.385 ohm/C. RTDs
with a sensitivity of 0.375 and 0.392 ohm/C as well as a variety of others are also
available.
2.6 Function:
Resistance thermometers are constructed in a number of forms and offer
greater stability, accuracy and repeatability in some cases than thermocouples.
While thermocouples use the Seebeck effect to generate a voltage, resistance
thermometers use electrical resistance and require a power source to operate. The
resistance ideally varies linearly with temperature.
The two most common ways of measuring industrial temperatures are with
resistance temperature detectors (RTDs) and thermocouples. Choice between them
is usually determined by four factors.
1)
2)
3)
4)
Temperature
Response time
Size
Accuracy and stability requirements
2.10 Construction:
Wiring configurations:
Two-wire configuration
Three-wire configuration
Four-wire configuration
12
13
RT = R0 [1+AT+BT2+CT3(T-100)] (-200C<T<0C)
RT = R0 [1+AT+BT2] (0C<T<850C)
Here,
A=3.9083*10-3C-1
B=-5.775*10-7C-2
C=-4.183*10-12C-4
Since the B and C coefficients are relatively small, the resistance changes
almost linearly with the temperature.
14
the
resistance
A=3.9083E-3
B =-5.775E-7
15
at
0C,
and
C =-4.183E-12(below0C),
or
C = 0 (above 0 C)
For a PT100 sensor, a 1 C temperature change will cause a 0.384 ohm
change in resistance, so even a small error in measurement of the resistance (for
example, the resistance of the wires leading to the sensor) can cause a large error in
the measurement of the temperature. For precision work, sensors have four wirestwo to carry the sense current, and two to measure the voltage across the sensor
element. It is also possible to obtain three-wire sensors, although these operate on
the (not necessarily valid) assumption that the resistance of each of the three wires
is the same.
The current through the sensor will cause some heating: for example, a sense
current of 1 mA through a 100 ohm resistor will generate 100 W of heat. If the
sensor element is unable to dissipate this heat, it will report an artificially high
temperature. This effect can be reduced by either using a large sensor element, or
by making sure that it is in good thermal contact with its environment.
For example, a 100 V voltage measurement error will give a 0.4 C error in
the temperature reading. Similarly, a 1 A error in the sense current will give 0.4
C temperature error.
Because of the low signal levels, it is important to keep any cables away
from electric cables, motors, switchgear and other devices that may emit electrical
noise. Using screened cable, with the screen grounded at one end, may help to
reduce interference. When using long cables, it is necessary to check that the
measuring equipment is capable of handling the resistance of the cables. Most
equipment can cope with up to 100 ohms per core.
16
The type of probe and cable should be chosen carefully to suit the
application. The main issues are the temperature range and exposure to fluids
(corrosive or conductive) or metals. Clearly, normal solder junctions on cables
should not be used at temperatures above about 170 C.
Sensor manufacturers offer a wide range of sensors that comply with
BS1904 class B (DIN 43760): these sensors offer an accuracy of 0.3 C at 0 C.
For increased accuracy, BS1904 class A (0.15 C) or tenthDIN sensors (0.03
C). Companies like Isotech can provide standards with 0.001 C accuracy. Please
note that these accuracy specifications relate to the SENSOR ONLY: it is necessary
to add on any error in the measuring system as well.
The function for temperature value acquisition (C++):
The following code estimates a Pt100 or Pt1000 sensor's temperature from
its current resistance (input parameter r).
float GetPt100Temperature(float r)
{
float
const
Pt100[]
{80.31,82.29,84.27,86.25,88.22,90.19,92.16,94.12,96.09,98.04,100.0,101.95,103.9
,105.85,107.79,109.73,111.67,113.61,115.54,117.47,119.4,121.32,123.24,125.16,1
27.07,128.98,130.89,132.8,134.7,136.6,138.5,140.39,142.29,157.31,175.84,195.84
};
int t=-50,i=0,dt=0;
if (r>Pt100[0])
while (250>t)
17
{
dt =(t<100)? 5: (t>110)? 50:40;
if(r<Pt100[++i])
return t+(r-Pt100[i-1])*dt /Pt100[i]-Pt100[i-1]);
t+=dt;
};
return t;
}
float GetPt1000Temperature(float r)
{
return GetPt100Temperature(r/10);
}
18
CHAPTER3
19
3.2
Different
3.1Introduction to Temperature Controllers:
Types of
2.
3.
There are three basic types of controllers: on-off, proportional and PID.
Depending upon the system to be controlled, the operator will be able to use one type or
another
to
control
20
the
process.
On/Off Control:
An on-off controller is the simplest form of temperature control device. The output
from the device is either on or off, with no middle state. An on-off controller will switch
the output only when the temperature crosses the set point. For heating control, the output
is on when the temperature is below the set point, and off above set point. Since the
temperature crosses the set point to change the output state, the process temperature will
be cycling continually, going from below set point to above, and back below. In cases
where this cycling occurs rapidly, and to prevent damage to contactors and valves, an onoff differential, or hysteresis, is added to the controller operations. This differential
requires that the temperature exceed set point by a certain amount before the output will
turn off or on again. On-off differential prevents the output from chattering or making
fast, continual switches if the cycling above and below the set point occurs very rapidly.
On-off control is usually used where a precise control is not necessary, in systems which
cannot handle having the energy turned on and off frequently, where the mass of the
system is so great that temperatures change extremely slowly, or for a temperature alarm.
One special type of on-off control used for alarm is a limit controller. This controller uses
a latching relay, which must be manually reset, and is used to shut down a process when
a certain temperature is reached.
Proportional Control:
21
Proportional controls are designed to eliminate the cycling associated with on-off
control. A proportional controller decreases the average power supplied to the heater as
the temperature approaches set point. This has the effect of slowing down the heater so
that it will not overshoot the set point, but will approach the setpoint and maintain a stable
temperature. This proportioning action can be accomplished by turning the output on and
off for short time intervals. This "time proportioning" varies the ratio of on time to "off"
time to control the temperature. The proportioning action occurs within a proportional
band around the setpoint temperature. Outside this band, the controller functions as an
on-off unit, with the output either fully on (below the band) or fully off (above the band).
However, within the band, the output is turned on and off in the ratio of the measurement
difference from the set point. At the set point (the midpoint of the proportional band), the
output on: off ratio is 1:1; that is, the on-time and off-time are equal. if the temperature is
further from the set point, the on- and off-times vary in proportion to the temperature
difference. If the temperature is below set point, the output will be on longer; if the
temperature is too high, the output will be off longer.
PID Control:
The third controller type provides proportional with integral and derivative
control, or PID. This controller combines proportional control with two additional
adjustments, which helps the unit automatically compensate for changes in the system.
These adjustments, integral and derivative, are expressed in time-based units; they are
also referred to by their reciprocals, RESET and RATE, respectively. The proportional,
integral and derivative terms must be individually adjusted or tuned to a particular
system using trial and error. It provides the most accurate and stable control of the three
controller types, and is best used in systems which have a relatively small mass, those
which react quickly to changes in the energy added to the process. It is recommended in
22
systems where the load changes often and the controller is expected to compensate
automatically due to frequent changes in set point, the amount of energy available, or the
mass to be controlled. OMEGA offers a number of controllers that automatically tune
themselves.
These
are
known
as
auto-tune
controllers.
Standard Sizes:
Since temperature controllers are generally mounted inside an instrument panel,
the panel must be cut to accommodate the temperature controller. In order to provide
interchangeability between temperature controllers, most temperature controllers are
designed to standard DIN sizes. The most common DIN sizes are shown below.
23
24
Easy to use. FF
25
FIGFI
CHAPTER 4
26
4.1 PIC16F877A:
This powerful (200 nanosecond instruction execution) yet easy-to-program
(only 35 single word instructions) CMOS FLASH-based 8-bit microcontroller pack
Microchip's powerful PIC architecture into an 40- or 44-pin package and is
upwards compatible with the PIC16C5X, PIC12CXXX and PIC16C7X devices.
The PIC16F877A features 256 bytes of EEPROM data memory, self programming,
an ICD, 2 Comparators, 8 channels of 10-bit Analog-to-Digital (A/D) converter, 2
capture/compare/PWM functions, the synchronous serial port can be configured as
either 3-wire Serial Peripheral Interface (SPI) or the 2-wire Inter-Integrated
Circuit (IC) bus and a Universal Asynchronous Receiver Transmitter (USART).
All of these features make it ideal for more advanced level A/D applications in
automotive, industrial, appliances and consumer applications.
Features
27
2 PWM 10-bit
256 Bytes EEPROM data memory
ICD
25mA sink/source per I/O
Self Programming
Parallel Slave Port
Parameter Name
Value
Flash
14
RAM Bytes
368
256
Digital Communication
1-A/E/USART, 1-
Peripherals
MSSP(SPI/I2C)
Capture/Compare/PWM
2 CCP
Peripherals
Timers
2 x 8-bit, 1 x 16-bit
ADC
8 ch, 10-bit
Comparators
-40 to 125
2 to 5.5
Pin Count
40
28
for serial
connecting
industrial
automation
equipment,
such
as PLCs, VFDs, servo drives, and CNC equipment are programmable via RS-232.
Some manufacturers have responded to this demand: Toshiba re-introduced
the DE-9M connector on the Tecra laptop.
Serial ports with RS-232 are also commonly used to communicate
to headless systems such as servers, where no monitor or keyboard is installed,
during boot when operating system is not running yet and therefore no network
connection is possible. An RS-232 serial port can communicate to some embedded
systems such as routers as an alternative to network mode of monitoring.
30
Signals:
The following table lists commonly used RS-232 signals and pin
assignments. See serial port (pinouts) for non-standard variations including the
popular DE-9 connector.
Signal
Name
Origin
DB-25
pin
Abbreviatio DT DC
Typical purpose
DCE.
Data Carrier
Detect
telephone line.
Data Set
Ready
commands or data.
DTR
20
DCD
DSR
RI
22
31
Request To
Send
Clear To Send
RTS
Transmitted
Data
DCE.
Received Data
Common
Ground
Protective
Ground
CTS
TxD
RxD
GND
common
PG
common
The signals are named from the standpoint of the DTE. The ground signal is
a common return for the other connections. The DB-25 connector includes a
second "protective ground" on pin 1.
Data can be sent over a secondary channel (when implemented by the DTE
and DCE devices), which is equivalent to the primary channel.
32
Pin
Common Ground
7 (same as primary)
14
16
19
13
12
too much capacitance, unless special cables are used. By using low-capacitance
cables, full speed communication can be maintained over larger distances up to
about 1,000 feet (300 m). For longer distances, other signal standards are better
suited to maintain high speed.
Other serial interfaces similar to RS-232:
RS-422 (a high-speed system similar to RS-232 but with differential
signaling)
RS-423 (a high-speed system similar to RS-422 but with unbalanced
signaling)
RS-449 (a functional and mechanical interface that used RS-422 and RS-423
signals - it never caught on like RS-232 and was withdrawn by the EIA)
RS-485 (a descendant of RS-422 that can be used as a bus in multidrop
configurations)
MIL-STD-188 (a system like RS-232 but with better impedance and rise
time control)
EIA-530 (a high-speed system using RS-422 or RS-423 electrical properties
in an EIA-232 pinout configuration, thus combining the best of both; supersedes
RS-449)
EIA/TIA-561 8 Position Non-Synchronous Interface Between Data Terminal
Equipment and Data Circuit Terminating Equipment Employing Serial Binary Data
Interchange
34
CHAPTER 5
35
GRAPHICAL DISPLAY
Overall: 75x52.7mm
Viewable area: 55.01x27.49mm
36
in
the
37
LCD.
in
the
Standard
Character
Pattern
of
LCD.
program files microchip MPASM Suite Template Object) (Add file "16f877.lkr"
which was located in program files microchip MPASM Suite LKR) Next Finish To
have more clear refer to MPLABIDE help files. After building the project open the
editor f877tmpo.asm and write the assembly code After writing the assembly code
in the editor, build the project by clicking on the following option Project Build all
Check for the errors in the output window View Output Once the error free code
was made, simulate the code by following option Debugger Select Tool MPLAB
SIM Simulator options are Step into - Each time only one instruction will be
executed (Single stepping mode) Run - To run the whole code at once. Animate - to
animate the executing the code Additional things: To view DRAM, program
memory, SFRs, and External memory use the option VIEW To set break points in
the
code
(where
simulation
stops
at
that
point).
After checking the code in the simulator, the code (file with .HEX extension)
is loaded into 16F877 microcontroller using PIC BURNER 3.
PIC BURNER3:
followed
to
program
the
IC
safely
are
as
follows.
Connect the PIC BURNER3 through RS232 Port to computer system with
windows98 as operating system. Execute the file "icprog" which was in the
software that comes with PIC BURNER3. Set the device as PIC16F877 Switch on
the power supply of PIC BURNER3 Settings Hardware {JDM Programmer, Com1,
Direct I/O} Settings Hardware check 1. On clicking "Enable Data out", Data in
39
40
CHAPTER6
41
PROCEDURE
6.1 Procedure:
Pt 100
Temperature
sensor
Temperature
Reader/
Controller
PIC16F877A
Microcontroller
42
RS232
128*64
Graphical
Display
Cost
Pt100 Sensor
Rs.480
SELEC TC303
Rs.1200
Microcontroller kit
Rs.2500
Rs.800
CONCLUSION
This project can be used for measuring, controlling and acquisition of the
temperatures in the engineering systems such as IC Engines, Boilers, etc. Graphs
can be drawn between a temperature and time and can be used for knowing the
deviations.
The acquisited data in the project can be used for controlling the temperature
and its changes (deviation) in the IC engines, Boilers, and other engineering
equipments.
43
44