Microcontroller Based High Resolution Temperature Monitoring Data Acquisition System with Graphical User Interface

Similar documents
International Journal of Electronics and Computer Science Engineering 1588

Intelligent Pressure Measuring System

Advanced NI-DAQmx Programming Techniques with LabVIEW

Design of An Embedded System For Monitoring and Controlling Temperature and Light

Design of Intel 8751 Microcontroller-based System for Monitoring and Control of a Thermal Process

Microcontroller Based Data Acquisition System

Implementation of a real-time, high-speed data logger for Process control application

Temperature measurement board, optically isolated, 16/8/4 channels for thermocouples, Pt100, RTD, 18-bit

Temperature Sensor TMP2 PMOD Part 1

AMS 5812 OEM pressure sensor with an analog and digital output

DT9828. USB Powered Thermocouple Measurement Module. Key Features: Analog Input Channels

Research of digital temperature measurement system in vacuum thermal test based on DS18B20

MACHINE BREAKDOWN DETECTION SYSTEM

Manual iaq-engine Indoor Air Quality sensor

A PIC-based LCD Display for Stand-Alone Instrumentation

Basics of UART Communication

The engine temperature real-time monitoring instrument based on Microcontroller. Wang Jiayue, Yue Yuntao, Luan Ru, Zhang Jianghui Qin Xin

Design of Greenhouse Temperature and Humidity Monitoring System Based on ZIGBEE Technique Ming Xin 1,a, Wei Zhongshan 1,b,*

MICROCONTROLLER BASED SMART FAN SYSTEM

Temperature Measurement and Control System Based on Embedded WEB

Temperature Controller BTC-A-Series

Microtronix Avalon I 2 C

EPT-200TMP-TS-U2 TMP102 Temperature Sensor Docking Board Data Sheet

Rapid Response Body Thermometer HY11P32 Application Note

D115 The Fast Optimal Servo Amplifier For Brush, Brushless, Voice Coil Servo Motors

Amarjeet Singh. January 30, 2012

8520/8520R. User Manual

DT3016. High-Speed, Multifunction PCI Data Acquisition Board. Overview. Key Features. Supported Operating Systems

DSP240-LPI Inverter Controller Card. Technical Brief

With a digital input we can read two states, a high or low. A switch can be open or closed.

Conclusion and Future Scope

Let s first take a look at power consumption and its relationship to voltage and frequency. The equation for power consumption of the MCU as it

Digital Discovery Reference Manual

Ultra-Accurate Measurement for Temperature and Voltage

ME 224: EXPERIMENTAL ENGINEERING. Lecture 2

Infineon C167CR microcontroller, 256 kb external. RAM and 256 kb external (Flash) EEPROM. - Small single-board computer (SBC) with an

HZX N03 Bluetooth 4.0 Low Energy Module Datasheet

Isolated, Field Configurable Analog Input 6B11 / 6B11HV FEATURES APPLICATIONS PRODUCT OVERVIEW

Digital Temperature Sensor with I 2 C Interface

0.1 Slow Monitoring and Recording System

POWER SAVER METER USING MICROCONTROLLER TO SAVE ELECTRICITY UPTO 30-40%

OBSOLETE. Isolated, Linearized, Thermocouple Input 3B47 FEATURES APPLICATIONS PRODUCT OVERVIEW FUNCTIONAL BLOCK DIAGRAM

An SPI Temperature Sensor Interface with the Z8 Encore! SPI Bus

WHERE THE FUTURE MEETS THE PRESENT. Datascan. solo Network Based Data Acquisition System

PIN ASSIGNMENT PIN DESCRIPTION

DaqBoard/1000. Series 16-Bit, 200-kHz PCI Data Acquisition Boards

RN-174. WiSnap M2 Super Module. Features. Description. Applications. ~ page 1 ~ rn-174-ds v1.1 6/1/2011

BE/EE189 Design and Construction of Biodevices Lecture 5. BE/EE189 Design and Construction of Biodevices - Caltech

CSE 466 Exam 1 Winter, 2010

Design and Development of Low Cost Multi-Channel USB Data Acquisition System for the Measurement of Physical Parameters

Architectural design proposal for real time clock for wireless microcontroller unit

Speed Control of A DC Motor Through Temperature Variation Using NI ELVIS LabVIEW

Ultra-Accurate Measurement for Temperature and Voltage

MSI-P440 USER MANUAL

DIRRS+ Digital Infra-Red Ranging System Ideal for robotics projects. Singles (SKU # Pack (SKU #35100)

PCI-3E. PCI Interface Card Page 1 of 7. Description. Features

S12VR Hardware Design. Guidelines. 1 Introduction. 2 Hardware Design. Guidelines. 2.1 Voltage regulator. Freescale Semiconductor

User-configurable Resolution. 9 to 12 bits (0.5 C to C)

Fredrick M. Cady. Assembly and С Programming forthefreescalehcs12 Microcontroller. шт.

Data Acquisition Laboratory

AT-501 Cortex-A5 System On Module Product Brief

An Ethernet Based Control and Monitoring System Using ARM Processor

Health monitoring of an power amplifier using an ethernet controller

Techniques to Reduce Measurement Errors in Challenging Environments

PF2100 MODBUS LOGGER CARD SYSTEM SPECIFICATION. v1.0 DRAFT Revised Dec 4, 2014 Last Revised by Alex Messner

CAUTION: TTL Only, Do Not Use ± 12 V RS-232

Multiple Switch Detection Interface with Suppressed Wake-up

Project Final Report Internet Ready Refrigerator Inventory Control System

Using an Analog Devices AD774X Capacitance-to-Digital Converter for Differential Button Sensor Operation

DATA LOGGER APPLICATION DEVELOPMENT USING MICROCONTROLLER ATMEGA 128 FOR A WEB-BASED GPRS COMMUNICATION

or between microcontrollers)

MDP200 Series. Differential Pressure Sensor FEATURES APPLICATIONS DESCRIPTION

Electronics Single wire communication

PD215 Mechatronics. Week 3/4 Interfacing Hardware and Communication Systems

INTRODUCTION. Mechanical Considerations APPLICATION NOTE Z86E21 THERMAL PRINTER CONTROLLER ZILOG

3 PHASE FAULT ANALYSIS WITH AUTO RESET FOR TEMPORARY FAULT AND TRIP FOR PREMANENT

Keywords Digital IC tester, Microcontroller AT89S52

Expansion Module HZS 541-1S

AN5181. Building a thermometer using the STM8 Nucleo-64 boards. Application note. Introduction

EK307 Lab: Microcontrollers

SPI Universal Serial Communication Interface SPI Mode

WARNING: Do not use the thermometer/data logger before you read the users manual and the following instructions.

Fox Thermal Instruments, Inc.

User-configurable Resolution. 9 to 12 bits (0.5 C to C)

Network Embedded Systems Sensor Networks Fall Hardware. Marcus Chang,

Pressure 4 click. PID: MIKROE 3020 Weight: 24 g

Ms Sandhya Rani Dash UNIT 2: NUMBER SYSTEM AND CODES. 1.1 Introduction

DS75 Digital Thermometer and Thermostat

SBD WARRIOR DATA SHEET

DS Wire Digital Thermometer and Thermostat

Web Site: Forums: forums.parallax.com Sales: Technical:

MPI-DN, MPI-D MULTICHANNEL ELECTRONIC RECORDER for HART or RS-485/ MODBUS RTU SENSORS

PC87435 Enhanced IPMI Baseboard Management Controller

GE-INTERNATIONAL JOURNAL OF ENGINEERING RESEARCH VOLUME -3, ISSUE -5 (May 2015) IF ISSN: ( )

Hello, and welcome to this presentation of the STM32L4 power controller. The STM32L4 s power management functions and all power modes will also be

RN-174. WiFly GSX Super Module. Features. Description. Applications. rn-174-ds v1.1 4/20/2011

NI2400/NI816/NI4866 DATALOGGER NI2400/NI816/NI /16/24 CHANNEL ETHERNET DATA LOGGER with Embedded Web Server

Nuvoton Touch Key Series NT1160 Datasheet

D1000M SERIES FOR MODBUS SENSOR TO COMPUTER INTERFACE MODULES

SPI (Serial & Peripheral Interface)

Transcription:

Microcontroller Based High Resolution Temperature Monitoring Data Acquisition System with Graphical User Interface Jayanta Kumar Nath 1, Sharmila Nath 2, Kanak Chandra Sarmah 3 Department of Instrumentation, Gauhati University, Guwahati - 781014, Assam, India Abstract In this article implementation of a temperature monitoring system using 8-bit Freescale semiconductor microcontroller MC9S08JM60 which is intended for general purpose application was described. The firmware was developed in DEMO9S08JM60 low-cost development system by PE Microcomputer Systems Inc. supporting Freescale MC9S08JM60 microcontrollers. The microcontroller firmware was developed in Freescale CodeWarrior Studio integrated development environment in C. The programmable I2C based Digital Temperature Sensor TMP275 is used for sensing the temperature. The microcontroller reads the digital temperature output of the sensor via the 2-wire I2C interface and displays the same on the PC serial console. The graphical user interface (GUI) system running in the PC allows the user to set the temperature threshold and other parameters for acquiring the temperature data. The Temperature Sensor TMP275 is capable to measure the temperature with a resolution of 0.0625 C (typical value) and provides accuracy of 0.0625 C (typical value) and 1 C (maximum) over a range of -40 C till +125 C. The system has been designed to measure the temperature over a range of -40 C till +125 C. The ambient temperature over a specified range was measured repeatedly and a number of observation was made. The experimental results shows consistently same results and shows that the system has higher reliability and precision. Keywords Embedded system, Freescale MC9S08JM60 microcontroller, Graphical user interface(gui), LabVIEW(Laboratory Virtual Instruments Engineering Workbench), TMP275. I. INTRODUCTION Temperature sensing forms an integral part of any industrial monitoring system. It is becoming more prevalent in the food industry, medicines, catering and supermarkets. It is a widely used parameter in any given process controlled environment. Earlier many attempts were made to develop a temperature monitoring system based on analog temperature sensors, thermocouples, resistance temperature detectors (RTD), thermistors, but the timing, response time and accuracy were insufficient. In case of industrial applications where very high sensitivity sensing of temperature change is required we require a temperature monitoring system which can detect a small change in temperature with reasonably short response time. In the proposed temperature monitoring system a digital temperature sensor TMP275 of Texas Instruments is used to sense the ambient temperature that gives out the digital value of the temperature with a resolution of 0.0625 C. It is interfaced to an 8-bit Freescale Semiconductor Microcontroller MC9S08JM60 via an I2C bus. The I2C master is implemented using two GPIO pins of the microcontroller that interfaces with the I2C slave interface of the temperature sensor. The microcontroller continuously transmits the temperature value to the serial port of a PC via its built-in UART. The temperature data is displayed real time graphically on the PC monitor. An application in LABVIEW is developed that is used to display the data on the PC s monitor. The microcontroller firmware was created in Freescale CodeWarrior Studio integrated development environment in C. A graphical user interface(gui) is implemented in LabVIEW(Laboratory Virtual Instrument Engineering Workbench) where the user can set the temperature threshold value and other data acquisition parameters. If the current temperature acquired is more than the temperature to be monitored then the GUI system indicates with the help of an LED. II. HARDWARE ARCHITECTURE The building blocks of the system comprise the digital temperature sensor, microcontroller, TTL-to-RS-232 converter and the PC. The microcontroller communicates with the sensor via the I2C bus. The sensor detects the ambient temperature and upon being initialised by the microcontroller converts the temperature into digital value and stores in the internal register of the sensor. The microcontroller reads the internal temperature register and sends it to the PC via the serial port. A LABVIEW application running in the PC displays the temperature graphically in real time. 85

Figure 1. Block Diagram The lower thermal resistance of the metal causes the leads to provide the primary thermal path. If it is used for surface temperature measurement then a thermally conductive adhesive should be used between the IC package and the surface of which the temperature is to be measured. This will help in achieving better accuracy. IC temperature sensor have the advantages of low cost, small size and high linearity. However it has certain disadvantages: limited operating temperature range (-40 C till +125 C), self heating error, and poor thermal coupling with the environment. B. Microcontroller The system uses 8-bit Freescale semiconductor microcontroller MC9S08JM60. The CPU runs at a core frequency of 48MHz and the internal bus at 24MHz. One of the built-in UART is used for serial communication with the external peripheral devices. The microcontroller measures the temperature and transmits the same via its serial port to the external PC. Two GPIO pins of port C, PTC0 and PTC1 are used for I2C clock and I2C data lines to communicate with the temperature sensor. A. Temperature sensor Figure 2. Test setup TMP275 is 0.5 C accurate, two-wire, serial output temperature sensor available in a tiny 8-pin SOIC surface mount device package. It is capable of reading temperature with a resolution of 0.0625 C. It is specified to operate over a range of -40 C till +125 C. The microcontroller reads the digital value of the temperature measured via its two wire serial interface. The I2C slave address pins A2, A1 and A0 of the sensor is connected to ground in the hardware design so that it has a slave address of 0x90 for write and 0x91 for read. The temperature register reserves 12 bit for the temperature value. Most significant bit is used for sign and 11 bits are used for magnitude. On the positive side, the 11 bits being all ones represent 127.9375 C. Therefore one LSBit represent 0.0625 C. On the negative side the sensor can measure a maximum negative value of - 40 C. The device takes a time interval of 220ms (typical) for converting into 12 bit digital value of the temperature. The I2C slave interface of TMP275 uses standard I2C protocol to communicate with the I2C master interface of the microcontroller. All bytes are transmitted MSB first. It is operated at fast mode at a frequency of 100kHz. The sensing of TMP275 is the chip itself. Thermal paths run through the package leads as well as the plastic package. III. SOFTWARE ARCHITECTURE A. Small embedded operating system The microcontroller has two built-in 16-bit timers. One of the timer is configured to generate an interrupt( a tick ) to the processor at regular and precise interval of 2ms. The interrupt service routine is used as the scheduler. The simple operating system architecture used in designing the software has two key features: A time-triggered architecture and a co-operative scheduling algorithm. The time-triggered approach has an advantage that it results in a system that has a predictable behaviour. A pre-emptive or time sliced approach is used so that from the perspective of the user, the OS appears to be running multiple tasks at the same time. B. Serial port driver A memory buffer is implemented to hold the data that needs to be transmitted via the UART. The serial port functions are executed on a periodic basis by the OS. This approach is advantageous in case of transmission of longer strings which might take longer time than the tick interval and stall the execution of other tasks. On a periodic basis the serial port functions are executed by the scheduler that checks the buffer and if there are any characters in the buffer ready to be send then the same are transmitted. 86

The code has been designed to read the sensor and transmit the temperature value on receiving a read temperature command from the PC to which the microcontroller is connected through the serial port. The speed of transmission via the serial port is 9600 bps. IV. DATA ACQUISITION A. LabVIEW developing module A serial communication is established between the microcontroller and the PC. The temperature measured by the microcontroller is transmitted by the latter to the PC upon receiving a read temperature command from the LABVIEW application running in the PC. The LABVIEW application that runs on the PC, displays the temperature with the real time stamp graphically. It also logs the data in the hard-drive of the computer. The temperature is read at a rate controlled by the LABVIEW application. While reconstructing the temperature waveform on the PC monitor screen, a knob that is designed in the LABVIEW application allows the user to control the sampling rate. The interrupt service routine that measures and transmit the temperature is executed at an interval of 5ms. However a delay of 200ms is inserted between each read command issued by the LABVIEW application for reading the temperature. Therefore the maximum sampling rate is 5 samples per second. The block diagram contains the graphical source code or block diagram code of the LabVIEW. The temperature sensor TMP275 communicates with the microcontroller via I2C bus. The I2C clock and I2C data signal lines are pulled up to +5V with 10K ohm resistors. The I2C bus can be shared between many slave devices and hence multiple temperature sensor devices TMP275 can be used to sense temperature at different points. The process of accessing TMP275 from the microcontroller via the I2C bus is as follows: Initialize TMP275 i.e., configuring the sensor for continuous conversion, 12-bit resolution, then read the temperature registers via the I2C standard protocol of read and write. Figure 4. Capture of temperature in real time Figure 5. Very high resolution capture of temperature change Figure 3. LabVIEW block diagram design B. Capture and display of temperature graphically Since the data is captured real time, the analyst can pinpoint for what duration the temperature is out of range of the required set-point temperature limit. In process control industrial applications where continuous monitoring of temperature is crucial, this kind of application will be helpful. As can be seen, the above figure shows the measured temperature for a span of 100 seconds. The highest temperature measured is seen to be 23.969 C and lowest 23.9065 C. Thus it can detect a fluctuation of temperature as low as 0.0625 C. C. Data storage Acquired data is to be processed and stored in harddrives of PC for future analysis and record purpose. Recorders and data loggers are used nowadays. In this proposed system acquired data are collected in LabVIEW and stored as files in hard-drives of PC in excel format. 87

TABLE I Data storage of temperature acquired by LabVIEW Date Time Temperature ( C) 4/11/2014 3:05 PM 33.2559 4/11/2014 3:06 PM 33.2559 4/11/2014 3:07 PM 33.2559 4/11/2014 3:08 PM 33.2559 4/11/2014 3:09 PM 33.2559 D. IC sensor compensation Temperature is measured from 0 C to 60 C with the microcontroller based system and compared with the measurement done by a standard mercury wall thermometer. Figure 7. Temperature error versus temperature curve of the sensor TMP275 It is observed that from 0 C to 30 C the reading given by the microcontroller based system and the thermometer is nearly equal with an average difference of 0.3 C. Beyond 30 C the difference of temperature readings between the microcontroller based system and the thermometer increases linearly. The error increases exponentially with temperature. The curve is linearized by applying least square method. The compensation is done by evaluating the equation at the temperature of interest(sensor output in degree celcius) and subtracting the result from the sensor output. The equation is computed by the microcontroller. Compensated Sensor Output = Sensor Output - sensor error Figure 6. Calibration curve V. EXPERIMENTAL RESULTS The system was functionally tested to measure the temperature over a range of 0 C to 75 C with a resolution of 0.0625 C. It has an operating temperature range of - 40 C till +125 C and provides accuracy of 0.0625 C (typical value) and 1 C (maximum) over a range of -40 C till +125 C. The sampling rate can be varied with the help of the knob ranging from a maximum value of 5Hz to a minimum of 0.5Hz. The number of acquired samples was 100. Temperature was varied from 22 C to 50 C and results were noted down as shown in table II. 88

Temperature measured by data acquisition system in C International Journal of Recent Development in Engineering and Technology Table II Test results Temperature measured standard thermometer C 22.8438 23 0.1562 by 24.84 25 0.16 27.9075 28 0.0925 in Relative error 31.3252 31-0.3252 34.05 34-0.05 37.01 37-0.01 39.95 40 0.05 43.3 43-0.3 45.9 46 0.1 50.03 50-0.03 It is optimal for thermal management and thermal protection applications. Microcontroller based temperature measurement system can measure the temperature with much higher accuracy and stability. The response of microcontroller based temperature measurement system utilizing a digital temperature sensor is much faster compared to a conventional mercury based thermometer. The use of digital temperature sensor has enabled to get rid of external signal conditioning circuitry resulting in much simpler and reduced hardware components thereby increasing the overall reliability of the system. Application areas for such type of monitoring systems are industries, medical instruments, laboratories, PC hardware. REFERENCES [1] Harsh Vardhan, Measurement-Priciples and Practises, Macmillan India Ltd., Delhi,(1993). [2] TMP275, Datasheet TMP275: 0.5 C Digital out temperature sensor, SBOS363D-June2006-Revised August 2007. [3] Temperature Sensor Design Guide, www.microchip.com/analog [4] Wang Tianmiao, The embedded system design and the example, Beijing: Tsinghua University Press, 2003. pp. 4-5. [5] James E. Hardy and Francis R Ruppel, Measurement and Instrumentation of Flow, Encyclopedia of Applied Physics,VCH Publishers Inc, New York, 445 (1994). [6] C. Johnson, Process Control Instrumentation Technology, Prentice Hall of India Pvt. Ltd., New Delhi (1996). [7] Michael J. Pont, Embedded C, Pearson Education Ltd. [8] Shibu K V, Introduction to embedded systems, Mc Graw Hill. VI. CONCLUSION Since the measurement system can measure the temperature with a resolution of 0.0625 C, this system can be used to monitor ambience where detection of precise temperature change is required. 89