摘 要
本设计首先给出了基于单片机的蔬菜大棚温湿度监测系统的总体方案,描述了温度传感器DS18B20和湿度传感器HS1101的工作原理;其次,进行了硬件电路的设计,包括温度测量电路、湿度测量电路、键盘与显示电路以及报警电路;然后在硬件部分的基础上又进行了软件部分的设计,包括主程序流程图、按键扫描子程序流程图和温湿度程序流程图,最后运用C语言对各个部分进行了编程。通过实践证明,该系统具有性能好、操作方便等优点,并且实现了对温湿度的测量、显示、调节和报警功能。 关键词 单片机 温度传感器 湿度传感器
THE MONITORING SYSTEM OF THE TEMPERATURE AND HUMIDITY BASED ON
SINGLE CHIP MIRCROCOMPUTER
ABSTRACT
In this paper, we first present the general scheme of the monitoring system of the temperature and humidity based on single chip microcomputer, and describe the working principle of the temperature sensor DS18B20 and the humidity sensor HS1101. Secondly, this paper designed the hardware electric circuits which include temperature measurement circuit, humidity measurement circuit, key and display circuit and alarm circuit. Then on this basis, it designed the software, this software part includes main program flow diagrams, the key-press scanning subprogram flow diagrams and temperature and humidity program flow diagrams. Finally, using C language programmed each part of the scheme. Prove through practice the system has the advantage of better performance and convenient operation, and also realized the measurement, display, regulation and alarm function of temperature and humidity.