版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、 基于微机的现场信息检测系统设计 摘要精准农业是信息农业,是现代农业的开展方向。如何获取信息是精确农业的关键问题。本论文研究的目标是设计一个能从现场获得信息的系统。该系统由两局部组成:一个是基于MSC- 51的根底上的便携式仪器,可用于测量该领域的多种信息,它包括测量经度和纬度、土壤的水分、pH值和电导率EC,大气温度和湿度,光照强度;另一局部是基于Visual Basic的软件,可用于便携式仪器的通信和处理数据。验证结果说明,该系统能快速、准确地获取信息。I 导言目前,精准农业已经吸引了许多国家的关注,它代表了现代农业1,2的开展趋势。当可以快速、有效地获取和处理现场的信息,精准农业是可能实
2、现的。但现在,对现场信息检测技术落后于其他技术,因此它已经成为重要的研究课题。在国外,很多年前就已经开始研究信息领域。许多公司都有收集终端和相应的软件,如在美国StarPal公司3的HGIS系统,可获取GPS信息,农作物分布及土壤性质的信息, ArcPad4系统由美国的ESRI公司的作出,AgGPS1605,6和EZ2map系统由美国的Trimble公司制造。然而,在中国这方面的研究却很少。方回7等研究了一个系统,它可以在外地掌上电脑根底上快速获取和处理信息。 在中国,农田信息的检测仪器的开发基于MSC- 51,如从山西农业大学8和厦门大学9 电子传导性设备。这些仪器操作简单,精度好,但他们不
3、能随时测量。邱政军和何勇10等开发了一种测量土壤水分的仪器,但其功能很简单。所以,本文所设计对农田的多重信息检测系统,它可以快速检测经度,纬度、温度、湿度、光照强度和pH值等,并处理这些信息。这种对耕地的多重信息检测系统是由两局部组成:一台便携式仪器,以及带有相应软件的个人计算机。II 便携式仪器的硬件和软件设计便携式仪器是由MSC- 51和许多传感器和芯片组成。传感器将纬度的位置、温度经度和大气湿度、光照强度、pH值、水分和土壤电导率等信息,转换成电能然后单片机处理信号,并传输数据,同时可以显示这些信息。A. 传感器选定 传感器是信息测量的根本元件。传感器包括很多,如全球定位系统接收器,土壤
4、水分传感器,pH值传感器,电导率传感器,温度传感器,湿度传感器,光照强度传感器传感器等。 Garmin公司生产的GPS25接收机被选定为GPS接收模块的便携式仪器。全球定位系统标准的NMEA数据输出为- 0183国家海洋电子协会。全球定位系统的数据处理,包括不同的行分隔根据和,确定不同的帧,如GPGSV,GPGGA,GPGSA等,不同的帧代表不同的信息。 TR- II的传感器作为测量土壤水分传感器。该传感器能检测出土壤中的水的体积百分比,其输出电压与土壤水分的关系如图1所示。用方程1表示。这里,W-土壤水分V -传感器的输出电压CHTM- 02传感器作为测量温度和湿度传感器,这种传感器的输出电
5、压与大气温度之间的关系是线性关系,从0到100,传感器的输出电压范围0V至1V的形式。输出电压与大气湿度之间的关系如表1。ASP2101传感器作为测量pH值传感器。温度会影响这种传感器:当温度上升时传感器输出电压上升,温度上升或下降一度将导致输出电压的改变0.2mv/pH。表2显示了该传感器的输出电压和pH值的关系。SDL- 1传感器作为电导率传感器。这种传感器可以检测范围从0.01ms/cm到2ms/cm,它的电池电导率为1.0,传感器的电阻测量电路如图2所示,图片中的电阻为100K。信号源是一个交流电源,如果使用直流电,电感将会被毁掉。信号的电源频率为50Hz,振幅为6V。 光照强度传感器
6、由光敏二极管和电阻如图3所示组成。输出之间的电流和光照强度的关系是线性关系,电流转换成电压时,电流通过电阻。B. 便携式仪器硬件设计便携式仪器的硬件由单片机,A / D转换,内存存储器,液晶显示器,RS- 232通信模块,传感器和键盘组成。硬件电路如图4所示。选择由ATMEL公司作的AT89S51单片机作为便携式仪器的微控制器。AT89S51单片机是一种低功耗、高性能、CMOS8位、4K字节、可编程闪存的微控制器。该装置是采用爱特梅尔的高密度非易失性内存技术,并与业界标准的80C51指令集和引脚兼容。Bt系统集成在一个多功能、具有8位闪存可编程的芯片上,Atmel的AT89S51单片机是一个功
7、能强大的微控制器,它提供了一个高度灵活、低本钱的嵌入式控制系统,有效的解决许多问题。它的处理速度可到达33MHZ。手持式仪器的主要任务是要获取数据,计算结果,显示的结果,与PC机进行通信。 TI公司的TLC2543作为为便携式仪器的A / D转换器。对于便携式仪器的精度测量,分辨率高、抗干扰能力强是一个A/ D转换器是重要指标。TLC2543是一种串行通讯的A / D转换器,具有12位分辨率,提供11个模拟输入。 6264RAM具有8K的内存容量,作为便携式仪器的存储器。 JHD162A作为便携式仪器的液晶显示器。该模块可以在屏幕上显示两行,每行有16个字符。 MAXIM公司的MAX232是便
8、携式仪器与RS-232的通信模块。该模块可转换成10V的电压,RS-232串行接口需要+5V电压。这是适合EIA-232E和V.28/V.24的通信条件。 键盘扫描电路由3行3列组成。用于输入控制指令的键盘有9键:检测键,保存项,阅读键,向上键,向下键,最关键的,底部键和通信密钥网页。C. 便携式仪器的软件设计汇编语言是便携式仪器的软件编译语言。该软件有以下模块:1、键盘扫描模块:该模块的任务是扫描键盘和按下相应的键时转移到其他模块。2、检测模块:当检测键被按下,程序运行这个模块。该模块包括3个局部:阅读从A/ D转换器和GPS25接收器的数据;制定可以说明经度,纬度,温度,湿度,光照强度和p
9、H值等信息数据,在液晶显示屏上显示数据。有两种方法来进行信息数据:线性数据计算和非线性数据的计算。输出的电流和光照强度的关系是线性的,从而可以根据光照强度数据可以计算出电流2。 光照强度=参考照度参考光照强度器X TLC2543的数据/TLC2543在参考数据2。传感器TR- II的输出电压和土壤水分的关系是非线性的,因此土壤湿度的数据可以保存在单片机,从而可以读取表中的数据计算出来。其他信息数据可以按以下方式之计算出。3、节电模块:当保存键被按下,程序运行这个模块。这个模块的任务是将保存在RAM存储器的信息数据在液晶显示屏上显示。4、读模块:当读取键被按下,程序运行这个模块。该模块可以从RA
10、M存储器读取数据并在液晶显示屏上显示出来。5、选择模块:当翻页键,下键,最关键的还是页面底部按下键时,程序运行这个模块。这个模块是用来选择保存在RAM存储器数据并在液晶显示屏上显示出来。6、通讯模块:如果沟通键被按下,程序运行这个模块。这个模块可以传输保存在RAM存储器的数据,通过串行接口把数据传到个人电脑。III 个人电脑软件设计 用Visual Basic语言编写个人电脑软件。软件的任务包括与便携式仪器的传输,显示数据,保存数据和处理数据。A 串行接口的RS-232MCS - 51单片机有一个串行接口,可在同一时间发送和接收数据。个人电脑也有一个或两个串行接口。通过这些接口,MCS - 5
11、1单片机和个人计算机可以互相交换数据。目前,ELA RS -232C是最流行的串行接口标准。这是个人电脑之间和MSC- 51通信。但是,通过RS- 232规定的电压不符合在MSC- 51所使用的TTL电压相等,因此需要一个可以改变个人电脑之间和MSC- 51所需的电压模块。便携式仪器使用的MAX232模块完成这项任务。B. 通信协议 两条线中有一条是用来传输数据,另条是参考地:个人电脑之间使用三线与单片机通信。它们之间的握手遵循软件握手协议。 Visual Basic中有一个名为MSComm控件控制,它可以执行串行通信。用户可以通过设置MSComm控件性的制定通讯协议。C. 软件设计 个人电脑
12、的软件包括两局部:串行通信和数据管理。串行通信可以通过MSComm控件实现。Access数据库用来处理数据。 在个人电脑上软件有5项:数据接收,数据清理,数据保存,数据读取和退出。当数据接收被按下时,个人电脑开始与便携式仪器通信。如果握手成功,个人电脑开始接收数据。与此同时,数据保存在数据库并显示出来。当按下数据清理,软件清理Access数据库。当数据保存被按下时,该软件DataGrid控件中显示由用户选定的其他数据库中的数据。当数据读取被按下时,该软件从数据库中读取由用户选择的数据并显示。IV 结果与讨论该例子是衡量这个农田信息采集系统中的位置,土壤的水分,pH值和电导率EC,大气温度和湿度
13、,光照强度等信息。实验系统分为两个局部,一个户外采集信息的一局部和一个室内通信的一局部。测试时,把便携式仪器放置农田。仪器开始,选了一些采样点,插入土壤上水分传感器,pH值传感器和电导率传感器探头。GPS定位数据的测量点和其他信息将显示在设备屏幕上。当通讯时,个人电脑和便携式仪器之间的连接通信线路。准备就绪后,将便携式仪器数据发送到个人计算机,在窗口马上显示。最后,保存所有GPS数据和在Access数据库中的样本点的其他信息数据。测试的结果说明:1本农田信息检测系统能快速准确地获取信息。2本检测系统可实现节能,信息数据处理和通信。V 结论研究设计了一种基于MSC- 51和基于Visual Ba
14、sic软件的便携式仪器,实现了快速、准确检测多种农田信息。它奠定了全面分析了作物生长环境的信息化根底,并提供地理信息,为精准农业开展的其他信息。VI 鸣谢这项研究得到了教学与研究杰出青年,教育部高等学校,中华人民共和国,中国自然科学基金工程编号:30270773教师奖励方案,专项科研基金高等学校博士学科点工程编号:20040335034,浙江省自然科学基金工程编号:RC02067和科学技术的浙江省工程编号2005C21094部门。参考书目1Y. He, Precision Agriculture, Zhejiang: Zhejiang university publish in house,
15、2003.2S.H. Tang, Q.J. Zhu, X.D. Zhou, S.M. Liu, M.X. Wu, A conception of digital agriculture, Geoscience and Remote Sensing Symposium, 2002. IGARSS 02. 2002 IEEE International, vol. 5, pp. 3026-3028, 2002.。3M. Grant, New software for Win CE, Successful Farming (Iow edition). Des Moines, vol. 97, Iss
16、. 10, pp. 26, Sep 1999.4D. Srinivasan, R.L. Cheu, W. T. Chuan, Development of an improved ERP system using GPS and AI techniques, Intelligent Transportatio Systems, 2003. Proceedings. 2003 IEEE, vol. 1, pp. 554-559, 2003.5K. Fran, Is that a GPS in your pocket?, Geospatial Solutions. Duluth vol. 11,
17、Iss. 7, pp 18, Jul 2001.6L. Scott, Data by the handful, Cotton Grower.Willoughby, vol. 38, Iss 6, p. 23, Jun 2002.7H. Fang, Y. He, Field inform ation collection and processing system based on palmsized personal computer, Transactions of the CSAE, vol. 20, no. 6, pp. 124-127, 2004.8Y.M. Zuo, Y. Wei,
18、H.C. Wang, J.Y. Li, On the Des ign and Research of an In telligent Conducti ity Gauge, Transactions of the CSAE, vol. 17, no. 2, pp. 161-164, 2001.9W.X. Chen, B.C. Hong, A singlechip computer controlled conductivity meter based on conductance-frequency transformation, Analysis Instrument, vol. 4, pp
19、. 11-14, 2002.10Z.J. Qiu, Y. He, Developmen t of so ilmo isture con ten tmeasur ing istrumen t based on GPS pos ition, Journal of Zhejiang University (Agric1 & Life Sci1), vol. 29, no. 2, pp. 135-138, 2003.Proceedingofthe2006IEEEConferenceonAutomationScienceandEngineeringShanghai,China,October7-10,2
20、006The Design of Field Information Detection System Basedon MicrocomputerZhengjun Qiu, Jingyuan Mao, Yong HeCollege of Biosystems Engineering and Food ScienceZhejiang UniversityZhejiang University, Hangzhou 310029, China HYPERLINK mailto: Abstract - Precision agriculture is an i
21、nformational agriculture, and is the developing direction of modern agriculture. How to acquire information is the key problem of precision agriculture. The objective of this research is to design a system to obtain information from field. This system consists of two parts. One is a portable instrum
22、ent based on MSC-51, which can be used to measure multiple information of field. It includes longitude and latitude of the measurement position, moisture, pH value and electric conductivity (EC) of soil, temperature and humidity of atmosphere and intensity of illumination. The other part is a piece
23、of software based on Visual Basic, which can be used to communicate with the portable instrument and process data. The validation results showed that this system could rapidly and accurately acquire information of filed.I.INTRODUCTIONAt present, precision agriculture attracts the attention of many c
24、ountries; it represents the development trend of modern agriculture 1,2. When the information of field can be quickly, effectively acquired and processed, the precision agriculture can possibly be realized. But now, the detection technology for information of field has dropped behind the other techn
25、ology for precision agriculture, so it has becomethe important research topic.Overseas, the research for the information of field has started many years ago. The collection terminal and corresponding software were excogitate in succession by research organizations, such as the HGIS system made by St
26、arPal Corporation in American 3, which can gain GPS information, crop distributing and information of soil character, the ArcPad 4 system made by ESRI Corporation in American, AgGPS160 5,6 and EZ2map system made by Trimble Corporation in American. However the research in China was seldom. Fanghui 7
27、etc investigated a system that can fast acquire and process the information of field based on palmtop computer. In China, the apparatus of detection information in farmland was developed based on MSC-51, such as the electric conductivity instruments from Shanxi Agriculture University 8 and Xiamen Un
28、iversity 9. Operation of these instruments is easy, precision is good, but they cant take measurement in real time. Qiu zhengjun and He yong 10 etc developed an apparatus for measurement the soil moisture, but its function is simple. So, a detection system for multiple information of farmland is des
29、igned in this paper, which can fast detect latitude, longitude, temperature, humidity, intensity of illumination and pH value etc, and process those information. This detection system for multiple information of farmland is composed of two parts: a portable instrument and a peace of software of pers
30、onal computer.II.DESIGN HARDWARE AND SOFTWARE OF THE PORTABLE INSTRUMENT The portable instrument is based on MSC-51 and consists of many sensors and chips. Sensors transform latitude and longitude of the position, temperature and humidity of the atmosphere, intensity of illumination, pH value, moist
31、ure and electric conductivity of soil information into electric signals, and then single-chip microcomputer picks up these signals and works out data that can indicate these information.A. Selection Sensor Sensor is the basics of information measurement. The portable instrument includes a lot of sen
32、sors, such as GPS receiver, soil moisture sensor, pH value sensor, electric conductivity sensor, temperature sensor, humidity sensor and intensity of illumination sensor. GPS25 receiver made by GARMIN Company is selected as GPS receiving module of the portable instrument. The GPS data output standar
33、d is NMEA-0183 (National Marine Electronics Association). The procession of GPS data includes separating different lines according to the existence of and , identifying different frames according to frame head such as GPGSV, GPGGA, GPGSA etc and picking up different information blocks from different
34、 frames. TR-II sensor is selected as soil moisture sensor of the portable instrument. This sensor detects the volume percentage of water in soil and its output voltage has relation with soil moisture (as shown in Fig.1). Equation (1) can also express their relation.Where, W- soil moisture V- output
35、voltage of the sensorCHTM-02 sensor is selected as temperature and humidity sensor of the portable instrument. The relation between output voltage of this sensor and temperature ofatmosphere is linearity. Form 0 to100, the output voltage of the sensor ranges form 0V to 1V. The relation between outpu
36、t voltage of this sensor and humidity of atmosphere is listed in Table I.ASP2101 sensor is selected as pH value sensor of the portable instrument. Temperature will influence this sensor: output voltage of the sensor rises while temperature rise. Temperature rising or dropping one degree will lead ou
37、tput voltage alter 0.2mv/pH. Table II shows the relation between output voltage of this sensor and pH value. SDL-1 sensor is selected as electric conductivity sensor of the portable instrument. This sensor can detect electric conductivity of soil with range from 0.01ms/cm to 2ms/cm and its battery c
38、onstant is 1.0. The measuring circuit of the EC sensor is shown in Fig.2. The resistance in the picture is 100K. The signal electrical source is an alternating power supply. If use direct current, pole will be destroyed. The frequency of the signal electrical source is 50Hz and its amplitude is 6V.I
39、ntensity of illumination sensor installed in the portable instrument consists of electric eye and resistance (as shown in Fig.3). The relation between output electric current of electric eye and intensity of illumination is linearity. Electric current is transformed into voltage when electric curren
40、t flows through the resistance. The output voltages from these sensors are not in the same scope, so these voltages should be processed before sent to singlechip. ICL7650 amplifier is used to magnify voltages that are very small for singlechip. The ICL7650S offers exceptionally low input offset volt
41、age and is extremely stable with respect to time and temperature. It is a direct replacement for the industry-standard ICL7650 offering improved input offset voltage, lower input offset voltage temperature coefficient, reduced input bias current, and wider common mode voltage range.B.Design Hardware
42、 of the Portable Instrument Hardware of the portable instrument consists of singlechip, A/D converter, RAM memorizer, LCD display, RS-232 communication module, sensors and keyboard. The configuration of hardware is showed in Fig.4. AT89S51 made by ATMEL Company is selected as microcontroller of the
43、portable instrument. The AT89S51 is a low-power, high-performance CMOS 8-bit microcontroller with 4K bytes of in-system programmable Flash memory. The device is manufactured using Atmels high-densitynonvolatile memory technology and is compatible with the industry-standard 80C51 instruction set and
44、pinout. Bt combining a versatile 8-bit CPU with in-system programmable Flash on a monolithic chip, the Atmel AT89S51 is a powerful microcontroller which provides a highly-flexible and cost-effective solution to many embedded control applications. Its process speed can be up to 33 MHZ. It is the core
45、 of portable instrument and its main task is to obtain the data, calculate the result, display result and communicate with PC.TLC2543 made by TI Company is selected as A/D converter of the portable instrument. For the measurement accuracy of the portable instrument, an A/D converter with high resolv
46、ing power and strong interference resistance is needed. TLC2543 with 12-bit resolving power is a kind of serial communication A/D converter, supplying 11 analog inputs. 6264RAM that has 8K capacity is selected as RAM memorizer of the portable instrument. JHD162A is selected as LCD display of the por
47、table instrument. This module can display two rows on screen and each row has 16 characters. MAX232 made by MAXIM Company is selected as RS-232 communication module of the portable instrument. This module can transform +5V voltage into 10V voltage which RS-232 serial interface needs. It is suitable
48、for EIA-232E and V.28/V.24 communication. The keyboard circuit scans keyboard with 3 columns and 3 rows. The keyboard used to input control instruction has 9 keys: Detect Key, Save Key, Read Key, Page Up Key, Page Down Key, Top Key, Bottom Key and Communication Key.C. Design Software of the Portable
49、 Instrument Assembly language is used to compile software of the portable instrument. The software has following modules: 1) Keyboard Scan Module: This modules task isscanning the keyboard and transferring to other modules when corresponding key is pressed. 2) Detection Module: When Detect Key is pr
50、essed, the program runs this module. This module includes 3 parts: reading data from A/D converter and GPS25 receiver; working out information data that can indicate latitude, longitude, temperature, humidity, intensity of illumination and pH value etc; displaying information data on the LCD display
51、. There are two ways to work out information data: linear data calculation and non-linear data calculation. The relation between output electric current of electric eye and intensity of illumination is linearity, thus intensity of illumination data can be calculated according to (2).Intensity of ill
52、umination=( Reference intensity of illumination Data of TLC2543)/ Reference data of TLC2543 (2) The relation between output voltage of TR-II sensor and soil moisture is non-linearity, thus soil moisture data can be calculated by reading data from a table saved in singlechip. Other information data c
53、an be calculated according to one of these ways.3) Saving Module: When Save Key is pressed, the program runs this module. This modules task is saving information data displayed on the LCD display in RAM memorizer. 4) Reading Module: When Read Key is pressed, the program runs this module. This module
54、 can read data from RAM memorizer and display it on the LCD display. 5) Selection Module: When Page Up Key, Page Down Key, Top Key or Bottom Key is pressed, the program runs this module. This module is used to select data saved in RAM memorizer and display it on the LCD display. 6) Communication Mod
55、ule: When Communication Key is pressed, the program runs this module. This module can transmit data saved in RAM memorizer to personal computer through serial interface.III. DESIGN SOFTWARE OF PERSONAL COMPUTERVisual Basic language is used to compile software of personal computer. The softwares task
56、 includes communicating with the portable instrument, displaying data, saving data and processing data. A. RS-232 Serial Interface MCS-51 has a serial interface, which can send and receive data at the same time. Personal computer also has one or two serial interface. Through these interfaces, MCS-51
57、 and personal computer can exchange data with each other. At present, ELA RS-232C is the most popular serial interface standard. It is suitable for communication between personal computer and MSC-51. But the voltage prescribed by RS-232 is not equal with the TTL voltage used in MSC-51, thus a module
58、 that can transform voltage between personal computer and MSC-51 is needed. The portable instrument uses Max232 module to complete this task.B. Communication Agreement The communication between personal computer and singlechip use three wires: two wires are used to transmit data and the other is ref
59、erence ground. The handclasp agreement between them is software handclasp. Visual Basic has a control named MSComm Control, which can perform serial communication. Users can enact communication agreement by setting attribute of MSComm Control. C. Design Software The software of personal computer inc
60、ludes two parts: serial communication and data management. Serial communication can be realized by MSComm Control. Access database is used to process data. The software of personal computer has 5 keys: Data Receive, Data Clean Up, Data Save, Data Read and Exit. When Data Receive is pressed, personal
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 茶叶包装设计2024年度委托合同
- 二零二四年度采购合同(含详细商品描述)
- 2024年度船舶买卖合同范本
- 城市供水工程承包合同(2024版)
- 二零二四年度车位销售与租赁权转让合同
- 二零二四年度金融借贷与还款合同
- 二零二四版变电站运行与维护劳务合同
- 2024年度油田开发打桩施工合同
- 2024商场特卖活动发光字制作合同2篇
- 二零二四年度车间维修保养合同
- 食品微生物检测技术智慧树知到期末考试答案章节答案2024年黑龙江生态工程职业学院
- 低血糖护理查房含内容课件两篇
- 小学二年级数学计算比赛试题
- 中国民族音乐作品鉴赏智慧树知到期末考试答案2024年
- 外出培训学习成果汇报
- 心肌梗死内科学
- 海上风电场工程结构安全监测建设规范
- 拆除工程施工方案(5篇)
- 国有企业合规管理
- 认识接触网概述
- (高清版)DZT 0337-2020 矿产地质勘查规范 油砂
评论
0/150
提交评论