INTERNATIONAL JOURNAL OF COMPUTER APPLICATION ISSUE2, VOLUME 2 (APRIL 2012)
ISSN: 2250-1797
Design and Development of Microcontroller based Digital Thermo Hygrometer M.A.A.Mashud#1, M. Shamim Hossain#2,M. Nurul Islam#3, M. Shohidul Islam#2, M. Shahinuzzaman#1 #1
Dept. Of AECE, Islamic University, Kushtia -7003, Bangladesh Email ID:
[email protected], shahin.aece@gmail
#1
#2
Dept. Of Computer Science & Engineering, Islamic University, Kushtia -7003, Bangladesh #2 mail ID:
[email protected],
[email protected] #3
Dept. Of Mathematics, Islamic University, Kushtia -7003, Bangladesh #3 Email ID:
[email protected]
________________________________________________________________ Abstract A microcontroller based digital thermo hygrometer was designed and developed to measure the value of temperature and humidity at any place. The system was battery operated so it was portable. A microcontroller PIC16F877A was used to control the developed system’s function. The system was measure the temperature from 0°c to 100°c and the humidity % RH from 0 to 100. The reading was displayed in a seven segment display. A “C” language program was development to control the function of the microcontroller, using PCWH compiler. Keywords: Microcontroller; PCWH Compiler; Digital; Low-cost; Temperature and Relative Humidity. ___________________________________________________________________________ Corresponding Author: M.A.A.Mashud
1. Introduction In our country some research laboratories, industries, hospitals, stores etc require to measure the temperature and humidity for research, production, treatment and diagnosis of the patients, storing food, beverage etc. Sometime, in weather monitoring, for instance, parameters such as, the temperature and humidity needed to be measured [1], thus sensors have always been given the task for doing so. Climate plays an important role in human life. The thermal comfort of human being is known to be influenced mostly by six parameters, i.e., air temperature, radiation, air flow, humidity, activity level and clothing thermal resistance [2] and [3]. The advancement in technology has made these small and reliable electronic sensors capable of monitoring environmental parameters more favorably. Monitoring systems using sensors for indoor climate and environment based parameters are explained in [4] and [5]. Combination of these sensors with data acquisition system has proved to be a better approach for temperature and relative humidity monitoring [6] and [7]. The surface acoustic waves (SAW) devices as temperature sensor is explained in [8] and [9]. These systems, however, are quite expensive and complex in nature as some of them require the use of on-chip transmitter circuit and involve fabrication processes. Page 16
INTERNATIONAL JOURNAL OF COMPUTER APPLICATION ISSUE2, VOLUME 2 (APRIL 2012)
ISSN: 2250-1797
This paper aims to build a low-cost, yet reliable, digital thermo hygrometer to measure the temperature and relative humidity. The developed system has two sensors that measure the temperature and relative humidity respectively. The analogue outputs of the sensors will be converted to digital signals and further processed by a microcontroller and displayed on 7-segment display. Using easily-available components and simple circuitry, the system should be beneficial in providing a portable, digital and low-cost thermo hygrometer.
2. Design Consideration The system is divided into three main parts: the sensor circuit, the micro controlling unit, and the display circuit. The sensor circuit contains the IC temperature sensor and resistive humidity sensor. The analogue outputs from these sensors are analyzed and converted into digital signal which encompasses a microcontroller. The block diagram of the overall system is depicted in Fig. 1.
RH Sensor
Op-amp
Op-amp
Built-in ADC
Temperature Sensor
PIC16F877A
Display
Microcontroller
Fig. 1: Block diagram of the system
2.1 The Sensor Circuit For temperature sensing, an integrated circuit temperature sensor LM35 is used [10]. The output voltage of the sensor is linearly proportional to the temperature (in Kelvin or Celsius) with the gradient of 10mV/°C and able to operate in the range of -55°C to 150°C. As the device is to be used in the tropical climate area where the temperature never drops below 0°C, the temperature range for this system has been offset to the range of 0°C to 100°C, using an op-amp. Relative humidity measurement is performed by the humidity sensor, HIH-4002 [11]. The HIH-4002 series are linear voltage output vs % RH. The output of this sensor is also acts as the input of the microcontroller. The CA3140 op-amp is used as buffer to minimize the loading effects [12] and [13].
2.2 Microcontroller Unit The microcontroller [14] is the heart of the whole system. Temperature sensor and Voltage sensor are input of the Microcontroller. Room heater driver circuit, air cooler driver circuit, displays and indicator circuit are output of the microcontroller .The microcontroller PIC16F877 has been used [15]. It has 40-Pin packages. It has a 10-bit A/D converter. A C language program has been developed to control the function of microcontroller using PCWH Compiler [16].
Page 17
INTERNATIONAL JOURNAL OF COMPUTER APPLICATION ISSUE2, VOLUME 2 (APRIL 2012)
ISSN: 2250-1797
2.3 Display Circuit Three common cathode 7-segment LED modules are used to display the reading of the system. Efficient use of the pin of PIC microcontroller, the display is accomplished by using a BCD 7-segment decoder (MCI4511B) [17]. The Microcontroller sends the output signal to the input pins of BCD-to- seven- segment Decoder whose output pins are connected to the input of common cathode seven segments LED [18].
3. Software The software has been developed for sensing the voltage from sensor, process data and display the room temperature and humidity. The software is divided into some sub routines and main routine. The programming language C is used to developed software. The flow chart of the program is shown in fig. 2
Fig. 2: Flow chart of the developed software
Page 18
INTERNATIONAL JOURNAL OF COMPUTER APPLICATION ISSUE2, VOLUME 2 (APRIL 2012)
ISSN: 2250-1797
4. Results and Discussion
Temperature 0 C
The accuracy of the developed system has been tested through extensive experiments. The measurements have been compared with more-advanced equipment which contains a thermometer and a relative humidity sensor with chart recorder for temperature and relative humidity measurements respectively. The results obtained are graphically represents in Fig. 3 and Fig. 4. 23 22.5 22 21.5 21 20.5 20 19.5 19 18.5 18 17.5 17
Developed system (°C)
Lab thermometer (°C) 0 1 2 3 4 5 6 7 8 9 10111213 No. of observations
Humoity ( % RH)
Fig. 3: Comparative study for temperature measurement between traditional systems and developed system
86.5 86 85.5 85 84.5 84 83.5 83 82.5 82
Lab RH sensor (%RH) Developed system (%RH) 0 1 2 3 4 5 6 7 8 9 10111213 No. of observations
Fig. 4: Comparative study for relative humidity measurements between lab RH sensor and developed system
From Fig. 3, it can be observed that the temperature sensor shows a good level of stability as well as accuracy. The average error of 0.15°C is observed due to ±0.1°C error by the sensor and ±0.15°C introduced by the ADC. Although the direct interface between the sensor and the microcontroller could affect the accuracy of the measurement, the relative error is quite Page 19
INTERNATIONAL JOURNAL OF COMPUTER APPLICATION ISSUE2, VOLUME 2 (APRIL 2012)
ISSN: 2250-1797
small, as suggested [19]. Meanwhile, the humidity sensor of the developed system also shows a very good accuracy as shown in Fig. 4. An average error of 2% is observed mainly due to the hysteresis effects of the sensor. Several portable weather station devices available in the market are compared with the developed system in terms of features and accuracy. The comparisons are listed in Table 1. It can be seen from Table 1 that the developed system has very good accuracy. The cost of the system which is significantly lower compared to other systems with similar features is another advantage of this system. Table 1: Comparisons of other weather station devices with the developed system JDC
Kestrel 4000
Instruments
Pocket
SKYWATCH
Weather
Developed system
Tracker Temperature
±0.5°C
±0.1°C
±0.15°C
RH Accuracy
±3%
±3%
±2%
Backup power
CR2032
2 AAA alkaline
Rechargeable
Lithium battery
battery
12V battery
380
330
< 60
Accuracy
Price (US$)
5. Conclusion In recent times, the cost of electronic equipment has fallen significantly. Due to the rapid development of micro electronics, all designed components and instruments are inexpensive. A digital thermo hygrometer from the international market cost around US$ 400, while the price of the developed digital thermo hygrometer is less than US$ 60. Moreover, when the features of the presently used system are compared with the developed system, the latter emerges as a better choice in terms of cost, portability and design.
References [1] K. G. Ong, C. A. Grimes, C. L. Robbins, and R. S. Singh (2001): Design and application of a wireless, passive, resonant-circuit environmental monitoring sensor. Sensors and Actuators A 93: 33. [2] ISO7730, (1984): International Standards Organization, Geneva, Switzerland. Page 20
INTERNATIONAL JOURNAL OF COMPUTER APPLICATION ISSUE2, VOLUME 2 (APRIL 2012)
ISSN: 2250-1797
[3] J. U. Bu, T. Y. Kim, Y. S. Jun, Y. C. Shim, and S. T. Kim, (1995): Silicon-based thermal comfort sensing device. In Proceedings of Transducers 95 (2). Eurosensors IX, Stockholm, Sweden. 104. [4] J.Kang, and S. Park, (2000): Integrated comfort sensing system on indoor climate. Sensors and Actuators. 302. [5] M. Odlyha, G. M. Foster, N. S. Cohen, C. Sitwellb, and L. Bullock. ( 2000): Microclimate monitoring of indoor environments using piezoelectric quartz crystal humidity sensors. J. Environ. Monit, 127. [6] M. Moghavvemi, K. E. Ng, C. Y. Soo, and S. Y. Tan, (2005): A reliable and economically feasible remote sensing system for temperature and relative humidity measurement. Sensors and Actuators, 181. [7] A. D. DeHennis, and K. D. Wise, (2005): A wireless microsystem for the remote sensing of pressure, temperature, and relative humidity. Journal of Microelectromechanical Systems 14(1): 12. [8] Y. N. Vlassov, A. S. Kozlov, N. S. Pashchin, and I. D. Yakovkin. (1993): Precision SAW pressure sensors. In IEEE Proceedings of 47th Frequency Control Sympo-sium. Salt Lake City. 665. [9] W. Buff, F. Plath, O. Schmeckebier, M. Rusko, T. Vandahl, H. Luck, and F. Muller. (1994): Remote sensor system using passive SAW sensors. In Proceedings of IEEE Ultrasonics Symposium. Cannes, 585. [10] National Semiconductor Datasheet (2000): LM35 Precision Centigrade Temperature. [11] http://www.phanderson .com /hih-4000.pdf [12] R.F. Coughlin and F. F. Driscoll; Operational Amplifiers and Linear Integrated Circuits, 89. [13] R. A. Gayakward, (2001); Op-Amps and Linear Integrated Circuits, Fourth Edition, 112. [14] http://www.scribd.com/doc/4323552/The-Pic-Microcontroller-Book Author: Nebojsa Matic. [15] 7X_30292c.pdf 0f microchip Technology Inc., PIC16F877 Datasheet, (2000). [16] PCWH Compiler, IDE Version 3.43, www.ccsinfo.com [17] Farnell Semiconductor Data CD-ROM”, Issue 7 January (2000): Data sheet 6365001. [18] RS International Electronic Cataloge March 2003 [19] F Reverter., J. Jordana, M. Gasulla, and R. P. Areny, (2005):Accuracy and resolution of direct resistive sensor-to-microcontroller interfaces. Sensors and Actuators A: in press.
Page 21