项目编号:mcuclub-dz-367
设计简介:
项目名:温湿度风扇
项目编号:mcuclub-dz-367
单片机:STC89C52
功能简介:
1、通过DHT11检测温湿度
2、通过按键设置温度上下限,当温度低于下限,温控风扇停止,当温度介于上下限之间,温控风扇低速转动,当温度高于上限,温控风扇高速转动
3、通过按键设置湿度上下限,当湿度低于下限,湿控风扇停止,当湿度介于上下限之间,湿控风扇低速转动,当湿度高于上限,湿控风扇高速转动
4、通过按键手动控制风扇转速
5、通过LCD1602显示温湿度
6、通过人体热释电感应模块检测是否有人,如果有人,关闭紫外线消毒灯,如果没人,自动打开紫外线消毒灯
总字数:17469
摘 要
近年来,随着夏季环境温度越来越高,风扇的应用越来越广泛,为了保持环境的舒适性,设计一款智能风扇非常重要。
本文设计一款温湿度智能控制风扇,以保持环境温度在设定范围内,并根据人体活动情况和温湿度情况智能地控制风扇开启。该项目使用STC89C52型号的单片机,并集成了多种传感器和显示设备,以实现以下具体功能:通过DHT11检测温湿度,通过按键设置温度上下限,当温度低于下限,温控风扇停止,当温度介于上下限之间,温控风扇低速转动,当温度高于上限,温控风扇高速转动;通过按键设置湿度上下限,当湿度低于下限,湿控风扇停止,当湿度介于上下限之间,湿控风扇低速转动,当湿度高于上限,湿控风扇高速转动同时,用户可以设定风扇的开关时间,从而在特定时间段内控制风扇的运行。通过人体热释电感应模块检测是否有人,如果有人,关闭紫外线消毒灯,如果没人,自动打开紫外线消毒灯,实现智能消毒功能。通过按键操作,用户可以设置不同的温湿度阈值和超声波传感器的灵敏度,以适应不同的环境需求。使用LCD1602液晶显示屏展示各种测量数据,包括当前时间、环境温度、风扇状态等信息,使用户可以方便地监控系统运行状态。本论文详细介绍了硬件电路设计、软件程序设计以及系统测试与优化过程。实验结果表明,“温湿度风扇”项目能够稳定可靠地实现温度自动控制,满足了智能化环境温湿度控制的要求。该系统在实际应用中具有较好的应用前景,可广泛用于办公室、家庭和其他需要温湿度控制的场所,为节能减排、提升生活品质等方面带来积极的影响。
关键词:单片机;温湿度风扇;DHT11;人体热释电;LCD1602
ABSTRACT
In recent years, with the increasing temperature in summer environments, the application of fans has become more and more widespread. In order to maintain the comfort of the environment, it is very important to design an intelligent fan.
This article designs a temperature and humidity intelligent control fan to maintain the ambient temperature within the set range, and intelligently control the fan to turn on based on human activity and temperature and humidity conditions. This project uses the STC89C52 microcontroller model, which integrates multiple sensors and display devices to achieve the following specific functions: detecting temperature and humidity through DHT11, setting the upper and lower limits of temperature through buttons. When the temperature is below the lower limit, the temperature control fan stops; when the temperature is between the upper and lower limits, the temperature control fan rotates at low speed; when the temperature is above the upper limit, the temperature control fan rotates at high speed; Set the upper and lower limits of humidity through buttons. When the humidity is below the lower limit, the humidity control fan stops. When the humidity is between the upper and lower limits, the humidity control fan rotates at low speed. When the humidity is above the upper limit, the humidity control fan rotates at high speed. At the same time, the user can set the on/off time of the fan to control its operation within a specific time period. Detect whether there are people through the human body pyroelectric induction module. If there are people, turn off the UV disinfection light. If there are no people, automatically turn on the UV disinfection light to achieve intelligent disinfection function. By pressing buttons, users can set different temperature and humidity thresholds and the sensitivity of ultrasonic sensors to adapt to different environmental needs. Using the LCD1602 LCD display screen to display various measurement data, including current time, ambient temperature, fan status, and other information, allows users to easily monitor the system’s operating status. This paper provides a detailed introduction to hardware circuit design, software program design, and system testing and optimization processes. The experimental results show that the “Temperature and Humidity Fan” project can stably and reliably achieve automatic temperature control, meeting the requirements of intelligent environmental temperature and humidity control. This system has good application prospects in practical applications and can be widely used in offices, homes, and other places that require temperature and humidity control, bringing positive impacts on energy conservation, emission reduction, and improving quality of life.
Keywords: microcontroller; Temperature and humidity fan; DHT11; Human pyroelectricity; LCD1602
目 录
摘 要 I
ABSTRACT II
1 绪论 1
2 系统设计方案 5
3 硬件设计 10
4 系统程序设计 20
5仿真测试 26
6 实物制作与调试过程 1
总结与展望 7
致谢 9
参考文献 10
附录 12