基于单片机的二氧化碳浓度器设计(1)

更新时间:2023-10-13 00:46:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

二氧化碳浓度检测器设计

摘要

随着社会经济的发展,人们生活水平普遍提高,瓜果、蔬菜及花卉的社会需求数量和品质要求也不断提高,特别是大中城市需要周年供应新鲜蔬菜,因此农业温室得到迅速发展。二氧化碳气体对农作物的生长起着非常重要的作用。近些年来,我国北方农村形成了以日光温室为主导的农业产业化,因此,为二氧化碳的增施创造了有利的条件。由于不同作物所需的二氧化碳浓度不同,在二氧化碳的增施中又难于控制对其量的排放,所以研制二氧化碳浓度检测器并用于日光温室的农业生产,对提高农业科技含量,促进农业增收,农民增收具有深远的意义。

本论文主要针对温室内二氧化碳浓度、温度以及湿度,设计了日光温室检测系统。综合考虑系统的精度、稳定性以及经济性要求这三个方面之后,确定以AT89S52单片机为控制核心,选用性价比比较高的传感器,来实现对二氧化碳浓度、温湿度的准确检测。针对不同的参数,可以通过键盘人为设定作物所期望的上、下限值。当单片机检测到二氧化碳浓度、温湿度有任何一个参数越限时,则启动声光报警,这时检测人员通过主机打开相应的执行机构进行补偿。检测器可以通过RS-232实现和温室主机的串行通讯。

本系统具有易于操作、运行可靠、便于扩充等特点。该系统考虑到温室环境的复杂性增加传感器实现多点多目标因子的检测。系统体积小,操作非常简单,灵活性强,针对不同环境、不同作物的不同要求,可以随时随地修改极限报警值,人机界面友好。该系统具有功能强成本低的特点,适合在各种温室或塑料大棚进行环境因子检测。

关键词:日光温室,二氧化碳浓度,温湿度,单片机,测控

I

The design of carbon dioxide detector

Abstract

As our country realizes the comparatively well-off level basically, people's living standards generally improve, especially the Large and medium cities need to supply the fresh vegetables in anniversary, This needs to develop production of the greenhouse Carbon dioxide on crop growth and plays a very important role. In recent years, the rural north China have formed a greenhouse-led industrialization of agriculture, therefore, applied for the increase of carbon dioxide created favorable conditions. Because different crops need different carbon dioxide concentrations, the growth in carbon dioxide it difficult to control its facilities in the amount of emissions, so carbon dioxide detector developed and used in greenhouse agriculture production, raise agricultural science and technology to promote agricultural income and farmers increase of far-reaching significance.

This thesis presents the measuring and controlling system about temperature, humidity and carbon dioxide's density in the greenhouse, composed of host PC and secondary MCU. Considering the accuracy and economical, this thesis design AT89S52 as the core control apparatus, and choose the sensors with high ration between performance and cost. it achieved accurate measurement and accuracy control. When the parameter has exceeded the limit, including temperature, humidity and carbon dioxide's density, the single-chip microcomputers activate the audible and visual alarm. At the same time, the single-chip microcomputers control the solid state relay to actuate mechanism for compensation .For different parameters, we can use keyboard to set the anticipant range of the crop. The secondary computer communicate with the host computer through RS232.

This system is easy to operate, reliable, easy to expand and so on. The system taking into account the increased complexity of the greenhouse environment to achieve multi-point multi-sensor target of cytokines. System is small, the operation is very simple and flexible for different environments, different requirements of different crops can be modified at any time limit alarm value, friendly interface. The system has powerful function and low cost, suitable for greenhouse or plastic tunnel testing of environmental

II

factors.

Key wards: greenhouse; temperature; humidity; carbon dioxide; single-chip microcomputer

III

目录

1绪论 ............................................................. 1 1.1研究目的和意义 ................................................. 1 1.2国内外发展状况 ................................................. 1 1.2.1国外发展现状 ................................................. 2 1.2.2国内发展现状 ................................................. 2 1.3课题的主要内容及研究意义 ....................................... 3 2系统总体方案的设计 ............................................... 4 2.1总体方案设计 ................................................... 4 2.2详细设计 ....................................................... 5 3硬件设计 ......................................................... 7 3.1微控制器概述和选用 ............................................. 7 3.1.1 AT89S52单片机的特点 ......................................... 7 3.1.2 AT89S52单片机的主要特性 ..................................... 8 3.2二氧化碳数据的采集与处理 ....................................... 8 3.2.1二氧化碳传感器的选择 ......................................... 8 3.2.2红外二氧化碳传感器的工作原理 ................................. 9 3.3温度数据的采集与处理 .......................................... 10 3.3.1温度传感器AD590简介 ........................................ 11 3.3.2温度测量电路 ................................................ 11 3.4湿度数据的采集与处理 .......................................... 13 3.4.1湿度传感器错误!未找到引用源。简介 .......................... 13 3.4.2湿度测量电路 ................................................ 14 3.5 A/D转换器及其接口电路 ........................................ 15 3.5.1 ICL7135的主要性能及管脚 .................................... 16 3.5.2 ICL7135的串行工作方式 ...................................... 17 3.6串行通信接口设计 .............................................. 19 3.6.1 RS232简介 .................................................. 20 3.6.2芯片接口电路 ................................................ 20 3.7 错误!未找到引用源。电路设计 .................................. 21

IV

3.7.1 错误!未找到引用源。总线技术简介 ............................ 21 3.7.2 24LC256芯片与单片机的接口电路 .............................. 23 3.8键盘显示电路设计 .............................................. 23 3.8.1键盘电路设计 ................................................ 23 3.8.2显示电路设计 ................................................ 24 3.9报警电路 ...................................................... 25 3.9.1蜂鸣器简介 .................................................. 26 3.9.2报警电路 .................................................... 26 4系统的软件结构和程序框图 ........................................ 28 4.1主程序模块 .................................................... 28 4.2系统各程序模块 ................................................ 30 4.2.1数据采集子程序模块 .......................................... 30 4.2.2键盘子程序模块 .............................................. 31 4.2.3显示子程序模块 .............................................. 31 4.2.4 错误!未找到引用源。总线的软件设计 .......................... 32 4.2.5数据处理子程序模块 .......................................... 33 5.外形设计 ........................................................ 34 5.1布局设计 ...................................................... 34 5.2外形结构设计 .................................................. 35 6使用说明 ........................................................ 37 7结论 ............................................................ 38 参考文献 .......................................................... 39 致谢 .............................................................. 42

V

本文来源:https://www.bwwdw.com/article/6jef.html

Top