单片机控制伺服电机设计(带单片机程序及电路)

整理文档很辛苦,赏杯茶钱您下走!

免费阅读已结束,点击下载阅读编辑剩下 ...

阅读已结束,您可以下载文档离线阅读编辑

资源描述

程设计说明书题目:基于单片机的步进电机控制系统设计课程:机电一体化系统设计姓名:马福德学号:0804705030指导教师:段广云、俞学兰专业年级:机械设计制造及其自动化(机械电子工程方向)2008级所在院系:机械工程学院完成日期:2011年7月10日答辩日期:2011年7月11日摘要随着微电子和计算机技术的发展,步进电机的需求量与日俱增,它广泛用于打印机、电动玩具等消费类产品以及数控机床、工业机器人、医疗器械等机电产品中,其在各个国民经济领域都有应用。研究步进电机的控制系统,对提高控制精度和响应速度、节约能源等都具有重要意义。步进电机是一种能将电脉冲信号转换成角位移或线位移的机电元件,步进电机控制系统主要由步进控制器,功率放大器及步进电机等组成。采用单片机控制,用软件代替上述步进控制器,使得线路简单,成本低,可靠性大大增加。软件编程可灵活产生不同类型步进电机励磁序列来控制各种步进电机的运行方式。本设计是采用AT89C51单片机对步进电机的控制,通过IO口输出的时序方波作为步进电机的控制信号,信号经过芯片AT6560AHQ驱动步进电机;同时,用4个按键来对电机的状态进行控制,并用数码管动态显示电机的转速。系统由硬件设计和软件设计两部分组成。其中,硬件设计包括AT89C51单片机的最小系统、电源模块、键盘控制模块、步进电机驱动模块、数码显示模块、测速模块(含霍尔片UGN3020)6个功能模块的设计,以及各模块在电路板上的有机结合而实现。软件设计包括键盘控制、步进电机脉冲、数码管动态显示以及转速信号采集模块的控制程序,最终实现对步进电机转动方向及转动速度的控制,并将步进电机的转动速度动态显示在LED数码管上,对速度进行实时监控显示。软件采用在Keil软件环境下编辑的C语言。本系统具有智能性、实用性及可靠性的特点。关键词:步进电机,单片机,电脉冲信号,角位移,转速控制,方向控制ABSTRACTWiththedevelopmentofmicroelectronicsandcomputertechnology,increasingdemandforsteppermotor,whichiswidelyusedinprinters,electronictoysandconsumerproductssuchasCNCmachinetools,industrialrobots,medicalequipmentandelectricalproducts,anditsvariousnationalfieldsareapplied.Ofsteppermotorcontrolsystemtoimprovethecontrolaccuracyandresponsespeed,energyconservationandsoimportant.Steppermotorisanelectricpulsesignalscanconverttheangulardisplacementorlineardisplacementofthemechanicalandelectricalcomponents,steppermotorcontrolsystemconsistsofsteppercontroller,steppermotorpoweramplifierandsoon.UseMCUcontrol,thesteppercontrollerinsteadofusingsoftwaretomakesimplecircuit,lowcost,reliabilitygreatlyincreased.SoftwareprogrammingflexibilitytoproducedifferenttypesofsteppingmotorexcitationsequencetocontroltheoperationofthevarioussteppermotormodeThisdesignisusedAT89C51ofSteppingmotorcontrol,throughtheIOportasasquarewaveoutputofthetimingofstepmotorcontrolsignal,thesignalthroughtheULN2003driverchipsteppermotor;thesametime,withfourbuttonstothestatusofthemotorcontrol,anddynamicdisplaywithdigitalcontrolmotorspeed.Systemconsistsofhardwareandsoftwaredesignoftwoparts.Amongthem,thehardwaredesign,includingminimumsystemAT89C51microcontroller,powersupplymodule,keyboardcontrolmodule,steppermotordrive(integratedDarlingtonULN2003)module,digitaldisplay(SM420361Kdigitalcontrol)module,speedmodules(includingtheHallprobeUGN3020)sixfunctionmodules,andeachmoduleinthecircuitboardtoachievetheorganiccombination.Softwaredesign,includingkeyboardcontrol,steppingmotorpulse,thedigitaldynamicdisplayandspeedsignalacquisitionmodule,controlprocedures,andultimatelytothesteppermotorrotationdirectionandrotationspeedcontrolofsteppermotorrotationspeedanddynamicdisplayintheLEDdigitaltube,real-timemonitoringofthespeeddisplay.SoftwareusedinthesoftwareenvironmenttoeditKeilClanguage.Thissystemhastheintelligence,practicalityandreliabilityfeatures.KeyWords:Steppingmotor,MCUPulseSignal,Angulardisplacement,Speedcontrol,Directioncontrol目录1绪论.....................................................................................................................................................................11.1背景.............................................................................................................................................................11.2设计任务及要求..........................................................................................................................................12总体方案设计.....................................................................................................................................................22.1方案设计.....................................................................................................................................................22.2芯片选择.....................................................................................................................................................22.2.1CPU的芯片选择..................................................................................................................................22.2.2驱动电路的芯片选择.....................................................................................................................32.2.3测试电路的芯片选择.........................................................................................................................63系统硬件设计.....................................................................................................................................................73.1电机驱动电路.............................................................................................................................................73.2测试及显示电路..........................................................................................................................................83.2.1CS3020霍尔传感器测试电路............................................................................................................83.2.2LED数码显示管..................................................................................................................................83.3电源.................................................................................................

1 / 30
下载文档,编辑使用

©2015-2020 m.777doc.com 三七文档.

备案号:鲁ICP备2024069028号-1 客服联系 QQ:2149211541

×
保存成功