SlideShare a Scribd company logo
IOSR Journal of Electronics and Communication Engineering (IOSR-JECE)
e-ISSN: 2278-2834,p- ISSN: 2278-8735.Volume 10, Issue 3, Ver. IV (May - Jun.2015), PP 45-52
www.iosrjournals.org
DOI: 10.9790/2834-10344552 www.iosrjournals.org 45 | Page
PIC Microcontroller & PC Based Multi Sensors Artificial
Intelligent Technique for Gas Identification.
Prof. S.N.Divekar1
, Dr. S.N.Pawar2
1
Assistant Professor, Dept. of Electronics & Telecomm., Parikrama Polytechnic, Kashti, M.S. India
2
Associate Professor, Dept. of Electronics & Telecomm, J. N.E.C. Aurangabad, M.S., India
Abstract: PIC microcontroller & PC based gas sensing system is presented in this project. The analysis
presented here depends on thin film metal oxide gas sensors TGS 822, TGS 813, TGS 2600, MQ6 and MQ7. The
differences in the steady state performance among their sensors are used for improving their selectivity and
sensitivity, while the combination of gas sensors permits success in gas classification problems. In the presented
approach the gas sensors are embedded into a chamber with a heating system. Different types of gases are used,
such as, Methane, Carbon monoxide and LPG to pass through this chamber with different concentrations,
different operating temperatures and different load resistances. Sets of data collected to detect the gas
sensitivity for each sensor depending on the output voltage in relation to temperatures, concentration of gases
and variable resistances for each sensor. In this project, novel approach, based on the ANN technique, used for
the gas identification. The identification is done directly from the data driven from the microcontroller by using
ANN trained model. The results of the ANN are shown to provide gas identification according to variation in
different parameters, such as gas concentrations, variation in sensor's resistance and output voltage of sensor at
different temperatures and to indicate that the selection of different gases is possible, based on microcontroller,
which improves sensitivity and selectivity with high accuracy and reliability.
Keywords: Gas detection, ANN, intelligent sensing, Gas sensors.
I. Introduction
Analysis and monitoring of gases can be carried out by means of metal oxide gas sensors, which are
used for either health or safety hazards. It is preferable to combine the response of a set of different sensors to
achieve more measurement accuracy than using an individual sensor. This resembles the system known as
electronic noses. In order to correct the nonlinearities, low selectivity and other problems of a single sensor, the
multi sensors data fusion are used to combine data to perform inference that may not be possible from a single
sensor alone. Thermal conductivity is analytical method based on the fact that various gases differ considerably
in their ability to conduct heat. The most common method, used for gas analysis, involves hot wire thermal
conductivity gas analysis cell as illustrated in figure (1). Such a cell consists of two chambers, each containing a
wire filament. One chamber allows the sample gas to flow through it, while the other is sealed and contains a
reference gas, such as air. The bridge is calibrated by allowing the same gas to surround the two filament
resistors, reference filament and measuring filament, R3 and R4. The resistor R2 is adjusted to yield a balanced
bridge condition. Then the gas in the measuring chamber is replaced by the gas under test with the same
pressure, and temperature conditions. If the test gas has different thermal conductivity than the reference gas, the
measuring filament resistors R4 will be cooled at different rate. A different cooling rate results depending on a
change of the temperature of the measuring filament resistor R4 and so change in its resistance. The change in
resistance R4 causes the unbalancing of the bridge. The condition of unbalance actuates a meter which indicates
the change in composition of the gas. The whole approach is based on measurements taken from an
experimental set up with certain typical commercial sensors.
The outputs of sensors are monitored by a microcontroller. Proper intelligent processing with use of
fuzzy logic has been chosen because it gives better results and enhances discrimination techniques among
sensed gases. Fuzzy logic systems encode human reasoning to make decisions and control dynamical systems.
Fuzzy logic comprises fuzzy sets which are methods of representing non statistical uncertainty and approximate
reasoning, include the operations used to make inferences. It is a tool for mapping the input features to the
output, based on data in the form of "IF - Then" rules. An implementation of a fuzzy expert system depends on
Mamdani type fuzzy controller. The objective of the controller is to discriminate different gases and to detect
the concentration of each gas according to the input variables.
PIC Microcontroller & PC Based Multi Sensors Artificial Intelligent Technique...
DOI: 10.9790/2834-10344552 www.iosrjournals.org 46 | Page
Fig. (1) Thermal conductivity Gas Analyzer circuit.
II. System Model
Fig. (2) The block diagram of hardware implementation of gas sensing detector system
Description of parts of the system:
1. Gas Sensors
For the identification of gases, five commercial gas sensors TGS 822, TGS 813, TGS 2600 from
"Figaro" sensors and MQ6 and MQ7 from "HANWEI" sensors industry have been used with heating supply
voltage equal to 5V.
PIC Microcontroller & PC Based Multi Sensors Artificial Intelligent Technique...
DOI: 10.9790/2834-10344552 www.iosrjournals.org 47 | Page
2. Gas chamber & gases used:
Gas sensors chamber is of internal volume 1200cm3 excluding sensor, heater circuit, and heating
system. Gases used for the experiment are Methane, Carbon monoxide, LPG (Propane and Butane).
Fig. (3) Glass Gas Chamber
3. Microcontroller (PIC16F877).
Microcontroller is used to sense the analog voltage from the gas sensors & to convert into digital. It
transmits data serially to PC for processing & analysis.
4. Programmable resistor (AD5246).
The AD5246 provides a compact 2 mm × 2.1 mm packaged solution for 128-position adjustment
applications. This device performs the same electronic adjustment function as a variable resistor. These low
temperature coefficient devices are ideal for high accuracy and stability variable resistance adjustments.
Fig. (4) Functional Block diagram of Programmable Resistor AD5246
The wiper settings are controllable through the I2
C compatible digital interface, which can also be used
to read back the present wiper register control word. The resistance between the wiper and either end point of
the fixed resistor varies linearly with respect to the digital code transferred into the latch.
Resistor variation is done in our system by using AD5246.
5. PC: PC of configuration Pentium(R) Dual core CPU, 2.30 GHz processor is used for Data processing &
identification. Docklight & MATLAB Application software are installed on PC for data collection, processing
and Gas identification
7. LCD: 20x4 character LCD module is used to display temperature, resistance value and sensor output.
III. Working Of System Model
All sensors are connected as an array and covered by a chamber which has "in" and "outlet" ports. The
input of chamber is connected with the out knob of gas canister. All sensors are subjected to variation in
temperatures from ambient temperatures and above.
PIC Microcontroller & PC Based Multi Sensors Artificial Intelligent Technique...
DOI: 10.9790/2834-10344552 www.iosrjournals.org 48 | Page
Fig. (5) Hardware setup Gas identification unit
The output of sensors are monitored and recorded for different temperature, load resistances and
concentration. Gas canister of concentration 100ppm is connected to gas chamber. Outputs of sensors are
recorded for temperature 400
C, 450
C, 500
C, 550
C, 600
C, 650
C, 700
C, and 750
C. Temperature set point is given
through PC using serial COM port. Temperature adjusted in gas chamber by using heating system. We were
varied load resistances as value1K, 2k, 3k, 4k, 5k, 6k and 7k for every temperature set point and recorded the
sensor output for each load resistance & temperature. The same procedure is carried out for 400ppm &
1000ppm methane, carbon monoxide and LPG.
Figure (2) shows the system block diagram. The block diagram of the hardware include a
microcontroller PIC 16F877. It is chosen for the implementation of this task due to the on-chip memory
resources as well as high speed. The output data is transferred to a PC via serial communication RS232 from
microcontroller with 9600 baud rate.
We are written the program for PIC 16F877 microcontroller in C language and then compile, build
using MPLAB IDE V8.90, and down-loaded to the microcontroller. The program consists of three parts:
measurement part, mathematical analysis part, and presentation part. Mathematical analysis part is carried out
by using fuzzy logic.
We are written MATLAB software in presentation part of programming. GUI of MATLAB is used for
presentation.
Fig.(6) Snapshoot of GUI using MATLAB
IV. Method Of Analysis
After the experiment has been setup and data have been collected, data analysis has been done by using
two methods.
The first method: Find the relation between the sensors output volt with the temperature for each gas at
different concentrations. This relation has been extracted using curve fitting which proved to be the best when
using exponential function, that accordingly gives prediction to the nearest output volt measured in the
experiments with the least error. The output volt of sensor under different values of operating temperature can
be calculated by the exponential equation.
PIC Microcontroller & PC Based Multi Sensors Artificial Intelligent Technique...
DOI: 10.9790/2834-10344552 www.iosrjournals.org 49 | Page
V= A x eBT
Where,
V=Output volt.
T =Temperature °C.
A and B = variable coefficients of fitting.
The second method: Artificial Neural Network depending on the temperature, output volt of each
sensor and the variable resistance as inputs to give online prediction of different concentrations for each gas as
the output. The feature of each gas is detected, based on the Artificial Neural Network system.
In our project ANN method of analysis had been used.
V. Result & Discussion
Figure 7: Sensors output for 100 ppm Methane gas at 4k load
Figure 8: Sensors output for 400 ppm Methane gas at 4k load
Figure 9: Sensors output for 1000 ppm Methane gas at 4k load
0.0
1.0
2.0
3.0
4.0
5.0
40 45 50 55 60 65 70 75
Volt
Temperature
TGS813
MQ7
MQ6
TGS822
0.0
1.0
2.0
3.0
4.0
5.0
40 45 50 55 60 65 70 75
Volt
Temperature
TGS813
MQ7
MQ6
TGS822
TGS2600
0.0
1.0
2.0
3.0
4.0
5.0
40 45 50 55 60 65 70 75
Volt
Temperature
TGS813
MQ7
MQ6
TGS822
TGS2600
PIC Microcontroller & PC Based Multi Sensors Artificial Intelligent Technique...
DOI: 10.9790/2834-10344552 www.iosrjournals.org 50 | Page
Figure 10: Sensors output for 100 ppm LPG gas at 4k load
Figure 11: Sensors output for 400 ppm LPG gas at 4k load
Figure 12: Sensors output for 1000 ppm LPG gas at 4k load
Figure 13: Sensors output for 100 ppm Carbon monoxide gas at 4k load.
0.0
1.0
2.0
3.0
4.0
5.0
45 50 55 60 65 70 75
Volt Temperture
TGS813
MQ7
MQ6
TGS822
TGS2600
0.0
1.0
2.0
3.0
4.0
5.0
45 50 55 60 65 70 75
Volt
Temperature
TGS813
MQ7
MQ6
TGS822
TGS2600
0.0
1.0
2.0
3.0
4.0
5.0
45 50 55 60 65 70 75
Volt
Temperature
400 TGS813
400 MQ7
400 MQ6
400 TGS822
400 TGS2600
0.0
0.5
1.0
1.5
2.0
2.5
3.0
3.5
4.0
4.5
5.0
40 45 50 55 60 65 70 75
Volt
Temperature
TGS813
MQ7
MQ6
TGS822
TGS2600
PIC Microcontroller & PC Based Multi Sensors Artificial Intelligent Technique...
DOI: 10.9790/2834-10344552 www.iosrjournals.org 51 | Page
Figure 14: Sensors output for 400 ppm Carbon monoxide gas at 4k load
Figure 15: Sensors output for 1000 ppm Carbon monoxide gas at 4k load.
The stability and sensitivity of sensors depends on temperature and load resistance in presence of gas,
which was experimentally characterized in above figure 7 to figure 15.
For methane gas in low temperature TGS813, MQ-7, TGS2600 sensors are more sensitive but as
temperature increases TGS822 more sensitive than other sensors. As temperature increase all sensor output are
increases for Methane gas 100ppm and 400ppm. TGS 813 output was increases as temperature increases in
1000ppm methane gas but other sensor output increases at 400
C to 450
C and 600
C to 750
C, sensor output
decrease in 500C to 550C.
For LPG gas TGS 822, MQ-6, TGS2600 sensors are more sensitive than TGS813 and MQ-7 Sensors.
MQ-7 and TGS822 sensors are more sensitive than TGS813, MQ-6 and TGS2600.
It can illustrate from above discussion that the sensitivity of each sensor changes due to the resistance
fluctuation and temperature variations, hence output results include non-linear response. Due to non linearity we
can’t predict the output. Therefore we used artificial network to get predicted output.
VI. Conclusion
An experimental measuring system based on a microcontroller has been developed. All experimental
data are performing in a fully automated computer control.
Different gases are used such as Methane, Carbon monoxide, LPG ( Propane + and Butane)
with100PPM, 400PPM, 1000PPM concentration. The microcontroller based gas sensing measurement system
that is developed in this project. It is fabricated as a unit prototype. In this project, the analysis method of all
sensors sensitivity for a specific gas is a result of the output volt variations depending on each variations of
temperature. A wide range of measurements of data had been recorded at a long period of time. Then the
averages of their selected results were taken. By applying the fitting method on using MATLAB ANN.
Artificial Neural Network is used to fitting data driven from the microcontroller.
It can be used to discriminate and classify the data set patterns for different gases according to the
variation in different parameters, such as gas concentrations, variation in sensor's resistance and output volt to
microcontroller at different temperatures and to improve the sensor's selectivity for gas identification. Due to the
abundant number of membership function figures, the results were limited to representing the ANN output
surface for each sensor. ANN gives on line prediction of the concentration depending on the behaviour of each
gas with different sensors which are extracted from the experiments.
0.0
1.0
2.0
3.0
4.0
5.0
40 45 50 55 60 65 70 75
Volt Temperature
TGS813
MQ7
MQ6
TGS822
TGS2600
0.0
1.0
2.0
3.0
4.0
5.0
40 45 50 55 60 65 70 75
Volt
Temperature
TGS813
MQ7
MQ6
TGS822
TGS2600
PIC Microcontroller & PC Based Multi Sensors Artificial Intelligent Technique...
DOI: 10.9790/2834-10344552 www.iosrjournals.org 52 | Page
References
[1]. Imon Morsi, “A Microcontroller Based on Multi Sensors Data Fusion and Artificial Intelligent Technique for Gas Identification”
The 33rd Annual Conference of the IEEE Industrial Electronics Society (IECON)
[2]. Santiago Marco, Arturo Ortega, Antonio Pardo, and Josep Samitier, "Gas Identification with tin Oxide sensor Array and self-
Organizing, Maps: Adaptive correction of sensor drifts. IEEE Transactions on Instrumentation and Measurements. Vol. 47, No.1,
February 1998.
[3]. Jan Zakrzewski, Wieslaw Domanski, Petros chaitas, and Theodore laopoulos, "Improving Sensitivity and Selectivity of Gas
Sensors by Temperature Variation", IEEE Transactions on Instrumentation and Measurement, Vol. 55 No.1. February 2006.
[4]. Sofiane Brahim - Belhouari, Amine Bermak, Minghua Shi, Philip C.H, Chan "Fast and Robust gas Identification system using an
Integrated Gas Sensor technology and Gaussion Mixture Models", IEEE Sensors Journal, Vol 5, No 6, December 2005.
[5]. P. Chaitas, W. Domanski, Th. Laopoulus, J. Zakrzewski “Gas Identification Method by Microcontroller-based Analysis of Two-
dimensional Sensors Behavior” IMTC - Instrumentation and Measurement Technology Conference, May 2004.
[6]. T. Becker, S. Muhlberger, C. Bosch-v. Braunmuhl, G. Muller, A. Meches, and W.Benecke, "Gas Mixture Analysis Using Silicon
Micro-Reactor Systems", Journal of Micro electromechnical systems, Vol, 9, No. 4, December 2000..
[7]. J.B. GUPTA, "Electronic and Electrical measurements and Instrumentation", S.K. Kataria and sons, 2002.
[8]. J. Wesley Hines, "Fuzzy and Neural Approaches in Engineering". John Wiley & sons, INC, 1997.
[9]. Timothy J. Ross, "Fuzzy logic with Engineering Applications", McGraw-Hill, Inc, 1995
[10]. http://www.figarosensor.com/gaslist.html
[11]. https://www.sparkfun.com/categories/146
[12]. S. Brahdgim Belhouari, A. Bermak, G. Wei, P.C.H. Chan, "Gas Identification Algorithms for micro electronic Gas sensor" IMIC -
Instrumentation and Measurement Technology Conference, 2004.
[13]. Hanusz Smulko, "The Measurement setup for Gas detection by Resistance Fluctuations of Gas Sensor" IMTC - Instrumentation and
Measurement Technology Conference, April 2006.
[14]. Muhammad Ali Mazidi, “PIC Microcontroller and Embedded System”, Pearson Publication, First Edition, 2008.
[15]. Chuck Hellebuyck, “Beginners Guide to Embedded C programming”, Create space Publishing Platform, first Edition, 2008.
[16]. http://www.microchip.com/downloads/en/DeviceDoc/39582C.pdf
[17]. http://www.analog.com/media//technical-documentation/data-sheets/AD5246.pdf
[18]. http://in.mathworks.com/help/matlab/matlab_external/getting-started-with-serial-i-o.html.
[19]. https://electrosome.com/interfacing-lcd-with-pic-microcontroller-hi-tech-c/
[20]. http://embedjournal.com/interfacing-lcd-module-part-1/
[21]. Carlos Gershenson “Artificial Neural Network for beginners” In tech Publication, 2008.
[22]. Jure Zupan “ Introduction to Artificial Neural Network Methods: what they are and how to use them” Acta chimica slovenica
conference, 1994.
[23]. Andy P.Dedecker, Peter L.M., Goethals, Wim Gabriels, Niels De Pauw, “Optimization of Artificial Neural Network(ANN) model
design for prediction of macro invertebrates in the Zwalm river basin” Science Direct Ecological Modeling Journal, 2004(161-173).
[24]. Howard Demuth, Mark Beale “Neural Network tool box” Mathwork user guide Version 4, July 2002.
[25]. Mark Hudson Beale, Martin T. Hagan, Howard Demuth “Neural Network Tool Box” Mathwork user guide version 8.2, March
2014.
[26]. Dr. Ali Assi, “Engineering Education and research using MATLAB” In Tech Publication, October 2011.
[27]. Primoz Potocnik “Neural Network: Matlab Examples” Neural Network course(practical Examples), 2012.
[28]. Anuradha Chug, Ankita Sawhney “The Comparative study of software maintenance forecasting analysis based on backpropagation
(NFTOOL & NTSTOOL) and adaptive nuero fuzzy interface system ANFIS” International journal of Advancement in Research
Technology, Vol. 2, Issue 5, 2013 (312-319).
[29]. Rudra Pratap, “Getting Started with MATLAB”, Oxford University Press, Version 7.8, 2010.
[30]. Sang-Hoon Lee, Yan-fangli, Vikram Kapila, “Development of a MATLAB based GUI environment for PIC microcontroller
Projects”, American Society for Engineering Education Annual Conference, 2004.
[31]. Amod Kumar, “GUI based Device Controller using MATLAB”, IJSER International Journal, Vol-4, Issue-6, June 2013.

More Related Content

H010344552

  • 1. IOSR Journal of Electronics and Communication Engineering (IOSR-JECE) e-ISSN: 2278-2834,p- ISSN: 2278-8735.Volume 10, Issue 3, Ver. IV (May - Jun.2015), PP 45-52 www.iosrjournals.org DOI: 10.9790/2834-10344552 www.iosrjournals.org 45 | Page PIC Microcontroller & PC Based Multi Sensors Artificial Intelligent Technique for Gas Identification. Prof. S.N.Divekar1 , Dr. S.N.Pawar2 1 Assistant Professor, Dept. of Electronics & Telecomm., Parikrama Polytechnic, Kashti, M.S. India 2 Associate Professor, Dept. of Electronics & Telecomm, J. N.E.C. Aurangabad, M.S., India Abstract: PIC microcontroller & PC based gas sensing system is presented in this project. The analysis presented here depends on thin film metal oxide gas sensors TGS 822, TGS 813, TGS 2600, MQ6 and MQ7. The differences in the steady state performance among their sensors are used for improving their selectivity and sensitivity, while the combination of gas sensors permits success in gas classification problems. In the presented approach the gas sensors are embedded into a chamber with a heating system. Different types of gases are used, such as, Methane, Carbon monoxide and LPG to pass through this chamber with different concentrations, different operating temperatures and different load resistances. Sets of data collected to detect the gas sensitivity for each sensor depending on the output voltage in relation to temperatures, concentration of gases and variable resistances for each sensor. In this project, novel approach, based on the ANN technique, used for the gas identification. The identification is done directly from the data driven from the microcontroller by using ANN trained model. The results of the ANN are shown to provide gas identification according to variation in different parameters, such as gas concentrations, variation in sensor's resistance and output voltage of sensor at different temperatures and to indicate that the selection of different gases is possible, based on microcontroller, which improves sensitivity and selectivity with high accuracy and reliability. Keywords: Gas detection, ANN, intelligent sensing, Gas sensors. I. Introduction Analysis and monitoring of gases can be carried out by means of metal oxide gas sensors, which are used for either health or safety hazards. It is preferable to combine the response of a set of different sensors to achieve more measurement accuracy than using an individual sensor. This resembles the system known as electronic noses. In order to correct the nonlinearities, low selectivity and other problems of a single sensor, the multi sensors data fusion are used to combine data to perform inference that may not be possible from a single sensor alone. Thermal conductivity is analytical method based on the fact that various gases differ considerably in their ability to conduct heat. The most common method, used for gas analysis, involves hot wire thermal conductivity gas analysis cell as illustrated in figure (1). Such a cell consists of two chambers, each containing a wire filament. One chamber allows the sample gas to flow through it, while the other is sealed and contains a reference gas, such as air. The bridge is calibrated by allowing the same gas to surround the two filament resistors, reference filament and measuring filament, R3 and R4. The resistor R2 is adjusted to yield a balanced bridge condition. Then the gas in the measuring chamber is replaced by the gas under test with the same pressure, and temperature conditions. If the test gas has different thermal conductivity than the reference gas, the measuring filament resistors R4 will be cooled at different rate. A different cooling rate results depending on a change of the temperature of the measuring filament resistor R4 and so change in its resistance. The change in resistance R4 causes the unbalancing of the bridge. The condition of unbalance actuates a meter which indicates the change in composition of the gas. The whole approach is based on measurements taken from an experimental set up with certain typical commercial sensors. The outputs of sensors are monitored by a microcontroller. Proper intelligent processing with use of fuzzy logic has been chosen because it gives better results and enhances discrimination techniques among sensed gases. Fuzzy logic systems encode human reasoning to make decisions and control dynamical systems. Fuzzy logic comprises fuzzy sets which are methods of representing non statistical uncertainty and approximate reasoning, include the operations used to make inferences. It is a tool for mapping the input features to the output, based on data in the form of "IF - Then" rules. An implementation of a fuzzy expert system depends on Mamdani type fuzzy controller. The objective of the controller is to discriminate different gases and to detect the concentration of each gas according to the input variables.
  • 2. PIC Microcontroller & PC Based Multi Sensors Artificial Intelligent Technique... DOI: 10.9790/2834-10344552 www.iosrjournals.org 46 | Page Fig. (1) Thermal conductivity Gas Analyzer circuit. II. System Model Fig. (2) The block diagram of hardware implementation of gas sensing detector system Description of parts of the system: 1. Gas Sensors For the identification of gases, five commercial gas sensors TGS 822, TGS 813, TGS 2600 from "Figaro" sensors and MQ6 and MQ7 from "HANWEI" sensors industry have been used with heating supply voltage equal to 5V.
  • 3. PIC Microcontroller & PC Based Multi Sensors Artificial Intelligent Technique... DOI: 10.9790/2834-10344552 www.iosrjournals.org 47 | Page 2. Gas chamber & gases used: Gas sensors chamber is of internal volume 1200cm3 excluding sensor, heater circuit, and heating system. Gases used for the experiment are Methane, Carbon monoxide, LPG (Propane and Butane). Fig. (3) Glass Gas Chamber 3. Microcontroller (PIC16F877). Microcontroller is used to sense the analog voltage from the gas sensors & to convert into digital. It transmits data serially to PC for processing & analysis. 4. Programmable resistor (AD5246). The AD5246 provides a compact 2 mm × 2.1 mm packaged solution for 128-position adjustment applications. This device performs the same electronic adjustment function as a variable resistor. These low temperature coefficient devices are ideal for high accuracy and stability variable resistance adjustments. Fig. (4) Functional Block diagram of Programmable Resistor AD5246 The wiper settings are controllable through the I2 C compatible digital interface, which can also be used to read back the present wiper register control word. The resistance between the wiper and either end point of the fixed resistor varies linearly with respect to the digital code transferred into the latch. Resistor variation is done in our system by using AD5246. 5. PC: PC of configuration Pentium(R) Dual core CPU, 2.30 GHz processor is used for Data processing & identification. Docklight & MATLAB Application software are installed on PC for data collection, processing and Gas identification 7. LCD: 20x4 character LCD module is used to display temperature, resistance value and sensor output. III. Working Of System Model All sensors are connected as an array and covered by a chamber which has "in" and "outlet" ports. The input of chamber is connected with the out knob of gas canister. All sensors are subjected to variation in temperatures from ambient temperatures and above.
  • 4. PIC Microcontroller & PC Based Multi Sensors Artificial Intelligent Technique... DOI: 10.9790/2834-10344552 www.iosrjournals.org 48 | Page Fig. (5) Hardware setup Gas identification unit The output of sensors are monitored and recorded for different temperature, load resistances and concentration. Gas canister of concentration 100ppm is connected to gas chamber. Outputs of sensors are recorded for temperature 400 C, 450 C, 500 C, 550 C, 600 C, 650 C, 700 C, and 750 C. Temperature set point is given through PC using serial COM port. Temperature adjusted in gas chamber by using heating system. We were varied load resistances as value1K, 2k, 3k, 4k, 5k, 6k and 7k for every temperature set point and recorded the sensor output for each load resistance & temperature. The same procedure is carried out for 400ppm & 1000ppm methane, carbon monoxide and LPG. Figure (2) shows the system block diagram. The block diagram of the hardware include a microcontroller PIC 16F877. It is chosen for the implementation of this task due to the on-chip memory resources as well as high speed. The output data is transferred to a PC via serial communication RS232 from microcontroller with 9600 baud rate. We are written the program for PIC 16F877 microcontroller in C language and then compile, build using MPLAB IDE V8.90, and down-loaded to the microcontroller. The program consists of three parts: measurement part, mathematical analysis part, and presentation part. Mathematical analysis part is carried out by using fuzzy logic. We are written MATLAB software in presentation part of programming. GUI of MATLAB is used for presentation. Fig.(6) Snapshoot of GUI using MATLAB IV. Method Of Analysis After the experiment has been setup and data have been collected, data analysis has been done by using two methods. The first method: Find the relation between the sensors output volt with the temperature for each gas at different concentrations. This relation has been extracted using curve fitting which proved to be the best when using exponential function, that accordingly gives prediction to the nearest output volt measured in the experiments with the least error. The output volt of sensor under different values of operating temperature can be calculated by the exponential equation.
  • 5. PIC Microcontroller & PC Based Multi Sensors Artificial Intelligent Technique... DOI: 10.9790/2834-10344552 www.iosrjournals.org 49 | Page V= A x eBT Where, V=Output volt. T =Temperature °C. A and B = variable coefficients of fitting. The second method: Artificial Neural Network depending on the temperature, output volt of each sensor and the variable resistance as inputs to give online prediction of different concentrations for each gas as the output. The feature of each gas is detected, based on the Artificial Neural Network system. In our project ANN method of analysis had been used. V. Result & Discussion Figure 7: Sensors output for 100 ppm Methane gas at 4k load Figure 8: Sensors output for 400 ppm Methane gas at 4k load Figure 9: Sensors output for 1000 ppm Methane gas at 4k load 0.0 1.0 2.0 3.0 4.0 5.0 40 45 50 55 60 65 70 75 Volt Temperature TGS813 MQ7 MQ6 TGS822 0.0 1.0 2.0 3.0 4.0 5.0 40 45 50 55 60 65 70 75 Volt Temperature TGS813 MQ7 MQ6 TGS822 TGS2600 0.0 1.0 2.0 3.0 4.0 5.0 40 45 50 55 60 65 70 75 Volt Temperature TGS813 MQ7 MQ6 TGS822 TGS2600
  • 6. PIC Microcontroller & PC Based Multi Sensors Artificial Intelligent Technique... DOI: 10.9790/2834-10344552 www.iosrjournals.org 50 | Page Figure 10: Sensors output for 100 ppm LPG gas at 4k load Figure 11: Sensors output for 400 ppm LPG gas at 4k load Figure 12: Sensors output for 1000 ppm LPG gas at 4k load Figure 13: Sensors output for 100 ppm Carbon monoxide gas at 4k load. 0.0 1.0 2.0 3.0 4.0 5.0 45 50 55 60 65 70 75 Volt Temperture TGS813 MQ7 MQ6 TGS822 TGS2600 0.0 1.0 2.0 3.0 4.0 5.0 45 50 55 60 65 70 75 Volt Temperature TGS813 MQ7 MQ6 TGS822 TGS2600 0.0 1.0 2.0 3.0 4.0 5.0 45 50 55 60 65 70 75 Volt Temperature 400 TGS813 400 MQ7 400 MQ6 400 TGS822 400 TGS2600 0.0 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0 40 45 50 55 60 65 70 75 Volt Temperature TGS813 MQ7 MQ6 TGS822 TGS2600
  • 7. PIC Microcontroller & PC Based Multi Sensors Artificial Intelligent Technique... DOI: 10.9790/2834-10344552 www.iosrjournals.org 51 | Page Figure 14: Sensors output for 400 ppm Carbon monoxide gas at 4k load Figure 15: Sensors output for 1000 ppm Carbon monoxide gas at 4k load. The stability and sensitivity of sensors depends on temperature and load resistance in presence of gas, which was experimentally characterized in above figure 7 to figure 15. For methane gas in low temperature TGS813, MQ-7, TGS2600 sensors are more sensitive but as temperature increases TGS822 more sensitive than other sensors. As temperature increase all sensor output are increases for Methane gas 100ppm and 400ppm. TGS 813 output was increases as temperature increases in 1000ppm methane gas but other sensor output increases at 400 C to 450 C and 600 C to 750 C, sensor output decrease in 500C to 550C. For LPG gas TGS 822, MQ-6, TGS2600 sensors are more sensitive than TGS813 and MQ-7 Sensors. MQ-7 and TGS822 sensors are more sensitive than TGS813, MQ-6 and TGS2600. It can illustrate from above discussion that the sensitivity of each sensor changes due to the resistance fluctuation and temperature variations, hence output results include non-linear response. Due to non linearity we can’t predict the output. Therefore we used artificial network to get predicted output. VI. Conclusion An experimental measuring system based on a microcontroller has been developed. All experimental data are performing in a fully automated computer control. Different gases are used such as Methane, Carbon monoxide, LPG ( Propane + and Butane) with100PPM, 400PPM, 1000PPM concentration. The microcontroller based gas sensing measurement system that is developed in this project. It is fabricated as a unit prototype. In this project, the analysis method of all sensors sensitivity for a specific gas is a result of the output volt variations depending on each variations of temperature. A wide range of measurements of data had been recorded at a long period of time. Then the averages of their selected results were taken. By applying the fitting method on using MATLAB ANN. Artificial Neural Network is used to fitting data driven from the microcontroller. It can be used to discriminate and classify the data set patterns for different gases according to the variation in different parameters, such as gas concentrations, variation in sensor's resistance and output volt to microcontroller at different temperatures and to improve the sensor's selectivity for gas identification. Due to the abundant number of membership function figures, the results were limited to representing the ANN output surface for each sensor. ANN gives on line prediction of the concentration depending on the behaviour of each gas with different sensors which are extracted from the experiments. 0.0 1.0 2.0 3.0 4.0 5.0 40 45 50 55 60 65 70 75 Volt Temperature TGS813 MQ7 MQ6 TGS822 TGS2600 0.0 1.0 2.0 3.0 4.0 5.0 40 45 50 55 60 65 70 75 Volt Temperature TGS813 MQ7 MQ6 TGS822 TGS2600
  • 8. PIC Microcontroller & PC Based Multi Sensors Artificial Intelligent Technique... DOI: 10.9790/2834-10344552 www.iosrjournals.org 52 | Page References [1]. Imon Morsi, “A Microcontroller Based on Multi Sensors Data Fusion and Artificial Intelligent Technique for Gas Identification” The 33rd Annual Conference of the IEEE Industrial Electronics Society (IECON) [2]. Santiago Marco, Arturo Ortega, Antonio Pardo, and Josep Samitier, "Gas Identification with tin Oxide sensor Array and self- Organizing, Maps: Adaptive correction of sensor drifts. IEEE Transactions on Instrumentation and Measurements. Vol. 47, No.1, February 1998. [3]. Jan Zakrzewski, Wieslaw Domanski, Petros chaitas, and Theodore laopoulos, "Improving Sensitivity and Selectivity of Gas Sensors by Temperature Variation", IEEE Transactions on Instrumentation and Measurement, Vol. 55 No.1. February 2006. [4]. Sofiane Brahim - Belhouari, Amine Bermak, Minghua Shi, Philip C.H, Chan "Fast and Robust gas Identification system using an Integrated Gas Sensor technology and Gaussion Mixture Models", IEEE Sensors Journal, Vol 5, No 6, December 2005. [5]. P. Chaitas, W. Domanski, Th. Laopoulus, J. Zakrzewski “Gas Identification Method by Microcontroller-based Analysis of Two- dimensional Sensors Behavior” IMTC - Instrumentation and Measurement Technology Conference, May 2004. [6]. T. Becker, S. Muhlberger, C. Bosch-v. Braunmuhl, G. Muller, A. Meches, and W.Benecke, "Gas Mixture Analysis Using Silicon Micro-Reactor Systems", Journal of Micro electromechnical systems, Vol, 9, No. 4, December 2000.. [7]. J.B. GUPTA, "Electronic and Electrical measurements and Instrumentation", S.K. Kataria and sons, 2002. [8]. J. Wesley Hines, "Fuzzy and Neural Approaches in Engineering". John Wiley & sons, INC, 1997. [9]. Timothy J. Ross, "Fuzzy logic with Engineering Applications", McGraw-Hill, Inc, 1995 [10]. http://www.figarosensor.com/gaslist.html [11]. https://www.sparkfun.com/categories/146 [12]. S. Brahdgim Belhouari, A. Bermak, G. Wei, P.C.H. Chan, "Gas Identification Algorithms for micro electronic Gas sensor" IMIC - Instrumentation and Measurement Technology Conference, 2004. [13]. Hanusz Smulko, "The Measurement setup for Gas detection by Resistance Fluctuations of Gas Sensor" IMTC - Instrumentation and Measurement Technology Conference, April 2006. [14]. Muhammad Ali Mazidi, “PIC Microcontroller and Embedded System”, Pearson Publication, First Edition, 2008. [15]. Chuck Hellebuyck, “Beginners Guide to Embedded C programming”, Create space Publishing Platform, first Edition, 2008. [16]. http://www.microchip.com/downloads/en/DeviceDoc/39582C.pdf [17]. http://www.analog.com/media//technical-documentation/data-sheets/AD5246.pdf [18]. http://in.mathworks.com/help/matlab/matlab_external/getting-started-with-serial-i-o.html. [19]. https://electrosome.com/interfacing-lcd-with-pic-microcontroller-hi-tech-c/ [20]. http://embedjournal.com/interfacing-lcd-module-part-1/ [21]. Carlos Gershenson “Artificial Neural Network for beginners” In tech Publication, 2008. [22]. Jure Zupan “ Introduction to Artificial Neural Network Methods: what they are and how to use them” Acta chimica slovenica conference, 1994. [23]. Andy P.Dedecker, Peter L.M., Goethals, Wim Gabriels, Niels De Pauw, “Optimization of Artificial Neural Network(ANN) model design for prediction of macro invertebrates in the Zwalm river basin” Science Direct Ecological Modeling Journal, 2004(161-173). [24]. Howard Demuth, Mark Beale “Neural Network tool box” Mathwork user guide Version 4, July 2002. [25]. Mark Hudson Beale, Martin T. Hagan, Howard Demuth “Neural Network Tool Box” Mathwork user guide version 8.2, March 2014. [26]. Dr. Ali Assi, “Engineering Education and research using MATLAB” In Tech Publication, October 2011. [27]. Primoz Potocnik “Neural Network: Matlab Examples” Neural Network course(practical Examples), 2012. [28]. Anuradha Chug, Ankita Sawhney “The Comparative study of software maintenance forecasting analysis based on backpropagation (NFTOOL & NTSTOOL) and adaptive nuero fuzzy interface system ANFIS” International journal of Advancement in Research Technology, Vol. 2, Issue 5, 2013 (312-319). [29]. Rudra Pratap, “Getting Started with MATLAB”, Oxford University Press, Version 7.8, 2010. [30]. Sang-Hoon Lee, Yan-fangli, Vikram Kapila, “Development of a MATLAB based GUI environment for PIC microcontroller Projects”, American Society for Engineering Education Annual Conference, 2004. [31]. Amod Kumar, “GUI based Device Controller using MATLAB”, IJSER International Journal, Vol-4, Issue-6, June 2013.