You are on page 1of 14

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/328288091

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


MLX90614

Article  in  The Open Automation and Control Systems Journal · February 2015


DOI: 10.2174/1874444301507010008

CITATIONS READS
20 3,732

5 authors, including:

Yunxue Liu
Yantai University
21 PUBLICATIONS   62 CITATIONS   

SEE PROFILE

All content following this page was uploaded by Yunxue Liu on 19 August 2020.

The user has requested enhancement of the downloaded file.


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
efficiently.
Liquid identification becomes more and more important
in the safety inspection at the subway, airport, ferry, rail-
way, and so on. Non-contact liquid security identification 2. HARDWARE DESIGN
is the best way because it can avoid the contamination of
the liquids and the injuries caused by some corrosive and 2.1. Structure of the Non-Contact Infra-Red Thermome-
toxic liquids. It can also speed up the identification. Yet the ter
accuracy of the non-contact liquid security identification is
affected by the temperature and it is important to measure The temperature measurement system mainly acquires
the temperature of the liquid when identified with micro- the temperature of liquids and stores the temperature data
wave equipment. into flash memory for system use, and can display the data
on LCD. The user can also set the upper and lower limits
There are many ways to measure the temperature of ob-
by keys module. The system gives the audio-light alarm if
jects. The temperature measurement can be mainly divided
it goes beyond the limits. Structure diagram of temperature
into contact measurement and non-contact measurement. measurement system is shown in Fig. (1).
We choose the non-contact method based on the infrared
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- Structure diagram of STM32F107 connectivity line
terials. Also, it corrects the results of the measured temper- LQFP100 pin out is shown as Fig. (2).
ature. It meets the requirements of high real-time, reliable,
2.3 Digital Thermometer MLX90614
*Address correspondence to this author at the Qingquan Road, Yantai, The MLX90614 is an Infra-Red thermometer for non-
Shandong, China. Postcode: 264005; Tel: 08613780951616; contact temperature measurements which is manufactured by
E-mail: jingang107@126.com
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

MLX90614 Keys Module


STM32F107

Flash RAM LCD1602

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

BOOT0
VDD_3
VSS_3

PA15
PA14
PC10
PC11
PC12
PD0
PD7

PD4
PD3
PD2
PD1
PD6
PB9
PB8
PB7
PB6
PB5
PB4
PB3

PD5
PE0
PE1
100

91
90
89
88
87
86
85
84
99
98
97
96
95
94
93
92

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

42
43
44
45
46
47
48
49
50
34
35
36
37
38
39
40
41

VDD_1
Vss_1
PA3

PA5
PA6
PA7
PA4
VDD_4

PC4
PC5
PB0
PB1

PB10
PB11
VSS_4

PB2

PE10
PE11
PE12
PE13
PE14
PE15
PE7
PE8
PE9

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].
3-VDD 4-VSS
Pin function of MLX90614 is shown as Table 1, and pin
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

STM32F107 4.7k MLX90614


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

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


2.5. Keys Module
object. LCD1602 is a kind of display which can display 16*2
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
are shown as Table 3. Key 1 together with Key 2 ~ Key 3
The structure diagram of STM32F107 and LCD1602
can set the up/down limits of alarm value.
connection is shown in Fig. (5).
Design of Non-contact Infra-Red Thermometer The Open Automation and Control Systems Journal, 2015, Volume 7 11

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

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
47
PB10
48
PB11
51
PB12
1 2 3
52
PB13
4 5 6
53
PB14

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 The MLX90614 measures and calculates the temperature
with a beeper and red LED. The alarm sets off if the meas- 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

S Start Condition
Wr Write(bit value of 0)
A Acknowledge (can be 0 for ACK and 1 for NACK)
P Stop 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 Wr A Command A Sr Rd A
Address Address
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 1 1 8 1
Slave
S S Wr A Command A
Address

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

(b) SMBus Write Word Format

S Start Condition P Stop Condition


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

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-
SMBus read/write word format is shown as Fig. (8).
col.
The flow charts of SMBus Write/Read Word is shown in
The SMBus interface is a 2-wire protocol, allowing Fig. (9).
communication between the Master Device (MD) and one or
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
Acknowledged?
Send ‘S’
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
Acknowledged? Receive ‘DataHigh’

Send ‘Command’ Send ‘A’

N
Acknowledged? Receive ‘PEC’

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?

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
S=15mm
15
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 The comparison of the measured temperature to the actu-
liquid bottle. It is necessary to study these effects to elimi- al temperature of the paper bottle at different distances is
nate the measurement error. Considering the working envi- shown in Fig. (15).
ronment of liquid security identification system, the test
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-
mal while the distance S measured is at 5mm. With the dis-
4.1. Distance Coefficient tance S increase, the measurement error will also increase.
The distance coefficient S/D is one of the most important The maximal error are 2.6°C (S=5mm), 2.8°C (S= 10mm)
parameters for the infrared thermometer [7]. S is the distance and 3.1°C (S=15mm) for glass bottle at 40°C.
from the MLX90614 to the bottle, and D is the diameter of
the bottle. When use the instrument with the S/D equal 12/1,
4.3. Different Materials of the Bottle
the distance coefficient requirement as shown in Table 4.
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
at a fixed distance.
First, study the effects of different test distance on differ-
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 bottles with different materials at a dis-
al temperature of the ceramic bottle at different distances is tance of S=10mm is shown in Fig. (17).
shown in Fig. (13).
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
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. (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
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. (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
20 Glass bottle (3mm)
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
20 Glass bottle (3mm)
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 4.4. Different Wall Thickness of the Bottle
with thin glass wall at a distance of S=10mm.
The wall thickness of bottles will affect the measured re-
The comparison of the measured temperature to the sults too. We study the results of different wall thickness of
actual temperature of the bottles with different materials glass bottles at a fixed distance.
at a distance of S=15mm is shown in Fig. (18).
The comparison of the measured temperature to the actu-
The maximal error is 3.2°C at 40°C for the bottles with al temperature of different wall thickness of the bottle at a
thick glass walls at a distance of S=15mm. distance of S=5mm is shown in Fig. (19).
The test results show that the bottles with different mate-
The comparison of the measured temperature to the actu-
rials give different measurement errors. The commercially
al temperature of different wall thickness of the bottle at a
available plastic water bottle produces minimum error as
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
20 Glass bottle (3mm)
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
results. We study the different results of different diameters
The test results show that the different wall thickness of of commercially available plastic water bottle at a fixed dis-
the bottles gives different measurement errors. Yet the max- tance.
imal error of the thin-wall bottle and the thick-wall one is
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 authors confirm that this article content has no con-
the big plastic bottle and the small one is only 0.5°C at 40°C
flict of interest.
in the measured distance of S=10mm.
To reduce the measurement errors, we can choose the ACKNOWLEDGEMENTS
best test distance at S=5mm. The error can be controlled in This work was supported in part by the National
the range of 0.5°C by adding temperature compensation al- “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.
Control., no. 10, pp. 2397-2400, 2011.
rity identification system. Completed the hardware circuit, [2] W.F. Liu, D.J. Song, J.C. Liu, and T.Han. “Design of an infrared
made the PCB plate, programmed the software with Keil C thermometer based on STM32”, Microcomputs Appl., vol. 31, no.
and debugged by Keil uVision4 MDK V4.22. Then, we stud- 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.
[5] T. Li and Y. Hu, “Intelligent positioning portable thermometer”,
wall thickness at various measuring distances. It meets the Transduc. Microsyst. Technol., vol. 33, no. 4, pp. 95-98, 2014.
requirements of high reliability and low power consumption [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
From Infrared Temperature Surveying”, J. SuZhou Instit. Silk
fication system. 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.

View publication stats

You might also like