无线温控风扇-毕业设计 - 图文

更新时间:2023-10-13 06:53:01 阅读量: 综合文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

摘 要

在人们的日常生活中,电风扇非常受到人们的喜爱。相对于空调,电风扇不仅价格便宜,使用方便安全,而且耗电量小。然而,人们在熟睡时,外界随着温度变化而降低,这时候人们会容易感冒,尤其是中老年人和小孩更加容易生病。但随着社会的发展,使用智能控制风扇渐渐起来。本文就采用ZigBee无线温控风扇的转速,主要是用两块ZigBee核心板,分别当做发送模块和接收模块,发送模块接上DS18b20温度传感器和电源,接收模块主要外接电机,温度传感器采集外界温度,对发送模块上的程序解析编译后通过天线传输给接收模块,最后对其的程序进行解析编译,通过电机驱动控制风扇,在此,可以设定上下限,让风扇的转速随外界温度变化而改变。这样的话,不仅更加的节能,而且有利于人们的健康。

关键词: Zigbee 智能风扇 DS18b20

第 1 页 共 42 页

Abstract

In People's Daily lives, the electric fan is very popular with people. Relative to the air conditioning, electric fan is not only cheap, easy to use security, and power consumption is small. People, however, when sleeping, the outside world as the temperature changes, and the people will be easy to catch a cold, Especially middle-aged and old people and children are more likely to get sick.But with the development of the society, the use of intelligent control fan up gradually. In this paper, using ZigBee wireless temperature control fan speed, Mainly is to use two pieces of ZigBee core board, respectively, as sending and receiving module, Sending module DS18b20 temperature sensor and the power is connected, receiving module is mainly external motor, temperature sensor to collect the outside temperature, the transmission module programs on parsing the compiled by antenna transmit to the receiving module, and finally the compiled program parsing, driven by motor control fan, the lower limit can be set up, let the speed of the fan varies with temperature change and change. In this way, more energy saving not only, and is conducive to people's health.

Keywords: Zigbee intelligent fan DS18b20

第 2 页 共 42 页

目录

1 绪论 ................................................................................................................................... 5 1.1智能风扇的发展背景 .................................................................................................. 5 1.1.1 智能风扇现阶段的应用 ........................................................................................... 5 1.1.2智能风扇的发展趋势 .................................................................................................. 5 1.1.3 智能风扇的设计内容 ................................................................................................. 5 2 系统总体设计 ................................................................................................................... 7 2.1基于单片机温控风扇和ZigBee温控风扇的两种方案的比较 .................................... 7 2.2系统总体框架 ................................................................................................................. 7 2.3 ZigBee的简介 ................................................................................................................. 8 2.3.1 ZigBee的介绍 .............................................................................................................. 8 2.3.2 ZigBee的应用 .............................................................................................................. 8 2.3.3 ZigBee的主要特性 ...................................................................................................... 8 2.3.4 ZigBee的协议架构 ...................................................................................................... 8 2.4 cc2530片上系统简介 ..................................................................................................... 9 2.4.1 cc2530系统的介绍 ...................................................................................................... 9 2.4.2 cc2530的功能.............................................................................................................. 9 2.4.3 cc2530模块及外设说明 ............................................................................................ 10 2.5 DS18b20温度传感器 .................................................................................................... 10 2.5.1 DS18b20温度传感器特点 ......................................................................................... 11 2.5.2 DS18b20的输出信号 ................................................................................................. 11 2.6 L298N电机驱动模块介绍 ............................................................................................ 11 3 硬件设计 ......................................................................................................................... 12 3.1 ZigBee发送和接收模块设计 ....................................................................................... 12 3.2DS18b20温度传感器模块设计..................................................................................... 13 3.3 L298N电机驱动模块设计 ............................................................................................ 14

第 3 页 共 42 页

4 软件软件 ......................................................................................................................... 16 4.1 软件IAR的介绍 .......................................................................................................... 16 4.2软件总体设计流程 ....................................................................................................... 16 4.3 ZigBee发送模块设计流程 ........................................................................................... 18 4.4 ZigBee接收模块设计流程 ........................................................................................... 19 4.5温度采集模块设计流程 ............................................................................................... 21 5 系统调试 ......................................................................................................................... 24 5.1硬件调试 ....................................................................................................................... 24 5.2软件调试 ....................................................................................................................... 26 总 结 ................................................................................................................................... 29 致 谢 ................................................................................................... 错误!未定义书签。 参考文献 ............................................................................................................................. 30

附录A:元器件 ............................................................................................................... 31

附录B:源程序 .................................................................................................................. 32

第 4 页 共 42 页

1 绪论

1.1智能风扇的发展背景

1.1.1 智能风扇现阶段的应用

电风扇在我国作为一种老式的家电,在90年代至今依然十分流行,电风扇具有摆放方便,体积轻巧,价格便宜的优点。正是我国对电风扇的广泛需求,人们对风扇的要求也越来越高,希望风扇变的智能化,和人性化,但是,在我国,智能风扇的应用不是很广泛,涉及的领域也比较狭窄,只是在一些高端电子产品中,应用到一点,比如,在笔记本电脑中,就安装有这种智能风扇,当电脑长时间的使用,会发热发烫,电脑传感装置检测到以后,会自动开启风扇,对电脑进行降温,以保证电脑的正常运行。智能风扇的应用还应用在许多电子产品上面,有的还设有报警装置,当外界温度达到警戒温度是,报警装置会发出声音来提醒人们。

1.1.2智能风扇的发展趋势

智能风扇在人们的生活中带来的好处毋庸置疑,虽然智能风扇在一些高端电子产品上面的应用比较广泛,但是如今,人们更想把智能风扇应用到老式的家电电风扇当中,所以我认为这是以后智能风扇的发展趋势,因此,以后的家用电风扇将是多功能的,智能化的,简单的来说,风扇内部带有报警装置,外部接有温度传感装置,温度显示屏,当外界温度低于一定的温度界限时,电风扇自动关闭,当外界温度在一定温度界限之间,电风扇会提高转速,并保持,但没有到最大转速,当外界温度高于一定的界限时,风扇转速达到最大,并保持,外界的温度会在电风扇的显示屏中显示,所以当外界温度过高时,电风扇会报警,提醒人们注意防暑降温。不管实在白天,还是夜晚人们睡觉时,都会给人们带来很大的方便,所以我相信这种节能的,智能化,多功能的风扇在未来会得到广泛的使用,还可以添加更多的功能,以满足人们的其他需求。 1.1.3 智能风扇的设计内容

(1) 系统通过温度传感器采集温度信息,并通过无线通信模块传输给单片机,

单片机能通过显示电路显示电路实时显示当前温度,要求温度测量精度0.5摄氏

第 5 页 共 42 页

本文来源:https://www.bwwdw.com/article/duef.html

Top