Indian Journal of Pure & Applied Physics
Vol. 53, October 2015, pp. 652-663
New real time temperature monitoring and evaluation system
Yavuz Egea*, Osman Kalenderb, Hakan Çıtakc, Sedat Nazlıbilekd & Mustafa Çoramıka,
a
Balikesir University, Necatibey Faculty of Education, Department of Physics, 10100 Balikesir, Turkey
b
Bursa Orhangazi University, Faculty of Engineering, Department of Electrical-Electronics Engineering,16350, Bursa,Turkey
c
Balikesir University, Balikesir Vocational High School, 10100, Balikesir, Turkey
d
Atilim University, Faculty of Engineering, Department of Mechatronics Engineering, 06800 Ankara, Turkey
*E-mail:
[email protected]
Received 18 January 2014; revised 8 July 2015; accepted 13 July 2015
The storage of many drugs, serum and vaccines at specified temperature limit is very important. Therefore, it is
necessary to read and record the ambient temperature and control the refrigerating device according to the limiting values
specified by the user. Taking into account these requirements, a new PIC microprocessor-based temperature monitoring
system that triggers the DS18B20 temperature sensor and controls the running of the refrigerator system is designed and
developed. At the controlling operation, performed by this system, temperature limits are specified by the user. In case these
limit values are exceeded, a warning message is sent to the user through GSM module. Furthermore, the temperature values
that are read between the time intervals specified by the user are sent to a GLCD screen and presented in a graphical form.
The temperature readings can be transferred to the computer environment as text file through a Visual Basic based interface
with using a serial port. At this system which has one year data storage capacity, it is possible that the temperature values
can be transferred to the computer by wireless communication facility. Differently from the present systems, recording,
evaluation, warning and device control operations are performed in the same system. In the present paper, the system
operation and its performance at the fields of application are expressed in detail.
Keywords: Refrigerator, Temperature sensor, Microcontroller, Serial port, Wireless communication
1 Introduction
Today manufacturing in factories is carried out by
automatically operating machines. The controls of
machines are realized by electronic and computerized
systems. It is possible that the mechanical and
physical changes in machines can be transferred to the
computer system and process them within the
computer and perform the control of the same
machine or other machines. The sensors are used to
transform any physical change into electrical signal
and they are transferred to electronic systems. The
industrial applications such as counting products,
performing quality control, holding the temperature,
humidity or illumination within a specified range, etc.
are some of the examples of sensor applications.
Among the examples, the most important physical
quantity is the temperature. Temperature sensors
measure the static and dynamic parameters that
depend on the temperature1. These parameters are
length, volume, pressure, electrical resistance,
potential difference and colour change and radiation
intensity of surfaces. Temperature is measured for
control, monitor, security and energy efficiency
purpose2-7. The temperature control may be necessary
for the places such as fixed or mobile frigorific
depots, laboratories, computer rooms, nuclear
reactors, electrical motors, industrial ovens and
boilers8-11. Furthermore, it is also necessary to
monitor, control and manage the temperature values
in the areas such as libraries, museums,health and
nutrition buildings. Blood and drug storage
environments also necessitate temperature monitor
and control because of growth of micro-organisms in
such places. Books and historical artifacts may be
destroyed by bacterial growth in hot environments.
In recent years, industrial studies have been done
on developing low and high temperature measurement
systems. There are a lot of examples on temperature
measurements such as the real time measurement of
surface temperature during the drying stage of the
film or mold cover solutions12, the measurement of
operating temperature of an isolated gate bipolar
transistor13, real time measurement of microthermocouple array during laser annealing process14,
real time measurement of the temperature of the
machine tool15, the temperature variation on a fiber
EGE et al.: NEW REAL TIME TEMPERATURE MONITORING SYSTEM
optic16, measurement of multi-spectral high
temperatures17, non-contact measurement of surface
temperature18,19, in vivo and real-time measurement of
the temperature in acupuncture20, real-time
measurement of concentration and temperature of
solution
during
crystal
growth21,
real-time
measurement of wall surface temperature subject to
hot impinging gas flow in combustion22, the real-time
measurement of welding temperature field and
closed-loop control of isotherm width23, real-time
measurement of temperature field with ICCD
sensor24, liquid crystal temperature measurement for
real-time control25, real-time measurement of
temperature field by calorimetric method26, real-time
temperature measurement of heating under
electrocardiographic electrodes during MR-Imaging27,
real-time temperature-measurement on pcbs, hybrids
and microchips28,29, measuring soil temperature and
moisture using wireless mems sensors30, measuring
the mixed air temperature in air-handling units31.
Measurement system must satisfy the following
properties in order to be an appropriate industrial
system such as it must be low in weight, compatible
with electromagnetic interference, low noise, suitable
for wireless communications, high data storage
capacity, suitable for multi sensor applications.
Taking into account these criteria, in the present
work, a new temperature monitoring system which
facilitates the operation of a refrigerator in a
controlled manner based on the desired inner
temperature has been developed.
In order to protect public health, World Health
Organization (WHO) suggests the temperature
monitoring systems that make measurements and
records and also keep the vaccines and similar
medicinal products at a specific temperature range.
When these suggested systems are examined, it is
seen that most of them use non-replace battery, their
memory capacity is limited, they have limited
activated life, their minimum logging interval is 2 s
and their accuracy is not below 0.2°C. In the system
developed in the present study, the features of the
systems suggested by WHO are enhanced.
Furthermore, this developed system can perform
motor control of the refrigerating system differently
from acoustic and visual alarm.
A temperature sensor called DS18B20 giving
digital output is used. In the temperature monitoring
system that is developed, triggering the sensor by the
clock signal, receiving the data output and
653
determining the temperature value by processing are
done by means of a PIC microcontroller. The
temperature values determined by this system can be
sent to a GLCD screen and transferred to a computer
environment through its serial port and stored as a txt
file. A new man-machine interface unit has been
designed for taking the data into the computer, storing
them into the memory and presenting them in
graphical form by using Visual Basic software
programming language. A facility is added to the
system in case the user wants the temperature values
read before transferring to a wireless computer.
Furthermore, this system has a data storage capacity
that can hold them for one year. The system can also
stop the operation of another industrial device and
brings the values of the temperature to newly
determined limits by the user.
2 Temperature Monitor System
2.1 Operation of the System
The block diagram of the temperature monitoring
system developed in the present work is shown in
Fig. 1.
Figure 1 shows the temperature monitoring system
works under the control of a central processing unit
(PIC18F452). The unit performs the following
operations: activate the sensor and read its output;
decide whether the readings can be sent or not by the
ASK transmitter; record the readings to the memory
(AT24C512) in coordination with the real time clock
(DS1307); write the value on the GLCD screen and
plot the graph of it; control the load depending on the
temperature limits entered by the keypad; activate the
buzzer when the memory is overflowed and achieve
data flow in a controlled manner from the memory to
the serial port of the computer. The flow chart
showing the command sequence of the central
processing unit is shown in Fig. 2.
As seen from Fig. 2, at the power up of the
temperature monitoring system, first of all it is
requested to the user to assign the control variables
that are used in controlling the refrigerating system.
Then, it is asked to enter the values of these variables.
If the user of the temperature monitoring system is a
medical doctor, then the two variables such as the
minimum temperature and the hysteresis temperature
have to be assigned in order to preserve the vaccines
within the refrigerator. The values of these variables
have to be entered as 4°C and 2°C, respectively. The
minimum value is the temperature value that it stops
654
INDIAN J PURE & APPL PHYS, VOL 53, OCTOBER 2015
Fig. 1 — Block diagram of the temperature monitoring system
the operation of the refrigerating system, on the other
hand, the hysteresis temperature is the value of the
temperature that the stopped system at the minimum
temperature can start again from that temperature
value which is above the minimum temperature.
Figure 2 shows when the energy is given to the
temperature monitoring system, first of all, the
program assigns the variables which are necessary for
the refrigerating system’s control. After that, the
program reads the ambient temperature value only
once and temperature variables which will be
controlled have not been entered by the user yet, the
values of these variables are accepted as zero.
Therefore, the refrigerating system becomes active
due to not entering the limiting values. Then, the time
is read and the temperature reading is written to
GLCD and recorded to the memory.
As long as the user does not push one of the buttons
settled in the front board of the system, the
refrigerating system stays active. When any button is
held down, the program branches to temperature,
alarm, time and memory settings. These variables can
be chosen with up- down buttons and the values can
be entered with right side button. The variables at the
temperature settings section are minimum temperature
and hysteresis temperature values. The minimum
temperature indicates that the refrigerating system
will be stopped and hysteresis temperature indicates
that above the minimum temperature, the system will
work again. At the alarm condition tab, in case the
memory is full, it can be arranged that the system will
give the alarm or not. At the timing section, the date
and the clock information can be entered in detail.
Furthermore, with the memory setting section, history
EGE et al.: NEW REAL TIME TEMPERATURE MONITORING SYSTEM
655
Fig. 2 — Flow chart of the program of central processing unit
of record information can be seen one by one and all
records in the memory can be sent to the computer
through a serial port.
After the variables are entered, the system reads the
first temperature value and then it is controlled that
the temperature reading is within the determined
limits or not. If the temperature is within the limits,
the system cuts the power of the refrigerating system
and it reads the time from the real time clock. Then, it
sends this temperature value to GLCD and records it
in memory. Every recorded temperature value is
wirelessly stored in a txt file in computer by means of
ASK receiver transmitter. The explicit scheme of
temperature monitoring system, the block scheme of
which is given at Fig. 1 and seen at Fig. 3.
2.2 Programming
Specifications
Parts
of
the
System,
Technical
2.2.1 Sensor
In the system that we developed in our work, the
DS18B20 temperature sensor is used. The pin
arrangement and technical specifications of the sensor
is given in Table 1. In addition, the block diagram of
the sensor is shown in Fig. 4.
The DS18B20 temperature sensor can be
programmed through a single line and provide a
656
INDIAN J PURE & APPL PHYS, VOL 53, OCTOBER 2015
Fig. 3 — Temperature monitoring system circuit diagram
Table.1 — Pin arrangement and technical specifications of the sensor
Pin arrangement of Sensor
Technical Specifications of Sensor
; Unique 1-Wire® Interface Requires Only One Port Pin for Communication
; Each Device has a Unique 64-Bit Serial Code Stored in an On-Board ROM
; Multidrop Capability Simplifies Distributed Temperature-Sensing Applications
; Requires No External Components
; Can Be Powered from Data Line; Power Supply Range is 3.0 V to 5.5 V
; Measures Temperatures from −55°C to +125°C (−67°F to +257°F)
; ±0.5°C Accuracy from −10°C to +85°C
; Thermometer Resolution is User Selectable from 9 to 12 Bits
; Converts Temperature to 12-Bit Digital Word in 750 ms (Max)
; User-Definable Nonvolatile (NV) Alarm Settings
EGE et al.: NEW REAL TIME TEMPERATURE MONITORING SYSTEM
657
Fig. 4 — Block diagram of the sensor
Configuration Register
Thermometer Resolution Configuration
Fig. 6 — DS18B20 memory map
Fig. 5 — Configuration register and thermometer resolution
configuration
digital output from the single line in contrary to the
other temperature sensors such as SHT11 and SHT75
for which there are two separate data lines (SCK,
DATA etc.). Therefore, it facilitates the programming
process of the unit and also provides easy
synchronization with the central processing unit. The
sensor can read the value of the temperature either
9-bit or 12-bit resolutions. In our work, we preferred
to use 12-bit resolution. In addition, the accuracy of
the temperature reading could be reduced to 0.1°C in
contrast to 0.5°C by a suitable programming for the
temperature range from -10°C to 85°C. In the present
work, the temperature reading loop is repeated in
every 750 ms (see Fig. 2). In case, the user wants to
reduce it to a shorter time, it can be achieved by
adjusting Configuration Register settings. But in this
case, the resolution will be lowered (Fig. 5). After
each loop, the readings are sent to the GLCD. But the
recording is done for every half an hour and 48 times
in a day. The durations for recordings are optional.
The memory map of the DS18B20 temperature
sensor that we use is shown in Fig. 6. The user can
program TH Register (Byte 2) and TL Register
(Byte 3) from this map as seen in Fig. 6.
2.2.2 Real-Time Clock
In our work, the integrated circuit DS1307 is used
as the RTC. Since the oscillator used in the circuit is
chosen as 32.768 kHz, the RS0, RS1, SQWE bits of
the Control Register are set to Logical 1 during
programming (Fig. 7).
2.2.3 Memory
In the temperature monitoring system that we
developed, AT24C512 two-wire serial EEPROM is
used for the storage of the readings. In order to
address the AT24C512, an 8-bit digital data is sent by
the central processing unit as seen in Fig. 8.
512 K EPPROM is capable of writing 128-byte of
data in one page. In addition, each of the 512 K
EPPROM can be arranged as 512 pages of 128 byte
each. At most 4 EEPROMs can be addressed by a
single central processing unit in cable connected
658
INDIAN J PURE & APPL PHYS, VOL 53, OCTOBER 2015
form. When we want to use the total memory capacity
of the AT24C512, the A0 and A1of the addressing
bits must be set to logical 0. The formats of the digital
data for byte write, page write and data read from an
address procedure for 512 K EPPROM through its
SDA line are shown in Fig. 9.
2.2.4 GLCD
In the developed system, the KS0108 124*64
graphical LCD is used. One half of the GLCD is
controlled by the CS1 and the other half is controlled
by CS2. The writing operation to the GLCD is
performed by the inputs of D0-D7. After the start, the
temperature reading is written on the left top corner
and the time is written on the right top corner. In
addition, a coordinate system appears. Its horizontal
axis is the time and vertical axis is the temperature. At
every half an hour, the temperature reading is plotted
on the graph and recorded in the memory. The
horizontal time axis is divided into 48 parts. In such a
Fig.7 — Control register settings of the DS1307
Fig. 8 — AT24C512 Device Address
Byte Write
Page Write
Current Address Read
Fig. 9 — Byte write, page write and current address read
EGE et al.: NEW REAL TIME TEMPERATURE MONITORING SYSTEM
way, the user can read a one-day data in the same
graph. At the end of the day, the graph is reset and the
loop repeated. Since the loop for temperature reading
is 750 ms, the temperature readings at every 750 ms is
shown at the left top corner of the GLCD, but not
plotted on the graph.
2.2.5 Optional Part (GPRS Modem)
The serial port output of the computer used to
transfer the temperature value stored in the memory to
the computer environment is also used to trigger the
GPRS modem or to send a SMS to the user at the
value of the temperature set by the user. The internal
power supply unit provides power for reading the
temperature values and sending SMS to the user
during the interruption of the mains supply. However,
during the interruption of mains supply system the
refrigerator cannot operate, therefore, the temperature
value may come to an undesired point. In such a case,
the mains interruption can be informed to the user by
an SMS. For example, if the user is a medical doctor
then an interruption causing the vaccines to stay in a
temperature of 7°C over a one hour period may spoil
them. In that case, it is necessary to inform the user in
time. If the user wants this optional part, then the
telephone number of the user is requested after
entering the first variables. The GPRS modem in our
system is given in Fig. 10 and the general
characteristics of it are listed in Table 2.
3 Performance Analysis of the System
Electronics card design of the developed system,
layout and rear and front panels are shown in Fig. 11.
Table 2 — General characteristics of the GPRS Modem
Fig. 10 — GPRS Modem
659
General features
1. Quad-Band GSM (850/900/1800/1900 MHz)
2. GPRS multi-slot class 10
3. Compliant to GSM phase 2/2+
4. Output power: 1-2 W
5. Control via AT commands
6. SIM Application Toolkit
7. SIM Application Toolkit
8. Internet Services: TCP, UDP, HTTP, FTP,SMTP, POP3
9. Supply voltage range: 3.3... 4.8 V
10. Power consumption : 50 A- 450 mA
11. Temperature Range : −20°C to +85°C
Fig.11 — Electronics card design of the developed system, layout and rear and front panels
660
INDIAN J PURE & APPL PHYS, VOL 53, OCTOBER 2015
Table 3 — Performance parameters of the temperature monitoring system
Performance parameters of the temperature monitoring system
Sampling time
Min. 93.75 ms 750 ms, Max. 750 ms
A/D Resolution
Min. 9 Bit, Max. 12 Bit
Measurement Accuracy 0.1 0C
Ease of Use
- Determination of limit temperature values
- Empty the memory at specified times
Functionality
- Getting data stored in memory in two different ways
- Sending SMS or call message when exceeding the specified limits
Power consumption
Max. 1 VA
Length of memory
1 year
4 Transfer of Temperature Values to Computer by
Serial Port
In the temperature monitoring system that we
developed in this work, a Visual Basic based interface
is developed to transfer the temperature values taken
with the sampling rate of 750 ms to the computer
environment through the serial port (Fig. 13). The
1,00
0,98
Power Consumption (Watt)
The socket for refrigerator, temperature probe
input, system power supply input and power control
switch are placed on the rear panel of the developed
temperature monitoring system. When the user makes
all the connections and power up the system, the
temperature readings on the GLCD screen are updated
at every 750 ms. The time, date, alarm, memory and
temperature limits are set by the left, right, up and
down buttons on the front panel. For this, first of all,
the right arrow button is pressed and setting menu is
seen. First of all, the temperature limit values are seen
in the menu (Fig. 2). Then the alarm, time and
memory settings appear (Fig. 2). After all the settings
are performed, the system starts to operate according
to the settings. The power is made off when the
temperature inside the refrigerator system falls to the
minimum temperature setting. If the alarm is active,
then the low temperature alarm is given. When the
internal temperature of the refrigerator system
exceeds the total of the minimum temperature plus the
hysteresis temperature, the system begins to operate
again. Thus, it is possible to hold the internal
temperature of the refrigerator system within the
desired limits. The performance parameters of the
temperature monitoring system are given in Table 3.
The system developed in the scope of this work has
three power changes with respect to time and they are
shown in Fig. 12. The power consumed by the
developed system does not change at all. This shows
that the system does not heat during operation.
0,96
0,94
0,92
0,90
0,88
0,86
0
5
10
15
20
25
30
Day
Fig. 12 — Three power changes with time of the temperature
monitoring system
Fig. 13 — User interface on which the sensor readings are written
and simultaneously plotted and presented
codes of the program running under this interface are
given in Annexure A.
When the Enable Option Button is pressed, the
12-bit digital temperature value is taken, converted
into the decimal value and written in the textboxes
within a 750 ms sampling interval. Furthermore, these
EGE et al.: NEW REAL TIME TEMPERATURE MONITORING SYSTEM
661
Table 4 — Comparison of developed system and other systems
Specification
Our System
Other Systems [Ref. 32]
Accuracy
Activated life
Memory capacity
Minimum logging interval
Alarm type
Price
± 0.1°C
unlimited
250000 point
93.75 ms
Visual, acoustic and SMS
150 $ (mains and rechargeable battery)
Power source
Min. and max. temperatures
Mains and Battery
-55°C and +125°C
±0.2°C to ±3.0°C
12 months to 60 months
4000 point to 38000 point
2 seconds to 60 seconds
Visual or Acoustic
20 $ to 149 $ (non-replaceable battery)
3600 $ (Mains, battery and solar)
187 $ per year on a 3 year agreement basis
(Replaceable batteries)
2100 $ (Rechargeable batteries)
Mains, battery or solar
Except one (3600 $) of them -55°C and +85°C
The measurement ranges of each device, sampling
time, temperature reading accuracy, data collection
may change from system to system. The temperature
monitoring system developed in the scope of this
work primarily constructed for controlling of the
refrigerator systems at a specified temperature range
with accurate measurements. Though the results are
not given in this paper, it is also tested with systems
such as oven, air conditioner, etc and the performance
of it is compared with the main device. According to
the test works, the comparison of the system with the
other measurement systems is given in Table 4.
Fig. 14 — Graphical user interface for temperature readings as
well as humidity readings in real time
values are recorded into a txt file in a folder
determined by the user. When the Show Graph
command button is pressed, the interface that converts
the values into graphical forms appears. In Fig. 14,
the graphics related to the temperature values with
respect to time are shown as an example.
As seen from Fig. 14, the time scale starts from 1
and goes to 60. At the end of 60 min, the axis shifts to
the left and the next values are seen. When the Stop
Option Button is pressed, data receive and graphics
plotting stop. After a while if the Enable Option
Button is pressed again, the recording process
continues from its stopping place and the graphics
skip the passing time and plotted again. When the Exit
command button is pressed, the program is closed.
5 Conclusions
Temperature
measurement
systems
are
manufactured according to the some specific purpose.
Restrictions of the developed system:
1 The limits of operation is in between -55°C and
+125°C.
2 The distance for wireless communications
without data loss is about 100 m.
3 During the mains interruptions, the only operation
is to read the internal temperature.
4 The power control system cannot operate in that
case.
This system is designed especially for storing
vaccines safely in the temperature range 4°-6°C
within the refrigerators in the family health centers by
the family doctors. The system may give the monthly
temperature variations during the audit in a printed
form. A normal refrigerator cannot give such a list
when needed. In similar systems such as data loggers,
the memory capacity is limited for long recording
times and they are costly devices as well. Therefore,
the temperature monitoring system developed in this
study has attractive features to be used in
aforementioned applications.
662
INDIAN J PURE & APPL PHYS, VOL 53, OCTOBER 2015
References
1 Antunes P, Rocha A M & Lima H, Measurement, 44 (2011)
554.
2 Minghui Hu, Fuzhen Xuan & Shan-Tung Tu, Measurement,
44 (2011) 875.
3 Pedersen K M & Tiedje N, Measurement, 41 (2008) 551.
4 Danisman K, Dalkiran I & Celebi F V, Measurement, 39
(2006) 695.
5 Farouq Y, Nicolazo C & Sarda A, Measurement, 38 (2005) 1.
6 Muller B & Renz U, Measurement, 34 (2003) 363.
7 Neuer G, Fischer J & Edler F, Measurement, 30 (2001)
211.
8 Kesavan K, Ravisankar K, Parivallal S, Sreeshylam P &
Sridhar S, Measurement, 43 (2010) 157.
9 Faranda Roberto & Lazzaroni Massimo, Measurement, 46
(2013) 324.
10 Liu S J, Su Po-Chang & Lin Kun-Yeh, Measurement, 42
(2009) 771.
11 Rustu Eke, Sertap Kavasoglu A & Nese Kavasoglu,
Measurement, 45 (2012) 1499.
12 Unsal E, Drum J & Yucel O, Rev of Scientific Instruments,
83(2) (2012).
13 Ivan Bahun, Neven Cobanov & Zeljko Jakopovic,
Automatika, 52 (2011) 295.
14 Chiolerio A, Pandolfi P & Maccioni G, Microelectronic
Engi, 88 (2011) 2484.
15 Chen C, Zhang J F & Wu Z J, Mechanika, 4 (2011) 413.
16 Scott Maha, Jihong Geng & Joel Schultz, Remote Sen Sys
Engi, 7087 (2008).
17 Meriaudeau F, Image & Vision Computing, 25 (2007)
1124.
18 Raad Peter E, Komarov Pavel L & Burzo Mihai G, TwentyThird Annual IEEE Semiconductor Thermal Measurement
and Management Symposium, (2007) 57-63, DOI:
10.1109/STHERM.2007.352406.
19 Lang M K, Donohoe G W & Zaidi S H, Optical Engineering,
33 (1994) 3465.
20 Cui R F, Liu J H & Ma W T, Sensors & Actuators APhysical, 119 (2005) 128.
21 Qun H, Lin H & Yong S,b Optical Design & Tes, 5638
(2005) 216.
22 Furukawa T, Kuo C H & Yang W J, Kagaku Kogaku
Ronbunshu, 26 (2000) 169.
23 Hang H, Pan J L & Liao B J, Science in China Series ETechnological Sci, 42 (1999) 129.
24 Zhang H, Pan J & Liao B J, Science In China Series ETechnological Sci, 41 (1998) 496.
25 Birrell D C & Eaton J K, Proc of the Society of PhotoOptical Instrumentation Engi, 3460 (1998) 58.
26 Zhang H, Liao B J & Pan J L, Proc of the Society of PhotoOptical Instrumentation Engi, 2894 (1996) 11.
27 Felmlee J P, Hokanson D A & Zink F E, Radiology, 197
(1995) 423.
28 Ignatiev M, Okorokov L & Smurov I, J De Physique IV, 4
(1994) 65.
29 Wallin B, Thermosense XIII Book Series: Proc of the Society of
Photo-Optical Instrumentation Engineers, 1467 (1991) 180.
30 Tyronese Jackson, Katrina Mansfield & Mohamed Saafi,
Measurement, 41 (2008) 381.
31 Lee P S & Dexter A L, Measurement, 37 (2005) 83.
32 http://apps.who.int/immunization_standards/vaccine_quality/
pqs_catalogue/categorypage.aspx?id_cat=35.
Appendix A
“VB code to transfer the measurements to the
computer”
Option Explicit
Private fEnable As Boolean
Private Sub cmdExit_Click()
If MSComm1.PortOpen = True Then
MSComm1.PortOpen = False
End If
End
End Sub
Private Sub Form_Load()
MSComm1.InputLen = 0
MSComm1.CommPort = 1
MSComm1.Settings = "2400,N,8,1"
Open "C:\ Documents and Settings\Yavuz Ege \
Desktop \ Voltmetre\ Deneme_01.txt" For Append As
#1
End Sub
Private Sub optEnable_Click()
fEnable = True
Do Until fEnable = False
DoEvents
Dim BytesToRead As Integer
Dim DataIn As Variant
Dim h As Integer
Dim a As Integer
Dim Tam As Integer
Dim Ondalık As Integer
MSComm1.PortOpen = True
BytesToRead = 1
MSComm1.Output = "A"
Do
DoEvents
Loop Until MSComm1.InBufferCount =
BytesToRead
If a / 2 = Int(a / 2) Then
DataIn = MSComm1.Input
Tam = Asc(DataIn)
End If
If a / 2 <> Int(a / 2) Then
EGE et al.: NEW REAL TIME TEMPERATURE MONITORING SYSTEM
DataIn = MSComm1.Input
Ondalık = Asc(DataIn)
txtToplam.Text = Tam + Ondalık * 0.1 & "C"
Print #1, Val (txtToplam.Text)
End If
a=a+1
MSComm1.PortOpen = False
Loop
End Sub
Private Sub optStop_Click()
fEnable = False
Close #1
End Sub
663
Nomenclature
Symbol
ICCD
GLCD
MR
ASK
CPU
USART
EPPROM
PIC
Intensified Charge Couple Device
Graphic Liquid Crystal Displays
Magneto resistive
Amplitude Shift Keying
Central Processing Unit
Universal Synchronous Asynchronous
Receiver Transmitter
Erasable Programmable Read-Only
Memory
Peripheral Interface Controller