1、1 摘 要 本课题针对教室灯光的控制,分析了教室灯光智能控制的原理和实现方法, 提出了基于单片机设计教室灯光智能控制系统的思路,并在此基础上开发了智能 控制系统的硬件模块和相应软件部分。 该系统以 AT89S51 单片机作为控制模块的核心部件, 采用热释红外人体传感 器检测人体的存在,采用光敏三极管构成的电路检测环境光的强度;根据教室合 理开灯的条件,通过对人体存在信号和环境光信号的识别与判断,完成对教室灯 光的智能控制,避免了教室用电的大量浪费。系统还具有报警功能;同时还采用 了软/硬件的“看门狗”等抗干扰措施。 本系统程序部分采用 C 语言编写,采用模块化结构设计、条理清晰、通用性 好,便
2、于改进和扩充。该系统具有体积小,控制方便,可靠性高,针对性强,性 价比高等优点,可以满足各类院校对教室灯光控制的要求,很大程度的达到节能 目的。 关键词关键词:智能控制器 热释红外传感器 单片机 2 Abstract The control for classroom lighting, analyses the principle and realization method of classroom lighting intelligent control, the MCU design classroom lighting intelligent control system based
3、 on the idea, and based on the development of the intelligent control system hardware module and software part. The system uses AT89S51 microcontroller as a core component of the control module, the infrared sensor to detect the existence of human body, light circuit testing environment using photos
4、ensitive transistor constitute reasonable strength; according to the classroom lights conditions, through the identification and determine the existence of signal and environmental light signals to the human body, the classroom lighting intelligent control, to avoid the use of waste electric classro
5、om. The system also has alarm function; at the same time also adopted the hardware / software “watchdog“ anti-interference measures. This system is part of the program using C language, modular structure design, clarity, good versatility, easy to improve and expand. The system has the advantages of
6、small volume, convenient control, high reliability, strong pertinence, high cost performance, can meet all kinds of institutions for classroom lighting control requirements, greatly saving energy. Keywords: intelligent controller for pyroelectric infrared sensor chip 3 引言 当前,随着经济的飞速发展,能源短缺问题日益突出,成为一个国家经济发展的“瓶颈”。 作为工业生产和人民生活不可或缺的电力能源更是如此。尤其现今越来越提倡低碳生活,节 约能源已经成为一种全球共识,而作为培养社会精英的高校更应该起到榜样的作用。但是目 前在校园内,教室灯火通明,却空无一人的现象屡见不鲜,这不仅造成了严重的资源浪费, 也对高校的形象造成了很坏的影响。本文所研究的教室灯光控制系统就可以很好地实现节约 能源的作用。 1 系统硬件组成 整个系统