摘 要
本次毕业设计主要是根据大学图书馆学习桌台灯的日常使用情况以及图书馆对灯光的需求这些问题,研究并设计出了一种基于单片机控制的图书馆学习桌全自动台灯控制系统。分析了当前中国的用电现状,并针对图书馆用电大量浪费的现象,提出了图书馆学习桌台灯智能控制控制的思想,分析了图书馆学习桌台灯智能控制的原理和实现方法,并采用单片机作为整个系统的核心智能控制部件。
本系统采用AT89S51单片机作为控制装置的智能部件,在图书馆前门和后门,采用热释电红外传感器检测人体的存在;采用光敏电阻组成的电路检测外界环境的光照强度;利用液晶显示器,能与单片机系统的接口简单可靠,使用方便;通过按键完成手动与自动模式的切换,实现手动控制灯的亮灭;本系统就会通过对人体的存在信号与外界环境的光照强度信号的识别来智能判断,当有人靠近学习桌时(人体感应),灯光会自动打开。灯光的亮度会根据自然光的光照强度来自动来自动调节。同时根据某个时段灯光处于不同的颜色。调试结果证明该系统具有很好的人机交互界面,能对图书馆学习桌台灯智能控制进行智能控制,可以避免学校图书馆用电的大量浪费。
关键词:图书馆;智能台灯;灯光控制;AT89S51;红外传感器
Abstract
According to the daily use of table lamp in university library and the demand of library for lighting,this graduation project mainly studies and designs a fully automatic desk lamp control system for library learning table based on single chip microcomputer control. This paper analyzes on the current situation of electricity consumption in China,and puts forward the idea of intelligent control of learning table lamp in library,and analyzes on the principle and realization method of intelligent control of desk lamp in library,aiming at the phenomenon of a large amount of waste of power consumption in libraries. The single chip microcomputer is used as the core intelligent control unit of the whole system.
In this system,AT89S51 single chip microcomputer is used as the intelligent part of the control device. In the front and back doors of the library,pyroelectric infrared sensors are used to detect the existence of the human body,and the electric circuit composed of Guang Min's resistance is used to detect the light intensity of the external environment. Using liquid crystal display,the interface with single chip microcomputer system is simple,reliable and convenient to use,and the switch between manual and automatic mode can be accomplished by keystroke to realize the light out of manual control lamp. The system can intelligently judge through the recognition of the human body's existing signal and the light intensity signal of the external environment. When someone approaches the learning table (human body sensing),the light will be turned on automatically. Brightness of Light It is automatically adjusted according to the light intensity of natural light. At the same time,the light is in a different color according to a certain period of time. The debugging results show that the system has a good human-computer interaction interface and can intelligently control the intelligent control of the desk lamp in the library. It can avoid a large amount of waste of power consumption in the school library.
Key words: library;Intelligent Table Lamp;Light Control;AT89S51;Infrared Sensor
目 录
摘 要 I
Abstract II
1. 绪论 1
1.1 选题背景及意义 1
1.2 国内外研究现状 1
1.3 研究主要内容 3
2. 图书馆学习桌台灯智能控制系统简介与方案分析 4
2.1 大学图书馆照明控制现状 4
2.2 图书馆学习桌台灯智能控制系统简介 4
2.3 系统控制方案分析 4
2.4 本章小节 5
3. 系统硬件设计 6
3.1 系统的硬件构成 6
3.2 系统控制的主要硬件电路 7
3.2.1 系统主控电路 7
3.2.2 系统供电电路 7
3.2.3 系统复位电路 8
3.2.4 数据采集电路 10
3.2.5 系统时钟电路 13
3.2.6 继电器驱动电路 14
3.2.7 蜂鸣报警电路 15
3.2.8 按键控制电路 16
4. 系统软件设计 17
4.1系统监控主程序模块 17
4.1.1 系统自检初始化 17
4.1.2 定时中断处理设计 18
4.2 数据采集模块 18
4.2.1 人体存在传感器的优缺点 18
4.2.2 数据采集软件的实现 18
4.2.3 人体存在传感器的抗干扰措施 19
4.2.4 人体存在传感器的安装要求 20
4.3 时钟模块 20
4.3.1 数据输入输出 20
4.3.2 时钟自检初始化 21
4.3.3 时钟程序设计 23
4.4 系统工作总流程 24
4.5 本章小节 24
5. 系统调试运行及问题分析 26
5.1 单片机系统调试方法及步骤 26
5.2 主要问题分析 28
6. 结论 29
参考文献 30
附 录 31
谢 辞 32