2019 年第 23 期
信息与电脑
China Computer & Communication
软件开发与应用
基于 STM32 的智能风扇控制系统设计
胡慧之
(无锡城市职业技术学院,江苏 无锡 214153)
摘 要:
笔者设计的智能风扇控制系统以 STM32F407 为控制核心,结合温度检测、人体感应、语音识别、蓝牙数据
传输等模块,对常用风扇进行了改进。该系统具有人工控制和智能控制两种工作模式,在智能控制模式下,风扇会根据
检测到的环境温度自动调整风扇转速,使环境温度恒定在人体最舒适的范围内;在人工控制模式下,用户可利用 LCD 触
摸屏、手机 APP 和语音人为控制风扇转速。此外,该系统还采用红外热释电传感器对人体进行检测,有人时正常工作,
无人时风扇会延时一段时间再自动关闭,避免能源浪费。
关键词:
STM32;智能风扇;PWM 控制
中图分类
号:TM925.11 文献标识码:A 文章编号:1003-9767(2019)23-059-03
Design of Intelligent Fan Control System Based on STM32
Hu Huizhi
(Wuxi City College of Vocational Technology, Wuxi Jiangsu 214153, China)
Abstract:
The intelligent fan control system designed by the author takes STM32F407 as the control core, and combines
temperature detection, human body induction, speech recognition, Bluetooth data transmission and other modules to improve the
common fans. It has two working modes: manual control and intelligent control. In the intelligent control mode, the fan automatically
adjusts the fan speed based on the detected ambient temperature, so that the ambient temperature is constant within the most
comfortable range of the human body. In manual control mode, the fan speed can be controlled manually using the LCD touch screen,
mobile app and voice. In addition, the infrared pyroelectric sensor is also used to detect the human body. When someone is working
normally, the fan is automatically turned off after a delay, and energy is saved.
Key words:
STM32; intelligent fan; PWM control
0 引言
传统电风扇大多数功能单一,只有选档吹风、定时、定
速等功能,不能根据温度变化调整转速,存在一定的健康隐
患和能源浪费。例如,在天气较热的夜晚时用户只能凭感觉
粗略定时、定速,设定的时间到了就停止工作。时间、风速
设定不适宜,会影响人们的睡眠质量,甚至对身体健康造成
损害。而且,传统风扇一般都不具备实时显示温度的功能,
不能给用户提供定时、定速的参考温度值,不适宜的定时、
定速都将会造成能源的浪费。
随着自动控制技术的迅速发展,各种智能风扇正逐渐走
入人们的生活。但是,目前大多数智能风扇只能实现 1 ~2
个智能控制功能,例如,人体红外检测功能或温度自动检测
功能等,这一状况已无法适应日益激烈的市场竞争,更无法
满足用户日益增长的体验需求。本文设计的智能风扇控制系
统集智能调速、语音调速、手机 APP 调速等多种功能,可以
更好地满足人工智能时代用户的新需求。
1 系统总体设计
本文设计的智能风扇控制系统主要由测温模块、人体感
应模块、语音模块、风扇驱动模块、触摸屏模块和蓝牙模块
组成,系统整体框图如图 1 所示。
测温模块
人体感应模块
STM32核心
控制模块
语音模块
触摸屏
风扇驱动模块
蓝牙模块
手机APP
图 1 系统整体框图
作者简介:
胡慧之 (1980—),女,江苏无锡人,硕士研究生,副教授。研究方向:单片机应用。
— 59 —