基于STC单片机的自动浇水器设计毕业论文

 2021-04-15 10:04

摘 要

人们的生活水平逐渐随着社会水平提高而改善。在家里养盆栽花卉可以优化室内环境,提高生活的品味。花草可以通过光合作用来增加室内的氧气,因此,空气也很新鲜,花草树木可以净化一些空气中的有害气体。因此,在家里养花被越来越多的家庭所喜爱。养花的关键问题就是浇水量的多少。水浇多了,植物容易被淹死;水浇少了,植物容易缺水而死。然而,在生活中,人们往往没有时间去关心植物浇水,此次设计旨在设计一种结合植物土壤检测,操作简单且价格实惠的自动浇水装置。

基于STC单芯片设计的自动浇水装置能够实现自动浇水的功能,一方面其可以节省时间,在另一方面,当人们无法给植物浇水,就可以实现自动浇水,不用担心缺水。本文旨在设计基于WIFI模块的自动浇水器来实现集土壤湿度采集、浇水控制和远程控制这三种功能为一体的自动控制系统。本文针对自动浇水器的系统设计主要围绕以下几个方面去讨论:1、通过了解国内外浇水器的现状来明确设计所要实现的功能。2、根据实现的功能去选择模块。确立了以STC89C52为单片机,并与LCD1602组成显示电路,土壤湿度传感器选择YL-69,远程控制模块选择WIFI模块ESP8266。3、对各个功能模块的各个功能明确之后,编写流程图及程序。

关键词:自动浇水,STC单片机,土壤湿度检测;WIFI

Design of automatic watering device based on STC MCU

ABSTRACT

People's living standards gradually improve with the improvement of social level. Potted flowers at home can optimize the indoor environment and improve the taste of life. Flowers and plants can increase indoor oxygen through photosynthesis, so the air is also fresh. Flowers and trees can purify some harmful gases in the air. Therefore, growing flowers at home is loved by more and more families. The key problem of flower cultivation is the amount of water. When watered too much, plants drown easily; when watered too little, plants die easily because of water shortage. However, in life, people often do not have time to care about plant watering. This design aims to design a simple and affordable automatic watering device combined with plant soil detection.

The automatic watering device based on STC single chip can realize automatic watering. On the one hand, it can save time. On the other hand, when people can't water plants, they can realize automatic watering without worrying about water shortage. The purpose of this paper is to design an automatic waterer based on WIFI module to realize the automatic control system which integrates the functions of soil moisture collection, watering control and remote control. In this paper, the design of automatic watering system is mainly discussed in the following aspects: 1. By understanding the status quo of internal and external waterers, the functions of the design are defined. 2. Select the module according to the function. STC89C52 is used as a single chip computer and LCD1602 is used as a display circuit. YL-69 is used as soil moisture sensor and ESP8266 is used as remote control module. 3. After defining each function of each function module, write flow chart and program.

Key words:automatic watering;;STC MCU;Soil Moisture Detection;WIFI

目录

1绪论 1

1.1 选题的目的和意义 1

1.2 自动浇水器的诞生背景及国内外发展现状 1

1.3 研究内容 2

2 自动浇水系统总体方案 4

2.1 结构设计 4

2.2 单片机选择 5

3 自动浇水器的硬件电路设计 6

3.1单片机的电路设计 6

3.1.1单片机简介 6

3.1.2 单片机STC89C52的最小系统 6

3.2 显示电路 8

3.3电源部分 8

3.4按键电路 9

3.5 水泵 10

3.6 土壤湿度传感器 11

3.6.1 土壤湿度传感器的选择与介绍 11

3.6.2 YL-69的工作方式 12

3.7 模数转换ADC0832 13

3.8 WIFI模块 14

3.8.1 WIFI模块的选择与介绍 14

3.8.2 ESP8266引脚与连接 14

3.8.3 ESP8266模式及指令 15

3.9 本章小结 18

4 软件部分设计 19

4.1系统控制流程图 19

4.2子程序流程图及其部分程序 20

4.3 本章小结 23

5 系统调试 25

结束语 29

致谢 30

参考文献 31

1绪论

1.1 选题的目的和意义

人们的生活水平逐渐随着社会水平的提高改善。在家里养盆栽花卉可以优化室内环境,可以提高生活的品味。家中花草植物可以通过光合作用来增加室内的氧气,空气会变得更新鲜,家中花草植物可以净化一些空气中的有害气体。因此家中花草被越来越多的家庭所喜爱。

养花的关键问题就是浇水量的多少。水浇多了,植物容易被淹死;水浇少了,植物容易缺水而死。然而,在生活中,人们往往没有时间去关心植物浇水,如工作忙,没时间,还是出差,旅游等花卉生长的问题,很大一部分是由浇水问题引起的;已经花了数个月,因为浇水不及时,增长并不严重,甚至干燥和死的花草,那么用于美化环境和净化空气的花朵将成为"鸡肋";如果你不养花,在家中就会感到没有活力;如果保留,花卉和植物的生长将不会好,家居装饰效果会受到影响。虽然市场上有自动花盆浇水装置,但价格大多不太可接受,而且大部分也只能设定浇水时间,基本上不可能定期给植物浇水。还有一种较便宜的植物缺水报警装置,这能提醒人们家中花草的水源短缺。然而,这样的报警装置只能提醒人们,这样的报警装置浇水的主体不是机器而是人。而且当人们实在无法抽出时间给植物浇水时,该报警并没有实际用处。因此,本设计旨在一种结合植物土壤检测,自动浇水的远程控制浇水装置。

1.2 自动浇水器的诞生背景及国内外发展现状

您需要先支付 80元 才能查看全部内容!立即支付

课题毕业论文、开题报告、任务书、外文翻译、程序设计、图纸设计等资料可联系客服协助查找,优先添加企业微信。