华北理工大学轻工学院
QINGGONG COLLEGE, NORTH CHINA UNIVERSITY OF SCIENCE AND TECHNOLOGY
毕业设计说明书
设计题目:基于单片机的感应自动门控制器的设计
学生姓名: 学 号: 专业班级:
学 部:信息科学与技术部 指导教师:
2015年06月09日
摘 要 摘 要
现如今自动化、信息化程度越来越高,单片机的应用领域也越来越广,成为人们生活不可或缺的一部分。随着社会的发展、科技的进步以及人们生活水平的逐步提高,各种方便于生活的自动控制系统开始进入了人们的生活,以单片机为核心的自动门系统就是其中之一。同时也标志着自动控制领域成为了数字化时代的一员。它实用性强,功能齐全,技术先进,使人们相信这是科技进步的成果。它更让人类懂得,数字时代的发展将改变人类的生活,将加快科学技术的发展。
本论文着重研究设计了以89C52单片机为主体,热释电型红外线传感器,直流步进电动机等为核心的自动门控制系统。它充分发挥了单片机的性能,其优点是硬件电路简单,软件功能完善,控制系统可靠,性价比较高,具有一定的使用和参考价值。
关键词 自动门;单片机;步进电机;热释电型红外线传感器
-I-
Abstract Abstract
Nowadays automation, informationization level is higher and higher, MCU application field is becoming more and more widely, become an indispensable part of people's life. With the development of the society, the progress of science and technology and the improving of people's living standard, all kinds of convenience in life start into the automatic control system of people's lives, with the single chip processor as the core of the automatic door system is one of them. Also marks the automatic controlled field became a member of the digital age. Its practicability is strong, the function is all ready, technology advanced, make people believe it's the result of scientific and technological progress. It is more to understand people, the development of the digital era will change human life, will speed up the development of science and technology.
This paper focuses on the design with 89C52 as the main body, pyroelectric infrared sensor, dc stepper motor as the core of automatic door control system, etc. It give full play to the performance of the microcontroller, the advantages of hardware circuit is simple, software function is perfect, reliable control system, the characteristics of high cost performance, has certain use and reference value.
Keywords automatic door; single chip microcomputer; stepping motor;
pyroelectric infrared sensor
-II-
目 录 目 录
摘 要 .............................................................................................................................I Abstract ......................................................................................................................... II 第1章 绪论 .................................................................................................................. 1 1.1 课题背景 ............................................................................................................. 1 1.2 自动门在国内外的发展状况 ............................................................................. 1 1.3 课题研究的意义和目的 ..................................................................................... 2 1.4 主要研究内容 ..................................................................................................... 2 1.5 本章小结 ............................................................................................................. 3 第2章 系统总体设计方案 .......................................................................................... 4 2.1 系统总体规划 ..................................................................................................... 4 2.2 器件介绍 ............................................................................................................. 4 2.2.1 89C52单片机 ................................................................................................ 4 2.2.2 热释电型红外线传感器 ............................................................................... 8 2.2.3 步进电机 ....................................................................................................... 9 第3章 硬件设计 ........................................................................................................ 11 3.1 基本单片机系统 ............................................................................................... 11 3.2 热释电红外检测电路 ....................................................................................... 12 3.4 控制电路 ........................................................................................................... 13 第4章 软件设计 ........................................................................................................ 14 4.1 整体顺序流程图 ............................................................................................... 14 4.2 功能模块程序 ................................................................................................... 15 4.2.1 定义变量及主程序 ..................................................................................... 15 4.2.2 驱动子程序 ................................................................................................. 16 4.2.3 延时程序 ..................................................................................................... 20 4.2.4 扫描程序 ..................................................................................................... 20 4.2.5 中断程序 ..................................................................................................... 22 第5章 仿真及调试 .................................................................................................... 23 5.1 仿真软件介绍 ................................................................................................... 23 5.2 软件调试 ........................................................................................................... 24 5.3 硬件调试 ........................................................................................................... 24 结 论 .......................................................................................................................... 27 参考文献 ...................................................................................................................... 28 谢 辞 .......................................................................................................................... 29
-III-