基于单片机温室大棚温度控制系统设计

 2023-08-04 10:08

论文总字数:12610字

摘 要

根据温室大棚温度自动控制设计需求,利用单片机结合温度传感器设计了大棚温度监控系统。详细介绍了系统的硬件电路和软件模块设计方法,硬件电路以AT89C51单片机为核心,包括温度传感器模块、显示模块、继电器模块等单元电路。温度信号由温度传感器DS18B20进行采集,直接输出数字信号然后传送给单片机,经过单片机处理后送给显示模块显示,超过阈值则启动报警模块,并通过温度控制电路,利用设计的控制算法进行温度的实时调节。设计了系统的主程序和子程序流程图,然后编写程序。包括:显示模块程序、温度信号处理程序、继电器控制程序、超过阈值报警程序。进行了安装和调试,结果表明,系统具有性能好、操作方便等优点,能够实现对温度的显示、调节和控制。

关键词:AT89C51单片机,DS18B20温度传感器,温度控制,继电器

Abstract: According to the automatic greenhouse temperature control design requirements, a greenhouse temperature monitoring system was designed using a single-chip microcomputer combined with a temperature sensor. The hardware circuit and software module design method of the system are introduced in detail. The hardware circuit is based on the AT89C51 microcontroller, including the temperature sensor module, display module and relay module. The temperature signal is collected by the temperature sensor DS18B20, and the digital signal is directly output and then transmitted to the single-chip microcomputer. After being processed by the single-chip microcomputer and sent to the display module, the alarm module is started when the threshold value is exceeded, and the temperature is controlled in real-time through the temperature control circuit using the designed control algorithm. adjust. Designed the system"s main program and subroutine flow chart, and then write the program. Including: display module program, temperature signal processing program, relay control program, exceeding threshold alarm program. Installation and commissioning were carried out. The results show that the system has the advantages of good performance, convenient operation, and the ability to display, adjust and control the temperature.

Keywords: AT89C51 microcontroller ,DS18B20 temperature sensor ,Temperature control ,Relay

目 录

1 绪论 4

1.1 研究背景及意义 4

2 设计方案与论证 4

2.1 任务 4

2.2 控制芯片的选择 5

2.3 温度传感器模块 5

2.4 键盘模块 6

2.5 系统最终方案 7

3 硬件电路的设计 8

3.1 主控制模块 8

3.2 温度采集部分设计 10

3.3 温度控制电路设计 10

3.4 LCD1602液晶显示电路 11

3.5 按键电路设计 12

3.6 蜂鸣器、发光二极管报警电路 13

3.7 整体硬件电路 13

4 系统软件设计 14

4.1 程序结构分析 14

4.2 系统主程序流图 14

4.3 DS18B20温度传感器程序流程图 15

4.4 液晶显示程序设计 16

4.5 按键扫描程序设计 17

4.6 温度PID的软件设计 18

4.7 报警程序设计 20

5 系统的调试 21

5.1 系统主程序设计 21

5.2 系统软硬件调试 21

5.3 软硬件调试中出现的问题及解决措施 26

结 论 27

参 考 文 献 28

致 谢 29

附录 30

附录A 温度控制系统元件清单 30

1 绪论

1.1 研究背景及意义

大棚里面的温度监控,就是为了满足蔬菜的生长和发育所需环境条件,系统可以通过键盘设定温度上下限值、LCD显示当前大棚里的温度值和上下限温度值,温度超过限值报警的功能,然后采用通风机或加热装置让温室里的温度,调节到栽培作物适宜温度范围内,实现了温度的自动控制。

棚温一般应该保持在20~30℃为宜,避免在高温下过度消耗营养素和严重损害植物,降温可以抑制呼吸,减少消耗,增加积聚。然而,温度不应降低太低,以避免低温的危险。

温室大棚是植物种植不可或缺的设施,温度是温室最重要的指标之一。它直接影响栽培作物的生长和产量,并为作物提供适宜的生长环境。首先是加强对温室温度的监测,然后及时调整温度。如果单纯手工控制耗时,效率低下且容易出错,则需要采用自动控制和减少劳动力,促进中国农业发展,增加农民收入。由于微控制器和各种电子设备的成本效益迅速提高,这种对低成本,稳定性能的要求成为可能。这种设计旨在通过设计一个多功能温度测量和控制系统来解决这个问题,该系统能够实现温度上限和下限的设置,自动监测,显示和报警,从而能够显示,调整和控制温度等等。

2 设计方案与论证

2.1 任务

设计一个温室大棚温度自动控制系统,系统的温度范围根据蔬菜生长所需的适宜温度,然后通过人工设定范围。而且能够在环境温度降低时实现加热升温,温度升高时自动通过散热设备降温至适宜范围。

剩余内容已隐藏,请支付后下载全文,论文总字数:12610字

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

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;