单片机控制伺服电机设计说明书
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
课程设计说明书
题目:基于单片机的步进电机控制系统设计课程:机电一体化系统设计
姓名:马福德
学号:0804705030
指导教师:段广云、俞学兰
专业年级:机械设计制造及其自动化
(机械电子工程方向)2008级
所在院系:机械工程学院
完成日期: 2011年7月 10 日
答辩日期: 2011年7月 11 日
摘要
随着微电子和计算机技术的发展,步进电机的需求量与日俱增,它广泛用于打印机、电动玩具等消费类产品以及数控机床、工业机器人、医疗器械等机电产品中,其在各个国民经济领域都有应用。研究步进电机的控制系统,对提高控制精度和响应速度、节约能源等都具有重要意义。
步进电机是一种能将电脉冲信号转换成角位移或线位移的机电元件,步进电机控制系统主要由步进控制器,功率放大器及步进电机等组成。采用单片机控制,用软件代替上述步进控制器,使得线路简单,成本低,可靠性大大增加。软件编程可灵活产生不同类型步进电机励磁序列来控制各种步进电机的运行方式。
本设计是采用AT89C51单片机对步进电机的控制,通过IO口输出的时序方波作为步进电机的控制信号,信号经过芯片AT6560AHQ驱动步进电机;同时,用 4个按键来对电机的状态进行控制,并用数码管动态显示电机的转速。
系统由硬件设计和软件设计两部分组成。其中,硬件设计包括AT89C51单片机的最小系统、电源模块、键盘控制模块、步进电机驱动模块、数码显示模块、测速模块(含霍尔片UGN3020)6个功能模块的设计,以及各模块在电路板上的有机结合而实现。软件设计包括键盘控制、步进电机脉冲、数码管动态显示以及转速信号采集模块的控制程序,最终实现对步进电机转动方向及转动速度的控制,并将步进电机的转动速度动态显示在LED数码管上,对速度进行实时监控显示。软件采用在Keil软件环境下编辑的C语言。本系统具有智能性、实用性及可靠性的特点。
关键词:步进电机 ,单片机 ,电脉冲信号, 角位移, 转速控制,方向控制
ABSTRACT
With the development of microelectronics and computer technology, increasing demand for stepper motor, which is widely used in printers, electronic toys and consumer products such as CNC machine tools, industrial robots, medical equipment and electrical products, and its various national fields are applied. Of stepper motor control system to improve the control accuracy and response speed, energy conservation and so important.
Stepper motor is an electric pulse signals can convert the angular displacement or linear displacement of the mechanical and electrical components, stepper motor control system consists of stepper controller, stepper motor power amplifier and so on. Use MCU control, the stepper controller instead of using software to make simple circuit, low cost, reliability greatly increased. Software programming flexibility to produce different types of stepping motor excitation sequence to control the operation of the various stepper motor mode
This design is used AT89C51 of Stepping motor control, through the IO port as a square wave output of the timing of step motor control signal, the signal through the ULN2003 driver chip stepper motor; the same time, with four buttons to the status of the motor control, and dynamic display with digital control motor speed.
System consists of hardware and software design of two parts. Among them, the hardware design, including minimum system AT89C51 microcontroller, power supply module, keyboard control module, stepper motor drive (integrated Darlington ULN2003) module, digital display (SM420361K digital control) module, speed modules (including the Hall probe UGN3020) six function modules, and each module in the circuit board to achieve the organic combination. Software design, including keyboard control, stepping motor pulse, the digital dynamic display and speed signal acquisition module, control procedures, and ultimately to the stepper motor rotation direction and rotation speed control of stepper motor rotation speed and dynamic display in the LED digital tube, real-time monitoring of the speed display. Software used in the software environment to edit Keil C language. This system has the intelligence, practicality and reliability features.
Key Words: Stepping motor , MCU Pulse Signal , Angular displacement ,Speed control ,Direction control