1、 VI 目录 摘要摘要 I AbstractAbstract II 前言前言 1 第一章第一章 设计目的和意义设计目的和意义 2 1.1 研究本课题的目的 2 1.2 研究本课题的意义及发展 2 第二章第二章 总体设计方案总体设计方案 4 2.1 设计要求 . 4 2.2 设计方案 . 4 2.2.1 总体设计方案 . 4 2.3 模块的功能 . 4 2.3.1 无线红外模块 5 2.3.2 人体感应模块 . 5 2.3.3 DS1302 时钟模块 5 2.3.4 EEPROM 存储电路 5 第三章第三章 总体设计电路总体设计电路 6 3.1 最小系统 6 3.1.1 简介 6 3.1.2 S
2、TC12C5A60S2 系列单片机的 A/D 转换器的结构 6 3.1.3 单片机最小系统设计 . 6 3.3 传感器 8 3.3.1 温度传感器 9 3.3.2 红外传感器 . 11 3.3.3 DS1302 时钟. 12 VII 3.4 LCD 液晶显示电路 . 13 3.5 风扇驱动 15 第四章第四章 系统软件设计系统软件设计 . 17 4.1 软件介绍 17 4.2 主程序流程图 . 17 4.3 DS18B20 子程序流程图 17 4.4 转速调节子程序流程图 18 第五章第五章 系统调试系统调试 . 20 5.1 传感器 DS18B20 温度采集部分调试 20 5.2 风扇调速电
3、路部分调试 21 5.3 人体感应模块的测试 . 21 参考文献参考文献 23 附录附录 . 24 附录 1 24 附录 2 29 致谢致谢 . 错误错误! !未定义书签。未定义书签。 总结与体会总结与体会 34 I 基于单片机智能遥控风扇的设计与制作 摘要 当今社会已经完全进入了电子信息化,温度控制器在各行各业中已经得到了充分的利 用。具有对温度进行实时监控的功能,以保证工业仪器,测量工具,农业种植的正常运作, 它的最大特点是能实时监控周围温度的高低,并能同时控制电机运作来改变温度。它的广 泛应用和普及给人们的日常生活带来了方便。 在炎热的夏天人们用电风扇来降温;在工业生产中,大型机械用电风
4、扇来散热等。随 着温度控制的技术不断发展,应运而生的温控电风扇也逐渐走进了人们的生活中。温控电 风扇可以根据环境温度自动调节电风扇启停与转速,在实际生活的使用中,温控风扇不仅 可节省宝贵的电资源,也大大方便了人们的生活和生产。 本设计为一种温控风扇系统,具有灵敏的温度感测和显示功能,系统采用 STC12C5A60S2 单片机作为控制平台对风扇转速进行控制。 利用 DS18B20 数字温度传感器采 集实时温度,经单片机的 PWM 控制光耦,光耦将单片机的信号和风扇的控制隔离,这样实 现了风扇高电压的控制,光耦控制三极管的放大倍数,实现了风扇的控制。 关键词关键词:温控风扇,单片机,DS18B20
5、,自动控制 II Based on the design and manufacture of intelligent remote control fan Abstract In todays society has entered the electronic information completely, the temperature controller in all walks of life have been fully utilized. Has the function of real-time monitoring of temperature to ensure the
6、 industrial instruments, measuring tools, agricultural planting of normal operation, it is the biggest characteristic of real-time monitor the surrounding temperature, and can control the motor operation to change the temperature at the same time. It is widely used and popularize brought convenience to Peoples Daily lives. In the hot summer, people use cooling fan; in the industrial production, is used toheat the electric fan large machinery. With the continuous development of thetechnology