本科毕业设计题目:电动自行车控制系统设计院(系、部):机电工程学院学生姓名:指导教师:职称2012年5月22日河北科技师范学院教务处制HebeiNormalUniversityofScience&Technology专业:电气工程及其自动化学号:学术声明本人呈交的学位论文,是在导师的指导下,独立进行研究工作所取得的成果,所有数据、图片资料真实可靠。尽我所知,除文中已经注明引用的内容外,本学位论文的研究成果不包含他人享有著作权的内容。对本论文所涉及的研究工作做出贡献的其他个人和集体,均已在文中以明确的方式标明。本学位论文的知识产权归属于河北科技师范学院。本人签名:日期:指导教师签名:日期:摘要I摘要目前电动车中使用的电动机一般有直流电动机、感应电动机、开关磁阻电动机以及永磁无刷直流电动机等。无刷直流电机控制系统是一种新型的调速系统,具有良好的运行、控制及经济性能,有着巨大的发展潜力。无刷直流电机是利用电子换相替代机械换相和电刷,既具有直流电动机良好的调速性能,又具有交流电机结构简单、运行可靠、维护方便等优点,在众多领域中得到了广泛的应用。单片机控制的调速系统是电动自行车的控制核心,与无刷直流电动机共同构成电动自行车的动力驱动系统。永磁无刷直流电动机调速系统适用于电动自行车等小功率的工作情况,本文在对电动自行车调速系统进行深入分析的基础上,迎合市场对电动自行车的新需求,讨论并设计了价格低廉且具有转速检测、速度显示,声光报警等新型实用功能的电动自行车调速系统。系统各个部分的控制电路基于ATMEL公司的AVR系列ATmega88单片机。根据永磁无刷直流电动机的特性实施单极PWM脉宽调制,并通过位置传感器的输出情况控制电机换相,同时实现转速检测,并通过液晶显示器显示转速。通过软硬件的配合,实现整个系统的设计要求。主要工作如下:硬件部分包括电源电路、MOSFET驱动电路、转速及位置检测电路、PWM控制电路、电流检测电路、速度给定及显示电路、照明电路、保护电路等。软件部分采用模块化结构设计,给出了各模块的程序流程图。关键词:无刷直流电动机;脉宽调制;ATmega88单片机;位置传感器AbstractBrushlessDCmotor(BLDCM)isanewtypeofmotorthatgetsmuchpopularityinthepastfewyears.ItcombinesthecharacteristicsofACmotorandDCmotor.Therefore,ithasexcellenttimingcapability,highefficiency,simpleconfiguration,reliableoperation,andcanbecontrolledandmaintainedeasily.BLDCMhasbeenwidelyusinginvariousfields.SCMcontrolofspeedcontrolsystemofelectricbicycleisthecontrolcore,andbrushlessDCmotoriscomposedofelectricbicycledrivesystem.permanentmagnetbrushlessDCmotorspeedcontrolsystemusedinelectricbicyclesandotherlow-powerwork,Basedontheelectricbicyclespeedcontrolsystembasedonthethoroughanalysis,tomeetthenewdemandsofmarketforelectricbicycles,discussinganddesigningoflowpricesandwithspeeddetection,speeddisplayutilityfunction,thesoundandlightalarmoftheelectricbicycledrivesystem.VariouspartsofthesystemcontrolcircuitbasedonATMEL'sAVRseriesATmega88mcu.AccordingtothepermanentmagnetbrushlessDCmotorunipolarpulsewidthmodulationcharacteristicsofPWMimplementation,andthroughthepositionsensorsothat摘要IIthemotorcommutation,andindirectrealizationofspeedtesting,andthroughdigitaltubedisplayspeed,throughhardwareandsoftwaresupport,realizethewholesystemdesignrequirements.Themainworkisasfollows:thehardwarepartcomprisesapowercircuit,drivecircuitforMOSFET,PWMcontrolcircuit,currentdetection,speedanddisplaycircuit,Lightingcircuit,andprotectioncircuit.Thesoftwarepartadoptsthemodulestructure,drawthemoduleflowchartofprogramdesignandintroducesthesoftwaredesignconsiderations,isakindofhighperformancebrushlessDCmotorspeedcontrolsystemdesign.Keywords:BrushlessDCmotor;pulsewidthmodulation;ATmega88;positionsensor河北科技师范学院2012届本科毕业设计1目录摘要.....................................................................IAbstract..................................................................I引言......................................................................21无刷直流电动机的结构及原理..............................................32系统总体结构及工作原理..................................................43控制系统硬件电路........................................................53.1单片机........................................................................................................................53.2转子位置及转速检测电路........................................................................................73.3转速控制方法............................................................................................................83.4全桥逆变及功率驱动电路........................................................................................93.5电压检测及欠压保护电路......................................................................................123.6电流检测及过流保护电路......................................................................................123.7转速给定电路..........................................................................................................133.8电源电路..................................................................................................................143.9速度、报警显示电路..............................................................................................153.10照明电路................................................................................................................163.11欠压、过流报警电路............................................................................................163.12刹车电路................................................................................................................174控制系统的软件设计.....................................................174.1系统主程序设计......................................................................................................174.2电子换相程序设计..................................................................................................184.3速度和电流控制子程序..........................................................................................194.4AD转换采样程序设计.............................................................................................194.5语音报警程序设计..................................................................................................205.总结...................................................................20参考文献...............................