《本科毕业论文(设计):基于STC12C5A60S2单片机自动控制节水灌溉系统设计》由会员分享,可在线阅读,更多相关《本科毕业论文(设计):基于STC12C5A60S2单片机自动控制节水灌溉系统设计(54页珍藏版)》请在金锄头文库上搜索。
1、xxxxxxxxx2015 届本科毕业论文(设计)I摘要自动控制节水灌溉技术的高低代表着农业现代化的发展状况,灌溉系统自动化水平较低是制约我国高效农业发展的主要原因。本文就此问题研究了单片机控制的节水灌溉系统,该系统可对不同土壤的湿度进行检测,并按照作物对土壤湿度的要求进行适时、适量灌水。本作品是以 STC12C5A60S2 单片机为设计核心,主要由土壤湿度传感器,数据处理电路,显示电路,输出控制电路,故障报警电路等组成,软件选用 C 语言编程。单片机可将土壤湿度传感器检测到的土壤湿度模拟量转换成数字量,并显示于 LCD 显示屏上,根据设定值判断,若需灌水,则单片机系统启动鸣音报警,发出灌水信
2、号,开启电磁阀进行灌水。该设计灵活性强,易于操作,可靠性高,具有方便、快捷和经济等特点,可根据土壤湿度及时灌溉。关关键键词词: 单片机 STC12C5A60S2、 节水灌溉、 自动控制xxxxxxxxx2015 届本科毕业论文(设计)IIAbstractThe level of auto-control water-saving irrigation technology reflects the development condition of agriculture modernization.The low automatic level of irrigation system is
3、the main reason that prevented our agricultures development. Water-saving irrigation in this paper, the research on the issue of single-chip microcomputer control system, the system could be used for different soil humidity testing, and timely in accordance with the requirements of the crops on soil
4、 moisture, adequate water.This work is based on STC12C5A60S2 micro-controller design core.The bottom hardware system mainly consists of soil moisture sensor,signal transfer circuit,monitor display circuit,our port control circuit,malfunction display circuit and the procedure programmed with C assemb
5、le language. Single chip microcomputer can change the humidity of the soil moisture sensor to convert the amount of soil moisture to a digital quantity, and displayed on the LCD display. According to set value judgment, if need to infuse water, then single chip microcomputer system start singing sou
6、nd alarm, signal to infuse water, open water electromagnetic valve. The high design flexibility, easy operation, high reliability, has the characteristics of convenient, quick and economic, to irrigation in time according to the soil moisture.Keywords: STC12C5A60S2 wireless, water-saving irrigation,
7、 auto-controlxxxxxxxxx2015 届本科毕业论文(设计)1目录目录1 绪论 .11.1 引言 .11.2 课题背景及研究的目的与意义.11.2.1 课题背景 .11.2.2 课题研究的目的与意义 .21.3 节水灌溉控制系统国内外的研究现状 .31.4 课题研究内容.32 系统总体设计方案 .42.1 系统工作原理 .42.2 系统方框图设计.42.3 系统结构 .52.3.1 湿度检测模块.52.3.2 单片机模块.52.3.3 显示模块.52.3.4 输出控制模块.52.3.5 报警模块.52.4 主要器件的选取.52.4.1 单片机的选取.52.4.2 土壤湿度传感器
8、的选取.92.4.3 显示器的选取.102.4.4 电磁阀的选取.102.4.5 软件语言的选取.113 系统主要硬件电路设计 .133.1 单片机主机系统电路.133.1.1 时钟电路.133.1.2 复位电路.143.2 数据采集处理电路.153.2.1 湿度采集.153.2.2A/D 转换部分.17xxxxxxxxx2015 届本科毕业论文(设计)23.3LCD 显示电路.183.3.1 1602LCD 基本参数.193.3.2 1602LCD 引脚功能说明.193.3.3 指令说明及时序.203.3.4 1602LCD 硬件原理图.203.4 输出控制电路.213.5 报警电路.223.6 按键电路.234 系统软件设计 .254.1 软件架构设计.254.2 系统主程序设计.254.3 初始化程序设计 .284.3.1A/D 转换初始化.294.3.2 液晶初始化.294.3.3 定时器中断系统初始化.304.4 子程序设计.314.4.1 湿度采集子程序.314.4.2 显示子程序.324.4.3 按键扫描程序.334.4.4 按键消抖程序.