摘 要
目前,大多数家庭所使用的饮水机都只有一些基本的功能,例如加热、保温。然而,随着人们物质生活的不断提高,对饮水机的性能要求也不断提高。为了满足人们对饮水机的性能要求,本课题研究智能饮水机,它主要功能是在温度达到100°沸腾,并能在0-100℃之间以5℃为最小温差进行温度设定,从而得到任意想要的水温,非常人性化。它还具有过热保护及防干烧功能等。
随着计算机技术的发展,单片机技术已成为计算机技术中的一个独特的分支,单片机的应用领域也越来越广泛,特别是在工业控制和仪器仪表智能化中扮演着极其重要的角色。过去经常采用模拟电路、数字电路实现的电路系统,现在相当大一部分可以用单片机予以实现,传统的电路设计方法已演变成软件和硬件相结合的设计方法。在实际应用中,单片机经常要与各种传感器相结合组成一定的应用系统,以实现系统的自动检测与控制。
本文所设计的智能饮水机就是单片机结合传感器的一个简单应用。该系统设计综合单片机以及电子技术理论,从生活实际出发,完善了饮水机的功能。整个设计系统实现三个功能,即加热、对温度上下限的控制和定时加热。与传统的饮水机相比,由于采用了自动检测和控制的电子设计技术,可较好地实现对水温的测量和控制,具有较广泛的应用前景。
关键词:智能饮水机 AT89S52单片机 温度采集 功能设计
Abstract
Currently, most households are using drinking fountains are only some basic functions, such as heating, insulation. However, with the continuous improvement of material life, people, performance requirements of the drinking fountains also rising. To meet the performance requirements for drinking fountains, drinking fountains of the intelligence research, which main function is in the boiling temperature reaches 100 °, and can be between 0-100 ℃ at 5℃ temperature difference for the minimum temperature setting, you want to get any water, very human. It also has thermal protection and anti-dry functions.
With the development of computer technology, single chip technology has become the computer technology in a unique branch of microcontroller applications are increasingly being used especially in intelligent industrial control and instrumentation plays a very important role. Used to analog circuits, digital circuits circuit system, and now a large part of the microcontroller can be achieved, the traditional method of circuit design has evolved into a combination of software and hardware design. In practical applications, the microcontroller with a variety of sensors often composed of some combination of the application system to achieve automatic detection and control system.
Intelligent design in this paper dispenser is a simple microcontroller with sensor applications. The system design of integrated microcontrollers and electronics theory, the reality of life, improve the function of the drinking fountains. The whole design system to achieve three functions, namely, heating, temperature control and timer upper and lower heat. Compared with the conventional drinking fountains, the use of automatic detection and control of electronic design techniques to achieve better measurement and control of water temperature, have a wider application.
Key words: intelligent water dispenser,AT89S52 microcontroller, temperature acquisition,Functional Design
目 录
前 言 6
1绪 论 8
1.1 课题研究的背景 8
1.2 市场饮水机现状 8
1.3 课题研究的目的和意义 9
1.4 智能饮水机的主体功能 9
1.5 课题设计的主体内容 10
2 智能饮水机的硬件结构设计 11
2.1 智能饮水机的总体设计 11
2.2 元器件选择 12
2.3 AT89S52的主要性能 12
2.3.1 AT89S52功能特性描述 13
2.3.2 AT89S52晶振电路的设计 13
2.4 测温电路的设计 15
2.4.1 DS18B20的引脚图及方框图 15
2.4.2 DS18B20主要性能 16
2.4.3 DS18B20功能特性描述 16
2.4.4 DS18B20供电方式 18
2.5 主控系统 19
2.6 输入控制 20
2.7 显示部分 21
2.8 其他功能部分 23
3 智能饮水机的软件设计 25
3.1 系统分配方式 25
3.2 主程序设计 25
3.3 各模块程序设计 28
3.3.1 温度检测程序设计 28
3.3.2 显示程序设计 30
3.3.3 键盘扫描程序 31
3.3.4 延时程序 34
4 调试及性能分析 35
4.1 软件调试 35
4.1.1 新建工程 35
4.1.2 新建文本 35
4.1.3 添加文本 36
4.1.4 程序编译 37
4.2 硬件调试 37
4.2.1 电源电路的仿真 37
4.2.2 出水电路模块的仿真 38
4.2.3 加热模块电路的仿真 39
4.2.4 显示模块电路的仿真 39
4.2.5 报警电路的仿真 40
4.3 性能分析 41
结 论 42
致 谢 43
参考文献 44
参考文献 44
附录1 45
附录2 46
附录3 47