I基于MSP430步进电机控制器的设计摘要随着微电子和计算机技术的发展,步进电机的需求量与日俱增,它广泛用于打印机、电动玩具等消费类产品以及数控机床、工业机器人、医疗器械等机电产品中,其在各个国民经济领域都有应用。研究步进电机的控制系统,对提高控制精度和响应速度、节约能源等都具有重要意义。本设计是采用MSP430单片机对步进电机的控制,通过I/O口输出的时序方波作为步进电机的控制信号,信号经过芯片ULN2003驱动步进电机;同时,用4个按键来对电机的状态进行控制,并用数码管动态显示电机的转速。系统由硬件设计和软件设计两部分组成。其中,硬件设计包括MSP430单片机的电源模块、键盘控制模块、测速模块、步进电机驱动(集成达林顿ULN2003)模块、数码显示(SM420361K数码管)模块6个功能模块的设计,以及各模块在电路板上的有机结合而实现。软件设计包括键盘控制、步进电机脉冲、数码管动态显示以及转速信号采集模块的控制程序,最终实现对步进电机转动方向及转动速度的控制,并将步进电机的转动速度动态显示在LED数码管上,对速度进行实时监控显示。软件采用在IARforMSP430软件环境下编辑的C语言。本系统具有智能性、实用性及可靠性的特点。关键词:步进电机MSP430单片机角位移转速控制方向控制IIAbstractWiththedevelopmentofmicroelectronicsandcomputertechnology,increasingdemandforsteppermotor,whichiswidelyusedinprinters,electronictoysandconsumerproductssuchasCNCmachinetools,industrialrobots,medicalequipmentandelectricalproducts,anditsvariousnationalfieldsareapplied.Ofsteppermotorcontrolsystemtoimprovethecontrolaccuracyandresponsespeed,energyconservationandsoimportant.ThisdesignisusedMSP430ofSteppingmotorcontrol,throughtheIOportasasquarewaveoutputofthetimingofstepmotorcontrolsignal,thesignalthroughtheULN2003driverchipsteppermotor;thesametime,withfourbuttonstothestatusofthemotorcontrol,anddynamicdisplaywithdigitalcontrolmotorspeed.Systemconsistsofhardwareandsoftwaredesignoftwoparts.Amongthem,thehardwaredesign,includingminimumsystemMSP430microcontroller,powersupplymodule,keyboardcontrolmodule,steppermotordrive(integratedDarlingtonULN2003)module,digitaldisplay(SM420361Kdigitalcontrol)module,speedmodules(includingtheHallprobeUGN3020)sixfunctionmodules,andeachmoduleinthecircuitboardtoachievetheorganiccombination.Softwaredesign,includingkeyboardcontrol,steppingmotorpulse,thedigitaldynamicdisplayandspeedsignalacquisitionmodule,controlprocedures,andultimatelytothesteppermotorrotationdirectionandrotationspeedcontrolofsteppermotorrotationspeedanddynamicdisplayintheLEDdigitaltube,real-timemonitoringofthespeeddisplay.SoftwareusedinthesoftwareenvironmenttoeditIARforMSP430Clanguage.Thissystemhastheintelligence,practicalityandreliabilityfeatures.KeyWords:SteppingmotorMSP430AngulardisplacementSpeedcontrolDirectioncontrolIII目录摘要.............................................................................................................................................I第一章绪论.................................................................................................................................11.1课题背景...............................................................................................................................11.2国内外发展现状...................................................................................................................11.3本文设计的任务...................................................................................................................3第二章系统概述...........................................................................................................................42.1系统的总体框架...................................................................................................................42.1.1系统的组成....................................................................................................................42.1.2系统的工作原理.............................................................................................................52.2系统的主要功能...................................................................................................................52.2.1步进电机的主要功能....................................................................................................52.2.2系统的特点....................................................................................................................53.1MSP430系列单片机简介.....................................................................................................63.1.1MSP430系列单片机功能特性......................................................................................63.1.2MSP430系列单片机的应用..........................................................................................83.2MSP430F149型单片机........................................................................................................83.2.1MSP430F149的引脚图..................................................................................................83.2.2MSP430F149的微处理器CPU.....................................................................................93.2.3工作方式.........................................................................................................................93.3步进电机.............................................................................................................................113.3.1步进电机概述..............................................................................................................113.3.2步进电机的特性..........................................................................................................113.3.3步进电机的种类..........................................................................................................123.3.4永磁步进电机的控制原理.....................................