APP下载

基于PIC16F873单片机的步进电机控制系统

2010-05-13黄法,孔秀华

现代电子技术 2009年12期

黄 法,孔秀华

摘 要:单片机控制步进电机具有功能灵活多样,脉冲输出准确,实时性强等特点,已被越来越广泛地应用在各种不同的运动控制系统中。该设计使用PIC16F873单片机,可以通过键盘输入数据与指令,并能通过旋钮方便地实现电机的连续调速,实时设置与显示步进电机的工作方式。采用一种升降速曲线的优化方法,解决步进电机在升降速过程中脉冲频率的变化不合理,使系统无法做到精确定位的问题;优化步进电机的驱动电路,采用硬件、软件抗干扰技术措施,使整个系统工作稳定可靠。

关键词:PIC16F873;ZLG7289A;升降速曲线的优化;抗干扰技术;控制系统

中图分类号:TM383.6;TP368.1 文献标识码:A

文章编号:1004-373X(2009)12-175-04

Stepping Motor Control System Based on PIC16F873 MCU

HUANG Fa1,KONG Xiuhua2

(1.Training Center for Vocational Skills,Weihai Vocational College,Weihai,264210,China;

2.Shandong Jiaotong University,Weihai,264200,China)

Abstract:Stepping motor controlled by single chip computer is applied widely in various motion control system because of the characteristics of flexible function,accurate outputting pluse and strong real-time etc.PIC16F873 is used in the design,stepping motor speed can be changed by data and instructions entered through the keyboard and can be continuously changed by rotating button,working mode and setting of motor is real-time displayed.The variation of unreasonable pulse frequency causes the matter that system can not realize accurate location in the course ofrise and fall-speed of stepping motor.The matter is solved by adopting an optimized method.Driving circuit of stepping motor is optimized,anti-interference technique is adopted in software and hardware.The whole system runs stably and reliably.

Keywords:PIC16F873;ZLG7289A;optimization of the rise and fall-speed;anti-interference technique;control system

0 引 言

单片机控制步进电机具有功能灵活多样,脉冲输出准确,实时性强等特点,通过软件设计可以实现各种复杂的控制,其系统成本较低,近些年来已被广泛应用在各种不同的运动控制系统中。

在实际应用中,若步进电机在升降速时,脉冲频率的变化不合理,就会使电机失步或者过冲,使系统无法做到精确定位;同时,由于系统快速性的要求,电机需要很快地完成加减速过程。

这里设计了基于PIC单片机的步进电机控制系统,分析快速性最好的指数型加减速曲线在实际系统中的应用规律,提出了一种升降速曲线的优化方法,采用了硬件、软件抗干扰技术措施。可以通过键盘输入数据与指令,并能通过旋钮方便地实现电机的连续调速,实时设置与显示步进电机的工作方式。……

登录APP查看全文