Sie sind auf Seite 1von 4

Research of The Harmful Gas Detection and Control System In Dairy

Yang Shifeng
College of Electronic information and automation
Tianjin University of Science & Technology
Tianjin 300222, China
yangsf@tust.edu.cn
Liu Yajuan
College of Electronic information and automation
Tianjin University of Science & Technology
Tianjin 300222, China
liuyajuan@mail.tust.cn


AbstractThis design constructs the harmful gas detection and
automatic control system for NH3 and H2S in the dairy, which
based on the electronic nose and LabVIEW virtual instrument
technology development platform. This control system tests the
harmful gas concentration of NH3 and H2S through the
semiconductor gas sensor MQ-137 and MQ-136; The NH3 and
H2S concentration change into the corresponding signals
through the A/D conversion chip, for the signal acquisition and
processing; The system realize the functions of the harmful gas
concentration of real-time data acquisition, display, storage,
which used graphical programming language LabVIEW, and
control the harmful gas concentration intelligently and
automation. This control system has the advantages of high
sensitivity, reliable work and the good effect
Keywords- LabVI EW; Electronic nose; SCM; Gas detection
Animal husbandry is an important part of the
agricultural economy, and the breeding industry of milk
cows is an important part of animal husbandry, the dairy not
only provide in a large number of high-quality milk
products but also provide the community with a large
number of employment opportunities, improving the living
quality, promoting the social economic development. It has
played an important role for social progress. [1]
With the development of economy and the improvement
of people's living standard, the demand of dairy products
increasing promote the rapid development of the dairies. In
recent years, the development of dairy industry is rapid, and
the number of cows and milk products is total in the world,
and industry development direction change into the scale,
intensive and professional barn feeding level.
But it also appeared some problems. As is known to all,
the modern animal husbandry production of four elements is
variety, feed nutrition, environment management and
disease prevention, the importance of livestock environment
also gradually cause the attention of the authorities. These
are two reasons, one is that the environment pollution by the
cows excrement is more serious, becoming a new pollution
source. If these excrement is not managed properly, it will
affect the sustainable development of the breeding industry
of milk cows, even threat to the humans health; The other
is that a lot of peculiar smell harmful gas is produced by
these waste, such as NH3,H2S. These will hazard the cow
health.
Dairy environment control is the key measures which
should be meet the cow the best growth needs and improve
the production level. Good control of the dairy is the
guarantee to improve the environment dairy production
capacity, get higher economic benefits and environmental
benefits. Therefore, the harmful gas concentration is
controlled effectively of the dairy, it is important
significance for the growth of cows and milk production,
give full play to its production potential and achieve high
yield, high efficiency. [2]
This paper used electronic nose, LabVIEW and single-
chip microcomputer technology, it design the dairy harmful
gas effective control system, realized the dairy real-time data
acquisition and automatic control, improve the work
efficiency and reliability.
I. THE SYSTEM STRUCTURE AND WORKING PRINCIPLE
The LabVIEW virtual software platform developed upper
computer control system, the system communicates through
the RS-232 serial port and the next bit machine Atmega64
single-chip microcontroller, and the acquisition and
conversion of data processing to Atmega64
microcontroller.[3]
Lower machine through the A/D conversion chip
acquisition harmful gas gas concentration information, and
transfer to PC; PC according to the acquisition of the current
data and setting value judgement, down a machine a control
information; Lower machine according to the PC control
information, through the spraying facilities on milk field
spray, and harmful gas, reducing harmful gas concentration,
Make milk shop gas concentration less than set concentration,
so as to achieve the purpose of control NiuChang gas
concentration. System structure diagram 1 shows.
Proceedings of the 2nd International Symposium on Computer, Communication, Control and Automation (ISCCCA-13)
Published by Atlantis Press, Paris, France.
the authors, 2013
0171

II. HARDWARE DESIGN
Hardware design includes: main controller, gas sensor,
A/D conversion chip, serial communication, such as chip
selection and interface circuit design.
A. The main controller and interface circuit
The main controller is using AVR series MCU
ATmega64. ATmega64 one high performance and low
power consumption of the eight microprocessors, working
voltage of 4.5~5.5 V, 64 KB in the system of programmable
Flash, 2 KB of EEPROM, 4 KB on chip SRAM, 64 KB
optional external storage space, can through the SPI interface
in the system of the programming. The main controller
interface circuit as shown in figure 3 shows.(NH3
concentration is not more than 20 ppm,H2S concentration is
not more than 8 ppm)
PEN
1
PE0 RXD0/(PDI)
2
PE1 (TXD0/PDO)
3
PE2 (XCK0/AIN0)
4
PE3 (OC3A/AIN1)
5
PE4 (OC3B/INT4)
6
PE5 (OC3C/INT5)
7
PE6 (T3/INT6)
8
PE7 (IC3/INT7)
9
PB0 (SS)
10
PB1 (SCK)
11
PB2 (MOSI)
12
PB3 (MISO)
13
PB4 (OC0)
14
PB5 (OC1A)
15
PB6 (OC1B)
16
PB7 (OC2/OC1C)
17
PG3/TOSC2
18
PG4/TOSC1
19
RESET
20
VCC
21
GND
22
XTAL2
23
XTAL1
24
PD0 (SCL/INT0)
25
PD1 (SDA/INT1)
26
PD2 (RXD1/INT2)
27
PD3 (TXD1/INT3)
28
PD4 (IC1)
29
PD5 (XCK1)
30
PD6 (T1)
31
PD7 (T2)
32
PG0 (WR)
33
PG1 (RD)
34
PC0 (A8)
35
PC1 (A9)
36
PC2 (A10
37
PC3 (A11)
38
PC4 (A12)
39
PC5 (A13)
40
PC6 (A14)
41
PC7 (A15)
42
PG2 (ALE)
43
PA7 (AD7)
44
PA6 (AD6)
45
PA5 (AD5)
46
PA4 (AD4)
47
PA3 (AD3)
48
PA2 (AD2)
49
PA1 (AD1)
50
PA0 (AD0)
51
VCC
52
GND
53
PF7 (ADC7/TDI)
54
PF6 (ADC6/TDO)
55
PF5 (ADC5/TMS)
56
PF4 (ADC4/TCK)
57
PF3 (ADC3)
58
PF2 (ADC2)
59
PF1 (ADC1)
60
PF0 (ADC0)
61
AREF
62
GND
63
AVCC
64
U12
ATmega64-16AC
5.1k
5.1k
VCC
RST
11.0592M
22pF 22pF
GND
0.1F
VCC
GND
5.1k
VCC
PC_RXD_PE0
PC_TXD_PE1
RATE2_250_PD5
AD_SCK_PB1
AD_MOSI_PB2
AD_MISO_PB3
AD_SS_PB0
AD_DRDY_PB4
MATA-UP-PB5
MATA-DW-PB6
MATA-RUN-PB7
AC_PE2
5.1k SENSOR-PIN-PG0
VCC
0
DS18B20 PC0
DS18B20 PC1
DS18B20 PC2
DS18B20 PC3
DS18B20 PC4
DS18B20 PC5

Figure 6. Schematic circuit diagram of host controller interface
B. Gas sensitive sensor and A/D conversion module
System measuring ammonia and hydrogen sulfide of
harmful gas concentration respectively with MQ-137 and
MQ-136 semiconductor gas sensor. MQ-137 detection range
for 10-300 PPM ammonia, MQ-136 detection range of 1-100
PPM hydrogen sulfide, which conform to the control system
of concentration change requirements.
Packaging good gas sensor has only 6 needle tube feet,
including four for signal out, 2 used to provide heating
current. This kind of gas sensor for sensitivity adjustment is
very important, so in order to ensure accurate measurement,
ought to consider the influence of temperature and humidity
field milk.
A/D chip as the core unit of data acquisition, data
acquisition circuit design must according to the actual
application carefully selection. In order to meet the accuracy
of data acquisition, speed and channel parameters
requirement, also in order to simplify the circuit design, we
adopt the MAXIM company MAX197 as A/D conversion
chip.[4]
MAX197 is one by using successive approximation way
of working, the internal integration of the input tracking/hold
circuit, Through the 8+4 parallel interface and SCM
connection, with two power down mode, through the
software programming choose eight input channel a modulus
conversion, Are widely used in industrial control system,
robot, data acquisition system, medical instruments and
telecommunication system. Used for gas concentration
acquisition of gas sensors and A/D conversion interface
circuit shown in figure 3.
3
2
1
U2
L
M
3
3
6
B
Z
2
.
5
10k
4148
4148
2.7k
0.1F
+2.5
VCC
AIN1-
AIN1+
0.1F
0.1F
0.1F
GND
0.1F
0.1F
0.1F
100
100
AD1+
AD1-
GND
REF+
9
REF-
10
AIN1+
7
AIN1-
8
AIN2+
6
AIN2-
11
DOUT
13
CS
4
DRDY
12
RST
5
GND
16
CLKOUT
3
DIN
14
SCLK
1
CLKIN
2
VDD
15
U1
AD7705B
2.4576M
15pF 15pF 0.1F
5.1k
VCC
VCC
AD_SS_PB0
AD_MOSI_PB2
AD_MISO_PB3
AD_SCK_PB1
AD_DRDY_PB4
AIN2-
AIN2+
0.1F
0.1F
0.1F
GND
0.1F
0.1F
0.1F
100
100
AD2+
AD2-
GND
+ 10uF +
47uF

Figure 7. Schematic circuit diagram of gas sensor and A/D conversion
C. Serial communication
MAX232AESE chip is the RS-232 communication
standard single power level conversion chip, the use of +5V
power supply. MAX232 interface circuit as shown in figure
4.[5]
RS232
MCUATmega64
PC
MAX197
MQ-136
MAX197
MQ-137
Spraying
medicine
H2S
concentration
NH3
concentration
dairy
Figure 1. Structure of system
Proceedings of the 2nd International Symposium on Computer, Communication, Control and Automation (ISCCCA-13)
Published by Atlantis Press, Paris, France.
the authors, 2013
0172
13
10
11
8
12
9
14
7
C1+
1
C2+
4
GND
15
C1-
3
VCC
16
R1
T1
T2
R2
C2-
5
V-
6
V+
2
U4
MAX232AESE
0.1F
0.1F
0.1F
0.1F VCC
0.1F
PC_RXD_PE0
PC_TXD_PE1 100
100
PC_COM2
PC_COM3

Figure 8. Schematic circuit diagram of interface of MAX232AESE
III. SOFTWARE DESIGN
A. MCU programming
The single chip microcomputer program written in C
language, and its main finish the concentration of harmful
gases, collection, storage and data sending work, and
according to the PC control signal, control drug head open.
B. PC program design
Overriding the NI company LabVIEW as the
development of information system software. LabVIEW
development environment object oriented, and network,
peripheral any integration, openness, high adaptability, short
development cycle, be helpful for data processing, sharing
and the deployment of simple, can reduce the development
cost and time, reduce the cost of the whole monitoring
system.
In the test and control system, the PC program design is
the key link, mainly responsible for accept gas sensors to
send data, through the writing of the corresponding program
to receive data processing, to the production process
monitoring, diagnosis and storage operation and related data
analysis. LabVIEW provide hundreds of instrument source
level driver, including DAQ, GPIB, VXI, RS a 232 and RS a
485, according to the need can in LabVIEW developed by
various hardware driver, also can through the dynamic link
library (DLL) using other language development drive
library, thus further expand its function.
In the test and control system, the PC through the
harmful gas concentration control main program from lower
machine gas concentration information processing, query
and display, and a machine to a control command, and then
control corresponding drug nozzle, complete dairy gas
detection automatic control system.As shown in figure 5.

Figure 9. Data real-time acquisition module block diagram
1) Gas concentration test procedures
According to the literature, Design gas concentration
measurement cycle program, a cyclic process is divided into
the basic process: Acquisition and judgment to sprinkle
medicine. The basic process is shown as shown in figure 6.

2) Man-machine interface
The man-machine interface including data display and
system control model, the user can through the interface
Settings gas concentration control parameters and inquires
the history data, realize human-machine interaction.
In the system is running, can display the drug nozzle
work and dairy air condition, etc. Under special
circumstances, can by clicking on the drug head model to
manual control spray drug shut, stop state.
IV. DESIGN RESULT
The basic functions of information systems, including
identification permissions, user management, recipe
management, equipment operation, status monitoring,
information recording and harmful gas concentration control.
V. CONCLUSIONS
This system use of the electronic nose technology and
LabVIEW technology, realize the dairy harmful gas
concentration of automatic control, with sensitivity and
safety associated with adjustable, reliable, simple structure,
long service life, low cost and easy to use. The results show
that, the application of this system can control the milk shop
harmful gas concentration, can be in small milk field use, can
effectively improve the cows in the growth period of milk
Figure 6. Basic flow chart
YES
Drug spraying
open
start
Acquisition
NH3,H2S
concentration

Is greater than
the set point?
NO
YES
End
setting time
NO
Proceedings of the 2nd International Symposium on Computer, Communication, Control and Automation (ISCCCA-13)
Published by Atlantis Press, Paris, France.
the authors, 2013
0173
field environment, and reduce the labor intensity of their
keepers.
REFERENCES
[1] Chen Xihui,Zhang Yinhong. 8.20 labview programming from entry to
the master [M]. Beijing: Tsinghua University Press,2007
[2] Li Yuhua. Virtual instrument development platform LabVIEW
software [J]. Computer Automated Measurement and Control,
1996(3)45-49
[3] Zhongbai Zhou, Baoshan He. Multi-sensor technique and solid-state
electrochemical sensor system for real-time and dynamic monitoring
of multi-component gases[J]. Sensors and Aetuators B,
108(2005)379-384.
[4] Peter A.Blume LabVIEW programming style [M]. Beijing:
Publishing House of Electronics Industry2009198
[5] Wang Shen, Liu Xuelan, Wang Yonghong. Research and
implementation of environmental control automation system based on
Chushi[J]. Computer Knowledge and Technology, 2008, (9): 1730
1732.

Proceedings of the 2nd International Symposium on Computer, Communication, Control and Automation (ISCCCA-13)
Published by Atlantis Press, Paris, France.
the authors, 2013
0174

Das könnte Ihnen auch gefallen