武汉工程大学邮电与信息工程学院毕业设计(论文)1摘要步进电机是一种通过电脉冲信号控制相绕组电流实现定角转动的机电元件,与其他类型电机相比具有易于开环精确控制、无积累误差等优点,在众多领域中获得了广泛的应用。为了得到性能优良的控制结果,出现了很多步进电机控制系统,其中采用单片机作为控制核心的控制系统得到了广泛的应用。很多这种控制系统在步进电机的驱动上已经做的非常好,比如细分驱动技术,但是有的系统比较复杂,和一些相对比较简单的控制过程不相吻合,投入上也不经济;有的系统在操作上不是很方便,交互性不强。而且,有感于目前的职业教育的专业教材各种技术太过经渭分明,由此带来的实习也是比较零散,没有把一些在工程实践中应该结合在一起的技术有机结合起来,因此本文的研究内容就是设计一套硬件系统较简单、经济,但功能较为齐全,适应性强,操作方便,可靠性高的,能够有机地把电子技术、单片机技术、电机的控制技术结合起来步进电机控制系统。本文首先简要描述了步进电机的发展、应用情况、以及常见的控制系统采用的方案,常见的驱动技术,而且还分析了步进电机的工作原理,然后以单片机为主控制器提出了整个系统的硬件设计方案,在此基础上对各个模块的电路进行详细的设计,接着阐述了步进电机程序的设计。关键词:步进电机、单片机、看门狗武汉工程大学邮电与信息工程学院毕业设计(论文)2AbstractSteppingmotorisakindofcontrolledbyelectricalpulsesignalphasewindingcurrenttoachievefixedanglerotatingelectromechanicalcomponents,comparedwithothertypesofmotorcontrolwitheasy-to-open-loopprecision,noaccumulationoferroroftheadvantages,hasbeenwidelyusedinmanyfields.Inordertoobtaingoodcontrolperformanceresults,therehasbeenalotofsteppingmotorcontrolsystem,whichadoptssinglechipasthecontrolofthecontrolsystemhasbeenwidelyapplied.Alotofthiscontrolsystemhasbeeninthedriveofstepmotorisverygood,suchassubdivisiondrivingtechnology,butsomeofthesystemismorecomplex,andsomerelativelysimplecontrolprocessdonotcoincide,investmentisnottheeconomy;somesystemsintheoperationisnotveryconvenient,donothaveastronginteraction.Moreover,professionalteachingtechniquesinoccupationeducationatpresenttooclearbyWei,practicetheresultingisscattered,notputsomeintheengineeringpracticeshouldbecombinedorganicallyintogether,thereforetheresearchcontentofthispaperistodesignasetofhardwaresystemissimple,economic,butthefunctioniscomplete,strongadaptability,convenientoperation,highreliability,canorganicallyintegrateelectronictechnology,singlechiptechnology,motorcontroltechnologyofsteppingmotorcontrolsystem.Thispaperbrieflydescribesthedevelopmentofthescheme,thesteppermotorapplications,aswellasthecommoncontrolsystem,drivingtechnologyiscommon,butalsoanalyzedtheworkingprincipleofsteppingmotor,andthenbythemicrocontroller.Thehardwaredesignschemeofthesystem,detaileddesignonthebasisofeachmodulethecircuit,thenelaboratedthedesignofsteppermotorprogram.Keywords:SteppingMotor,SCM,WatchDog武汉工程大学邮电与信息工程学院毕业设计(论文)3目录摘要---------------------------------------------------------------------------------------------------------------------------1Abstract--------------------------------------------------------------------------------------------------------------------------2目录------------------------------------------------------------------------------------------------------------------------------3第一章绪论-------------------------------------------------------------------------------------------------------------------41.1课题背景------------------------------------------------------------------------------------------------------------41.2主要研究工作------------------------------------------------------------------------------------------------------4第二章单片机基础知识及选择------------------------------------------------------------------------------------------52.1单片机应用发展简介---------------------------------------------------------------------------------------------52.2单片机选择---------------------------------------------------------------------------------------------------------6第三章步进电机基础知识及选择---------------------------------------------------------------------------------------73.1步进电机工作原理------------------------------------------------------------------------------------------------73.2步进电机的选择---------------------------------------------------------------------------------------------------83.3步进电机各指标和参数------------------------------------------------------------------------------------------9第四章系统的硬件设计--------------------------------------------------------------------------------------------------124.1系统设计方案----------------------------------------------------------------------------------------------------124.2单片机最小系统-------------------------------------------------------------------------------------------------134.3串口通信模块-----------------------------------------------------------------------------------------------------184.4数码管显示电路设计-------------------------------------------------------------------------------------------184.5步进电机驱动电路----------------------------------------------------------------------------------------------224.6电源电路----------------------------------------------------------------------------------------------------------254.7键盘电路-----------------------------------------------------------------------------------------------------------26第五章控制系统软件设计----------------------------------------------------------------------------------------------295.1软件系统设计原则----------------------------------------------------------------------------------------------295.2步进电机控制系统功能设计---------------------------------------------------------------------------------295.3主程序设计-------------------------------------------------------------------------------------------------------305.4显示程序设计--------------------------------------------