文档介绍:摘要
在电气时代的今天,电动机在工农业生产与人们日常生活中都起着十分重要的作用。步进电机作为最常见的一种电机,作为一种数字伺服执行元件,步进电机具有结构简单、运行可靠、控制方便、控制性能好等优点,广泛应用在数控机床、机器人、自动化仪表等领域。为了实现步进电机的简易运动控制,一般以单片机作为控制系统的微处理器,通过步进电机专用驱动芯片实现步进电机的速度和位置定位控制。步进电机是将电脉冲信号转变为角位移或线位移的开环控制元件。在非超载的情况下,电机的转速、停止的位置只取决于脉冲信号的频率和脉冲数,而不受负载变化的影响,即给电机加一个脉冲信号,电机则转过一个步距角。这一线性关系的存在,加上步进电机只有周期性的误差而无累积误差等特点。使得在速度、位置等控制领域用步进电机来控制变的非常的简单。步进电机的调速一般是改变输入步进电机的脉冲的频率来实现步进电机的调速,因为步进电机每给一个脉冲就转动一个固定的角度,这样就可以通过控制步进电机的一个脉冲到下一个脉冲的时间间隔来改变脉冲的频率,延时的长短来具体控制步进角来改变电机的转速,从而实现步进电机的调速。
步进电机是数字控制电机,它将脉冲信号转变成角位移,即给一个脉冲信号,步进电机就转动一个角度,因此非常适合于单片机控制。
本设计采用89C52单片机为核心设计,L297和L298为驱动芯片,用单片机内部的定时器改变CP脉冲的频率时间对步进电机的转速控制,实现电机调速与正反转功能,并用数字灯和数码管显示当前状态。
【关键词】步进电机单片机 L297 L298
ABSTRACT
In the electrical era, the motor plays an important role in industrial and agricultural production and daily life. Stepper motor as the mon type of motor, a digital servo actuator, stepper motor has a simple structure, reliable operation, easy to control, good control performance, widely used C machine tools, robots, automatedinstrumentation areas. Generally based onsingle chip as the microprocessor control system for easy movement of the stepper motor control, speed and position of the stepper motor positioning control stepper motor-specific driver stepper motor is the electrical pulses into angular displacement or linear displacement of the open-loop the case of non-overloading, motor speed, the stop position depends only on the pulse frequency and pulse number, regardless of load changes, to the motor plus a pulse signal, the motor is turned to a step angle. The existence of this linear relationship, coupled with the characteristics of the stepper motor only periodic error without accumulated error. Makes the speed, position and control the stepper motor to control very simple. eneral of the stepper motor is to change the frequency of the pulse input stepper motor to achieve the speed control of stepper motor, stepper motors each toa pulse rotating a fixed angle, so that you can contro