Anda di halaman 1dari 5

2014 First International Conference on Computational Systems and Communications (ICCSC) | 17-18 December 2014 | Trivandrum

LabVIEW based Modelling and Analysis of


Temperature Sensors
Lizy Abraham

Shayama Subair

Department of ECE
LBS Institute of Technology for Women, Poojappura
Trivandrum, Kerala
lizytvm@yahoo.com

Department of ECE
LBS Institute of Technology for Women, Poojappura
Trivandrum, Kerala
shayamass@yahoo.com

Abstract In this paper, a temperature measurement


module using DS18B20 digital temperature sensor is developed
to work as a standalone system. The module is compared with
other conventional temperature sensors used in space
applications. The total process consists of comparing the
temperature obtained using DS18B20 module in real time with
RTD, Thermocouple and LM35. PIC16F877A microcontroller
is used to read the data from the sensor and send to PC.
Lab VIEW (Laboratory Virtual Instrumentation Engineering
Workbench) of National Instruments, running on the computer
will extract and display the data from the serial port at real
time. Finally, using BeagleBoard which is a low-power opensource single-board computer produced by Texas Instruments,
the temperature is remotely monitored.

standard Celsius or Fahrenheit. Simultaneously, on the one


hand, send them to the host computer PC through its serial
communication. In addition, the system can easily set an
artificial temperature threshold, so that when the actual test
temperature detection system temperature exceeds the
threshold value, the indicator will turn ON.

Keywords DS18B20 temperature sensor, PIC16F877A,


RS232, LabVIEW, BeagleBoard.

Fig.1 Framework map of system design

I. INTRODUCTION
Temperature is a common parameter to be controlled and
closely related with our daily lives, industrial production and
space applications. Temperature is an important component
of modern detection technique. Temperature monitoring
system has two kinds of shortcoming in current life. One is
that it needs a lot of wires to transfer the sensor signal to
data acquisition card and the implementation of linking
signal wires is very troubling. Also, the cost is high. The
other shortcoming is that the signal transferred in wire is
analog signal. Designing high-performance temperature
measurement systems has great significance in many
practical applications for modern significance. In this paper,
as the background of compensation and applications of the
sensors temperature characteristics, a novel intelligent
temperature detecting system based on PIC16F877A and
DS18B20 [1]-[4] is designed and implemented. The system
uses single-bus digital temperature sensor DS18B20 as
mining temperature component produced by DALLAS,
PIC16F877A as the master processing chip. Also the data is
sent to PC by using RS-232 serial interface and display it
using the real time software LabVIEW.

III. SYSTEM HARDWARE DESIGN AND


IMPLEMENTATION
A. Design and implementation of PIC external circuit
Since the system has programmable flash memory in the
internal of PIC16F877A, no external memory is needed; pin
32 can be directly connected to the VCC. At the same time,
taking into account, the PIC16F877A microcontroller has a
clock inside the circuit, we only need to access timing
control component in its OSC1/CLKI OSC2/CLKO pins to
form a stable self-excited oscillator. When using the crystal
and capacitors to form the resonant circuit, there are no strict
requirements with the C1 and C2. But considering the size
of capacitor which usually affects the stability of oscillator
and its vibration, usually capacitor value is chosen as
15 ~ 35pF. In our design a 20MHz crystal oscillator and
22pF capacitors are used. The specific circuit design is
shown in fig. 2.

II. SYSTEM DESIGN


System design framework is shown as fig.1, from which
we can see the system consists of PIC, temperature sensor,
PC machine and an indicator. In which, DS18B20 is the
temperature collection component, responsible for the actual
temperature sensitive element, and sending the collected
data to master chip PIC16F877A by a single bus. The main
chip processes the received data and converts it into a

Fig.2 PIC external crystal oscillator circuit

978-1-4799-6013-2/14/$31.00 2014 IEEE


277

2014 First International Conference on Computational Systems and Communications (ICCSC) | 17-18 December 2014 | Trivandrum

B. Design and implementation of DS18B200 temperature


sensor interface circuit
As DS18B20 is a single bus device the work of the
c
the data
circuit is simple; just power on and complete
transmission. DS18B20 can be set to two power
p
supply, data
bus power supply and external power suppply. Using data bus
power supply can save a wire, but itt takes longer to
complete the temperature measurement. While using an
external power supply, the measuremennt speed is faster
although using another wire. In this systtem, since only a
temperature sensor is connected, adoptts external power
supply mode and attach a 4.7K pull-up ressistor on the bus to
pull up the power level. The specific of thhe interface circuit
is shown as fig.3.

for the DS18B20 is written in MPLAB and connects to


Pickit3. Use CCS developmennt tool as compiler to compile
the C source code. After poositioning the target file and
library, create a HEX file and debug
d
target.

Fig.5 DS18B20 Reset diagram

Fig.3 DS18B20 interface circuit

C. Design and implementation of seriaal communication


interface circuit
To communicate PIC with PC, a serrial interface chip
must be added between the PIC and PC to match the two
levels. The serial interface communicaation circuit was
shown in fig.4. MAX3232 chip was useed to convert the
voltage level between MCU and PC. Theere are two RS232
interface in MAX3232, only one poort was used to
communicate with PC. The input pin labeeled with TXD and
RXD of MAX3232 was connected to the
t
serial port of
PIC16F877A.

Fig.5 is the design process of DS18B20


D
reset program. Each
operation of DS18B20 ([5] & [6]) requires a command to
reset. Fig.6 is a design proceess of writing a command to
DS18B20 and fig.7 is a designn process of reading data from
DS18B20. Fig.8 is the designn process of PIC to read the
temperature data and indicatingg using LED whether the chip
is working or not.

Fig.4 Serial communication circuit

IV. DESIGN AND IMPLEMENTATION


N OF SYSTEM
SOFTWARE
A. Design and implementation of PIC proggram in MPLAB
PIC programming is done using MPLAB
M
Integrated
Development Environment (IDE) which is an integrated
toolset for the development of embeddeed applications on
Microchip's PIC and dsPIC microcontrollers. The system
uses the microcontroller C language to execute software
design and implementation which does not
n depend on the
machine hardware system and the operaating system. The
Microchip Pickit3 is used for burning the PIC. The program

Fig.6 Write Command to DS18B20

According to the above prrocess flow diagram, we can


easily write the specific proceddure code and compile. After
compilation is successfully com
mpleted the program is burned
to PIC16F877A. If the LED iss turned OFF, this means that
the PIC external circuit is not working or some error during
burning. Then circuit connectioon is checked and it is rewired
or the voltage flow through eacch component is verified.

278

2014 First International Conference on Computational Systems and Communications (ICCSC) | 17-18 December 2014 | Trivandrum

B. Program design of PC usingg LABVIEW


The temperature measurem
ment system stored the raw
data in flash chip and uploadeed them to PC through RS232
serial communication interfacee. LABVIEW [7] and its data
acquisition system is used to reead data in the form of digital
and waveform, simultaneouslyy, display visually on the host
computer using the main proggram interface in LabVIEW.
The block diagram in LabVIE
EW mainly includes the serial
port selection, begin detecction/stop detection, current
temperature display window
w and temperature change
waveform. VISA Configure Seerial port initializes the serial
port specified by VISA resoource name to the specified
settings. Wire data to the VIISA resource name input to
determine the polymorphic instance
i
to use or manually
select the instance.The rate off transmission through RS232
is 9600bps.The time requireed for the write and read
operations is 1000 millisecoonds and one stop bit. The
number of bits required for dataa transmission is 8.
V. EXPERIMEN
NTAL RESULTS

Fig.7 Read Command to DS18B20

In order to test and verify the effectiveness of the


temperature measurement sysstem designed in this paper,
different experiments are caarried out at high and low
temperature with the system. Inn the experiment, we have set
the temperature of high and loow temperature dropping from
40 to 25 , then rising from
m 50 to 65 , change and
detect the data every 3 annd then comparing the error
between the detected temperrature and the set standard
temperature. The sensor reesponse to high and low
temperature is good, Figure.99 is the response curve for
cooling, and Figure.10 is the response curve for heating.
The experimental details of thhe high and low temperature
detection experiment are shoown in Table 1. From the
experimental test data in Tabble 1,we can seeclearly, the
standard error of the detectedd temperature withthis system
and actual set temperature valuue at eachtemperature point is
no more than 0.7 , which
w
indicates theproposed
temperature measurement systeem iscorrect and effective.
TABLE 1

Cool
Temperature(/0C)
40
37
34
31
28
25

DETECTEED TEMPERATURE DATA

Detected
Temperature(/0C)
40.6
37.7
34.5
31.5
28.8
25.5

Warm
W
T
Temper0
a
ature(/
C)
5
50
5
53
5
56
5
59
6
62
6
65

Detected
Temperature(/0C)
50.7
53.6
56.7
59.5
62.7
65.8

Fig.8 Program design process of MCU reading the tem


mperature data, LED
indication

Fig.9 Response curve for cooling

279

2014 First International Conference on Computational Systems and Communications (ICCSC) | 17-18 December 2014 | Trivandrum

Fig.10 Response curve for heating

Fig14. Impulse Response of LM35

VI. COMPARISON WITH OTHER


R SENSORS
The temperature variation of the sensorrs is find out and
the response time, settling time of differentt sensors are
plotted.

Fig15. Impulse Response of DS18B20

Fig.11 Similar Input Variation to All Sensors

20
15
10
5
0

Fig.16 Response Time Curve

From Fig 11 it is clear that the response time of DS18B20 is


almost similar to RTD. So it caan replace RTD.
Fig.12 Impulse Response ofRTD

80
60
40
20
0

Fig.17 Settling Time Curve

Fig13. Impulse Response of Thermocouple

The settling time is less compared to RTD .So from the


above curves the overall behavvior of DS18B20 is better
compared to other sensors

280

2014 First International Conference on Computational Systems and Communications (ICCSC) | 17-18 December 2014 | Trivandrum

VI. REMOTE MONITORING


Remote monitoring of temperatures is done through
LAN using a beagle board. BeagleBone Black is a low-cost,
open source, community-supported development platform
for ARM Cortex-A8 processor. It is connected to the PC
following the procedure given below:
Step1: Connect different temperature sensors to different
channels of NI 9219 Universal AI module.
Step 2: Using DAQ Assistant block in LabVIEW select the
channel and parameter, and then set the number of samples
and baud rate.
Step 3: Run the VIs and obtain the output.
Step 4: Connect Beagle Board to the PC using USB cable.
Step 5: Open Start.htm from the window appeared. A
beagleboard.org webpage will appear.
Step 6: Install the driver corresponding to the Windows 64
bit.
Step 7: Click to the IP address of the board. A window will
appear showing the successful connection of the board.
Step 8: Connect the keyboard to the board using MicroUSB.
Step 9: Power ON the board and connect it to the Desktop
PC or TV using HDMI cable.
Step 10: The board will act as a mini computer and write the
program in text editor and save as javascript (.js) file.
Step 11: Connect the sensor to the temp out pin 36 of the
board and pin 34 of the board to ground.
Step 12: Disconnect keyboard and connect the Ethernet
cable to computer and type the IP address (198.168.1.2) of
the board to the web box of the browser. The
beagleboard.org page will appear and our project will be
displayed at the left of that page.
Step 13: Click on the project name and click Run.
Change the adapter settings of the PC for network
sharing. The remote temperature monitoring system window
will appear and the real time temperature data is transmitted
via LAN. Using the virtual Wi-Fi hotspot application, the
live temperature data is obtained in mobile phone also. This
setup makes the system suitable for Internet of Things (IoT).
The below figures shows the data transmission window of
remote PC and mobile.

Fig.19 Remote Monitoring using Mobile Phone

V. CONCLUSION
Temperature is one of the important parameters in the
actual industrial processes, designing efficient temperature
measurement system has been the focus of the work. In this
paper, we have designed an intelligent temperature
measurement system using DS18B20 to work as a
standalone module. It should also be noted that the sensor is
the core device of temperature detection system, whose
performance parameters directly affects the accuracy of the
detected temperature. In this work, the accuracy of
DS18B20 based temperature monitoring system is compared
with other conventionally used temperature measuring
sensors like LM35, RTD and Thermocouple. The overall
response curve for the temperature is plotted and analyzed
using various measures. The Experimental result shows that,
the behavior of DS18B20 is almost equal to the
conventional sensors, especially with platinum based RTD
used in space applications which determines its scope and
utility. A remote monitoring system is also developed using
BeagleBone Black board and the data is transmitted to
another PC and mobile phone.
REFERENCES
[1]

[2]

[3]

[4]
[5]

[6]
[7]

Jie LI, Qiao JIANG, Xi-ning YU, Ying DU, Intelligent Temperature
Detecting System, IEEE Conference on Intelligent System Design
and Engineering Application, Changsha, 2010: 888-891.
Abhishek Mallik and Sauvik Das Gupta, Modelling of MEMS
based Temperature sensor and temperature control in a petrochemical
industry using LabVIEW., IEEE Conference on Computer and
Automation Engineering, Bangkok, 2009:287-292.
WANG Li-xin, YANG Shao-qing, ZHENG Hong-jun, Temperature
measurement method and temperature sensor, Liaocheng Teachers
College, 2005, 12(01):32-34.
ZHANG Jin-min. Application of single-bus digital temperature
system based on DS18B20, Chinese instruments, 2005(03):86-88.
MA Jin, LI Xiao-guang, NING Wei, Theory and development of
several commonly used temperature sensors, Chinese instruments,
2004(041-4.
WEI Ying-zhi. Application of DS18B20 in temperature control,
Coal Mine Machinery, 2005(03):92-94.
L. Abraham, Manual on LabVIEW, SCITECH Publications (India)
Pvt. Ltd.

Fig.18 Monitoring using Remote PC

281

Anda mungkin juga menyukai