You are on page 1of 6

8th International Multidisciplinary Symposium

UNIVERSITARIA
„Challenges and opportunities for sustainable development through quality and
SIMPRO 2018
innovation in engineering and research management”

Increase the Quality of Temperature Measurements


using Virtual Instrumentation
Nicolae Patrascoiua* Cosmin Rusa
a
University of Petrosani, Petrosani, Romania

Abstract

For temperature monitoring, there are many options that are determined either by the type of sensor used or the method of acquisition
and processing data from it. In this paper, we propose such a temperature monitoring system by using semiconductor integrated
sensors and an open source platform based acquisition module. The proposed system allows the selection of available several sensor
static characteristics used and their treatment by means of interpolation methods to process the data thus obtained.

Keywords: integrated sensor; LM 9402x; Arduino Uno; spline interpolation; LabView

1. Introduction

Obtaining temperature information allows either adjusting it in a process or system, or collecting data about other
physical variables whose values can be temperature dependent. As is known in the temperature measurement, different
types of sensors are used according to the functional principle. Thus, resistance temperature detectors (RTD),
thermistor, thermocouple, or p-n junction can be used.
It is known that the temperature sensitivity of the p-n junction is part of the transistor’s defining equations and is
quite predictable over the typical semiconductor operating the range of –55°C to +150°C. Starting from this observation,
the semiconductor temperature sensors are made and used.
Most semiconductor junction temperature sensors use a diode-connected bipolar transistor (by short-circuited the
collector-base junction). A constant current passed through the base-emitter junction produces a junction voltage
between the base and emitter (VBE) that is a linear function (VBE = f(T)) of the absolute temperature (T). The overall
forward voltage drop has a temperature coefficient of approximately 2 mV/°C
When compared to a thermocouple or a resistive temperature device (RTD), the temperature coefficient of a
semiconductor sensor is larger but still quite small. Also, the semiconductor sensor’s forward voltage has an offset that
varies significantly from unit to unit. However, the semiconductor junction voltage vs. temperature is much more linear
than that of a thermocouple or RTD. In addition to the temperature-sensing element, circuitry is easily integrated to
produce a monolithic temperature sensor with an output that can be easily interfaced to a microcontroller and to provide
features that are useful in specific applications. For example, by using an embedded temperature sensor with additional
circuitry, protection features can be added to integrated circuits (ICs) (Fraden. J., 2014).
Electronic platforms open – source offer users the possibility to create its own hardware structure based on a core
developed around a microcontroller. Their usefulness is essential in the realization phase, and especially in prototyping
phase of the technical systems requiring a central processing unit like microcontroller type (Oxer J., Hugh B., 2010).
In order to achieve the virtual instrument that we propose in this paper we used the Arduino platform. This is a
development board achieved in various configurations, every of these using various microcontrollers ATmega and can
be used for building digital devices and interactive objects that can sense and control physical devices. The software
component of the platform is integrated into a graphical user interface (GUI), IDE type, which is based on programming
language named Processing (Durfee W., 2008).

* Corresponding author. Tel.:; fax:.


E-mail address: nicolaepatrascoiu@upet.ro.
Developments in systems control, information technology and cybersecurity

2. Integrated temperature sensors LM 9402x

The integrated circuits LM9402x, (LM94021, LM94022, LM94023) built in CMOS technology, integrates a
temperature sensor and signal processing circuitry to provide an analog precision output signal that is dependent on the
temperature of the capsule.
For temperature monitoring, this application uses the LM94021 sensor manufactured by Texas Instruments and is
available on the LM9402xEVM Evaluation Module (EVM) with the same manufacturer. It is usable for a wide range of
temperatures between -50 °C and + 150 °C, providing an output voltage that is inversely proportional to the measured
temperature. It operates with a single-pole supply voltage starting from 1.5V and the low current required for the
LM94021 circuitry makes it ideal for battery-powered systems as well as for general temperature sensing applications.
With two logic inputs, Gain Select 1 (GS1) and Gain Select 0 (GS0), it is possible to select the slope, i.e. the value of
the output size according to the input voltage, i.e. the voltage-temperature ratio (Texas Instruments Inc., 2013).
The slope selection inputs can be directly connected to the source potential (VDD) or to the ground (GND) without
the need for pull-up or pull-down resistance, thus reducing the number of components. These selection entries can also
be controlled by TTL-compliant logical signals that allow the system to optimize gain during operation or system
diagnostics.
For the correct use of the temperature sensor in Fig.1., the pins configuration, the graphical presentation of the
transfer characteristics and the slopes corresponding to each of these characteristics are presented. The slopes are
chosen via the GS1 and GS0 pins (Texas Instruments Inc., 2013).

Fig.1. Typical transfer characteristics of the LM 94021 sensor

Although the LM94021 sensor response has a very good linearity is not perfectly linear, the response is slightly
parabolic. The shape of the operating characteristics presented in Fig.1. is approximately linear.
The actual operating features are tabulated and can be used in applications built with this sensor by the "look-up
table" method. Output voltage values expressed in mV for all 4 selectable sensitivities and for the full range are
available to download at http://www.ti.com/lsds/ti/analog/temperature_sensor.page.
The static characteristics can be expressed and analytically based on the next parabolic equations defined for the 4
slopes as follows:

mV mV
VTEMP  mV  =870,6mV-5,506   T-30o C  -0,00176 o   T-30o C 
2
For GS1 = 0 / GS0 = 0 o
(1)
C C

mV mV
VTEMP  mV  =1324,0mV-8,194   T-30o C  -0,00262 o   T-30o C 
2
For GS1 = 0 / GS0 = 1 o
(2)
C C

mV mV
VTEMP  mV  =1777,3mV-10,888   T-30o C  -0,00347 o   T-30o C 
2
For GS1 = 1 / GS0 = 0 o
(3)
C C

mV mV
VTEMP  mV  =2230,8mV-13,582   T-30o C  -0,00433 o   T-30o C 
2
For GS1 = 1 / GS0 = 1 o
(4)
C C
SIMPRO 2016: Sustainable Development through Quality and Innovation in Engineering and Research

3. Hardware structure

An Arduino Uno open source platform is used to acquisition and primary process of the signal from the sensor. In
Fig.2. the block diagram of the monitoring system is presented.

LM9402xEVM

Output LM94023
Output LM94022
Output LM94021
 LM94021
GS1
GS0

VDD
GND
4
3
2
1
0
13
12
11
10
9
8
AREF
GND
Digital IO
PC PWM Arduino
LabVIEW Power UNO
Analog inputs
Reset

GND
3V3

A5
A3
A4
A1
A2
A0
5V

Fig.2. Hardware structure

Information about the temperature value represented by the voltage at the sensor output is taken over by the Arduino
Uno module respectively from the analog channel AI0 to which the signal from the sensor is connected. For other
analog values, the other analog channels can also be used through a suitable selection.
With the Arduino Uno module, a first signal processing is made, namely its analog-to-digital conversion, for which
the integrated microcontroller ATmega328 structure on the Arduino Uno module is used (Evans W.B., 2014).
Through the USB serial interface is obtained a link between a computer and the Arduino Uno module so that the data
can be retrieved and processed by means of an application written in LabVIEW. This application provides to the user
the data in a synthetic form via an appropriate interface. Also through the same interface user will be able to generate
certain commands to the monitored technical system.
The sensor slope control is achieved through two digital channels that allow the user to select any of the four slope
values through the application.

3.1. LM9402xEVM Evaluation Module (EVM)

The Texas Instruments LM9402xEVM (EVM) evaluation module, Fig.3. is designed to evaluate the operation mode
and performance of the LM94021, LM94022 and LM94023 sensors (Texas Instruments Inc, 2018).

Fig.3. The LM9402xEVM Evaluation Module (EVM)

The Texas Instruments LM9402xEVM (EVM) evaluation module contains all three temperature analogue sensors
and all jumpers for setting the slope either by connecting to the VDD supply voltage (GSx = 1) or by connecting to the
GND table (GSx = 0). Slope control can also be accomplished by appropriate logic levels taken from the digital
channels of the Arduino Uno module and applied on the same jumper. Are used for this the digital IO2 and IO3 pins.
The analog output of the sensor is connected to the analog input AN0 of the Arduino module.
Developments in systems control, information technology and cybersecurity

4. Virtual instrument

The virtual instrument is the application and represents the program written in LabVIEW, with which the
communication with the Arduino Uno module is managed, and the processing of the data received from the sensors via
the Arduino module is performed.

4.1. Front panel

On the front panel there are user interface elements that can be used to:
 entering data or commands (input elements) called controls;
 displaying the results obtained by processing data called indicators.
In Fig.4. there are shown the snapshots of the front panel of the virtual instrument corresponding to its operation.
In the realization of this application, three windows of the front panel are used, the user having the choice of any at
any time of them. The three windows named Grafic, Tabel and Statistica can be selected using the Tab command.

Fig.4. Snapshots of the front panel

The Grafic window is used to display the time evolution of the monitored temperature values. The time units on the
abscissa are the real-time units, represented by the date, time, minute, and second corresponding to the reading of the
respective temperature value by the sensor.
The Tabel window is a table representation of these temperature readings and their reading times
The Statistica window shows the maximum value found throughout the temperature acquisition as well as the time of
its identification.
Also on the front panel are the following indicators:
 Tensiune - a numeric type indicator showing the volt value of the voltage read from the sensor;
 Temperatura curenta - slide indicator showing the value of the current temperature in degrees;
 Alarma 1, Alarma 2, Alarma 3 - Boolean indicators indicating that the set alarm thresholds have been exceeded
The controls on the front panel with their defined functions are:
 Portul Serial - ring control used to select the USB port to which the Arduino Uno module is connected;
 Canalul analogic - numerical control used to select the analog input to which the sensor to be read is connected;
 Sensibilitate - ring-type control used to select one of the 4 slopes of the sensor.
 Setpoint 1, Setpoint 2, Setpoint 3 - numerical controls used to set alarm thresholds.
 STOP - boolean control used to stop the program running
SIMPRO 2016: Sustainable Development through Quality and Innovation in Engineering and Research

4.2. Diagram block

The block diagram is the proper program and consists of operations, functions and programming structures arranged
according to the data flow necessary to execute the program (Sumathi S., Surekha P., 2007).
Running the program is done as long as the STOP button on the front panel is not actuated, and this operation is given
by including all operations and functions in a While structure. Between two consecutive cycles of this structure, a delay
of 1 sec is set by using the Wait  Until  Next  ms.vi function so that the acquired temperature values with one read per
second. Is used the Open Serial.vi function that open a serial communication with the LINX-controlled module, in this
case the Arduino Uno module, and Close.vi function, respectively, that shut down communication with the LINX-
controlled module and release the computer's connection resources. The activation of the two functions takes place
when the program starts running after the STOP button is activated.
The general block diagram of the virtual instrument is presented in Fig. 5.

Fig.5. Block diagram of the virtual instrument

By using the Sequence structure, data acquisition and processing takes place in two sequences, as follows:
1. The slope value is selected by using the Digital Write.vi function that sent through selected digital outputs the proper
code to the selection pins GS0 and GS1;
2. The voltage value is read from the sensor by using the Analog Read.vi function and the voltage-temperature
conversion in made after that.
With the values of the voltage read from the AN0 analog input for the voltage-temperature conversion, the relations
(1) ... (4) or the "look-up table" can be used.
In this application, for the conversion voltage-temperature was chosen a method that does not involve significant
memory allocation and is valid across the entire range of the transducer. An interpolation method has been chosen for
only a few of the voltage-temperature pairs from the sensor catalog.
The Spline  Interpolant.vi and Spline  Interpolation.vi functions are used for a small set of value pairs from the sensor
catalog for each slope, as shown in Fig 6.

Fig.6. Voltage – temperature conversion for all four slopes


Developments in systems control, information technology and cybersecurity

The Spline  Interpolation.vi function returns a temperature value by the spline interpolation. The current temperature
correspond to the values of the read tension and the values obtained at the output of the Spline  Interpolant.vi function
that return an array with the length of the number of values and containing the second derivative of the spline g(x) at the
tabs of the read tension.
During the acquisition, the maximum value of the temperature and the moment of its occurrence are identified in
each reading cycle by using the Shift  Register operation. With this transfer operation between consecutive cycles, the
maximum value identified in a cycle with the new read value is compared and the maximum between them is kept,

Maximum 
temperature 
value
Temperature 
array

Current 
temperature value Current time

Fig.7. Identifying the maximum temperature

At the same time, the values read in each cycle are grouped and indexed into a vector so that for each maximum of
the temperature values its vector index is also identified. Simultaneously with the temperature values are indexed and
their time moments and using the index of the maximum temperature can be found and the time of reading this value.
The readings values of the temperature can be exported in a .lvm format to a file that can be later opened in an Excel
spreadsheet and used to keep a history of the measured sizes. For this, Write  To  Measurement  File  Express  VI function is
used. This function performs the data entry in text-based measurement files (.lvm), binary measurement files (.tdm or
.tdms) or Microsoft Excel files (.xlsx).

5. Conclusions

Following the obtained results it can conclude that this virtual instrument can be used to acquire the temperature
values with high measurement speed and precision selected through selected slopes.
The fastest of the tested sensors is the LM 94021, with the linearity being very good, the other sensors being slower
but the conclusions being valid for them as well in terms of precision. .
Data is stored in an external Excel file and further processing is possible.
Similarly, implementation can be done on other sensors with low time response (humidity sensor, atmospheric
pressure sensor, etc.)

References

Fraden. J., Handbook of Modern Sensors. Physics, designs, and applications. Third edition. Springer-Verlag New York,
(2014)
Durfee W., Arduino Microcontroller Guide, University of Minnesota, www.me.umn.edu/courses/me2011/arduino/,
(2009)
Evans W.B. Arduino Programming Notebook Creative Commons, San Francisco, (2014)
Oxer J., Hugh B., Practical Arduino. Cool Projects for Open Source Hardware, Springer-Verlag New York, (2010)
Sumathi S., Surekha P., LabVIEW based Advanced Instrumentation Systems Springer-Verlag Berlin Heidelberg, (2007)
Texas Instruments Inc., LM94021/LM94021Q Multi-Gain Analog Temperature Sensor, Dallas, USA ( 2013)
Texas Instruments Inc., LM9402xEVM Evaluation Module (EVM). User's Guide, Dallas, USA ( 2018)
* * *, Arduino Compatible Compiler for LabVIEW-Version 1.0.0.19, TSXeperts Alledine, (2015)

You might also like