基于单片机的自动灌溉控制器的毕业设计 联系客服

发布时间 : 星期五 文章基于单片机的自动灌溉控制器的毕业设计更新完毕开始阅读

毕业设计(论文)

课 题 名 称 自动灌溉控制器的设计 学 生 姓 名 学 号 系、年级专业

指 导 教 师 职 称

2010年5月30日

摘 要

近几年来,随着水资源的日趋紧张,世界各国都在积极探索行之有效的节水途径和措施。自动灌溉技术是为了解决水资源不足,提高灌溉效率而发展起来的现代灌溉技术之一。

本文设计了一个自动灌溉控制器,该系统以AT89C51单片机为控制核心,采用模块化的设计方案,由湿度采集模块、步进电机控制模块、键盘接口模块和显示模块组成。湿度采集模块以探针式电容湿度传感器为核心,步进电机控制电路模块采用了达林顿驱动芯片ULN2803,显示电路模块主要由LCD12864构成。在闭环(自动)模式下,该系统能自动对土壤的湿度进行检测,当实际湿度低于警戒值时单片机自动启动步进电机进行灌溉。在时间(手动)模式下,可通过键盘设置灌溉的时间,超过该时间,则停止灌溉。

关键词:AT89C51;探针式电容湿度传感器;ULN2803达林顿驱动;LCD12864

I

ABSTRACT

In recent years, along with the freshwater getting less, all countries in the world actively explore effective ways and measures to save water. Automatic irrigation technology is one of the modern irrigation technologies to deal with the water shortage, improving irrigation efficiency.

This paper designs an automatic irrigation controller. The system use AT89C51 as control core, with modular design scheme. There are four modules: humidity acquisition module, the stepper motor control module, keyboard interface module and display module. Humidity acquisition module mainly uses probes type capacitor humidity sensors as the core; stepping motor control circuit module uses the ULN2803 drive chip linton; display circuit module mainly composed by LCD12864. In the loop (automatically) mode, this system can detect soil moisture. When actual humidity is lowwer than vigilance value, microcontroller automatic startup stepper motor to irrigat. In time (manual) mode, users can set the time through the keyboard.when the irrigation time is out, then stop the irrigation.

Keywords: AT89C51;Probe type capacitor humidity sensors;ULN2803 da

linton driver;LCD12864

II

目 录

摘 要 .................................................................................................................. I ABSTRACT ..................................................................................................... II 第1章 绪论 ..................................................................................................... 1

1.1 引言 .................................................................................................... 1 1.2 课题来源 ............................................................................................ 1 1.3 国内外现状 ........................................................................................ 2 第2章 方案设计与论证 ................................................................................. 4

2.1 总体方案论证 .................................................................................... 4 2.2 键盘方案选取 .................................................................................... 5 2.3 土壤湿度传感器的选取 .................................................................... 6 第3章 系统硬件电路设计 ............................................................................. 9

3.1 AT89C51单片机硬件电路 ................................................................. 9 3.2 湿度采集电路 .................................................................................. 12 3.3 矩阵键盘电路设计 .......................................................................... 14 3.4 LCD液晶显示电路 .......................................................................... 15 3.5 步进电机驱动电路 .......................................................................... 19 第4章 系统软件设计 ................................................................................... 21

4.1 程序设计 .......................................................................................... 21 4.2 主程序设计 ...................................................................................... 22 4.3 12864 LCD显示子程序设计 ........................................................... 24 4.4 键盘子程序设计 ............................................................................. 28 第5章 系统仿真 ........................................................................................... 35

5.1 PROTUES仿真软件介绍 ................................................................ 35 5.2 仿真电路设计 .................................................................................. 35 5.3系统总体电路仿真 ........................................................................... 36 第6章 结束语 ............................................................................................... 41 参考文献 ......................................................................................................... 42 致谢 ................................................................................................................. 43 附录Ⅰ源程序代码 ......................................................................................... 44 附录Ⅱ 系统整体电路图 ............................................................................... 54