新设计-心沟通,因为我们用心设计

智能微灌系统设计

智能微灌系统设计

 

智能微灌系统设计(软件设计)

摘要

本论文主要阐述了以单片机为处理器的智能微灌系统的硬件、软件设计、系统编程等方面的问题。本微灌系统采用ATMEL公司的AT89S51单片机作为核心处理器控制整个系统的工作,系统由湿度传感器,信号采集电路、键盘、显示电路、输出控制电路、串行通信电路、E2PROM读写电路、灌溉设备等构成。本系统可以实现自动检测土壤周围空气湿度,自动控制微灌设备;同时,系统的参考湿度值可修改,并有断电保存功能;采集到的湿度值和参考湿度值可以通过串行通信电路传给上位机,上位机可以通过串行通信去修改微灌系统的参考湿度值,从而实现对整个系统的管理。

硬件方面,土壤周围湿度的测量采用先进的S302H5V5电容式湿度传感器,信号采集的A/D转换模块采用了ADC0809芯片;键盘、显示分别采用了点触式按键和LCD显示;输出控制电路由三极管、或非门、继电器、发光二极管等组成。软件设计采取了流行的模块化编程方法和模块调试,软件程序的开发全部采用了汇编语言。其主要包含的程序有:主程序、键盘扫描子程序、A/D采样子程序、串行接收和发送子程序、LCD显示子程序等。

经过实验室的连续调试证明:该控制器具有可靠性高、功能强、自动化控制、操作简单等特点。另外,本文对整个智能微灌控制系统今后的进一步发展和完善提出了几点建议。

关键词:智能,微灌,单片机


DESIGN OF THE INTELLIGENT MICRO-IRRIGATION SYSTEM (SOFTWARE DESIGN)

Abstract

The hardware layout and software development for single chip microprocessor intelligent micro-irrigation system and system programming are presented in detail in this paper. Based on the AT89S51 single chip microcomputer, the micro-irrigation system consists of humidity moisture sensors, signal gathering circuit, keyboard and monitor display circuit, out port control circuit, serial communication circuit,E2PROM reading-writing circuit and irrigating equipments and so on. The system is able to automatically detect the humidity of environment and control the irrigating equipment. Thus, the setting humidity can be modified. The humidity modified will be saved to prevent from that the data is lost when the power is cut off .Then, the gathering humidity of environment and setting humidity will be sent serially to the computer . On the other hand, the computer can modify the setting humidity of the micro-irrigation system by the serial communication. So we can use the computer to manage the micro-irrigation system.

As far as the design of the hardware is concerned, here chose the S302H5V5 capacitive humidity sensor as the humidity sensor, ADC0809 as the A/D conversion, the touching style key as the keyboard, LCD as the monitor display. The out port circuit is consists of triode, NOR gate, relay, light-emitting diode and so on. The development of software adopts the popular modularized structure and the modularized debug facilities. The design of software adopts assembly language entirely. The primary program is composed of main program, keyboard scanning subroutine, A/D sampling subroutine, serial transmit and receive subroutine, displaying subroutine of LCD and so on.

The successive debug experiments prove that the system is characterized by high reliability, capable control function, controlling by automation and simple operations. In addition, there are some suggestions about the further development and improvement of the micro-irrigation system in this paper.

Key words: intelligence, micro-irrigation, single chip microcomputer


 

目录

摘要··· I

Abstract· II

第1 绪论··· 1

1.1 微灌概述··· 1

1.2 研究现状··· 1

1.2.1 研究背景··· 1

1.2.2 国内外的发展情况··· 2

1.2.3 研究的意义和目的··· 3

1.3 课题指导思想··· 4

1.4 课题设计任务和要求··· 4

1.5 论文结构··· 4

第2 微灌自动化技术··· 5

2.1 自动化灌溉概述··· 5

2.2 微灌自动化控制的发展现状··· 5

2.3 微灌自动化控制的新技术··· 7

2.4 现代微灌自动化的发展方向··· 8

2.5 本章小节··· 8

第3 系统设计思想及主要应用器件··· 9

3.1 系统设计的总体思想··· 9

3.2 系统硬件简介··· 10

3.2.1 硬件设计思想··· 10

3.2.2 硬件构成··· 10

3.3 系统主要器件··· 11

3.3.1 核心控制器件AT89S51· 11

3.3.2 S302H5V5湿度模块··· 12

3.3.3 ADC0809· 12

3.3.4 串行通信··· 13

3.3.5 E2PROM· 16

3.3.6 LCD· 17

3.4 本章小结··· 18

第4 系统软件设计··· 19

4.1 系统软件设计要解决的问题··· 19

4.2 系统软件模块··· 20

4.2.1 A/D转换模块··· 21

4.2.2 LCD显示··· 23

4.2.3 湿度算法··· 26

4.2.4 键盘扫描··· 29

4.2.5 E2PROM读写··· 32

4.2.6 串行通信··· 37

4.3 本章小节··· 39

结论··· 40

谢辞··· 42

参考文献··· 43

附录1 软件程序··· 44

 


站内搜索

自动化毕业设计网© 2010 版权所有

QQ690566615电话15233862762