[IEEE 2013 International Conference on Communications and Signal Processing (ICCSP) - Melmaruvathur,...

5
ARM based Temperature Measurement and Processing to Remote Computer using Fiber Optic Cable Aruna.Kommu, Raghavendra Rao. Kanchi AbstractAccurate measurement and monitoring of temperature is an important task in research field and vital task in industrial and chemical processes. In this paper we present an inexpensive instrumentation for the measurement, monitoring and processing of temperature of a thermally insulated chamber. The same principle can be extended to any other system whose temperature has to be measured. The system is built around an advanced 32-bit ARM RISC processor: LPC2148. The LM35 temperature sensor is interfaced to the LPC2148 by directly connecting its output to the analog input channel of the on-chip 10-bit ADC. The sensed temperature is not only displayed on the LCD but also sent to the laptop/desktop by communicating over fiber optic cable. The experimental results are discussed in detail, which shows the wide range of accurate temperature measurement using ARM processor. IndexTermsARMLPC2148, Fiber Optic Cable, Temperature Sensor LM35 I. INTRODUCTION The temperature measurement and processing the values is one of the important tasks in teaching and research laboratories, industrial and medical environments. There are different techniques to accomplish this task using different types of sensors namely: Thermistors (Negative Temperature Coefficient, NTC and Positive Temperature Coefficient, PTC), Thermocouple, Resistive Temperature Detectors: RTD (PT100), AD590, LM35 etc [1, 2, 3]. Due to the ever increasing need for such measurement in different fields, many designers have tried to design such systems using different microcontrollers. The use of microcontrollers in embedded design brought revolutionary changes in the entire field of embedded system design. Today a number of microcontrollers are available on the market from different vendors. But the design of embedded applications with microcontrollers having advanced features is gaining more prominence. K.Aruna is working as Junior Research Fellow (UGC), Department of Physics, Sri Krishnadevaraya University, Anantapur, 515003, A.P., INDIA ([email protected]. Dr.K.Raghavendra Rao is working as Professor and Chiairman, B.O.S. in Physics, Department of Physics, Sri Krishnadevaraya University, Anantapur, 515003, A.P., INDIA ([email protected] ). Previously most of these systems were designed based on PIC, AT89C51, AVR and other microcontrollers [4, 5]. But in the present scenario, designers are looking for ARM (Advanced RISC Machine) processors due to the availability with tremendous features which are more suitable for embedded system design. ARM is a low cost, high performance and low power consumption microcontroller which is useful to the designers with flexible and cost effective platform for the development of embedded applications. Based on these points of view ARM processor is selected as the heart of the system. This paper is organized as follows. Section-II gives the information about ARM microcontroller and LM35 temperature sensor. Measurements of temperature hardware and software details are described in Section-III. Section-IV provides the result and discussion. Section-V gives the case study and Section VI concludes the paper. II. SYSTEM ARCHITECTURE OVERVIEW The block diagram of the total system is shown in figure 1. It consists of temperature measurement sensor LM35, the mixed signal controller LPC2148, LCD module and fiber optic link to send the measured temperature values to a remote computer. A. ARM Microcontroller (LPC2148) ARM7TDMI, which is a 32-bit mixed signal controller from NXP Semiconductors, is most widely used in a number of embedded systems such as mobiles, automobiles, industrial control etc. ARM is a leading intellectual property provider of high performance, low cost, and power efficient RISC processor microcontroller [6]. ARM CPU has Von Neumann architecture and it uses two buses, namely, AHB (advanced high performance bus) and VPB (VLSI peripheral bus), which increases the speed of execution [7] compared to other commonly used microcontrollers such as the INTEL 8051 and the Microchip PIC family. NXP’s ARM mini kit was purchased from NSK electronics, Bangalore, which cost about 30$ [8]. Mini ARM kit consists of LPC2148 ARM7TDMI as its core and two types of memory: Flash memory of 512kB with In System Programming (ISP) and In Application Programming (IAP) capabilities and a static RAM of 40kB [9]. LPC2148 CPU has a simple programmer model and it has sixteen 32 bit general purpose registers and two special registers named as current program status register (CPSR), saved program status register (SPSR). International conference on Communication and Signal Processing, April 3-5, 2013, India 978-1-4673-4866-9/13/$31.00 ©2013 IEEE 423

Transcript of [IEEE 2013 International Conference on Communications and Signal Processing (ICCSP) - Melmaruvathur,...

Page 1: [IEEE 2013 International Conference on Communications and Signal Processing (ICCSP) - Melmaruvathur, India (2013.04.3-2013.04.5)] 2013 International Conference on Communication and

ARM based Temperature Measurement and Processing to Remote Computer using Fiber

Optic Cable

Aruna.Kommu, Raghavendra Rao. Kanchi

Abstract— Accurate measurement and monitoring of temperature is an important task in research field and vital task in industrial and chemical processes. In this paper we present an inexpensive instrumentation for the measurement, monitoring and processing of temperature of a thermally insulated chamber. The same principle can be extended to any other system whose temperature has to be measured. The system is built around an advanced 32-bit ARM RISC processor: LPC2148. The LM35 temperature sensor is interfaced to the LPC2148 by directly connecting its output to the analog input channel of the on-chip 10-bit ADC. The sensed temperature is not only displayed on the LCD but also sent to the laptop/desktop by communicating over fiber optic cable. The experimental results are discussed in detail, which shows the wide range of accurate temperature measurement using ARM processor.

IndexTerms— ARMLPC2148, Fiber Optic Cable, Temperature Sensor LM35

I. INTRODUCTION

The temperature measurement and processing the values is one of the important tasks in teaching and research laboratories, industrial and medical environments. There are different techniques to accomplish this task using different types of sensors namely: Thermistors (Negative Temperature Coefficient, NTC and Positive Temperature Coefficient, PTC), Thermocouple, Resistive Temperature Detectors: RTD (PT100), AD590, LM35 etc [1, 2, 3]. Due to the ever increasing need for such measurement in different fields, many designers have tried to design such systems using different microcontrollers. The use of microcontrollers in embedded design brought revolutionary changes in the entire field of embedded system design.

Today a number of microcontrollers are available on the market from different vendors. But the design of embedded applications with microcontrollers having advanced features is gaining more prominence.

K.Aruna is working as Junior Research Fellow (UGC), Department of Physics, Sri Krishnadevaraya University, Anantapur, 515003, A.P., INDIA ([email protected].

Dr.K.Raghavendra Rao is working as Professor and Chiairman, B.O.S. in Physics, Department of Physics, Sri Krishnadevaraya University, Anantapur, 515003, A.P., INDIA ([email protected]).

Previously most of these systems were designed based on PIC, AT89C51, AVR and other microcontrollers [4, 5]. But in the present scenario, designers are looking for ARM (Advanced RISC Machine) processors due to the availability with tremendous features which are more suitable for embedded system design. ARM is a low cost, high performance and low power consumption microcontroller which is useful to the designers with flexible and cost effective platform for the development of embedded applications. Based on these points of view ARM processor is selected as the heart of the system. This paper is organized as follows. Section-II gives the information about ARM microcontroller and LM35 temperature sensor. Measurements of temperature hardware and software details are described in Section-III. Section-IV provides the result and discussion. Section-V gives the case study and Section VI concludes the paper.

II. SYSTEM ARCHITECTURE OVERVIEW

The block diagram of the total system is shown in figure 1. It consists of temperature measurement sensor LM35, the mixed signal controller LPC2148, LCD module and fiber optic link to send the measured temperature values to a remote computer.

A. ARM Microcontroller (LPC2148)

ARM7TDMI, which is a 32-bit mixed signal controller from NXP Semiconductors, is most widely used in a number of embedded systems such as mobiles, automobiles, industrial control etc. ARM is a leading intellectual property provider of high performance, low cost, and power efficient RISC processor microcontroller [6]. ARM CPU has Von Neumann architecture and it uses two buses, namely, AHB (advanced high performance bus) and VPB (VLSI peripheral bus), which increases the speed of execution [7] compared to other commonly used microcontrollers such as the INTEL 8051 and the Microchip PIC family. NXP’s ARM mini kit was purchased from NSK electronics, Bangalore, which cost about 30$ [8]. Mini ARM kit consists of LPC2148 ARM7TDMI as its core and two types of memory: Flash memory of 512kB with In System Programming (ISP) and In Application Programming (IAP) capabilities and a static RAM of 40kB [9]. LPC2148 CPU has a simple programmer model and it has sixteen 32 bit general purpose registers and two special registers named as current program status register (CPSR), saved program status register (SPSR).

International conference on Communication and Signal Processing, April 3-5, 2013, India

978-1-4673-4866-9/13/$31.00 ©2013 IEEE423

Page 2: [IEEE 2013 International Conference on Communications and Signal Processing (ICCSP) - Melmaruvathur, India (2013.04.3-2013.04.5)] 2013 International Conference on Communication and

It has a vectored interrupt controller, two 10-bit analog-to-digital converters (ADCs) with 14 channels, one 10-bit digital-to-analog converter (DAC), USB full speed device controller, two UARTS one with full modem interface, two 32-bit Timers, Watch dog timer, PWM unit, Real Time Clock (RTC) with optional battery backup and 45 general purpose input/output (I/O) pins, CPU (operating voltage: 3.3V), on- chip crystal oscillator (maximum clock frequency: 60MHz ) and on -chip PLL.

B. LM35 Temperature Sensor

Temperature measurement is done in majority of the science experiments with a special reference to solid state physics experiments. For example, in the energy gap determination, dielectric constant measurement or in chemistry experiments such as melting point determination, pH measurement at various temperatures etc. Thermometer is used to sense and measure temperature. The student (researcher) has to concentrate on both the processes namely the varying parameter such as pH or melting sample and temperature reading, simultaneously. Hence, there is a possibility to miss the correct transition temperature. At this stage, it is advisable to display and record the temperature accurately. Commercially available instruments of this nature are expensive. Keeping this in view point, an inexpensive mixed signal controller based temperature measurement and transmitting system using fiber optic cable is developed and described in this paper. There are different types of temperature sensors available on the market. Some of them are: Thermistors, Thermocouples, IC temperature sensors, RTDs etc. Thermistors are non linear temperature sensors which call for sensor linearization either by hardware or software. Thermocouples on the other hand need front-end electronics for signal conditioning and compensation circuit etc. RTD (PT100) is costly compared to any of the other sensors. Popular and widely used IC temperature sensors are: Analog Device’s AD590 [10] and National Semiconductor’s LM35 [11]. AD590 provides current output whereas LM35 provides voltage output. One of the important features of this temperature sensor (LM35) is that its output voltage is proportional to the temperature in Celsius. Hence no extra calibration and compensation is needed. It draws a typical

current of 60μA and hence self heating is negligible. Further this sensor is available in different packages, so that they can be used in different applications by preparing suitable probes. The pin layout of LM35 temperature sensor is shown in figure 2, and its typical application circuit is shown in figure 3. LM35 gives an accuracy of ± 0.50°C over a temperature range of -55°C to +150°C. When used as a basic temperature sensor (2°C to 150°C as shown in Figure 3), the output voltage Vout = 0 mV+10 mV/°C, that is change in temperature by 1°C will result in a variation of 10.0 mV at its output. Another important feature of LM35 is that, with any IC the LM35 accompanying wiring and circuit must be kept insulated and dry to avoid leakage and corrosion. This feature is accomplished by proper sealing of the IC and the wiring circuit. Further, the experiment in the present work is carried out by connecting the +VS to +3.3V, though the diagram shows VS between +4V to +20V. This fact further reduces the self heating of the device, which leads to more accurate results. This point is exploited in the present work. The application note of LM35 gives more details on its effective usage.

Fig. 2. LM35 Temperature sensor

III. TMPERATURE MEASUREMENT HARDWARE AND

A. Hardware Details As mentioned in the previous section, LM35 is an accurate

SOFTWARE DETAILS

Fig. 3. Basic centigrade temperature sensor

424

Page 3: [IEEE 2013 International Conference on Communications and Signal Processing (ICCSP) - Melmaruvathur, India (2013.04.3-2013.04.5)] 2013 International Conference on Communication and

3- pin temperature sensor IC. The total hardware circuit diagram developed in the present work is shown in figure 4. Pin 1of LM35 is connected to the power supply (+3.3V). Pin 3 is connected to ground and pin 2 which is the output, is connected to analog input channel of 10-bit ADC (P0.30) of LPC2148. The microcontroller consists of two 10-bit ADCs namely, ADC0 and ADC1, with six and eight analog input channels, respectively. Key features of the on -chip ADC of LPC2148 is:

Measurement range of 0V to Vref ( typically 3V ) 10 bit conversion time 2.44μs Basic clocking for the ADC is provided by the

APB clock The microcontroller processes the sensor output to compute the temperature in degree Celsius. This is accomplished by connecting pin2 of LM35 to the analog input channel of the internal ADC0. The reference voltage to the ADC is the same as the supply voltage to the microcontroller, i.e., 3.3V. The output voltage from the sensor is converted to a 10 -bit digital number and the internal software converts the digital value into its equivalent temperature and is displayed on the LCD module which is interfaced to LPC2148 in 4-bit mode. The measurement takes a maximum of 100μs to respond to the change in temperature. The temperatures computed over a length of time are stored in the memory of the microcontroller and also sent to the remote computer using fiber optic cable. The fiber optic cable module available in the laboratory is used in the present work (Figure 5). The module is developed with trasmitter and receiver sources. The TXD line of the microcontroller is fed to the Transmitter input through a buffer. The output signal in the form of light (optical signal) is lanched in to the fiber. The other end of the fiber is connected to the receiver module. The received data signal is passed through a buffer and fed to the input of the MAX232 IC. This IC shifts the voltage levels suitable to the laptop’s serial port (COM PORT). Photograph of the real-time data acquisition is shown in figure 6. The motorized stirrer is mounted (optional accessory) to stir the liquid if taken in the temperature measuring chamber.

Fig. 5. Photograph of the Fibre Optic Transmitter and Receiver

Fig. 4. Total hardware circuit diagram

Fig. 6. Photograph of the real-time data acquisition system

425

Page 4: [IEEE 2013 International Conference on Communications and Signal Processing (ICCSP) - Melmaruvathur, India (2013.04.3-2013.04.5)] 2013 International Conference on Communication and

A. Software Details

The present system is implemented by developing a suitable embedded C program using KEIL μVision software. This is n integrated development environment (IDE) with embedded C/C++ compiler for ARM which supports simulation and debugging interface [12]. The software developed is compiled and uploaded to the flash memory using Flash utility (PHILIPS). The flowchart to read and display the temperature is shown in figure 7, and figure 8 shows the flowchart to transfer the bulk data to Laptop/Desktop over Fiber Optic Cable (FOC).

Fig.7. Flow chart to display on LCD Fig.8. Flow chart to transfer the data to Laptop/Desktop over FOC

The total hardware developed in the present study is shown in Figure 5. In the present study, measurements were carried out between 20°C to 90°C. The temperature values recorded in the microcontroller’s memory is linear fit using ORIGIN software. The resulting graph is shown in Figure 9.

In this paper we designed and implemented an ARM

K.Aruna is thankful to the University Grants Commission (UGC), New Delhi, for sanctioning Junior Research Fellowship (BSR JRF).

REFERENCES

[1] Jiaoyue Liu, Lin Ma and Juqing Yang, “Methods and techniques of

temperature measurement,” International Conference on Electrical and Control Engineering, Sept 2011, pp. 5332-5334.

[2] Deshmukh, M.D, Panditrao A, “Design and development of thermister based sensor for spirometry,” IEEE International Conference on Electrical, Electronics and computer Science, March 2012, pp. 1-3.

[3] Jiguang Liu, Yukun Li and Hongyan Zhao, “A Temperature Measurement System based on PT100,” IEEE International Conference on Electrical and control Engineering, June 2010, pp. 296-298.

[4] Hongli Zhu, Liyuan Bai, “Temperature monitoring system based on AT89C51 microcontroller,” IEEE International Symposium on IT in Medicine and Education, Aug 2009, Vol 1, pp. 316-320.

[5] Bin Li and Jinhui Lei, “Design of industrial temperature monitoring system based on single chip microcontroller,” IEEE International Conference on Computer Science and Service System, Aug 2011, pp. 342-344.

[6] ARM architecture, http://en.wikipedia.org/wiki/ARM_architecture

VI. CONCLUSION

IV. RESULT AND DISCUSSION

V. CASE STUDY In order to validate the proposed scheme, we have performed a solid-state experiment: Determination of Energy Gap in a Semiconductor. The energy gap evaluated in the present study using 1N914 was 1.13±0.01eV. This is in line with the literature value [13].

microcontroller based embedded system for the measurement of temperature of a water bath. The developed system is simple, reliable and gives accurate values. With the features such as low cost and better performance, the system can be implemented for reasonably accurate temperature measurement in teaching and research laboratories. In order to validate the present work, the energy gap of Silicon diode (1N914) was measured with the developed experimental set up. Due to their tiny size and low power consumption ARM processors are ideal in applications such as industrial control and medical systems. Work is in progress to send the data over wireless communication using ZigBee, and to develop hardware and software for engine cooling system in automobiles, by replacing the non-linear Thermistor [14] with LM35. ACKNOWLEDGMENT

Fig. 9. Measured temperature values using thermometer vs computed and displayed temperature readings on LCD

426

Page 5: [IEEE 2013 International Conference on Communications and Signal Processing (ICCSP) - Melmaruvathur, India (2013.04.3-2013.04.5)] 2013 International Conference on Communication and

[7] Andrew N Sloss “ARM Systems Developers Guide: Design and Optimizing System software, Morgan Kaffman Publishers, An Import of Elsevier, 2005.

[8] http://www.nskelectronics.com [9] LPC2148 User Manual NXP Semiconductors-UM10139 [10] www.analog.com/static/imported-files/data-sheets/AD590 [11] National Semiconductor Corp.2000. LM35 Precision Centigrade

Temperature Sensor Datasheet. http://www.ti.com/lit/gpn/lm35 [12] http://www.keil.com [13] Low,J.J, Kreider,M.L.,Pulsifer,D.P.,Jones,A.S.,and Gilani,T.H.,”Band

Gap Energy in Silicon,”American Journal of Undergraduate Research,vol.7,no.1,pp.27-32,2008,and references there in.

[14] www.sergey89.ru/files/Nissan/P10%20&%20P11/FSM/ec_cd20.pdf.

427