Sie sind auf Seite 1von 13

Send Orders for Reprints to reprints@benthamscience.

ae
8 The Open Automation and Control Systems Journal, 2015, 7, 8-20

Open Access
Design of Non-Contact Infra-Red Thermometer Based on the Sensor of
MLX90614

Gang Jin1,*, Xiangyu Zhang2, Wenqiang Fan1, Yunxue Liu1 and Pengfei He1

1
Institute of Optical-electronic Engineering, Yantai University, Yantai, Shandong, China
2
Tianjin Huaning Electronics Co., Ltd. Tianjin, China

Abstract: Liquid identification becomes more and more important in the safety inspection at the subway, airport, and
railway. Non-contact liquid security identification is the best way, because it can avoid the contamination of the liquids
and the injuries caused by some corrosive and toxic liquids. The paper designed the non-contact Infra-Red thermometer
based on the sensor of MLX90614 and the most favored microprocessor STM32F107 for the non-contact liquid security
identification system. Completed the hardware circuit, made the PCB plate, programmed the software with Keil C and de-
bugged by Keil uVision4 MDK V4.22. Then, studied the effects by measuring the temperature differences using bottles
with various shapes, materials, sizes and wall thickness at different distances. The system meets the requirements of high
reliability, low costs, low power consumption, real time response and the demands of the non-contact liquid security iden-
tification system.

Keywords: Digital sensors, Infra-Red thermometer, MLX90614, Safety inspection, STM32F107.

1. INTRODUCTION
low cost and low power consumption. The system works
Liquid identification becomes more and more important efficiently.
in the safety inspection at the subway, airport, ferry, rail-
way, and so on. Non-contact liquid security identification is
2. HARDWARE DESIGN
the best way because it can avoid the contamination of the
liquids and the injuries caused by some corrosive and toxic
liquids. It can also speed up the identification. Yet the 2.1. Structure of the Non-Contact Infra-Red Thermome-
accuracy of the non-contact liquid security identification is ter
affected by the temperature and it is important to measure The temperature measurement system mainly acquires the
the temperature of the liquid when identified with micro- temperature of liquids and stores the temperature data into
wave equipment. flash memory for system use, and can display the data on
There are many ways to measure the temperature of ob- LCD. The user can also set the upper and lower limits by
jects. The temperature measurement can be mainly divided keys module. The system gives the audio-light alarm if it
into contact measurement and non-contact measurement. goes beyond the limits. Structure diagram of temperature
We choose the non-contact method based on the infrared measurement system is shown in Fig. (1).
technology [1] to measure the temperature for the liquid in
the bottle, especially in cases of fast, accurate, and closed 2.2. Microprocessor STM32F107
bottles.
The microprocessor is the central processing unit of the
This paper designs the non-contact Infra-Red thermom- temperature measurement system. STM32F107 is a kind of
eter based on the sensor of MLX90614 and the most fa- ARM Cortex™-M3 RISC [2] 32-bit processor with pro-
vored microprocessor STM32F107, and studies the hard- duced by STMicroelectronics. The maximum frequency of
ware construction and the software design in details. This the processor can reach up to 72 MHz and the flash
software is programmed with Keil C and debugged by Keil memory is 64 to 256 Kbytes [3]. It has high integration
uVision4 MDK V4.22, and studies the effect of the tem- level, high-performance and low power consumption.
perature on different bottles with different shapes and ma-
terials. Also, it corrects the results of the measured temper- Structure diagram of STM32F107 connectivity line
ature. It meets the requirements of high real-time, reliable, LQFP100 pin out is shown as Fig. (2).

2.3 Digital Thermometer MLX90614


*Address correspondence to this author at the Qingquan Road, Yantai,
Shandong, China. Postcode: 264005; Tel: 08613780951616; The MLX90614 is an Infra-Red thermometer for non-
E-mail: jingang107@126.com contact temperature measurements which is manufactured by
Melexis.

1874-4443/15 2015 Bentham Open


Design of Non-contact Infra-Red Thermometer The Open Automation and Control Systems Journal, 2015, Volume 7 9

STM32F107

Flash RAM LCD1602


MLX90614 Keys Module

Audio-Light
Alarm
Fig. (1). Structure diagram of temperature measurement system.

PA14 PA15 PC10 PC11 PC12 PD0 PD1 PD2 PD3 PD4
PD5 PD6 PD7 PB3 PB4 PB5 PB6 PB7 BOOT0
PB8 PB9 PE0 PE1 VSS_3 VDD_3

PE2 76
PE3 1 77 75 VDD_2
PE4 2 74 VSS_2
PE5 NC
PE6 3 73 PA13
VBAT 4 72 PA12
PC13-TAMPER-RTC 5 71 PA11
PC14-OSC32-IN 6 PA10
PC15-OSC32-OUT 70 PA9
VSS_5 7 69 PA8
VDD_5 8 STM32F107 68 PC9
OSC_IN 9 PC8
OSC_OUT LQFP100 67 PC7
NRST 10 66 PC6
PC0 11 65 PD15
PC1 PD14
12 64 PD13
PC2
PC3 13 63 PD12
VSSA 14 62 PD11
VREF- PD10
VREF+ 15 61 PD9
VDDA 16 60 PD8
PA0-WKUP 17 59 PB15
PA1 PB14
PA2 18 58 PB13
19 57 PB12
20 56
2726

21 55
22 54
PA3 VSS_4 VDD_4

23 53
24 52
25 51
Fig. (2). Structure diagram of STM32F107 connectivity line LQFP100 pin out.

Due to its low noise amplifier, 17-bit ADC and powerful


DSP unit, a high accuracy and resolution of the thermometer
is achieved. The thermometer used is factory calibrated with
a digital PWM and SMBus (System Management Bus) out-
put. As a standard, the 10-bit PWM is configured to continu-
ously transmit the measured temperature in the range of -20
2-PWM/SDA 1-SCL/ Vz
to 120 ˚C with an output resolution of 0.14 °C [4].
Pin function of MLX90614 is shown as Table 1, and pin 3-VDD 4-VSS
description is shown as Fig. (3).
In normal mode the measured object temperature is
available at pin 2 with Pulse Width Modulated. And in
SMBus [5] compatible mode is automatically configured as
open drain NMOS.
Fig. (3). Pin description of MLX90614 (Top view).
10 The Open Automation and Control Systems Journal, 2015, Volume 7 Jin et al.

Table 1. Pin functions of MLX90614.

Pin Name Pin Function

1 SCL Serial Clock Input

2 PWM/SDA Data In/Out

3 VDD External Supply Voltage

4 VSS Ground

VCC VCC
MLX90614 SCL
STM32F107 4.7k SDA
78 4.7k 1
PC10 PC11 2 VDD VSS
79
VCC 3
0.1μF
4

Fig. (4). Structure diagram of STM32F107 and MLX90614 connection.

Table 2. Pin function of LCD1602.

Pin Name Pin Function

1 VSS GND

2 VDD Power Supply Voltage

3 VO Contrast Adjust

4 RS Register Select

5 R/W Read/Write

6 E Enable Signal

7~14 DB0~DB7 Data Bit 0~7

15 A+ Backlight Positive Pole

16 K- Backlight Negative Pole

The structure diagram of STM32F107 and MLX90614


The VO pin connects a 10K variable resistor as contrast
connection is shown as Fig. (4).
adjusts. A+ connects +3.3V as backlight positive of power
supply and K- connects GND as backlight cathode of power
2.4. Displayer Module supply.
Displayer module can display the temperature data of the
object. LCD1602 is a kind of display which can display 16*2 2.5. Keys Module
characters with low power consumption. Pin function of
Six keys module is designed as a part of a friendly hu-
LCD1602 is shown as Table 2.
man-machine interaction interface. The definitions of keys
The structure diagram of STM32F107 and LCD1602 are shown as Table 3. Key 1 together with Key 2 ~ Key 3 can
connection is shown in Fig. (5). set the up/down limits of alarm value.
Design of Non-contact Infra-Red Thermometer The Open Automation and Control Systems Journal, 2015, Volume 7 11

STM32F107 LCD1602
PC8 65 4 RS
64 5 R/W E
PC7
63 6 DB0
PC6
~ DB7
PA0 23~32 7~14
~
PA7

Fig. (5). Structure diagram of STM32F107 and LCD1602 connection.

Table 3. Key definitions.

Key Name Definition

1 Set Set Temperature Alarm Value Limit

2 Shift A Circular Left Shift

3 Increase The Value Plus One

4 Measure Start the Measurement

5 Cancel Cancel the Modified Data Before

6 OK Acknowledgement Key

STM32F107
PB1047
PB1148
PB1251
1
PB1352 2 3
PB1453
4 5 6

Fig. (6). Structure diagram of key module.

These six keys are organized as a 2 by 3 matrix with 5


ured value goes beyond the limits. It uses the DC power and
ports of STM32107. The structure diagram of key module is
the battery power to ensure the reliability. The system can
shown in Fig. (6).
also work in sleep mode to reduce power consumption.

2.6. Other Modules 3. SOFTWARE DESIGN


The non-contact Infra-Red thermometer module uses the
4GB flash memory K9LBG08U0M made by Samsung for 3.1. The Transport Protocols of MLX90614
data storage. The audio-light alarm system is configured
with a beeper and red LED. The alarm sets off if the meas- The MLX90614 measures and calculates the temperature
of the object and provides the results through the PWM out-
12 The Open Automation and Control Systems Journal, 2015, Volume 7 Jin et al.

S Slave Address Wr A Data Byte A P


SStart Condition
Wr Write(bit value of 0)
AAcknowledge (can be 0 for ACK and 1 for NACK) PStop Condition
Slave-to-Master Master-to-Slave

Fig. (7). SMBus packet element key.

1 7 1 1 8 1 1 7 1 1
Slave Slave
S Address Wr A Command A Sr Address Rd A

8 1 8 1 8 1 1
Data Byte Data Byte
A A PEC A P
Low High

(a) SMBus Read Word Format

1 7 11 8 1
Slave
S S Wr A Command A
Address

8 1 8 1 8 11
Data Byte Data Byte
A A PEC A P
Low High

(b) SMBus Write Word Format

Start Condition S PStop Condition PEC Packet Error Code


Repeated Start Condition
Sr Rd Wr Read(bit
A value of 1) Write(bit value of 0) Acknowledge
Master-to-Slave
Slave-to-Master

Fig. (8). SMBus read/write word format.

put or the SMBus interface which are built with pins


SMBus packet element key is shown as Fig. (7).
PWM/SDA and SCL [6]. The paper uses the SMBus proto-
col. SMBus read/write word format is shown as Fig. (8).
The SMBus interface is a 2-wire protocol, allowing The flow charts of SMBus Write/Read Word is shown in
communication between the Master Device (MD) and one or Fig. (9).
more Slave Devices (SD). At a given time, only one master The flow charts of temperature measurement by
device can be present and the MLX90614 can only be used MLX90614 is shown as Fig. (10).
as a slave device.
Design of Non-contact Infra-Red Thermometer The Open Automation and Control Systems Journal, 2015, Volume 7 13

Start

N
Send ‘S’ Acknowledged?

Y
Send ‘SlaveAddress&Wr’ Send ‘DataLow’

N N
Acknowledged? Acknowledged?

Y Y
Send ‘Command’ Send ‘PEC’

N N
Acknowledged? Acknowledged?

Y Y
Send ‘DataHigh’ Return

(a) SMBus Write Word

Start

Send ‘S’ Receive ‘DataLow’

Send ‘SlaveAddress&Wr’ Send ‘A’

N Receive ‘DataHigh’
Acknowledged?

Send ‘Command’ Send ‘A’

N Receive ‘PEC’
Acknowledged?

Send ‘Sr’ Send ‘A’

N
Acknowledged? Return

Send ‘SlaveAddress&Rd’

N
Acknowledged?

(b) SMBus Read Word

Fig. (9). The flow charts of SMBus write/read word.


14 The Open Automation and Control Systems Journal, 2015, Volume 7 Jin et al.

Start

MLX90614 initialize

Read DATA from RAM(07H)

Calculate of the temperature value

Store and display the temperature value

Return

Fig. (10). The flow charts of temperature measurement by MLX90614.

Start

System Initialization

N
Keys Pressed?

Y
Close timer

Keys Processing

Open timer

Timer Overflow

N
Other Operation?

Y
Deal with the Operation

Low Power Consumption Management

N
Key 1 or 4?

Y
System Wakeup

Fig. (11). The flow chart of main program.

It can get the Celsius temperature from the formula 3.2. Main Program
T (C)  [DataHigh : DataLow]* 0.2  273.15 Main program is a big loop. The flow chart of main pro-
gram is shown in Fig. (11).
Design of Non-contact Infra-Red Thermometer The Open Automation and Control Systems Journal, 2015, Volume 7 15

Table 4. The distance coefficient requirement.

D(mm) 10 20 50 100

S(mm) <120 <240 <600 <1200

40

The measured temperature(C )


35

30

25

20
S=5mm
S=10mm
15 S=15mm
20 22 24 26 28 30 32 34 36 38 40
The actual temperature(C )

Fig. (12). The comparison of the measured temperature to the actual temperature of the commercially available plastic water bottle at differ-
ent distances.

4. ANALYSIS OF THE TEST RESULTS


The comparison of the measured temperature to the actu-
The measurement results of liquid temperature are af- al temperature of the glass bottle at different distances is
fected by many factors such as distance coefficient, meas- shown in Fig. (14).
ured distances, the material, the shape and the thickness of
liquid bottle. It is necessary to study these effects to elimi- The comparison of the measured temperature to the actu-
nate the measurement error. Considering the working envi- al temperature of the paper bottle at different distances is
ronment of liquid security identification system, the test shown in Fig. (15).
temperature is from 20°C to 40°C. The test result shows that the distance of the MLX90614
to the bottle will affect the measurement. The error is mini-
4.1. Distance Coefficient mal while the distance S measured is at 5mm. With the dis-
tance S increase, the measurement error will also increase.
The distance coefficient S/D is one of the most important
parameters for the infrared thermometer [7]. S is the distance The maximal error are 2.6°C (S=5mm), 2.8°C (S= 10mm)
from the MLX90614 to the bottle, and D is the diameter of and 3.1°C (S=15mm) for glass bottle at 40°C.
the bottle. When use the instrument with the S/D equal 12/1,
the distance coefficient requirement as shown in Table 4. 4.3. Different Materials of the Bottle
The material of bottles affects the measured results. We
4.2. Effects of Different Test Distances study the different results of bottles with different materials
First, study the effects of different test distance on differ- at a fixed distance.
ent materials. Plastic, ceramic, glass and paper are chosen as The comparison of the measured temperature to the actu-
the test specimens, and the test distances S are at 5mm, al temperature of the bottles with different materials at a dis-
10mm and 15mm respectively.
tance of S=5mm is shown in Fig. (16).
The comparison of the measured temperature to the actu-
The maximal error is 26°C at 40°C for glass and ceramic
al temperature of the commercially available plastic water
bottles at a distance of S=5mm.
bottle at different distance is shown in Fig. (12).
The comparison of the measured temperature to the actu- The comparison of the measured temperature to the actu-
al temperature of the ceramic bottle at different distances is al temperature of the bottles with different materials at a dis-
shown in Fig. (13). tance of S=10mm is shown in Fig. (17).
16 The Open Automation and Control Systems Journal, 2015, Volume 7 Jin et al.

38
36

The measured temperature(C )


34
32
30
28
26
24
22
S=5mm
20 S=10mm
S=15mm
18
20 22 24 26 28 30 32 34 36 38 40
The actual temperature(C )

Fig. (13). The comparison of the measured temperature to the actual temperature of the ceramic bottle at different distances.

38
36
The measured temperature(C )

34
32
30
28
26
24
22
S=5mm
20 S=10mm
S=15mm
18
20 22 24 26 28 30 32 34 36 38 40
The actual temperature(C )

Fig. (14). The comparison of the measured temperature to the actual temperature of the glass bottle at different distances.

38
36
The measured temperature(C )

34
32
30
28
26
24
22 S=5mm
20 S=10mm
S=15mm
18
20 22 24 26 28 30 32 34 36 38 40
The actual temperature(C )

Fig. (15). The comparison of the measured temperature to the actual temperature of the paper bottle at different distances.
Design of Non-contact Infra-Red Thermometer The Open Automation and Control Systems Journal, 2015, Volume 7 17

40

The measured temperature(C )


35

30

25

20 plastic bottle ceramic bottle Glass bottle(3mm)


Glass bottle(9mm)
paperbottle
15
20 22 24 26 28 30 32 34 36 38 40
The actual temperature(C )

Fig. (16). The comparison of the measured temperature to the actual temperature of the bottles with different materials at a distance of
S=5mm.

40
The measured temperature(C )

35

30

25
plastic bottle
ceramic bottle
20 Glass bottle(3mm)
Glass bottle(9mm)
paperbottle
15
20 22 24 26 28 30 32 34 36 38 40
The actual temperature(C )

Fig. (17). The comparison of the measured temperature to the actual temperature of the bottles with different materials at a distance of
S=10mm.

40
The measured temperature(C )

35

30

25

20 plastic bottle ceramic bottle Glass bottle(3mm) Glass bottle(9mm)


paperbottle

15
20 22 24 26 28 30 32 34 36 38 40
The actual temperature(C )

Fig. (18). The comparison of the measured temperature to the actual temperature of the bottles with different materials at a distance of
S=15mm.
18 The Open Automation and Control Systems Journal, 2015, Volume 7 Jin et al.

38
36

The measured temperature(C )


34
32
30
28
26
24
22
Glass bottle (3mm)
20
Glass bottle (9mm)
18
20 22 24 26 28 30 32 34 36 38 40
The actual temperature(C )

Fig. (19). The comparison of the measured temperature to the actual temperature of different wall thickness of the bottle at a distance of
S=5mm.

38
36
The measured temperature(C )

34
32
30
28
26
24
22
Glass bottle (3mm)
20
Glass bottle (9mm)
18
20 22 24 26 28 30 32 34 36 38 40
The actual temperature(C )

Fig. (20). The comparison of the measured temperature to the actual temperature of different wall thickness of the bottle at a distance of
S=10mm.

The maximal error is 3.2°C at 40°C for the bottles with


thin glass wall at a distance of S=10mm. 4.4. Different Wall Thickness of the Bottle
The comparison of the measured temperature to the The wall thickness of bottles will affect the measured re-
actual temperature of the bottles with different materials sults too. We study the results of different wall thickness of
at a distance of S=15mm is shown in Fig. (18). glass bottles at a fixed distance.
The maximal error is 3.2°C at 40°C for the bottles with The comparison of the measured temperature to the actu-
thick glass walls at a distance of S=15mm. al temperature of different wall thickness of the bottle at a
The test results show that the bottles with different mate- distance of S=5mm is shown in Fig. (19).
rials give different measurement errors. The commercially The comparison of the measured temperature to the actu-
available plastic water bottle produces minimum error as al temperature of different wall thickness of the bottle at a
compared to the other bottles, and the glass bottle produces distance of S=10mm is shown in Fig. (20).
the maximal error.
Design of Non-contact Infra-Red Thermometer The Open Automation and Control Systems Journal, 2015, Volume 7 19

38
36

The measured temperature(C )


34
32
30
28
26
24
22
Glass bottle (3mm)
20
Glass bottle (9mm)
18
20 22 24 26 28 30 32 34 36 38 40
The actual temperature(C )

Fig. (21). The comparison of the measured temperature to the actual temperature of different wall thickness of the bottle at a distance of
S=15mm.

40
The measured temperature(C )

35

30

25

20
  60mm
  100mm
15
20 22 24 26 28 30 32 34 36 38 40
The actual temperature(C )

Fig. (22). The comparison of the measured temperature to the actual temperature of different diameters of the plastic bottle at a distance of
S=10mm.

The comparison of the measured temperature to the


4.5. Different Sizes of the Bottle
actual temperature of different wall thickness of the bottle
at a distance of S=15mm is shown in Fig. (21). The diameter of the bottles may also affect the measured
The test results show that the different wall thickness of results. We study the different results of different diameters
the bottles gives different measurement errors. Yet the max- of commercially available plastic water bottle at a fixed dis-
imal error of the thin-wall bottle and the thick-wall one is tance.
only 0.2°C between 20°C to 40°C. The measurement errors The comparison of the measured temperature to the actu-
are in the range of the design requirements, so the measure- al temperature of different diameters of the bottle at a dis-
ment errors can be ignored in different wall thickness of bot- tance of S=10mm is shown in Fig. (22).
tles.
20 The Open Automation and Control Systems Journal, 2015, Volume 7 Jin et al.

The test results show that the different sizes of the bottles
CONFLICT OF INTEREST
give different measurement errors. Yet the maximal error of
the big plastic bottle and the small one is only 0.5°C at 40°C The authors confirm that this article content has no con-
in the measured distance of S=10mm. flict of interest.
To reduce the measurement errors, we can choose the ACKNOWLEDGEMENTS
best test distance at S=5mm. The error can be controlled in
the range of 0.5°C by adding temperature compensation al- This work was supported in part by the National
“Twelve Five” Science and Technology Support Sub-
gorithm according to the data of test.
project (No. 2011BAK09B05) and National Natural
Science Foundation of China (No. 61202399).
CONCLUSION
The paper designed the non-contact Infra-Red thermome- REFERENCES
ter based on the sensor of MLX90614 and the most favored [1] W.Y. Bei, and H. Jiang, “Study of Temperature Wireless Moni-
microprocessor STM32F107 for the non-contact liquid secu- toring System Based on Infrared Technology”, Comput. Measur.
rity identification system. Completed the hardware circuit, Control., no. 10, pp. 2397-2400, 2011.
made the PCB plate, programmed the software with Keil C [2] W.F. Liu, D.J. Song, J.C. Liu, and T.Han. “Design of an infrared
and debugged by Keil uVision4 MDK V4.22. Then, we stud- thermometer based on STM32”, Microcomputs Appl., vol. 31, no.
2, pp. 22-24, 2012.
ied the effects of the results of the temperature measured by [3] “STM32F107xx DataSheet”, STMicroelectronics, 2009.
different bottles with different shapes, materials, sizes and [4] “MLX90614 DataSheet”, Melexis Corporation, 2007.
wall thickness at various measuring distances. It meets the [5] T. Li and Y. Hu, “Intelligent positioning portable thermometer”,
requirements of high reliability and low power consumption Transduc. Microsyst. Technol., vol. 33, no. 4, pp. 95-98, 2014.
[6] C.F. Sha. “MLX90614 IR Thermometer and Its Application”,
with real time response. The system works efficiently and
Modern Electron. Techniq., no. 22, pp. 36-40, 2007.
meets the demands of the non-contact liquid security identi- [7] S. M. Dai and G. R. Zhu, “The Analysis of the Error Caused
fication system. From Infrared Temperature Surveying”, J. SuZhou Instit. Silk
Textile Technol., vol. 20, no. 1, pp. 25-29, 2000.

Received: September 16, 2014 Revised: December 23, 2014 Accepted: December 31, 2014
© Jin et al.; Licensee Bentham Open.
This is an open access article licensed under the terms of the Creative Commons Attribution Non-Commercial License (http://creativecommons.org/licenses/
by-nc/4.0/) which permits unrestricted, non-commercial use, distribution and reproduction in any medium, provided the work is properly cited.

Das könnte Ihnen auch gefallen