常州信息职业技术学院电子与电气工程学院 毕业设计论文
摘 要
温控风扇是利用温度的变化控制风扇启停及转速的智能系统,在现代社会中的生产以及人们的日常生活中都有广泛的应用,如工业生产大型机械散热系统中的风扇、现在笔记本电脑上的广泛应用的智能CPU风扇等。本文设计了基于单片机的温控风扇系统,采用单片机为控制器,利用温度传感器DS18B20作为温度采集元件,并根据采集到的温度,通过一个达林顿反向驱动器ULN2803驱动风扇电机。根据检测到的温度与系统设定的温度比较实现风扇电机的自动启动和停止,并能根据温度的变化自动改变风扇电机的转速,同时用LED八段数码管显示检测到的温度与设定的温度。系统的预设温度的设置是通过两个独立按键来实现的,一个增大预设温度,一个减小预设温度。
关键词: 单片机;DS18B20;温控;风扇
1
ABSTRACT
In life, we often use to electric fan. For example, in the hot summer people use electric fan to cool; in industrial production, large-scale machinery use electric fan for cooling. But when the environmental temperature changes, artificial hard to timely control the speed of the fan, is also very difficult to effectively utilize valuable resources. With the development of technology of temperature control, temperature control technology has been fully meet the modern daily life and production requirements, emerge as the times require temperature-controlled electric fan has gradually entered people's life. Temperature control electric fan according to the ambient temperature automatic regulating electric fan start / stop and speed, in real life use, temperature-controlled electric fan not only can save valuable resources, also brings great convenience for people's life and production.
Temperature control fan in modern society production and people's daily life have a wide range of applications, Such as industrial production of large mechanical cooling system of fan, now notebook computer on a wide range of application of intelligent CPU fan. This paper introduces the design of MCU based temperature control fan system, using SCM as the controller, use of temperature sensor DS18B20 as a temperature acquisition component, and according to the collected temperature, through a Darlington reverse driving fan motor driver ULN2803. According to the detected temperature and a set temperature to achieve system comparison of fan motor for automatic start and stop, and according to temperature changes automatically change the fan motor speed, at the same time with the LED eight digital tube display the detected temperature and a set temperature. The preset temperature set by two independent buttons to achieve, The one increase the preset temperature, and the another one reduced the preset temperature.
Key words: single chip microcomputer; DS18B20; temperature control; fan
2
常州信息职业技术学院电子与电气工程学院 毕业设计论文
基于单片机的温控风扇设计
目 录
摘 要 ............................................................. 1 第1章 前 言 ...................................................... 1 第2章 整体方案设计 ............................................... 2 第3章 各单元模块的硬件设计 ....................................... 3
3.1 系统器件简介 ................................................ 3
3.1.1 DS18B20单线数字温度传感器简介 ......................... 3 3.1.2 达林顿反向驱动器ULN2803简介 ........................... 3 3.1.3 AT89C52单片机简介 ..................................... 4 3.1.4 LED数码管简介 ......................................... 4 3.2电路设计 ..................................................... 5
3.2.1 开关复位与晶振电路 ..................................... 5 3.2.2 独立按键连接电路 ....................................... 6 3.2.3 数码管显示电路 ......................................... 6 3.2.4 温度采集电路 ........................................... 7 3.2.5 风扇电机驱动与调速电路 ................................. 8 3.2.6 电路总图 ............................................... 9
第4章 软件设计 .................................................. 11
4.1 程序设置 ................................................... 11 4.2 用Keil C51 编写程序 ........................................ 12 4.3 用Proteus进行仿真 ......................................... 12 第5章 系统调试 .................................................. 17
5.1 软件调试 ................................................... 17
5.1.1 按键显示部分的调试 .................................... 17 5.1.2 传感器DS18B20温度采集部分调试 ........................ 17 5.1.3 电动机调速电路部分调试 ................................ 18 5.2 硬件调试 ................................................... 18
5.2.1 按键显示部分的调试 .................................... 18 5.2.2 传感器DS18B20温度采集部分调试 ........................ 18 5.2.3 电动机调速电路部分调试 ................................ 19
第6章 结束语 .................................................... 20 参考文献 ......................................................... 21 致 谢 ............................................................ 22
3
常州信息职业技术学院电子与电气工程学院 毕业设计论文
第1章 前 言
在现代生活和生产中,电风扇被广泛应用,起着重要的作用,如冷却风扇,用于人的大型机械的夏季冷却风扇,工业生产,现在广泛应用于笔记本电脑的智能风扇。随着温度控制技术的发展,为了降低风机运行和节能的噪声,温度控制风机越来越受到广泛的关注和广泛的应用。第一阶段,温度控制风扇的设计有一定的效果,可以使风机根据环境温度变化自动无级调速,当环境温度上升到一定时间会自动启动风机,并随着环境温度的升高加速自动风扇转速,当环境温度降低到一定时间会自动停止风机,实现智能化控制。
本文设计的8052系列单片机AT89C52单片机是ATMEL公司的控制器,利用温度传感器DS18B20作为温度采集装置,达拉斯,并通过Darlington司机ULN2803驱动风扇电机反转。同时,该系统检测环境的温度,以及系统的温度显示在LED数码管的动态显示。根据环境温度与预置温度的比较,实现了风机电机的自动启动和停止,并实现了转速的自动调整。
1