




版權說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權,請進行舉報或認領
文檔簡介
西安工程大學本科畢業(yè)設計(譯文)DesigningtheTestingandControllingInstrumentofthePhotoelectricRotatingSpeedSensorBasedonAT89C52Abstract-Aimingatthenecessityofperformancetestofphotoelectricrotatingspeedsensorandthelimitationoftraditionaltestinginstruments,byusingdual-processormodularstructureofAT89C52,anewtestinginstrumentisdesignedanddeveloped,whichisagenerationofadvancedinstrumentwithpracticalhighperformanceandhighreliability.Thephotoelectricrotatingspeedsensorisdrivenandtestedbytheinstrument.Thedriveandtestofthephotoelectricrotatingspeedsensorarcimplemented.Thehardwaredesignofdriveandtestcircusitmoduleintestingandcontrollinginstrumentareintroduced,andthesoftwaredesignisalsopresentedbydriveandtestcircuitproceduresofstepmotor.Thepracticalrunningindicatesthedevelopedtestingandcontrollinginstrumentimprovesworkingefficiencyandtestingobjectivereality,ithasdefinitelypracticalvalue.Keywords:Pulse;Sensor;Microprocessor;Stepmotor1IntroductionTQG15locomotivethePhotoelectricRotatingSpeedSensorsusedfordetectingthespeedofRailwaylocomotivevehiclewheel,itprovideselectricpulsesignalforlocomotiveelectriccontrolsystem,andisoneofthemainparametersofthelocomotivesafety,reliability,normalwork.ToensuretheTQG15locomotivephotoelectricrotationalspeedsensorqualityandperformance.Thetestisveryimportant.Thetraditionaldetectiondevicesarebasedonmanualoperation,onlyafewlimitedperformanceindicatorsofdetection,thereisahighprecisionandproductivitylowdisadvantages.Withthecontinuousdevelopmentofelectronictechnology,especiallytheSingle-chiptechnologyinintelligentinstrumentwidelyapplication,developmentanewgenerationofhighperformanceandpracticalthetestingandcontrollinginstrumentofthephotoelectricsensorisimperative.2TQG15locomotivethePhotoelectricRotatingSpeedSensor2.1StructureandworkingprincipleTQG15locomotivethePhotoelectricRotatingSpeedSensorconsistsoffulcrumbearinginstitutions、rotationshaftanduniversalunitedshaftdriving、optoelectronicconversioncircuitOptoelectronicconversioncircuit’sthecoreissmallcircuitboardswhichconsistsofgratingplateandphotosensitivetransistor,gratingplatefixedinthehingeshaftends,throughseven-corecabletoconnectasmallcircuitboardandtheexternalcircuit,Seven-corecableisdividedintotwogroupsAandB,eachgrouphasthreelines,twoofthelinestoadd15VDCpower,otheroutputpulsesignals.AfterTQG15locomotivethePhotoelectricRotatingSpeedSensorconnectedto15Vpowersupply,usinglight-emittingdiodes(leds)asthelightsource,gratingplaterotatingdrivenbythewheelshaft,becausetheblockingeffectofgratingplate,thusthelightsourcebecomesintermittentlight,thenleadthelightinterruptersphotosensitivetransistorswitchinterchangeablytoproducethepulsesignals,throughthemagnifyingcircuitreshaping,outputsquare-wavepulsethatitandspeedisproportional,inordertomeettheelectricalcontrolsystemoflocomotiveworkneeds.2.2PerformanceindexandtestcontenttheTestingandControllingInstrumentrequiredperformanceindexfor:Dcworkingpower:(15土15%)V,powerdissipationcurrentlessthan:50mA,outputpulseamplitude(Whentheloadresistoris3kH):high-level>9V,low-level<2V,phaseposition:90。土50%,rotationalspeedrange:0?1000r/min,thenumberofpulsespercirclc:200,thedutyfactorofoutputpulse:(50土20)%.theTestingandControllingInstrumentrequiredtestparametersfor:rotationalspeed、pulsenumber、Thelowesthigh-level、Thehighestlow-levelandthedutyfactorofpulse.3TheTestingandControllingInstrument’shardwaredesignTheAT89C52isalow-power,high-performanceCMOS8-bitmicrocontrollerwith8Kbytesofin-systcmprogrammableFlashmemoryand256bytesofRAM,thedevelopmentofinstrumentchosenAT89C52microcontroller.Accordingtotheworkprincipleofphotoclcctricsensor,themainperformanceindexesandtestcontent,theTestingandControllingInstrument’sgeneralprinciplestructureschematicinstrumentisshowninfigure1Fig.1HardwarestructureofmeasuringandcontrollinginstrumentItsworkingprocess:throughthekeyboardofinitializationandfunctionaftersetting,thenexecuteAT89C52applications,outputpulsesignal,drivesteppemotorandphotoelectricsensorsrotate,throughthesignalcircuitandA/Dconverter,thenphotoelectricsensoroutputpulsesignalsintodigitalsignals,intotheAT89C52microcontroller,afterdataprocessing,sendtomonitorandmicroprinteroutput.Stepmotorliftingspeedcontrolneedtwotimerinterrupthandling;Althoughphotoelectricspeedsensorpulsesignaltestcontentcanbeastep-by-stepprocess,butintestingdutyfactor、whentwochannel'sphasedifferenceisequal,allneedtwotimers.ButAT89C52Chipcanonlyprovidethreetimer/counter,theAT89C52singleresourcesarenotqualifiedforthetestingandcontrollinginstrument’sjob.Besides,inordertosimplifytheoperationofthetestingandcontrollinginstrumentanduse,thetestingandcontrollinginstrumentadoptsthedualstructureofAT89C52microprocessor,therefore,thetestingandcontrollinginstrumentofthephotoelectricrotatingspeedsensordividedintodrivecircuitandsignalmeasuringcircuittwofunctionalmodules.3.1DrivingcircuitmoduledesignInordertodrivephotoelectricsensorsrotateandeasilyadjustitsspeed,youneedtoselectsuitableforthesystemcharacteristicsandapplicationsofmotor,asthephotoelectricrotatingspeedsensor’spowerplant.sepmotorhasfourcharacters:①Stepangleandspeedsizeonlyandproportionaltothepulsefrequency;②Bychangingthesizeofthepulsefrequencyrangecanadjustmotorspeed;③Toachievequickstart-up,brake,inversion;④Highcontrolaccuracyandreliableoperation.Stepmotorcharacteristicsofthesefouraspects,applicabletothesystem,therefore,inthetestapparatus-drivenpartoftheselectionofthesteppermotorasapowerplant.Stepmotorisatypeofelectricpulseintoangulardisplacementofmotor,thepowertodrivebyspecialoffersaseriesofsteppingmotorwithcertainregularityofelectricalsignals,eachinputanelectricalpulse,itfurtherbeforesteppingmotor,itsangularandpulseproportionaltothenumberof,motorspeedproportionaltothepulsefrequency,rotatingspeedandrotatingdirectionareconnectedwitheachphasewindings’wayofelectricity[l].UseAT89C52MCUphotoelectricspeedsensordrivecircuitmodule,outputthedesiredfrequencypulsesignals,accordingtothefunctionrequirementofdrivecircuitandtheprincipleofsteppingmotor,thetestingandcontrollinginstrumentdrivermodulehardwareprincipleasshowninFigure2:Fig-2StructureschematicofdrivermoduleInFigure2forthesteppermotorspeedgradingcontrol.InAT89C52microcontrollerPIportpinaccesscontrol300,500,700and900fourspeed(r/min)workinthepress.TakeadvantageofsomeoftheP2portpindrivelight-emittingdiode,indicatesthecurrentstepmotorspeedsegment.While,P2.0tubefeetoutputsteppingmotorrequiredpulsesignal,controlsteppermotorswork.Besides,P1.6andP1.7pinusedtoimplementthedrivecircuitandtestcircuitofsimplecommunication,namelysteppermotorworkneededtospeed,takeadvantageofP1.6controltestcircuitryfortesting,whilethetestiscompleted,withP1.7controlsteppermotorcanworktothenextfile.3.2TestcircuitmoduledesignAccordingtothephotoelectricsensoroutputspeedclcctricpulsesignalcharacteristicsandtherequiredtestparameters,thetestingandcontrollinginstrumentofmeasurementcircuitmodulehardwareconfigurationasshowninFigure3Fig.3StructureschematicoftestcircuitFigure3themeasuringcircuitconsistsoffourparts:①Signalconditioningandacquisitioncircuit,thephotoelectricspeedsensor15VsquarewavesignalconvertingcanreceivetheCMOSAT89C52level,usedtomeasurephotoelectricsensor`sthenumberofpulses,pulsedutycycleandphaseparameters.Besides,usinghigh-performanceADCAD574Aachievepulsesignalhigh-lowamplitudemeasurement;②Switchcontrolcircuit,takeadvantageoftheP1portselectionthroughA,Bchannelpulsesignals;meetAandBchannelpulsesignaltestingwork;③TheI/Ocircuit,oneistousethekeyboardinputcircuitoftherelevantinformationaboutrealizingfunctionkeysofinitializationanddifferenttestcontent,thesecondistousetheLCDdisplaytheworkofthetestinstrumentintime,threeistheuseofmicro-printertoprintthetestresultsarchive.④SCMAT89C52,AT89C52isthecoreofthetestcircuit,toachievecoordinationofdatainput,output,operationandprocessing.4SoftwaredesignThesoftwaredesignbasedonthesystemfunction,performance,anduserrequirements,andadoptmodularizedstructureand”top-down”approachtodesignjob.Toimprovetheworkefficiency,run-timeminimizingmanualinterventionandaction,while,systeminitializationworkstatusonlineadjustable,intuitivedisplay,accordingtothetestingandcontrollinginstrumenthardwarestructurelayoutandfunctionalityrequirements,softwaredesigncontentmainlyincludesthestepmotordriverandsignaltestingtwobasicmodules,thefollowingisadescription.4.1StepmotordriverdevelopmentPhotoelectricsensorperformanceparametersofthetest,needamulti-levelspeeddrivenbyitsoutputsignalofelectricalimpulsesalongwithanyexceptionstothoseconditionstest.SteppingmotorspeedistheuseofmultistageAT89C52applicationsystem,bychangingthefrequencyofdrivenpulsetoimplementation,inadditionthereisalimittostartsteppingmotorandthefrequencyandmaximumworkingfrequency,thatis,theaccelerationanddecelerationexcessiveexist-problem,indevisingtheircontrolprogramistogivefullconsideration[2]AsshowninFigure4isinaccordancewiththerequirementsforthedesignofdrivingpartofthemainmoduleflowchart.Fig-4FlowchartofmaincontrolprogramforstepmotorWhendevelopingasteppermotordriver,youshouldalsodealwiththreeissues:first,ontheworkoftheStateflagofmotorplanningandapplication;thesecondisthesteppermotoraccelerationanddecelerationofdiscretetrancheandthecorrespondencebetweentheoperatingfrequency;thethirdisdeterminedbypulsefrequencyistheSCMtimerinterruptoutput,buttheinitialtimerinterruptresponseandthereisanadditionaldelayofMount,theprogramperformsprocessingnecessary[2].4.2SoftwaredevelopmentoftestingmodulesTestmodulesofsoftwareintothemonitoringprogramandtheinterruptserviceprogram,whereeachpartconsistsofanumberoffunctionalmodules.Monitormainlyincludesinitializationmodules,self-diagnosticsandtestmodule,displaymoduleandkeyscanningandprocessingmodule;interruptserviceprogrammainlyconsistsofA/Dconversion,dataread,timer,andclockhandlingfunctionmodule.Dependingonthetestcircuitfunctionalrequirements,whichmonitortheoverallprocessasshowninFigure5.Variousmonitoringmoduleofkeyfeaturesare:initializemoduleisusedtoinitializetheextensioninterface,internalRAMandSFR(specialfunctionregister)andworkstatusflag;testanddiagnosticmodule,usedtocheckthedatainputandoutputchannels,DACanddisplayhardwarecircuitisfunctional;displaymodule,usedtodisplaythetestworkparametersandtheworkoftheState;keyscanningandprocessingmodule,completekeyrecognitionandexecutionofthefunction,eachkeytosettheflags.Themainfunctionkeysandfunctionkeysforlotnumberisusedtosetthetestbatch;datekeyisusedtosetthetestdaychannelkeytogglestheA/Btestpulseoutputchannel;keysarcusedtoperformthetestingcapabilities;printkeycontrolminiatureprinteroutputtestreports.Fig.5FlowchartofmonitoringprogramDependingonthesystemneeds,pulsemoreperformanceindicatorsofmeasurement,isinthemaintestkeycontrolforitemizedtesting,testmoduletoprocessasshowninFigure6.Totesttheimplementationrequiresthecombinationofappropriatesubmodules,theinterruptserviceprogramandhardwarewiring.Fig.6OperationalflowchartoftestingmoduleTestmethodformainparameters:itsanumberofmeasurement,pulse,qualifiedgratingspareshouldopenwith200tanks,accordingtothesteppermotorspeed,youcandetermineadesiredtime,scheduledcounttotal;Secondly,thepulseofhighandlowlevelmeasurement,belongtotheanalogtest,theuseofpulseofrisingandfallingedgeastheinterruptflag,withA/Dconverter,convertstheanalogvoltagedigital;itsthree,dutycyclemeasurement,pulseinputtotheexternalinterruptinterface,withitsrisingandfallingedgecontroltwotimerstartandstop;fourth,twochannelphasedifferencemeasurement,inthephasedifferencefunctionkeysunderthecontrolofthecompleteswitchaboutwiring,makesA,Bchannelpulsesignalreceivedtwoexternalinterruptport,andthenuseatimertodetermineitslatency,combinedwithpulsesignalcyclecandeterminethephasedifferencebetweenthetwo.5conclusionThedevelopmentoftheTestingandControllingInstrumentofthePhotoelectricRotatingSpeedSensorwithdualmicroprocessorarchitecture,inthesystem'shardwareandsoftware,bothintermsofstructure,itscontroloperationssimpleandpractical,workperformanceandhighreliability.Theactualrunningshowsthatthedesignoftheinstrumenthashighutilityvalue.基于AT89C52的機車光電轉速傳感器測控儀設計摘要:針對光電轉速傳感器性能指標測試的必要性和傳統(tǒng)測試儀的局限性,引入AT89C52雙微處理器模塊結構,設計開發(fā)出先進而實的高性能、商可靠性的新一代光電轉速傳感器測控儀,實現(xiàn)光電轉速傳感器的驅動和測試工作。介紹測控儀驅動電路、測試電路模塊的硬件設計;并通過步進電機驅動程序和測試電路程序介紹軟件設計工作。實際運行表明,所開發(fā)的測控儀提升了工作效率和測試的客觀性,具有一定的實用價值。關鍵詞:脈沖;傳感器;微處理器;步進電動機1引言TQG15機車光電轉速傳感器是用于檢測鐵路機車車輛車輪轉速的光電式轉速傳感器,為機車電氣控制系統(tǒng)提供電脈沖信號,是機車安全、付靠、正常工作的主要參數(shù)之一。為保證TQG15機車光電轉速傳感器的質景和性能,其檢測工作至關重要。傳統(tǒng)的檢測裝置基于手工操作,只能進行幾個有限性能指標的檢測,存在精度不高和工作效率低等缺點。隨著電子技術的不斷發(fā)展,尤其是單片機技術在智能儀器儀表中的廣泛應用,開發(fā)新一代高性能而實用的光電傳感器測控儀勢在必行。2TQG15機車光電轉速傳感器2.1結構和工作原理TQG15機車光電轉速傳感器由支承機構、轉軸及萬向聯(lián)軸傳動機構、光電轉換電路系統(tǒng)三部分組成。光電轉換電路的核心是光柵盤和光敏二極管組成的小電路板,光柵盤固定在轉軸軸伸端部,通過七芯電纜連接小電路板和外接電路,七芯電纜分為A、B兩組,每組三根引線,其中兩根引線用于接15V直流電源;另一根用于輸出脈沖信號。 TQG15機車光電轉速傳感器接上15V電源后,利用發(fā)光二極管作為光源,光柵盤在車輪轉軸的帶動下而旋轉,由于光柵盤的遮擋作用,從而使光源變?yōu)閿嗬m(xù)光,致使光斷續(xù)器中的光敏三極管通、斷交替切換而產(chǎn)生脈沖信號,經(jīng)過電路的放大整形后,輸出與轉速成比例的方波脈沖列,以滿足機車電氣控制系統(tǒng)的工作需要。2.2性能指標及測試內(nèi)容測控儀所所需的性能指標為:工作直流電源:(15±15%)V,功耗電流小于50mA,輸出脈沖幅值(負載電阻3kmΩ時):高電平≥29V,低電平≤2V,相位差:90°±50%,轉速范圍:0?1000r/min,每圈的脈沖數(shù):200,輸出方波波形占空比:(50±20)%。測控儀所需的測試參數(shù)為:轉速、脈沖數(shù)、脈沖最低高電平、脈沖最高低電平和脈沖占空比。3測控儀硬件設計AT89C52是一種低功耗、高性能、CMOS型微處理器,片內(nèi)含有8k的可反復擦寫的只讀程序存儲器和256B的RAM,所開發(fā)的測控儀選用AT89C52單片機。根據(jù)光電傳感器的工作原理、主要性能指標和測試內(nèi)容,測控儀總體原理結構示意圖如圖1所示。圖1測控儀總體原理解構其工作過程為:通過鍵盤對系統(tǒng)進行初始化和功能設置后,執(zhí)行AT89C52中的應用程序,輸出脈沖信號,驅動步進電動機及光電傳感器旋轉,通過信號調(diào)理電路和A/D轉換器,把光電傳感器所輸出的脈沖信號轉換為數(shù)字信號,送入AT89C52單片機,數(shù)據(jù)處理后,送顯示器和微型打印機輸出。步進電動機升降速控制需要兩級定時器中斷處理:盡管光電轉速傳感器脈沖信號的測試內(nèi)容可進行分步處理,但在測試占空比、兩通道的相位差等參數(shù)時,都需要兩個定時器配合。而AT89C52片內(nèi)只能提供三個定時/計數(shù)器,單一AT89C52的資源無法勝任測控儀的工作。另外,為了簡化測控儀的操作和使用,本測控儀采用了雙AT89C52微處理器的結構形式,因此,光電轉速傳感器測控儀分為驅動電路和信號測試電路兩大功能模塊。3.1驅動電路模塊設計為了驅動光電傳感器旋轉,并能方便地調(diào)整其轉速,需要選擇適合于本系統(tǒng)特點和應用的電動機,作為光電轉速傳感器的動力裝置。步進電動機具有四個特點:①步距角和轉速大小僅與脈沖頻率成正比;②通過改變脈沖頻率的大小可大范圍地調(diào)節(jié)電機轉速;③能實現(xiàn)快速起動、制動、反轉:④控制精度高,運行可靠。步進電動機這四個方面的特點,適用于本系統(tǒng),所以在測試儀的驅動部分選用步進電動機作為動力裝置。步進電動機是一種把電脈沖轉換成角位移的電動機。由專用的驅動電源向步進電動機提供一系列具有一定規(guī)律的電脈沖信號,每輸入一個電脈沖,步進電動機就前進一步,其角位移與脈沖數(shù)成正比,電機轉速與脈沖頻率成正比,轉速和轉向與各相繞組的通電方式有關[1]。利用AT89C52單片機構成光電轉速傳感器的驅動電路模塊,輸出所需頻率的脈沖信號。根據(jù)驅動電路的功能要求和步進電動機的工作原理,測控儀驅動電路的模塊硬件原理如圖2所示。圖2驅動電路模塊結構示意圖在圖2中為了對步進電動機的轉速實行分級控制,在AT89C52單片機P1端口的管腳接入控制300、500、700和900四級轉速(r/min)I:作的按鍵。利用P2端口的部分管腳驅動發(fā)光二極管,指示步進電動機的當前轉速工作段。同時,P2.0管腳輸出步進電動機所需脈沖信號,控制步進電動機工作。另外,P1.6和P1.7管腳用于實現(xiàn)驅動電路和測試電路的簡單通信功能,即步進電動機工作到所需轉速后,利用P1.6控
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 聯(lián)建投資協(xié)議書
- 砸車調(diào)解協(xié)議書
- 資產(chǎn)轉移協(xié)議書
- 鄧州離婚協(xié)議書
- 子女贍養(yǎng)協(xié)議書協(xié)議書
- 煮蛋器設備維修協(xié)議書
- 自愿騰退協(xié)議書
- 校企合作宣傳片協(xié)議書
- 電腦報廢協(xié)議書
- 摩托車交易合同協(xié)議書
- 16949標準培訓課件
- T-CMES 04001-2020 機床裝備制造成熟度評價規(guī)范
- 國開電大《企業(yè)信息管理》形考任務參考答案
- 風力發(fā)電運維值班員(高級工)理論考試題庫(濃縮400題)
- 常見柜面業(yè)務操作考核評分表
- 2023年中國石油招聘考試真題
- DB43 738-2012 建設工程消防設施檢測評定規(guī)則
- 公司事故隱患內(nèi)部報告獎勵機制
- β內(nèi)酰胺類抗菌藥物皮膚試驗指導原則2024課件
- 弱電機房工程報價清單
- 口腔醫(yī)院感染預防與控制
評論
0/150
提交評論