基于单片机的步进电机控制系统设计摘要鉴于步进电机内部控制方式为低成本的开环控制,与伺服电机控制和步进电机最显著区别在于成本低、开发周期短、系统简单,广泛应用于智能家居、办公自动化设备和自动化生产和运输场合。特别是随着近年来工业自动化水平的不断提高和微机电技术的不断发展,小型轻便办公设备、家用电器、生活小电器、医疗器械、小型按摩理疗仪、电动玩具等消费类产品层出不穷,多样的使用需求对步进电机的外形尺寸大小、控制精度、响应速率、稳定性、负载力、能耗都提出了较高的要求。步进电机对外输出性能的优劣主要取决于步进电机控制系统的设计是否合理。一套完整的步进电机控制系统通常包括步进控制器,功率放大器和步进电机3个主要模块。单片机因为具有耗电量低、可靠性好、运行速率快、使用寿命长等显著优势而成为现阶段自动控制领域最常用的系统开发集成工具。基于单片机的步进电机控制器具有电路简单、成本低、稳定性好、控制精度高等特点,成为当下最火热的步进电机控制方式。本研究中首先详细介绍了基于51单片机的数据转换、驱动与控制原理,在此基础上完成了基于STC89C51单片机的步进电机控制系统设计。所设计的步进电机控制系统主要包括AT89C51、ULN2003芯片和个数码,结构简单、功能齐全、稳定性好、可靠度高。不仅具备十个不同档位的备选速度和正反转功能,还能够通过数码管实时显示步进电机运行状态。关键词:步进电机,单片机,正反转控制,电机驱动IABSTRACTSteppermotorduetotheuseofthecompositionoftheopen-loopsystemissimple,cheap,andverypractical,soitisusedwidelyinmanyfieldsofprinterandotherofficeautomationequipmentandvariouscontroldevice.Inparticular,withthecontinuousimprovementofindustrialautomationlevelandthecontinuousdevelopmentofmicroelectromechanicaltechnologyinrecentyears,smallportableofficeequipment,householdappliances,smalllivingappliances,medicalinstruments,smallmassagephysiotherapyapparatus,electrictoysandotherconsumerproductsemergeinendlessly,andthevarietyofusedemandfortheshapeandsizeofthesteppingmotor.Thecontrolprecision,responsespeed,stability,loadcapacityandenergyconsumptionallputforwardhigherrequirements.Steppermotorisapulsesignalcanbeconvertedintomechanicalangulardisplacementorlinedisplacementcomponents,steppermotorcontrolsystemiscomposedofsteppingcontrollercomposedofapoweramplifier,andsteppingmotor.Usingsinglechipmicrocomputercontrol,usingsoftwareinsteadoftheabovestepcontroller,thecircuitissimple,lowcost,reliabilityisimprovedgreatly.Softwareprogrammingflexibilitytoproduceoperationmodeofdifferenttypesofsteppermotorexcitationsequencetocontrolallkindsofsteppermotor.ThisdesignistheuseofSTC89C51microcontrollertocontrolthesteppingmotor,temporalsidethroughtheI/Oportoutputwaveasthecontrolsignalofstepmotor,thesignalthroughthechipULN2003todrivethesteppermotor.Accordingtodifferentneeds,wecanhavetendifferentgearspeedselection,andtherealizationofpositiveinversion.Inordertobemorehumanized,weaddedadigitaldisplay,displaytheoperatingstateofthesteppingmotor.Keywords:Steppingmotor;single-chipmicrocomputer;positiveinversioncontrol;motordriveII目录1引言........................................................................................................11.1步进电机及其发展............................................11.2步进电机在我国的发展应用及前景..............................21.3本研究的主要内容及意义......................................32步进电机控制总系统设计....................................................................32.1系统框架....................................................42.2主控芯片选择.....................................