精品基于串口通信的步进电机调速系统设计-定 - 图文

题 目:基于串口通信的步进电机

调速系统设计

内蒙古科技大学毕业设计说明书(毕业论文)

基于串口通信的步进电机调速系统设计

摘 要

本设计方案中采用基于串口通信的AT89C51型单片机内部的定时器改变CP脉冲的频率从而实现对步进电机的转速进行控制,实现电机调速与正反转的功能。

在实验室和工业应用中,串口是计算机与外部串行设备之间的数据传输通道,由于串行通信方便易行,所以应用广泛。

在VC++6.0的环境下,编写使用C语言,串口通信程序,由单片机控制的步进电动机的转速。当由单片机控制的步进电动机的转速的工作数据由串口传到计算机时,操作人员能够实时监控其工作状态,工作数据,根据情况,并能更改其工作参数。这样,就使得控制步进电机的转速。而电机的转速取决于脉冲信号的频率和脉冲数,而不受负载变化的影响,即给电机加一个脉冲信号,电机则转过一个步距角,所以步进电机每给一个脉冲就转动一个固定的角度,这样就可以通过控制步进电机的一个脉冲到下一个脉冲的时间间隔来改变脉冲的频率,延时的长短来具体控制步进角来改变电机的转速,从而实现步进电机的调速。

关键词:步进电机调速;单片机;串口通信;VC++

I

内蒙古科技大学毕业设计说明书(毕业论文)

The stepper motor speed control system based on

serial communication

Abstract

The design of serial communication based on AT89C51 single-chip microcomputer-based timer to change the internal pulse frequency of CP in order to achieve the speed of stepper motor control with the positive realization of motor function.

In the laboratory and industry field, the computer serial port and external serial device data transmission between the channels, as a result of user-friendly serial communication lines, so a wide range of applications.

In VC + +6.0 environment, prepared using the C language, serial communication procedures by the single-chip microcomputer to control the speed of the stepper motor. When controlled by the single-chip stepper motor speed the work of the serial data transmitted by the computer, the operator can work in real-time monitoring of its status, the work of data, depending on the circumstances and can change its operating parameters. This allows control of stepper motor speed. Depends on the speed of the electrical pulse frequency and pulse number, and not subject to the impact of changes in load, that is, to add an electrical pulse signal, a step motor is turned away from the angle, the stepper motor is a pulse on each rotation of a fixed point of view so that you can control the stepper motor through a pulse to pulse the next time interval to change the pulse frequency, the length of delay to a specific angle in order to change control of stepper motor speed, the stepper motor in order to achieve Speed.

Keywords: Stepper motor; Singlechip; Serial communication; Visual C++

II

内蒙古科技大学毕业设计说明书(毕业论文)

目 录

摘 要 ......................................................................................................................................... I Abstract ...................................................................................................................................... II 目 录 ...................................................................................................................................... III 第一章 概述 .............................................................................................................................. 1

1.1开发背景及发展趋势 ................................................................................................. 1 1.2功能要求及功能实现概述 ......................................................................................... 2 第二章 系统结构的实现与步进电机的驱动 .......................................................................... 3

2.1整体硬件结构 .............................................................................................................. 3 2.2系统硬件电路设计 ...................................................................................................... 3

2.2.1硬件的基本组成 ............................................................................................... 3 2.2.2电路图 ............................................................................................................... 3

2.2.2.1晶振电路 ................................................................................................ 4 2.2.2.2光电隔离器 ............................................................................................ 5 2.2.2.3 MAX232的介绍 .................................................................................... 6 2.2.3 PCB板的生成 ................................................................................................... 6 2.3步进电机的结构特点 .................................................................................................. 7

2.3.1反应式步进电机的结构 ................................................................................... 7 2.3.2 反应式步进电机的工作原理 .......................................................................... 8 2.3.3 反应式步进电机的步进方式 .......................................................................... 9 2.3.4 步进电动机的主要性能指标 ........................................................................ 10 2.3.5步进电动机的运行特性 ................................................................................. 11 2.3.6步进电机的选型 ............................................................................................. 13 2.4步进电机驱动电路 .................................................................................................... 14

2.4.1单电压驱动 ..................................................................................................... 14 2.4.2 双电压驱动 .................................................................................................... 15 2.4.3 斩波驱动 ........................................................................................................ 16 2.4.4 细分驱动 ........................................................................................................ 17 2.4.5 集成电路驱动 ................................................................................................ 17

III

联系客服:779662525#qq.com(#替换为@)