Blog Archive

Wednesday, 2 March 2016

DATA LOGGER AND REMOTE MONITORING SYSTEM FOR MULTIPLE PARAMETER MEASUREMENT APPLICATIONS

DATA LOGGER AND REMOTE MONITORING SYSTEM FOR MULTIPLE PARAMETER MEASUREMENT APPLICATIONS

Electrical and Electronics Project by Ravi Devani
ABSTRACT
The present article portrays a design and implementation of microcontroller based embedded system for data logging and remote monitoring of environmental parameters with simplicity to users. The main task of monitoring parameters viz. temperature (T) and humidity (H) along with transmission of this information in the form short message service (SMS) to user’s mobile phone is done by the system. Also weather monitor system provides data-logging facility. The logged data can be then transferred to a personal computer (PC) having a graphical user interface program for further analysis or printing the measurements. The observed data is comparable with the actually measured data using conventional mercury thermometer and masons hygrometer for measurement of temperature and humidity, respectively.
Keywords: - microcontroller, data logger, AVR, SMS

INTRODUCTION
Remotely monitoring of environmental parameters is important in various applications and industrial processes. In earlier period weather monitoring systems are generally based on mechanical, electromechanical instruments which suffer from the drawbacks like poor rigidity, need of human intervention, associated parallax errors and durability. With the inclusion of electronics the instruments were made compact and cheaper. However, these systems lack flexibility of remote monitoring and data logging.
Kang and Park have developed monitoring systems, using sensors for indoor climate and environment based on the parameters mentioned in 2000. Combination of these sensors with data acquisition system has proved to be a better approach for temperature and relative humidity monitoring in 2005. Vlassov in 1993 introduces the usage of surface acoustic waves devices as temperature sensor.These systems, however, are quite complex in nature as some of them require the use of on-chip transmitter circuit and involve fabrication process. This demand the development of a microcontroller based embedded system for weather monitoring. Such a system should monitor and provide data for remote examine. A device for weather monitoring systems has been developed and implemented as described in this paper is capable to data logging and remote examine. The device is simple to use, requires no additional hardware and allows the flexible selection of data-size and the time intervals between the readouts through a simple keypad (two keys only). The collected data by weather monitoring system can easily be exported to a PC via a serial port to make subsequent data analysis or graphic and digital storage thus automatic data collection is possible without giving up PC resources.

MATERIALS AND METHODS
The design of weather monitoring system involves various steeps, viz selection of proper sensor to sense physical parameter, design of signal conditioning circuit which support digital logic device, selection of Central Processing Unit (CPU) and Display unit.
 
Fig.1: Block diagram of weather remote monitoring device.
The functional block diagram of weather remote monitoring device is shown in Fig. 1.The system shown in block diagram is designed around the ATMEL AVR microcontroller. As shown in the Fig.1.the microcontroller’s on-chip peripherals like ADC, UART, EEPROM, POR, and Timer are being used to lower the cost and to increase the efficiency and reliability. This makes AVR microcontroller a better choice for such embedded systems. Sensors sense the physical parameters, in this case the humidity, temperature, the analog output of sensor are given to on-chip Analog to Digital Converter. ADC converts analog voltage into corresponding digital word which is processed to get the actual physical parameter and then displayed onto the LCD module interfaced to the ports of microcontroller. The device also acts as a data logger, with the help of RTC (Real Time Clock) and MMC (Multi Media memory Card) interfaced to microcontroller. The current time for data-logging purposes is provided by the time-base circuit while nonvolatile storage is provided by MMC. The stored records then can be transmitted using serial (RS-232) links to PC for permanent storage in the data files using graphical user interface program (GUI).

1. The sensor circuit
For temperature sensing, an integrated circuit temperature sensor LM35 is used, which has an analog output voltage. The output voltage of sensor is linearly proportional to temperature with a gradient of 10mV/ºC and able to operate in the range -55ºC to +150ºC with an accuracy of ± 0.5ºC. These make LM35 good choice for ambient temperature monitoring. Relative humidity measurement is performed by calibrated humidity sensor module SY-HS-220 which minimizes the system complexity by reducing component count. The humidity sensor module converts relative humidity to voltage with an accuracy of ± 5% RH. The characteristics curve of relative humidity (% RH) vs. output voltage (mV) is shown in the Fig.2.
 
Fig. 2: Humidity sensor characteristics plot.
Using equation of straight line,
                                (1)
Herein, Y is % relative humidity, m is slope and c is offset.
Slope is calculated by using Humidity sensor characteristics plot as,
                                     
The characteristic is a straight line and the slope is constant along the line. Thus multiplying measured voltage from sensor by calculated slope gives Relative Humidity. In addition, the output voltages from both the sensors are sufficiently large in magnitude so, there is no need of separate signal conditioning circuitry, which improves reliability of the system.

2. Central processing unit (CPU)
The main component here is the Atmega32 microcontroller which works as CPU. This microcontroller not only controls the system but also synchronizes all the module operations. The CPU use calibrated 8 MHz internal RC oscillator. Atmega32 provides eight channels ADC (Analog to Digital Convertor) which can be used in 10-bit mode.
 
Fig. 3: Full working schematic of weather remote monitoring device.
 Electrical and Electronics Project by Ravi Devani
3. The display circuit
The device uses LCD module for local real-time display. The module has onboard display controller, which relieves the main microcontroller from manually generating dot-matrix character display. The display unit is composed of 16x2 dot matrix alphanumeric LCD. The LCD is configured in 4-bit mode with read-write control (WR) pin grounded. This configuration requires less number of I/O pins of microcontroller, typically 6 only. The circuit diagram shown in Fig. 3. reveals actual pin connections of the device.

4. Data logging & remote monitoring circuitry
The device allows the selection of amount of data and the time intervals between them through a simple keyboard (two keys only). The current time for data-logging purposes is provided by the time-keeping circuit typically from 30sec to 99min. Memory card (MicroSD) with 1GB capacity from SanDisk [7] is connected to the microcontroller for storing the sensors readings to store more than 100 days reading (for 30-second sampling interval). MicroSD cards are available very cheap nowadays, a great option for having a huge memory in any embedded system project. The interface of the MMC and the microcontroller is based on the SPI bus which is shown in Fig. 3. Fig. 4 shows the SD card pin-out & the bread-board adapter design by soldering 7-pins of a breakout header on the microSD. Interfacing of the microSD to Atmega32 is shown in the Main Circuit diagram of system.
 
Fig.4: Bread-board adapter design by soldering 7-pins of a breakout header on the microSD adapter
The microcontroller sends current monitored parameters through SMS in the time interval specified by user. In present system Nokia-3310 mobile phone is interfaced to microcontroller, using Nokia F-Bus Protocol [6]. A typical SMS sent by the system is shown in the Fig.5b.

5. The Time-Base Circuit
A real-time clock (RTC) chip-DS1307 is used for Time-Base purpose. Communication between the RTC and the microcontroller is achieved via a simple serial interface bus protocol. A separate battery source supplies the power required by the chip, hence enables RTC operation kept without interruption in the event of main power source failure.

6. The interfacing circuit and GUI
Data stored in MMC can be accessed directly with the personal computer (PC) through serial port connection .The GUI software allows the user to download the data from MMC, the data can also redirect to Excel. The graphical user interface (GUI) is developed using Visual Basic language. The screen shot of GUI is shown in Fig.5a.
(5a)

(5b)
Fig.5: Screen shot of GUI program run on PC and typical SMS view on user mobile phone

SOFTWARE DESCRIPTION OF DEVICE
The firmware for the CPU is written in embedded–C language. Fig.6. shows the flow chart of the device software. The programmed behavior of the device is as follows:
When the device is powered-up, the initialization part of the device software configures various on-chip peripherals such as timers, interrupts, ADC etc. and initializes the externally interfaced LCD, RTC, and MMC. This initialization sequence puts these resources into a known state. Once initialize, device display parameter and setup user data using keys (sw1, sw2).At regular time interval specified by user setup, device store parameter & send it through SMS to user mobile phone. Device checks request to send stored record through serial port as shown in device software flow chart.
 
Fig.6: Flow chart of the weather remote monitoring device software.

RESULT
The accuracy of proposed device has been tested through extensive experiments. Present device can measure temperature from 0oC to 100oC with 0.5oC resolution and relative humidity from 30%RH to 90%RH with resolution of 1%RH. Although final accuracy of weather remote monitoring system depends on sensor accuracy. The observed data is comparable with the actually measured data using conventional mercury thermometer and Masons Hygrometer. The results obtained are summarized in Table-1, Table- 2.
Table 1: Comparison of temperature measurements.
 
From Table-1, it can be observed that the temperature sensor shows a good level of stability as well as accuracy. The average error of 0.60C is observed due to ±0.50C error by the sensor and ±0.250C introduced by ADC. The humidity sensor of proposed device also show very good accuracy as shown in Table-2.an error of 2% is observed mainly due to the hysteresis effects of the sensor. This device is very useful in Green house, as data logger and remote monitoring where temperature and humidity plays vital role, hence it is necessary to monitor and control this parameter. The readout storage capacity of device can be easily increased by adding external memory such as Multimedia or Flash memory card.
Table 2 : Comparison of Humidity measurements.
 

(7a)
(7b)
Fig.7: Graph of humidity and temperature compared with Hygrometer and mercury thermometer respectively

CONCLUSION
From the graphs of Humidity and temperature it is clear that there is very close agreement between the data collected by our system and that measured by already available and calibrated systems, which validates the measurements made by our system. The presented system can be useful for studding behavior of Industrial and Home processes application having multiple parameters. Though the system employs SMS technology which is a point-to-point communication technology with the limitations of small bandwidth; it imposes no need of PC or web server for remote monitoring and thus saves the cost. With slightly modifying the firmware current monitored parameters can be sent to many users through SMS.

REFERENCES
[1] Kang. J. and Park S. “Integrated comfort sensing system on indoor climate” Sensors and Actuators. 2000. 302-307.
[2] Moghavvemi M. and Tan. S. “A reliable and economically feasible remote sensing system for temperature and relative humidity measurement”. Sensors and Actuators. 2005. 181-185.
[3] Vlassov Y.N. and Kozlov A.S. “Precision SAW pressure sensors” IEEE proceeding of 47th frequency control symposium. 1993. 665-669.
[4] Jan Cimo and Bernard Siska, “Design and realization of monitoring system for measuring air temperature and humidity, wind direction and speed”. Journal of Environmental Engineering and Landscape Management. 2006. 14(3).127 -134.
[5] K.Gowardhan, “Control anything from a cell phone Tiny Planet” Smart Materials Structures and Conference on Systems International.2005. Bangalore. India.
[6] Wayne Peacock. “Nokia F-Bus Protocol”.2004. online website www.Embedtronics.com

[7] SanDisk Corporation. SanDisk SD card product manual. Version-2.2.2004. www.sandisk.com .
Electrical and Electronics Project by Ravi Devani

No comments:

Post a Comment