河南理工大学毕业设计(论文)说明书
摘 要
电梯是现在高层建筑中的垂直运输工具,更是一种标志着现代物质文明建设发展的机电一体化的复杂运输设备。它涉及到了电子技术、机械工程、电力电子技术、微机技术、电力拖动系统和土建工程等多个科学领域。因此电梯的生产情况和使用数量已成为一个国家现代化程度的标识之一。随着现代化城市的高速发展,一幢幢高楼拔地而起,每天都有大量人流及物流需要输送,为了节约用地和适应经贸事业的发展,而这些高层建筑的垂直运输就成为了一个突出问题,电梯作为解决这一问题的主角在人们的工作和生活中的地位就变得更加的凸显了。
本设计就是对电梯这一垂直运输工具的运送规律的一种简单的模拟。设计中采用AT89C51单片机为核心控制元件及外围硬件电路构成了一个四层电梯控制系统的模型。通过对各楼层用户按键状态的检测,作为用户请求信息送到单片机,然后单片机通过改变端口的状态控制步进电机,实现了电机的调控功能,使电梯能够准确的停靠在请求楼层。软件部分使用汇编语言,利用中断方式来检测用户请求的按键信息,模拟按键引起的电平变化,送至单片机来确定楼层位置及请求方式,当电梯运行到各个楼层时,楼层数送数码管显示。硬件设计简单可靠,与软件相结合,基本实现了电梯的基本功能。
关键词:单片机;电梯;步进电机;控制
I
河南理工大学毕业设计(论文)说明书
Based on single-chip microcomputer controling the elevator ′s control system designation
Abstract
Now the elevator is the vertical transportation tool of the high building, but also a marked about the modern material civilization construction development integration of machinery complex transportation equipment. It involves electronic technology, mechanical engineering, power electronic technology, microcomputer technology, electric driving system and civil engineering and so on many fields of science. Therefore elevator production condition and used quantity has become one of the logoes of the national modernization degree. With the rapid development of modern city, every day there are lots of people and logistics need to be saved by the transportation, and adapt to the economic and trade development of the cause of the ground, tall buildings have sprung up, but the vertical transportation became a prominent problems, the status of the elevator to solve this situation as the leading role in people's work and life has becoming more highlights.
This design is a simple simulation about the transport rule of the vertical transportation of elevator. Using AT89C51 microcontroller as the core control components and peripheral hardware circuit constituted a four layers of elevator control system model in the designation. On each floor by detecting state of user buttons, and users request information is sent to microcontroller, then the state by changing the port of the MCU to control stepping motor, achieve the motor control function, so that elevator can accurate docked at request floor. Software part use assembly language, using interrupt mode to
II
河南理工大学毕业设计(论文)说明书
detect users request key information, simulate keystrokes cause level change, sent to the microcontroller to determine the floor position and request way, when elevator running to each floor, the sign of the floor is sent to digital tube to display. Hardware design is simple, reliable, and unifies software, basically achieved the basic function of the elevator.
Keywords: SCM; Elevator; Motor-stepper; Controling
III
河南理工大学毕业设计(论文)说明书
目录
1 绪论 ........................................................ 1 1 .1 电梯概述 ................................................ 1 1.1.1电梯的定义与分类 ..................................... 1 1.1.2电梯的组成 ........................................... 1 1.1.3 电梯的国内外发展史 .................................. 2 2 设计说明 .................................................... 4 2.1 课题的设计思路 .......................................... 4 2.1.1 硬件部分 ............................................ 4 2.1.2 软件部分 ............................................ 4 2 .2 课题的开发环境 .......................................... 4 2.2.1 电路图绘制软件——PROTUES ........................... 4 2.2.2 程序调试软件——WAVE ................................ 5 2.3 设计要求 ................................................ 5 2.4 总体设计 ................................................ 6 2.4.1 设计方案 ............................................ 6 2.4.2 设计方框图 .......................................... 7 3 硬件器件介绍 ................................................ 8 3.1 单片机概述 .............................................. 8 3.1.1 单片机的介绍 ........................................ 8 3.1.2 单片机的硬件特性 ................................... 8 3.1.3 单片机的引脚及功能 .................................. 9 3.2 步进电机概述 ........................................... 12 3.2.1 步进电机 ........................................... 12 3.2.2 步进电机的工作原理 ................................. 12 3.2.3 步进电机的分类 .................................... 12 3.2.4步进电机的特点 ....................................... 13 3.3 反应式步进电机 ........................................ 14 3.3.1 反应式步进电机的工作原理 ......................... 14 3.3.2反应式步进电机的驱动方式 .......................... 15 3.3.3 反应式步进电机的控制方式 ........................... 16 3.4 L298 ................................................... 18 3.5显示部分 ............................................... 20 3.5.1 数码管 ............................................. 20 3.5.2 发光二极管 ........................................ 22 3.6 CD4511 ................................................. 22 3.7 74LS245 ................................................ 23
I
河南理工大学毕业设计(论文)说明书
4 电路设计 ................................................... 25 4.1 单片机最小系统设计 .................................... 25 4.2 键盘电路的设计 ........................................ 25 4.3 步进电机驱动电路 ...................................... 27 4.4 显示电路设计 .......................................... 28 4.4.1 楼层显示电路 ...................................... 28 4.4.2 电梯外部请求显示电路 ............................... 28 4.5 超重报警电路 .......................................... 29 5 软件设计 ................................................... 31 5.1 初始化程序 ............................................ 31 5.2 键盘扫描子程序 ........................................ 31 5.3 程序要点说明 .......................................... 31 5.4 设计流程图 ............................................ 32 5.4.1 总流程图 ........................................... 32 5.4.2 模块流程图 ........................................ 33 6 结束语 ..................................................... 37 致 谢 ....................................................... 39 参考文献 ..................................................... 40 附录一 ....................................................... 41 附录二 源程序 ................................................ 42
II