您好,欢迎访问三七文档
基于霍尔传感器的电机转速测量系统软件设计摘要在生产过程中,电机的应用十分广泛,随着生产的不断发展,对电机转速的测量就显得十分必要,同时对电机转速的测量提出了更高的要求。本文设计了一种以51单片机作为主控制器,使用霍尔传感器进行测量的直流电机转速测量系统。本系统采用集成霍尔传感器敏感速率信号,具有频率响应快,抗干扰能力强等特点。文章介绍了霍尔传感器的工作原理,阐述了霍尔传感器测速系统的工作过程,利用脉冲计数法实现了对转速的测量,通过LCD直观地显示电机的转速值。结合硬件电路设计,采用模块化方法进行了软件设计。编制了电机转速的测量设计了测量模块、转速模块、报警模块、显示模块等的C51程序,并通过PROTEUSE软件进行了仿真。仿真结果表明所设计的软件程序是正确的。关键词:霍尔传感器;单片机;电机转速测量;液晶显示。SoftwareDesignofMotorSpeedMeasurementSystemBasedonHallSensorAbstractIntheproductionprocess,themotorsarewidelyusedasproductioncontinuestodevelop,measuringthemotorspeedbecomesnecessary,whilemotorspeedmeasurementputforwardhigherrequirements.Thismeasurementsystemisadesignofamicrocomputer51astheprimarycontroller,theHallsensorasasensortomeasuretheDCmotorspeed.ThesystemusesanintegratedHallsensorsensitivityrateofthesignalwithafrequencyoffastresponse,anti-interferenceabilityandsoon.TheworkingprincipleoftheHallsensorwasintroducedinthispaper.Theworkingprocesswasdescribed.Itisusedpulse-countingmethodtoachievethemeasurementofspeed,andtodisplaymotorspeedvaluesthroughanintuitiveLCD.Combinationofhardwarecircuitdesign,softwaresweredesignedbyamodularapproachusingC51program,suchasthemotorspeedmeasurementmodule,alarmmodule,displaymoduleetc.,AlltheseprogramsweresimulatedthroughPROTEUSE.Simulationresultsshowthatthedesignedsoftwareprogramsarecorrect.Keywords:Hallsensor;microcontroller;SpeedMeasurement;LCD.目录1绪论.....................................................................11.1立题的目的和意义......................................................11.2应用与发展前景........................................................11.3设计任务与要求........................................................21.3.1设计任务..........................................................21.3.2设计要求..........................................................21.4小结..................................................................22课题方案设计..............................................................32.1系统总体设计要求......................................................32.2系统模块结构论证......................................................32.2.1霍尔测速模块论证与选择............................................32.2.2计数器模块论证与选择..............................................32.2.3显示模块论证与选择................................................32.2.4报警模块论证与选择................................................42.2.5电源模块论证与选择................................................42.2.6单片机模块论证与选择..............................................42.3转速测量方案论证......................................................42.3.1方案一电机轴一侧贴磁片............................................52.3.2方案二电机转轴加测速转盘..........................................52.3.3方案对比..........................................................52.4小结..................................................................53系统总体设计..............................................................63.1总体硬件设计..........................................................63.1.1硬件原理图........................................................63.1.2硬件电路设计总图..................................................63.2系统子模块简介........................................................73.2.1传感器部分........................................................83.2.2计数器............................................................83.2.3处理器............................................................83.2.4LCD显示部分.......................................................83.2.5外接报警部分......................................................84软件设计.................................................................104.1程序设计步骤.........................................................104.2程序流程图...........................................................104.2.1主程序流程图.....................................................114.2.2中断服务流程图...................................................124.3软件程序设计.........................................................144.3.1主程序设计.......................................................144.3.2中断服务程序设计.................................................164.3.3显示程序设计.....................................................164.3.4报警程序设计.....................................................184.3.5转速程序的设计...................................................184.3.6软件程序基础知识准备.............................................195软件调试.................................................................205.1PROTEUS及KEIL软件简介................................................205.1.1Proteus软件......................................................205.1.2KEIL软件.........................................................205.2应用KEIL软件进行程序调试............................................215.3PROTEUS软件仿真.......................................................215.3.1仿真步骤.........................................................215.3.2仿真实例.........................................................225.4硬件软件联合调试.....................................................255.4.1联调步骤.........................................................255.4.2搭接检查步骤.....................................................266结论.............................
本文标题:霍尔传感器测速系统
链接地址:https://www.777doc.com/doc-5214361 .html