当前位置:文档之家› 基于51单片机蓝牙控制照明系统大学论文

基于51单片机蓝牙控制照明系统大学论文

摘要随着社会的发展人们对生活质量的要求越来越高,照明在能耗中所占的比例日益增加,因而照明节能也日显重要。

现在国内外普及使用的节能开关基本有声控型、触摸型、感光型等。

这几种开关各有自己的弊端,如声控型不适合环境嘈杂场所、感光型开关在无人期间不能自动关闭。

单片微型计算机简称单片机,是典型的嵌入式微控制器(Microcontroller Unit),常用英文字母的缩写MCU 表示单片机,单片机又称单片微控制器,它不是完成某一个逻辑功能的芯片,而是把一个计算机系统集成到一个芯片上。

单片机由运算器,控制器,存储器,输入输出设备构成,相当于一个微型的计算机(最小系统)。

和计算机相比,单片机缺少了外围设备等。

概括地讲:一块芯片就成了一台计算机。

它体积小、质量轻、价格便宜、为学习、应用和开发提供了便利条件。

同时,学习使用单片机是了解计算机原理与结构的最佳选择。

单片机在工业控制领域广泛应用。

单片机由仅有CPU的专用处理器芯片发展而来。

最早的设计理念是通过将大量外围设备和CPU集成在一个芯片中,使计算机系统更小,更容易集成到复杂的对体积要求严格的控制设备当中。

本文利用所学51单片机基础知识结合自动控制技术和蓝牙2.0通信技术设计完成一套无线遥控家电开关系统。

本设计详细地讲述了51单片机控制原理和单片机编程技术,HC-06蓝牙通信技术以及自动化控制技术。

整个系统以STC89C52单片机为核心,单片机实现HC-06蓝牙指令的解析与继电器开关控制指令的发出。

蓝牙通信单元采用工业级的HC-06蓝牙模块来完成,蓝牙模块在整个系统中负责蓝牙指令的接收和传输;家电开关的自动控制部分采用4路继电器开关来实现,继电器开关是典型的弱电信号控制型照明系统开关。

关键词:单片机、蓝牙、照明系统AbstractWith the development of society, people's quality of life is becoming more and more demanding, and the proportion of lighting in the energy consumption is increasing. Now the popularity of energy-saving switch at home and abroad, the basic use of voice control, touch type, sensitive type, etc.. These switches have their owndrawbacks, such as voice type is not suitable for noisy environment, photosensitive switch can not be automatically shut down during the unmanned. As the single chip computer is a typical embedded micro controller (Microcontroller Unit), usually abbreviated as MCU English letters single-chip microcontroller also known as single-chip microcontroller, it is not the completion of a logic function of the chip, but a computer system integrated into a chip. The single chip microcomputer is composed of an arithmetic device, a controller, a memory, an input and output device, which is equivalent to a microcomputer. Compared with the computer, SCM, such as the lack of peripherals. Generally speaking: a chip is a computer. The utility model has the advantages of small size, light weight, low cost and convenient conditions for learning, application and development. At the same time, learning to use the MCU is to understand the principle and structure of the computer the best choice.SCM is widely used in the field of industrial control. Single chip processor developed by only CPU dedicated chip. The first idea is to integrate a large number of peripherals and CPU in a single chip, so that the computer system is smaller, more easily integrated into the complex requirements of the control of the volume of equipment. In this paper, we design a set of wireless remote control switch system based on the 51 basic knowledge of MCU and the technology of Bluetooth and 2. This design describes in detail the 51 single-chip microcomputer control principle and single-chip programming technology, HC-06 Bluetooth communication technology and automation control technology. The whole system is based on STC89C52 single chip microcomputer, and the analysis of the HC-06 Bluetooth command and the control of the relay switch control instructions. Bluetooth communication unit using HC-06 Bluetooth module to complete the industrial level, the Bluetooth module is responsible for Bluetooth instruction in the whole system of receiving and transmission; automatic control appliance switch using 4 way relay switch to achieve the relay switch control is a typical type of weak current signal lighting system switch.Keywords: MCU, Bluetooth, lighting system摘要 (1)Abstract (1)1绪论 (4)1.1 课题研究的背景 (4)1.2 课题的研究意义 (5)2 体统的总体设计 (6)2.1 选择单片机 (6)2.2 蓝牙设备 (7)2.3 检测光照 (8)2.4 继电器 (8)3 硬件的设计 (9)3.1 系统硬件概述 (9)3.2 CPU的介绍 (9)3.3 主接线图设计 (10)3.4 蓝牙通信模块设计 (10)4 软件系统设计 (11)4.1 系统流程设计 (11)4.2 程序仿真 (12)4.2.1 keil简介 (12)5 系统测试 (15)5.1 蓝牙通信模块测试 (15)5.2 单片机最小电路测试 (16)总结 (16)参考文献 (18)致谢 (19)1绪论随着国民经济的快速发展和社会进步,教育在全社会愈加被关注和重视,校园规模也随着受教育者的数量增加而不断扩大,教室的数量也大幅度增加。

为使师生有舒适的教学和学习的环境,无论是教室的面积、设施和照度,校方在力所能及的范围内,都付出了十分的努力。

但由于学校开放型的管理模式,以及全员的节能意识的淡薄,高校的教室在白天室内照度很高的情况下,仍然普遍存在开灯作业;即使室内无人或人数很少的情况下,也是全部开启室内照明。

夜间许多教室,即使仅有几个学生在教室自习,但室内照明全部开启,绝不会有师生因为只有少数人而仅开几盏灯。

长明灯比比皆是,人走不熄灯的现象到处存在。

这种有形和无形的浪费,给校方的水电支出带来了沉重的负担。

学校的水电支出约占全校经费支出的1/4—1/5,电费支出占据较重比例。

其中主要能耗浪费较大的是:教室照明和空调的使用。

而教室照明的浪费源自予长明灯、白天亮灯、不合理使用照明以及旧灯管的不及时更换。

单片机的出现至今已经有30多年的历史了。

微型计算机的迅速发展,促进微型计算机测量和控制技术的迅速发展和广泛应用,单片机(单片微型计算机)的应用已经渗透到广泛渗透到社会经济、军事、交通、通信等相关行业,而且也深入到家电、娱乐、艺术、社会文化等各个领域,并掀起了一场数字化技术革命。

单片微型计算机就是将中央处理单元、存储器、定时/计数器和多种接口都集成到一块集成电路芯片上的微型计算机。

因此一块芯片就构成了一台计算机。

它已成为工业控制领域、智能仪器仪表、尖端武器、日常生活中最广泛使用的计算机。

1.1 课题研究的背景随着计算机网络、通信、控制等技术的发展,智能建筑的发展越来越迅猛。

目前,国内大多数智能建筑存在效率低、能耗高的现象。

就智能建筑的照明系统来说,许多地方的灯经常是从早到晚开着的,不管这些房间或楼道是否有人,也不管有多少人。

相关主题