1、基于 51 单片机的智能温控风扇 1 论文题目论文题目:基于基于 51 单单片机的智能温控风扇片机的智能温控风扇 摘要摘要 本设计为一种温控风扇系统,具有灵敏的温度感测和显示功能,系统选用 STC89C52 单片机作为控制平台对风扇转速进行控制。可由用户设置高、低温度 值,测得温度值在高低温度之间时打开风扇弱风档,当温度升高超过所设定的温 度时自动切换到大风档,当温度小于所设定的温度时自动关闭风扇,控制状态随 外界温度而定。所设高低温值保存在温度传感器 DS18B20 内部 E2ROM 中,掉电后 仍然能保存上次设定值,性能稳定,控制准确。 关键词:单片机单片机 温度传感器温度传感器 智能控制
2、智能控制 Abstract This design is a kind of temperature control fan system, has the sensitive temperature senor and display function ,system STC89C52 monolithic as control the fan speed.High and low temperature can be set by the users, the measured temperature value between high and low temperature open
3、the fan when the windshield ,when temperature exceeds the set temperature automatically switch to the wind ,when the temperature is less than the set temperature automatically shut down the fan, control state varies with temperature. Set high and low temperature values stored in internal temperature
4、 sensor DS18B20 E2ROM, after power off can still be saved the set value, stable performance and accurate control. Key words: Automatic control; single chip micromputer; temperature control 基于 51 单片机的智能温控风扇 目录 第一章引言 1 第二章 整体方案的设计 . 2 2.1 系统整体的设计 . 2 2.2 方案论证 2 2.2.1 温度传感器的选择 . 2 2.2.2 控制核心的选择. 3 2.2.
5、3 温度显示器件的选择 3 2.2.4 调速方式的选择. 4 第三章 硬件设计 . 5 3.1 系统器件简介. 5 3.1.1 DS18B20 单线数字温度传感器简介 . 5 3.1.2 STC89C52 单片机简介. 6 3.1.3 LED 数码管简介.11 3.2 电路设计 12 3.2.1 开关复位与晶振电路 12 3.2.2 独立按键连接电路 . 13 3.2.3 数码管显示电路. 14 3.2.4 温度采集电路 . 15 第四章 软件设计 . 17 4.1 程序设置 17 4.2 用 KeilC51 编写程序 . 18 4.3 用 Proteus 进行仿真 . 18 4.3.1 Pr
6、oteus 简介 . 18 4.3.2 本设计基于 Proteus 的仿真 . 19 第五章 系统调试 . 24 5.1 软件调试 24 5.1.1 按键显示部分的调试 24 5.1.2 传感器 DS18B20 温度采集部分调试. 24 第六章 硬件系统 . 25 6.1 按键电路的调试 . 25 6.2 温度传感器电路的调试. 25 6.3 电机电路的调试 . 25 6.4 硬件调试遇到的问题 25 第七章 结论 26 参考文献 27 致谢. 28 附录. 29 附录 1 PCB 版图 29 附录 2 原理图 . 30 附录 3 程序代码 . 31 基于 51 单片机的智能温控风扇 1 第一章引言 电扇是人们日常生活中常用的降温工具,从开始的吊扇到现在的 USB 风扇 是无可取代。作为一种节能环保,并且廉价简单的降温工具,电扇还在很多人 家发挥着自己独特的作用。顺应时代潮流,各种多功能的风扇逐渐在取代传统 风扇。 单片机作为一种智能化程度高,控制精度高,操作简单,廉价易得,抗干 扰能力强等特点,越来越多的应用于智能化产品之中。 市场上智能风扇产品相继问世,制作方法也多种多样,功能也