单片机的蔬菜大棚温湿度控制
引 言 1
一 总体设计 1
(一)、 总体设计 1
(二)、硬件总体设计 1
1、总体方案的设计 1
2、 系统原理 2
二 硬件电路设计 2
(一) 最小系统电路设计 3
1、主控芯片 AT89C51 3
2、时钟电路和复位电路 4
(二)传感器测量传输电路设计 6
1 、SHT11简介 6
2 、SHT11内部结构原理 6
3 、SHT11的应用及接线 7
(三) 按键设置电路设计 9
(四) 数码管显示电路的设计 10
1、 数码管的基本知识 10
2、 数码管的显示 11
3、 数码管的连接 11
(五)报警调节电路的设计 12
(六)驱动电路设计 13
(七)系统整体原理图和PCB 15
三 软件体系结构 17
(一) 主程序的设计 17
(二) SHT11温湿度子程序 19
(三) 温湿度调节程序 20
五 系统仿真及硬件调试 22
(一) 用Keil uVision2进行编译 22
(二) Proteus仿真 22
(三) 实物调试 25
结 论 26
致 谢 27
参考文献 27
附录1 原理图 28
附录2源程序 29
附录3 PCB布线图 43
Abstract
In the present agricultural production, *好棒文|www.hbsrm.com +Q: ¥3^5`1^9`1^6^0`7^2$
with the popularization of trellis technology, increasing the number of greenhouse shed, shed vegetables for it, the most important is the control of temperature and humidity. Temperature and humidity is not in crop growth of optimum range, will affect the good crop growth, affects the benefit, so will always control temperature and humidity in a suitable vegetable growth range is very important. This design is mainly in order to realize the canopy temperature and humidity display, alarm, and adjust.
This thesis mainly expounds based on AT89C51 vegetables canopy temperature and humidity control design principle, circuit design and software design part. The system is mainly composed of single chip microcomputer, digital temperature and humidity sensor SHT11, digital tube, keyboard, LED, etc. This design USES AT89C51 single chip microcomputer as controller, SHT11 temperature and humidity as the collector, may to the executive part of instruction to realize the temperature and humidity of the shed parameter adjustment, according to the actual demand design the single-chip microcomputer control system, this system can realize the data acquisition, data processing, numerical display, keyboard scanning, temperature and humidity Settings and transfinite alarm, adjust the temperature and humidity (humidification, drop wet, heating, cooling) function. At the same time introduced the temperature and humidity sensor, microcontroller interface, and application software, the design and simulation. The system is reliable in performance, simple structure, convenient debugging, can realize the shed vegetables in the automatic adjustment of the temperature and humidity.
Keywords: temperature and humidity control; AT89C51; SHT11; Transfinite alarm; Temperature and humid
引 言
近年来随着计算机在社会领域的影响和大规模集成电路的发展,单片机应用也不断地走向深入,由于它具有功能强,体积小,功耗低,价格便宜,工作可靠,使用方便等特点,非常适合用于与控制有关的系统,所以被广泛地应用于自动控制,智能化仪器,仪表,数据采集,农业生产以及家用电器等领域。
随着现代农业的一步步推进,传统的蔬菜大棚,已满足不了生产需求,自动化的控制大棚生产环境就越来越受要求,温湿度报警调节能够满足农业蔬菜生产对于温湿度控制的需求,让人们清楚地了解当前环境温湿度,并进行相应的报警调节。
设计一个基于单片机的蔬菜大棚温湿度控制系统,用单片机作为主控芯片,通过SHT11温湿度传感器采样外部信号:其测量原理是首先利用两只传感器分别产生相对湿度、温度的信号, 然后经过放大, 分别送至A /D转换器进行模数转换、校准和纠错,最后通过二线串行接口将相对湿度及温度的数据送至微控器, 再利用微控器完成非线性补偿和温度补偿。然后通过程序计算温湿度,将数据传输与单片机,通过单片机P0.0-P0.3口输出信号,经过译码器,反相器进行数码管位选,通过P1.0-P1.7口输出信号进行段选,进而通过数码管显示电路来显示温湿度,通过P2.0-P2.5口进行报警,升降温度,增减湿度。
一 总体设计 1
(一)、 总体设计 1
(二)、硬件总体设计 1
1、总体方案的设计 1
2、 系统原理 2
二 硬件电路设计 2
(一) 最小系统电路设计 3
1、主控芯片 AT89C51 3
2、时钟电路和复位电路 4
(二)传感器测量传输电路设计 6
1 、SHT11简介 6
2 、SHT11内部结构原理 6
3 、SHT11的应用及接线 7
(三) 按键设置电路设计 9
(四) 数码管显示电路的设计 10
1、 数码管的基本知识 10
2、 数码管的显示 11
3、 数码管的连接 11
(五)报警调节电路的设计 12
(六)驱动电路设计 13
(七)系统整体原理图和PCB 15
三 软件体系结构 17
(一) 主程序的设计 17
(二) SHT11温湿度子程序 19
(三) 温湿度调节程序 20
五 系统仿真及硬件调试 22
(一) 用Keil uVision2进行编译 22
(二) Proteus仿真 22
(三) 实物调试 25
结 论 26
致 谢 27
参考文献 27
附录1 原理图 28
附录2源程序 29
附录3 PCB布线图 43
Abstract
In the present agricultural production, *好棒文|www.hbsrm.com +Q: ¥3^5`1^9`1^6^0`7^2$
with the popularization of trellis technology, increasing the number of greenhouse shed, shed vegetables for it, the most important is the control of temperature and humidity. Temperature and humidity is not in crop growth of optimum range, will affect the good crop growth, affects the benefit, so will always control temperature and humidity in a suitable vegetable growth range is very important. This design is mainly in order to realize the canopy temperature and humidity display, alarm, and adjust.
This thesis mainly expounds based on AT89C51 vegetables canopy temperature and humidity control design principle, circuit design and software design part. The system is mainly composed of single chip microcomputer, digital temperature and humidity sensor SHT11, digital tube, keyboard, LED, etc. This design USES AT89C51 single chip microcomputer as controller, SHT11 temperature and humidity as the collector, may to the executive part of instruction to realize the temperature and humidity of the shed parameter adjustment, according to the actual demand design the single-chip microcomputer control system, this system can realize the data acquisition, data processing, numerical display, keyboard scanning, temperature and humidity Settings and transfinite alarm, adjust the temperature and humidity (humidification, drop wet, heating, cooling) function. At the same time introduced the temperature and humidity sensor, microcontroller interface, and application software, the design and simulation. The system is reliable in performance, simple structure, convenient debugging, can realize the shed vegetables in the automatic adjustment of the temperature and humidity.
Keywords: temperature and humidity control; AT89C51; SHT11; Transfinite alarm; Temperature and humid
引 言
近年来随着计算机在社会领域的影响和大规模集成电路的发展,单片机应用也不断地走向深入,由于它具有功能强,体积小,功耗低,价格便宜,工作可靠,使用方便等特点,非常适合用于与控制有关的系统,所以被广泛地应用于自动控制,智能化仪器,仪表,数据采集,农业生产以及家用电器等领域。
随着现代农业的一步步推进,传统的蔬菜大棚,已满足不了生产需求,自动化的控制大棚生产环境就越来越受要求,温湿度报警调节能够满足农业蔬菜生产对于温湿度控制的需求,让人们清楚地了解当前环境温湿度,并进行相应的报警调节。
设计一个基于单片机的蔬菜大棚温湿度控制系统,用单片机作为主控芯片,通过SHT11温湿度传感器采样外部信号:其测量原理是首先利用两只传感器分别产生相对湿度、温度的信号, 然后经过放大, 分别送至A /D转换器进行模数转换、校准和纠错,最后通过二线串行接口将相对湿度及温度的数据送至微控器, 再利用微控器完成非线性补偿和温度补偿。然后通过程序计算温湿度,将数据传输与单片机,通过单片机P0.0-P0.3口输出信号,经过译码器,反相器进行数码管位选,通过P1.0-P1.7口输出信号进行段选,进而通过数码管显示电路来显示温湿度,通过P2.0-P2.5口进行报警,升降温度,增减湿度。
版权保护: 本文由 hbsrm.com编辑,转载请保留链接: www.hbsrm.com/dzxx/txgc/1955.html