您好,欢迎访问三七文档
当前位置:首页 > 机械/制造/汽车 > 电气技术 > -基于单片机的步进电机控制系统的设计 (1)
本科毕业设计基于单片机的步进电机控制系统的设计摘要随着自动控制系统的发展和对高精度控制的要求,步进电机在自动化控制中扮演着越来越重要的角色,区别于普通的直流电机和交流电机,步进电机可以对旋转角度和转动速度进行高精度控制。步进电机作为控制执行元件,是机电一体化的关键组成之一,广泛应用在各种自动化控制系统和精密机械等领域。步进电机是将电脉冲信号转变为角位移或线位移的开环控制元件。在非超载的情况下,电机的转速、停止的位置只取决于脉冲信号的频率和脉冲数,而不受负载变化的影响,即给电机加一个脉冲信号,电机则转过一个步距角。本系统介绍了一种基于单片机的步进电机控制系统的设计,包括了硬件设计和软件设计两部分。其中,硬件设计包括单片机最小系统、键盘控制模块、LCD显示模块、步进电机驱动模块、位置检测模块共5个功能模块的设计。系统软件设计采用C语言编写,包括主程序、数字键处理程序、功能键处理程序、电机驱动处理程序、显示模块、位置采集模块。本设计采用STC89C52单片机作为主控制器,4*4矩阵键盘作为输入,LCD1602液晶作为显示,ULN2003A芯片驱动步进电机。系统具有良好的操作界面,键盘输入步进电机的运行距离;步进电机能以不同的速度运行,可以在不超过最大转速内准确运行到任意设定的位置,可调性较强;显示设定的运行距离和实际运行距离;方便操作者使用。关键词:单片机步进电机液晶显示键盘驱动DesignoftheSteppingMotorControlSystemBasedonSCMQiuHaizhao(CollegeofEngineering,SouthChinaAgriculturalUniversity,Guangzhou510642,China)Abstract:Withthedevelopmentofautomaticcontrolsystemandtherequirementsofhigh-precisioncontrol,steppingmotorcontrolinautomationisplayinganincreasinglyimportantrole,differentfromthecommonDCandACmotor,steppermotorrotationangleandrotationalspeedcanbehigh-precisioncontrolled.Steppermotorasacontrolactuatorisakeycomponentofmechanicalandelectricalintegration,widelyusedinavarietyofautomatedcontrolsystemsandprecisionmachineryandotherfields.Steppermotoristheopen-loopcontrolcomponentschangingelectricpulsesignalsintoangulardisplacementorlineardisplacement.Inthecaseofnon-overloaded,themotorspeed,stoppositiondependsonlyonthepulsefrequencyandpulsenumber,regardlessofloadchanges,thatis,toaddapulsemotor,themotoristurnedastepangle.Thissystemintroducesadesignofsteppermotorcontrolsystembasedonsinglechipmicrocomputer,includinghardwaredesignandsoftwaredesignintwoparts.Amongthem,thehardwaredesign,includingsinglechipminimalsystem,keyboardcontrolmodule,LCDdisplaymodule,thesteppermotordrivemodule,positiondetectionmodulefivefunctionalmodules.SystemsoftwaredesignusingClanguage,includingthemainprogram,processnumberkeys,thekeyoffunctionprocesses,motordriverhandler,thedisplaymodule,positionacquisitionmodule.ThisdesignusesSTC89C52microcontrollerasthemaincontroller,4*4matrixkeyboardasaninput,LCD1602LCDasadisplay,ULN2003Achipassteppermotordriver.Systemhasagooduserinterface,keyboardinputsteppermotorrunningdistance;Steppermotorcanrunatdifferentspeed,andruntoanygivenpositionaccuratelyinanyspeedwithoutexceedingthemaximumspeed,withastrongadjustable;Displaytherunningdistanceandtheactualrunningdistance,whichismoreconvenientfortheoperatortouse.Keywords:SCMstepperLCDkeyboarddriverI目录1前言.................................................................................11.1步进电机的发展...................................................................11.2设计要求..........................................................................12系统方案分析与选择论证...........................................................12.1步进电机的选择...................................................................12.2步进电机驱动方案的选择.........................................................22.3显示方案的选择...................................................................32.3键盘方案的选择...................................................................32.3步进电机位置检测方案的选择.....................................................32.4整体方案..........................................................................43主要芯片介绍与硬件电路设计......................................................43.1单片机最小系统模块..............................................................43.1.1单片机介绍......................................................................43.1.2单片机最小系统.................................................................53.2键盘电路设计.....................................................................63.3显示模块..........................................................................73.3.1LCD1602介绍...................................................................73.3.2LCD1602电路图.................................................................73.4驱动模块..........................................................................83.4.1ULN2003A介绍.................................................................83.4.2驱动电路图......................................................................93.5位置检测模块.....................................................................93.5.1A3144E介绍.....................................................................93.5.2位置检测电路图................................................................114程序设计...........................................................................114.1主程序............................................................................114.2数字键处理程序..................................................................134.3功能键处理程序..................................................................13II5结论................................................................................14参考文献..............................................................................15附录...................................................................................16致谢...................................................................................27华南农业大学本科生毕业设计成绩评定表11前言1.1步进电机的发展步进电机最早是在1920年由英国人所开
本文标题:-基于单片机的步进电机控制系统的设计 (1)
链接地址:https://www.777doc.com/doc-6455084 .html