摘要:一块干土壤的干湿,不能仅从其表面状态而定,有时即使土壤表面干燥,但植物根部附近也可能过多的潮气。为了能够精确的测出土壤湿度,故设计了以AT89C52单片机为核心的土壤湿度计。硬件部分采用LCD1602作为显示屏,土壤湿度传感器则采用的是STH10,它是一款电容式传感器。电源接口采用的是USB接口和外接5V电源的链接口。设置四个按键来实现湿度与频率读书的切换。设置复位电路来清除上次所测数据。软件部分则采用C语言实现,通过分模块编写程序,逐一实现土壤湿度测试,屏幕切换,技术统计,精度值保留几位等。在做出实体样机后,对其实用性、准确性进行了实验研究,并保存了相关数据,最后对数据进行了分析。实验证明,本设计方案相当实用并易于实现。本设计可以很好地解决湿度的记录和监控问题,并且具有一定发展前景。
关键词:湿度、单片机、传感器、测量4318
Design of Soil Moisture Meter
Abstract:A dry soil wet and dry, not only from the surface state may be, sometimes, even when the soil surface is dry, but near the plant roots may also be too much moisture. To be able to accurately measure soil moisture, it is designed to AT89C52 microcontroller as the core of the soil hygrometer. The hardware part of the LCD1602 display, the soil moisture sensor is used STH10, It is a capacitive sensor. The power connector is USB interface and an external 5V power supply link port. Switch the four keys to achieve humidity and frequency of reading. Set the reset circuit to clear the last of the measured data. The software part is realized with C language, The module programming, realized the soil moisture test, switch the screen, technical statistics, the precision value retained several etc. In making the physical prototype, the practicability, accuracy was studied, and the preservation of the relevant data, the data were analyzed. Experiments show that, the design scheme is practical and easy to implement. This design can well solve the humidity of the recording and monitoring problem, and has certain development prospects.
Key Words: Humidity, microcontroller, sensor, measurement
目录
1 绪论 5
1.1 土壤湿度计简介 5
1.2 土壤湿度计的发展前景与现状 5
1.3 本土壤湿度计的出发点 8
2 土壤湿度计设计概述 10
2.1硬件结构概述 10
2.2 软件流程概述 11
2.3 调试原理概述 11
3 硬件设计 12
3.1 核心控制器件及相关电路 12
3.1.1 核心控制器件AT89C52单片机介绍 12
3.1.2 AT89C52各引脚介绍 13
3.1.3 特殊功能引脚介绍 15
3.1.4特殊功能寄存器 16
3.1.5数据存储器 16
3.1.6捕获方式 17
3.1.7自动重装载(向上或向下计数器)方式 17
3.1.8可编程时钟输出 18
3.1.9编程方法 18
3.1.10数据查询 19
3.2 LCD1602液晶显示模块介绍 19
3.2.1 LCD1602简介 19
3.2.2 1602LCD的特性 20
3.2.3 LCD1602液晶接口 23
3.2.4如何显示一个自定义的字符 23
3.3 STH10土壤湿度传感器模块 24
3.3.1 产品概述 24
3.3.2 传感器芯片 25
3.3.3材质 25
3.3.4传感器性能 26
3.3.5 电气特性 27
3.3.6 补充说明 27
3.4 独立按键模块 27
3.4.1键盘基本知识 27
3.4.2 独立连接式键盘 28
3.4.3 键盘输入的特点 29
3.4.4 按键的识别 29
3.4.5 本设计中的按键 30
3.5 程序烧入模块 30
3.5.1 USB-ASP程序烧写 30
3.5.2 USB-ASP简介 31
3.6 电源模块 31 AT89C52单片机土壤湿度计设计+电路图:http://www.751com.cn/zidonghua/lunwen_949.html