1、 摘 要 本设计为一种温控风扇系统,具有灵敏的温度感测和显示功能,系统AT89C52单片 机作为控制平台对风扇转速进行控制。可由用户设置高、低温度值,测得温度值在高低 温度之间时打开风扇弱风档,当温度升高超过所设定的温度时自动切换到大风档,当温 度小于所设定的温度时自动关闭风扇,控制状态随外界温度而定。所设高低温值保存在 温度传感器DS18B20内部ROME 2 中,掉电后仍然能保存上次设定值,性能稳定,控制准 确。 关键词: 自动控制;单片机;温控 Abstract This design is a kind of temperature control fan system, has th
2、e sensitive temperature sensor and display function, system AT89C52monolithic as control platform to control the fan speed. High and low temperature can be set by the user, the measured temperature value between high and low temperature open the fan when the windshield, when temperature exceeds the
3、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 sensor DS18B20 E2ROM, after power off can still be saved
4、the set value, stable performance and accurate control. Key words:Key words: Automatic control; Single chip microcomputer; Temperature control 1 目录 第一章 整体方案设计 . 2 1.1 前 言 2 1.2 系统整体设计 . 2 1.3 方案论证 . 3 1.3.1 温度传感器的选择 3 1.3.2 控制核心的选择 . 4 1.3.3 显示电路的选择 . 4 1.3.4 调速方式的选择 . 5 第二章 各单元模块的硬件设计 . 7 2.1 系统器件简
5、介 7 2.1.1 DS18B20 单线数字温度传感器简介 7 2.1.2 达林顿反向驱动器 ULN2803ULN2803 简介. 7 2.1.3 AT89C52AT89C52 单片机简介 . 8 2.1.4 LED 数码管简介 10 2.2 各部分电路设计 .11 2.2.1 开关复位与晶振电路 .11 2.2.3 数码管显示电路 . 12 2.2.4 温度采集电路 . 13 2.2.5 风扇电机驱动与调速电路 . 15 第三章 软件设计 17 3.1 程序设置 17 3.2 用 Keil C51 编写程序 . 17 3.3 用 Proteus 进行仿真 . 18 3.3.1 Proteus
6、Proteus 简介 18 3.3.2 本设计基于 ProteusProteus 的仿真 19 第四章 系统调试 24 4.1 软件调试 24 4.1.1 按键显示部分的调试 24 4.1.2 传感器 DS18B20DS18B20 温度采集部分调试 . 24 4.1.3 电动机调速电路部分调试 . 24 4.2 硬件调试 25 4.2.1 按键显示部分的调试 25 4.2.2 传感器 DS18B20DS18B20 温度采集部分调试 . 25 4.2.3 电动机调速电路部分调试 . 25 4.3 系统功能 26 4.3.1 系统实现的功能 . 26 4.3.2 系统功能分析 . 26 结 论 27 参考文献 28 附录 1:电路总图 . 29 附录 2:程序代码 . 30 2 第一章 整体方案设计 1.1 前 言 在现代社会中,风扇被广泛的应用,发挥着举足轻重的作用,如夏天人们用的散热 风扇、工业生产中大型机械中的散热风扇以及现在笔记本电脑上广泛使用的智能 CPU 风扇等。而随着温度控制技术的发展,为了降低风扇运转时的噪音以及节省能源等,温 控风扇