单片机的粮仓多点测温系统
- 格式:doc
- 大小:554.18 KB
- 文档页数:67
摘要本毕业设计是基于单片机的温湿度监测系统设计方案,主要由温度、湿度采集、AD转换、单片机控制、数码管显示、USB连接器六部分组成。
本设计采用89c51单片机为控制中心,该芯片具有4KB的快擦写可编程/擦除只读存储器EEPROM、256 KB片内RAM、3个16位定时计数器、5个中断源,无需进行系统扩展既可满足任务要求,能较大幅度提高系统的性价比。
而温湿度传感器我选用的是dht11传感器,他性价比高。
DHT11数字温湿度传感器是一款含有已校准数字信号输出的温湿度复合传感器。
它应用专用的数字模块采集技术和温湿度传感技术,确保产品具有极高的可靠性与卓越的长期稳定性。
传感器包括一个电阻式感湿元件和一个NTC测温元件,并与一个高性能8位单片机相连接。
因此该产品具有品质卓越、超快响应、抗干扰能力强、性价比极高等优点。
另外该系统除了能显示温湿度以外,还能设置温湿度报警阈值。
关键词:温湿度;89c51单片机;dht11传感器Barn temperature monitoring systemAbstractThe graduation project is based on the single chip design temperature and humidity monitoring system, mainly by temperature, humidity acquisition, AD conversion, microprocessor control, digital display, usb connector composed of six parts.The design of the control center using 89c51 microcontroller, the chip has 4KB of flash programmable / erasable read only memory EEPROM, 256 KB on-chip RAM, 3 16-bit timer counters, six interrupt sources, both without the need for system expansion to meet mission requirements, can greatly improve the system's cost. The temperature and humidity sensor I use is dht11, he cost effective. DHT11 digital temperature and humidity sensor is a calibrated digital signal output with the temperature and humidity combined sensor. Its application-specific digital modules acquisition and temperature and humidity sensor technology, to ensure that products with high reliability and excellent long-term stability. Sensor includes a resistive element and a sense of wet NTC temperature components, and with a high-performance 8-bit microcontroller connected. So the product has excellent quality, fast response, anti-interference ability, high cost performance advantages.In addition the system in addition to showing the outside temperature and humidity, but also set the temperature and humidity alarm threshold.Keywords:Temperature and humidity;89c51 microcontroller;dht11 Sensor1 绪论1.1 选题背景近几年据海关统计结果显示,我国粮食进出口同比均呈下降趋势,我国粮食供求开始进入紧平衡阶段。
目录1 引言 (11.1本设计的意义 (11.2国内外现状分析 (11.3论文的主要内容 (72 系统总体方案设计 (73 硬件部分设计 (83.1AT89C51介绍 (83.1.1 主要性能 (83.1.2 引脚功能说明 (93.2传感器模块部分设计 (10 3.2.1 AD590主要特性 (103.2.2 与ADC0809接口 (11 3.3数模转换部分硬件设计 (12 3.3.1 ADC0809介绍 (123.3.2 ADC0809各管脚功能 (12 3.3.3 硬件连接电路 (133.4LED显示电路的设计 (14 3.4.1 LED数码管 (153.4.2 LED数码管编码方式 (153.4.3 LED数码管显示方式和典型应用电路 (163.5报警电路的设计 (173.6整体电路图 (184 软件部分设计 (194.1A/D转换程序流程图 (194.2显示程序流程图 (194.3报警程序流程图 (204.4主程序流程图 (20结束语 (23参考文献................................................. 错误!未定义书签。
附录 (24致谢..................................................... 错误!未定义书签。
1 引言1.1 本设计的意义随着电子技术、计算机技术、通信技术的迅速发展,工业测控领域采用先进的技术对现场的工业生产参数进行检测,监测是实现工业自动化的重要标志。
据不完全统计,在工业生产中被监测最多的参数应该是压力、流量、温度三大参数。
无论在石油、化工、煤炭、水利等行业,还是电力、机械、航空、国防等部门,都离不开对这些参数的监测。
当然除此之外,还有诸如液位、扭矩、密度、浓度、速度、位移、距离、电参数等众多物理参数的监测,但用的最多的恐怕还是温度的监测,可以说温度的测量是一个“永恒”的话题。
题目基于单片机的粮仓温湿度控制系统设计学生姓名张大陆学号********** 所在学院物理与电信工程学院专业班级电子信息工程专业12级3班指导教师帅春江完成地点陕西理工学院2016年6月5日基于单片机的粮仓温湿度控制系统设计作者:张大陆(陕西理工学院物理与电信工程学院电子信息工程专业12级3班,陕西汉中723001)指导老师:帅春江[摘要]影响粮食安全储存的主要参数是粮仓的温度和湿度,粮仓温湿度测量方法以及相应的智能控制一直是粮食储存的一个重要问题。
本设计采用STC89C52单片机最小系统对检测、报警、显示、调控等模块进行多点控制,传统的温湿度控制利用温度计、湿度表、湿度试纸等测试器材,通过人工进行检测,对不符合温湿度要求的库房进行通风、降温、去湿等操作。
这种方法费时费力,效率低,随机性大,误差大,不能及时的解决问题。
本设计则通过自动检测、即时报警、自动调控等功能很好的解决了。
并且,本设计不仅针对粮仓,对于大多譬如蔬菜大棚、花圃、实验室、医院等需要温湿度检测控制的各个领域都是适用的。
[关键词] 粮仓;温湿度;多点检测控制;单片机 Design of temperature and humidity control system for granany basedon single chip microcomputerAuthor:Dalu Zhang(Grade 12, Class 3, Major electronic1s and information engineering, School of Physics and Electronic Information Engineering, Shaanxi University of Technology, Hanzhong 723001, Shaanxi)Tutor: Chunjiang ShuaiAbstract:Grain is a necessity for human , the grain storage is very essential to the maintenance of social stability and keep the economy sustainable developmented. And the main parameters to the grain safe storage is the temperature and humidity . This design uses the STC89C52 system of single chip microcomputer to cotrol the modules about the detection , alarm , control and the key . And it could automatic measurement and control without people , and improve effciency and quality of work very well . DHT11 temperature and humidity sensors and OLED display shows real time data and pass to the staff with instant and accurate . While the traditional temperature and humidity control is use of Thermometer , humidity table , humidity dipstick test equipment . Through the artificial testing . Not in conformity with the requirements of the temperature and humidity supply cooling , ventilation , to wet operation . This artificial testing time-consuming , the efficiency is low . This design is by automatic detection , instant alarm , automatic regulation of functions such as a good solution to these problems . At last , this design not only against the granary , but also for most such as vegetable greenhouses , flowers garden , laboratories , hospitals could also be applicabled .Keywords:Granary; automatic detection and control ;temperature and humidity ;Singlechip目录 3.2.21 引言1.1背景及意义粮食储存是国家针对战争、饥荒和一些突发事件所做的预防准备,所以粮食的储存安全至关重要。
本科毕业设计基于单片机的粮仓温湿度多点无线监测系统设计温湿度是一个非常重要的参数。
在工业、医疗、军事和生活等许多地方,都需要用到测温湿装置来监测温湿度。
传统直接布线测量不能满足要求,特别是在某些环境恶劣的工业环境和户外环境,通过直接布线测量不现实。
因此采用无线传输温湿度信息尤为必要。
目前有些设计能够实现无线温湿度监测,但价格过高是其最大的缺点。
在实际温湿度控制过程中既要求系统具有稳定性、实时性又需要降低功耗。
因此设计一种低功耗的无线温湿度监测系统很有意义。
本文提出一种针对无线数据传输问题的解决方案,该方案基于nRF24L01来设计无线温湿度采集系统。
该系统采用传统单片机ATmega16L和数字温湿度传感器AM2301来构成多点、实时的无线温湿度监测系统。
通过简单的无线通信协议,实现可靠性与功耗平衡,该系统能实现对温湿度的监测,是可以实现远程控制的无线温湿度监测系统。
该系统利用无线通信技术构建了分布式无线传感器网络,通过传感器节点实现温湿度信息的采集和传输,系统具有组网简单,维护方便,运行费用低等优点,能够实现可靠的无线数据传输。
可以应用于大型粮仓温湿度的监测。
关键字:ATmega16 AM2301 无线传输 nRF24L01Wireless Temperature and Humidity Monitoring System in BarnShi Jianzhu(College of Engineering, South China Agricultural University,Guangzhou 510642, China>Abstract:Temperature and humidity is a very important parameter. In many places, such asthe industrial, medical, and military, you need the temperature and humidity measurement device to monitor temperature and humidity. Direct wiring measurement does not meet the requirements, especially in some environments, such as, harsh industrial environments and outdoor environments. Therefore, the wireless transmission of temperature and humidity information is particularly necessary.At present, some devices can be used to monitor wireless temperature and humidity, but the price is the biggest drawback, the price is too high. The system must be stable, real-time and low power consumption in actual control. Therefore, the design of a low-power consumption wireless temperature and humidity monitoring system makes sense. This paper presents a solution for wireless data transmission, the program is based on the nRF24L01 to design the monitorint system of wireless temperature and humidity. The system uses the traditional microcontroller ATmega16 and digital temperature and humidity sensor AM2301 toform multi-point, real-time wireless temperature and humidity monitoring system. Through a simple wireless communication protocols, bring about reliability and power balance. The system is a remote wireless temperature and humidity monitoring system.The system uses wireless communication technology to build a distributed wireless sensor networks. The temperature and humidity data acquisition and transmission based on sensor nodes, with a simple network, easy maintenance, low operation cost. The system can be applied to a large granary temperature and humidity monitoring.Key word: ATmega16 AM2301 Wireless Transmission nRF24l01目录1 前言12 系统方案分析与选择论证12.1 系统最终方案12.2 系统方案设计22.2.1 主控芯片方案22.2.2 无线通信模块方案22.2.3 温湿度传感器方案32.2.4 显示模块方案33 主要芯片介绍和系统模块硬件设计4 3.1 ATmega16L-8AI单片机43.2 nRF24L01无线模块53.2.1 nRF24L01模块电路图53.2.2 nRF24L01模块接口电路53.2.3 nRF24L01模块供电电源63.2.4 nRF24L01模块工作模式63.2.5 nRF24L01模块工作原理73.2.6 nRF24L01配置字83.3 数字温湿度传感器 AM230183.3.1 AM2301概述83.3.2 AM2301接口及温湿采集电路9 3.3.3 AM2301工作原理93.4 显示模块TFT-LCD104 系统软件设计114.1 单片机软件设计114.1.1 发送端流程114.1.2 接收端流程125 硬件电路135.1 硬件制作135.2 硬件调试145.3 硬件调试结果145.3.1 温湿度采集测试155.3.2 nRF24L01无线模块测试186 结论与展望18参考文献19附录20致谢22华南农业大学本科生毕业设计成绩评定表1 前言粮食是人类赖于生存不可或缺的物质基础,是人类从事各种活动的前提。
基于51单片机的粮仓温湿度检测系统[摘要]粮仓温度湿度监测控制系统是基于STC12C52A60S2的数据采集、对比、控制的系统。
以STC12C52A60S2单片机为控制器,对温度传感器DS18B20传送的数字量信号和对湿度传感器HR202传送的模拟量信号进行采集和处理,当前值和设定温度上限值进行对比,进而执行控制作用,通过对继电器的控制进而控制设备的启停,对粮仓温度湿度进行调节,使其维持在适当范围,维护粮仓正常运行。
[关键词] 单片机、温湿度、检测、控制Abstract:The granary’s temperature and humidity control and detect system is based on the micro control unit of STC12C5A60S2,the system is used for date acquisition,comparison,and control.In this system,STC12C5A60S2 is the controller,the controller is designed to deal with temperature and humidity signal from the temperature sensor and humidity sensor.Then compare these data with limits the value of temperature and humidity.If the date is out of limits,then the controller send a control signal to warn people,besides,the controller will make the fan running to make the temperature and humidity lower.In this way,the granary can be working at usual status.Key words: MCU、temperature and humidity、control目录第一章绪论 (1)1.2相关领域国内外应用的现状及发展趋势 (1)1.3 粮仓温湿度检测控制系统原理 (2)1.4 本章小结 (2)第二章:系统分析、设计要求及模块选择 (3)2.1 设计要求 (3)2.2 单片机型号的选择 (3)2.21 采用STC89C52单片机 (3)2.22 采用STC12C5A60S2单片机 (3)2.3 显示系统模块的选择 (3)2.31采用LED数码管显示 (3)2.32采用1602液晶显示 (3)2.4 测温模块的选择 (4)2.41 采用模拟量温度传感器 (4)2.42 采用数字量温度传感器 (4)2.5 测湿模块的选择 (4)2.6 控制模块的选择 (4)2.7 通讯模块的选择 (4)2.8本章小结 (4)第三章系统总体方案及硬件电路模块设计 (5)3.1 系统总体设计思路: (5)3.2 系统硬件设计 (5)3.2.1 单片机最小系统 (5)3.2.2 温度信号采样电路模块 (9)3.2.3 湿度采样电路模块 (12)3.3 串口模块 (14)3.4显示模块 (15)3.5 控制模块 (16)3.6 继电器模块 (17)3.7 本章小结 (18)第四章系统的软件设计 (19)4.1 流程图设计 (19)4.1.1系统总体流程图 (19)4.1.2温度检测流程图 (19)4.1.3湿度检测流程 (20)4.2系统的程序设计 (20)4.2.1 DS18B20测温程序 (20)4.2.2 A/D转换程序 (25)4.2.3 1602显示程序 (26)4.3 本章小结 (29)第五章硬件调试部分 (30)结束语 (31)参考文献 (32)第一章绪论1.1 本课题的研究意义及必要性民以食为天,粮食是社会安定的保证,自1990年我国建立粮食储备制度以来,储备粮在国家宏观调控中占据了重要地位,无论何时,必须时刻保持储备粮的调控作用不动摇,是维持社会安定、粮食市场稳定、农民增收的重要保证。
长春工程学院毕业设计(论文)摘要粮仓温度实时检测系统是针对粮库中粮食存储的需要而设计的。
系统通过计算机检测粮食贮备库中粮食的基本温度情况,并结合其它粮情信息(如入仓时间、品种、仓型、天气情况等)进行综合分析。
粮仓温度检测系统是由AT89S52单片机构成的对现场8*5矩阵传感器进行采样的系统,以AT89S52单片机为主机,内部EPROM作为程序存储器,8155可编程并行I/O扩展接口芯片,是有键盘控制、显示温度并且超限时自动报警功能的检测系统。
利用微机技术对粮仓进行监控,用户可方便地构造自己需要的数据采集系统,在任何时候把粮仓现场的信息实时地传送到控制室,管理人员不需要深入现场,就可查看历史数据。
关键词温度传感器单片机监测AbstractThe real time temperature detecting system on granary is designed for the request of the provisions store in granary.The system synthesizes and analyzes the status by detect the basic temperature situation of the provisions through CPU together with other situations such as the time of getting in the granary, the variety, the granary style, the air and so on). It is a detect system with 8*5matrix Sensors and Consisted by single chip computer AT89S52.Program Memory EPROM expansion interface 8155,which has the functions of the key controlling, the temperature displaying, the printing, and the automatic alert beyond the time limited. The users can form the data detecting system conveniently by themselves, and send news to the controlling room at any time and the managers can know the data without coming to the field.Keywords:temperature-sensor microprocessor control unit monitor。
0 前言粮食是一个国家生存的根本,为了防备战争、灾荒及其它突发性事件,粮食的安全储藏具有重要意义。
根据国家粮食保护法规,必须定期抽样检查粮仓各点的粮食温度与湿度,以便及时采取相应的措施,防止粮食的变质。
但大部分粮仓目前还是采取人工测温的方法,这不仅使粮仓工作人员工作量增大,且工作效率低,尤其是大型粮仓的温度检测任务如不能及时彻底完成,则有可能会造成粮食大面积变质。
据有关资料统计,目前,我国各个地方及垦区的各种大型粮仓都还存在着程度不同的粮食储存变质问题。
我国每年因粮食变质而损失的粮食达数亿斤,直接造成的经济损失是惊人的[1]。
对粮仓粮食安全储藏的主要参数是粮仓的温度和湿度,这两者之间又是互相关联的。
粮食在正常储藏过程中,含水量一般在12%以下是安全状态,不会产生温度突变,一旦粮仓进水、结露等使粮食的含水量达到20%以上时,由于粮食受潮,胚芽萌发,新陈代谢加快而产生呼吸热,使局部粮食温度突然升高,必然引起粮食“发烧”和“霉变”,并可能形成连锁反应,从而造成不可挽回的损失[2]。
此次设计的是粮仓温湿度实时检测控制系统,是对一个粮仓的温湿度进行控制,以保证粮仓储粮的安全。
粮仓温湿度控制系统是以AT89S52单片机为核心构成控制系统。
本课题完成了整个系统的硬件设计,提出了一种可以应用于中小型粮仓的温湿度控制系统。
1单片机粮仓的发展概况1.1研究的背景与意义农业是国民经济的基础,粮食是基础的基础。
近年来,随着农业科学技术的不断进步,农业生产持续而稳定地增产。
农户生产粮食数量也日益增多,绝大部分农民不仅解决了温饱问题,而且有了更多的粮食。
我国粮食年产量和常年储存量均居世界首位。
中央粮食储备有较为完善的仓储设施和技术保障,在保证国家粮食安全方面发挥着重要作用。
但是,我国还有一半以上的粮食储存在农民手中,这些粮食的储藏安全是国家粮食安全的重要组成部分。
长期以来由于种种原因,忽视了农户粮食储藏技术的研究与推广,农户粮食的储藏技术非常落后,给国家和人民造成了巨大的损失。