您好,欢迎访问三七文档
成绩课程设计报告设计题目步进电机控制系统设计课程名称计算机控制技术B姓名郭苗苗学号2011001226班级自动化1102教师闫高伟设计日期2014年7月2日I步进电机控制系统设计摘要此次课程设计采用的实验设备为实验室的TDN-AC/ACS计算机控制技术实验箱中的35BYJ46型四相八拍步进电机为对象,设计以8088CPU为核心的步进电机控制系统。通过硬件电路和软件算法两方面的设计,使步进电机实现变速运转以及正反转。所谓步进,就是指每给步进电机一个递进脉冲,步进电机各绕组的通电顺序就改变一次,即电机转动一次。关于转向与转速,通过查表的方式实现,以逐次递增方向查表,依次输出表中数据,则步进电机正转;以逐次递减方向查表,则步进电机反转,即通过一个表实现步进电机的正转与反转。转速则通过调用延时子程序,当调用延时较长的子程序时,则步进电机转速慢,当调用延时较短的子程序时,步进电机转速加快。8088为16为CPU,通过可编程接口芯片8255A与驱动器ULN2803连接进而驱动四相八拍步进电机的运转,改变延时时间进而改变步进电机的转速,改变步进模型即可实现电机的正反转。经过软件的不断编程与反复调试,控制效果达到良好的状态。步进电机种类繁多,步距角各不相同,作为控制系统的执行原件具有快速启停、精确步进、直接接受数字量控制等优良特点。关键词:步进电机;8255;8088CPU;流程图;源程序;变速;正反向IISteppermotorcontrolsystemdesignsummaryThecoursedesignoftheexperimentalequipmentforlaboratoryTDN-AC/ACSincomputercontroltechnologyexperimentboxtype35byj46fourphaseeightstepmotorasanobject,designedwith8088CPUasthecoreofsteppingmotorcontrolsystem.Throughthedesignofthetwoaspectsofhardwarecircuitandsoftwarealgorithm,thesteppermotortorealizevariablespeedandpositive&negativeoperation.So-calledstepbystep,isreferstoeachtoaprogressivepulsesteppermotor,steppingmotor'swindingcurrentorderwillchangeagain,themotorrotation.Aboutthesteeringandspeed,bywayoflook-uptable,tablelookupinsuccessiveincrementaldirection,inturn,theoutputdatainthetable,wasasteppingmotor;Look-uptableindecreasesdowndirection,thestepmotorreversal,byatabletorealizethesteppermotor'sforwardandinversion.Speedisbycallingthedelaysubroutine,whencalldelaylongersubroutine,thesteppermotorspeedisslow,whenshortcalldelaysubroutine,thesteppingmotorspeedfaster.8088to16forCPU,throughtheprogrammableinterfacechip8255aanddriveULN2803connection,inturn,drivefourphaseeightstepmotoroperation,changethedelaytime,inturn,changethespeedofthesteppermotor,stepintothemodelofthemotorcanberealizedandreversing.Throughsoftwareprogramminganddebuggingrepeatedly,thecontroleffecttoachieveagoodcondition.TherearemanydifferentkindsofsteppingmotorandstepawayfromtheAngleofeacharenotidentical,astheexecutionoftheoriginalcontrolsystemhasfastandstopping,accuratestepping,directlyforexcellentcharacteristicssuchasdigitalvolumecontrol.KeyWords:Steppermotor;8255;8088CPU;flowcharts;sourceprogram;Variablespeed;direction目录摘要····························································ISummary····························································II第1章设计内容··················································1第2章设计目的与要求·············································22.1设计目的····················································22.2设计要求····················································22.2.1硬件·················································22.2.2软件·················································2第3章硬件系统的基本原理········································33.1步进电机35BYJ46············································33.1.1励磁线圈及励磁顺序···································33.1.2工作原理·············································43.1.3步进电机转速·········································53.1.4步进电机与8255A接口关系·····························53.2驱动单元ULN2803············································73.2.1原理图················································73.2.2驱动原理··············································73.38088CPU····················································83.3.18088CPU结构图········································83.3.28088内部结构具体介绍·································83.3.3具体应用··············································93.48255A可编程并行接口芯片····································93.4.18255A简介············································93.4.28255A的编码与工作方式选择···························103.4.38255A的端口地址编码·································12第4章软件设计··················································134.1步进电机模型地址···········································134.2程序流程图·················································144.3中断程序流程图·············································15第5章实现正反转及变速的操作过程································165.1软件操作··················································165.1.1由正转到反转········································165.1.2变速的实现··········································165.2硬件操作实现··············································16第6章总结·····················································17参考文献·······················································17附录1仿真原理图···············································18附录2实验外部接线图···········································18附录3实验结果图···············································19附录4程序清单·················································201第1章设计内容采用TDN-AC/ACS计算机控制技术实验箱中的35BYJ46型四相八拍步进电机为对象,设计以8088为核心的步进电机控制系统。要求用软、硬件实现电机的正反转以及变速。根据课题要求,用可编程并行接口芯片8255A组成控制系统,控制步进电机正转、反转以及转速控制,步进电机不能直接由8255驱动,而需要用相应的芯片驱动,因此,控制系统直接控制电机驱动即可控制步进电机。2第2章设计目的与要求2.1设计目的(1)掌握四相八拍步进电机的控制方法,通过硬件和软件两方面构造一个简单实用的步进电机控制系统。(2)掌握微机原理程序设计方法及汇编语言在硬件编程方面的应用,达到运用所学知识来应用于实践的目的。(3)培养学生查阅资料、使用工程设计标准、手册及编写设计技术的能力。(4)培养初步掌握设计开发产品的能力,了解微机控制系统的一般设计方法。2.2设计要求2.2.1硬件要求设计电路,使其能够驱动步进电机转动,所需元件及器材由实验值提供,其中步进电机为35BYJ46型四相八拍电机,电压为DC12V,8088CPU为基础,以8255为接口芯片,电源取自实验箱。根据相应状态,利用数码管完成输出显示。数据的输入采用键盘或者实验箱上的旋钮,输出采用实验箱上的8255单元完成。2.2.2软件要求编写程序,控制步进电机的运转,要求可调整步进电机运转的方向和速度。选择合适的设计
本文标题:微机课设
链接地址:https://www.777doc.com/doc-5740222 .html