基于STM32的电梯呼梯控制器的设计与实现(20110815)
论文题目 基于STM32的电梯呼梯控制器的设计与实现学科专业 指导教师 教授 作者姓名 学 号 分类号 密级 UDC 学 位 论 文基于STM32的电梯呼梯控制器的设计与实现(题名和副题名) (作者姓名) 指导教师姓名 教授 电子科技大学 成都 (职务、职称、学位、单位名称及地址) 申请专业学位级别 专业名称 论文提交日期 论文答辩日期 学位授予单位和日期 电子科技大学 答辩委员会主席 评阅人 2011年 月 日注1:注明国际十进分类法UDC的类号。独 创 性 声 明本人声明所呈交的学位论文是本人在导师指导下进行的研究工作及取得的研究成果。据我所知,除了文中特别加以标注和致谢的地方外,论文中不包含其他人已经发表或撰写过的研究成果,也不包含为获得电子科技大学或其它教育机构的学位或证书而使用过的材料。与我一同工作的同志对本研究所做的任何贡献均已在论文中作了明确的说明并表示谢意。签名: 日期: 年 月 日关于论文使用授权的说明本学位论文作者完全了解电子科技大学有关保留、使用学位论文的规定,有权保留并向国家有关部门或机构送交论文的复印件和磁盘,允许论文被查阅和借阅。本人授权电子科技大学可以将学位论文的全部或部分内容编入有关数据库进行检索,可以采用影印、缩印或扫描等复制手段保存、汇编学位论文。(保密的学位论文在解密后应遵守此规定)签名: 导师签名: 日期: 年 月 日. . .摘要自1887年美国奥的斯公司制造出世界上第一台电梯以来,电梯控制技术先后经历了继电器控制、PLC控制、微机控制阶段、现场总线控制阶段。与其它几种现场总线比较而言,CAN总线是最易实现,价格最为低廉的一种,在众多领域被广泛采用。本文设计的电梯呼梯控制器主要包括轿厢控制器和外召控制器采用集成了CAN总线控制器的STM32微处理器。STM32处理器是意法半导体最新推出的基于ARM公司Cortex-M3架构的嵌入式微处理器,具有高集成度、高可靠性、高速、低成本、低功耗的优点,在工业控制领域得到了广泛地应用,尤其适合于电梯控制系统的应用。基于CAN总线的串行通信方式实现了主控制器与轿厢控制器、外招控制器之间的内选、呼梯、登记、显示、应答等信号的沟通,使整个控制系统的控制信号线数从数百根减少到几根,极大地方便了电梯的安装和维修,提高了电梯的运行效率和服务质量,增强了电梯运行的实时性,并为进一步实现多台电梯群控、远程监控、楼宇自动化提供便利接口,具有广阔的应用前景。本文首先介绍了电梯控制系统的总体结构,接着分别介绍了轿厢控制器和外召控制器的硬件开发目标、基本功能,并给出其硬件的详细设计方法。采用STM32处理器作为呼梯控制器的核心,CAN总线为串行通信方式,并对其中的重点电路:STM32核心电路、信号输入输出电路、按键和指示灯电路、CAN驱动电路、LED点阵电路等进行了详细地描述。然后再分别介绍了轿厢控制器和外召控制器的软件设计流程和主要的功能设计。呼梯控制器的软件基于STM32的标准库编写。使用标准库函数编程屏蔽了操作大量寄存器的复杂性,增强了程序的可读性、复用性和可靠性,加速了开发过程,明显降低了开发成本和维护成本。最后,本项目在一个根据实际电梯大小按比例缩小的电梯模型上进行了测试,该模型具有接近实际电梯系统的基本功能模块。测试结果表明轿厢控制器和外召控制器的硬件设计和软件功能设计满足设计要求,且工作稳定可靠。关键词:电梯外召控制器,电梯轿厢控制器, CAN总线AbstractSince the worlds first elevator was made by Otis America Corporation in 1887, the elevator control technology was developed from relay control to PLC control, microcontroller control and field bus control. Compared with orther field buses, CAN bus is the cheapest and the most easily to realize. It is abroadly used in many domains. This paper discusses a design method of elevator calling system, which bases on STM32 microprocessor that integrates CAN bus controller. The calling system includes outside call controller and internal call controller. The STM32 microprocessor which bases on ARMs Cortex-M3 architecture was announced by STMicroelectronics Company recently, the chip has many advantages, such as high integration, high reliability, high speed, low cost and low power consumption, and so on. So it is wide used in industry control domain, especially suitable for elevator control system applications. The serial communication method based on CAN bus relizes the contact signal of inside choosing, calling, register, answer and displaying between Main Controller, Internal Call Controller and Outside Call Controller. This method reduces the hole systems control signal lines number from hundreds to sereral. It makes the elevators installation and maintenance easier, enhances the elevators operating efficiency and the quality of services, streangthens the timely control of elevator movement, and offers the convenience connection to futher functions of group elevator control, the remote monitoring and the building automation. It has wide application prospect.The paper first introduces the hold structure of the elevator control system, and then introduces the aim and basic function of hardware design of internal calling controller and outside calling controller respectively. It also gives the detail of hardware design, which adopts STM32 microprocessor as its core processor, and uses CAN bus as serial communication method. It describes the important electronic circuit in detail, such as the core circuit of STM32, signal input and output circuit, key and LED circuit, CAN drive circuit, LED matrix circuit, and so on.In the following four chapters, the paper also introduces the software design, which base on STM32 standard libraries. The programming which uses standard libraries eliminate the complexity of operating so many registers, so making the programme more readable, reuseable and stable, accelerating the process of development cycle, and reducing the development and maintainence cost obviously.In the end, the project was tested in an elevator model which shrinking by certain scale of real elevator. The model has basic module approaching to real elevator systems. The design of internal calling controller and outside calling controller was shown satisfying the demand and working stably by the test result.Keywords: outside calling controller of elevator, i