基于美國ASME標(biāo)準(zhǔn)的磁粉檢測規(guī)程(完整資料)_第1頁
基于美國ASME標(biāo)準(zhǔn)的磁粉檢測規(guī)程(完整資料)_第2頁
基于美國ASME標(biāo)準(zhǔn)的磁粉檢測規(guī)程(完整資料)_第3頁
基于美國ASME標(biāo)準(zhǔn)的磁粉檢測規(guī)程(完整資料)_第4頁
基于美國ASME標(biāo)準(zhǔn)的磁粉檢測規(guī)程(完整資料)_第5頁
已閱讀5頁,還剩76頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡介

基于美國ASME標(biāo)準(zhǔn)的磁粉檢測規(guī)程(完整資料)(可以直接使用,可編輯優(yōu)秀版資料,歡迎下載)

基于美國ASME標(biāo)準(zhǔn)的磁粉檢測規(guī)程(完整資料)(可以直接使用,可編輯優(yōu)秀版資料,歡迎下載)CONTENTS1。Scope2。QualificationofNDEPersonnel.3。Procedure4。MagnetizingEquipmentandMaterial5。SurfacePreparation6.Examination7。Evaluation8.Demagnetizat(yī)ion9.Ree(cuò)xaminationforrepairedAreaandNonconformityControl10.PostCleaning11.ReportSUSPENSIONCONCENTRATIONCALIBRATIONRECORDMAGNETICPARTICLEEXAMINATIONINSTRUCTIONMAGNETICPARTICLEEXAMINATIONREPORT1。Scope1。1。Thisprocedureisappliedtodetectcracksandotherdiscontinuitiesonornearthesurfaceofferromagneticmaterials,usingwetmagneticparticleandACorDCyoketechniquewithcontinuousmagnetizationmethod1.2.Thisprocedureisappliedtoweldsandmat(yī)erialsofASMECodepressurevesselsfabricatedaccordingtoASMECodeSectionⅧDivision1.2.QualificationofNDEPersonnelAllpersonnelperformingmagneticparticlee(cuò)xaminat(yī)ionshallbequalifiedandcertifiedinaccordancewiththerequirementsofHT'sWrittenPracticeforNDEPersonnelTraining,Examination,QualificationandCertificat(yī)ionbasedontherequirementsof“SNT-TC—1A”(CurrentCodeacceptededition)3.ProcedureThisprocedureshallbesupplementedbyMAGNETICPARTICLEEXAMINATIONINSTRUCTIONwhichshallbeissuedtoeveryproducttobee(cuò)xaminedandinwhichmoredetailparametersarespecified。TheInstructionshallbepreparedbylevelⅡ,approvedbylevelⅢNDEexaminer,4.MagnetizingEquipmentandMaterials4.1Magnetizingequipment4。1。1ThemagnetizingequipmentshowninTable1shallbeused。Table1ManufacturerModelFactoryNo.TypeTechniqueSHEYANGCYE-1030ACorDCYokeTechnique4.1.2.CalibrationofEquipmentThemagnetizingequipmentshallbecalibrat(yī)edatleastonceayear,orwhenevertheequipmenthasbeendamaged。Iftheequipmenthasnotbeeninuseforayearormore,calibrationshallbedonepriortofirstuse.ThemagnetizingequipmentshallbecalibratedinaccordancewiththerequirementsofMAGNETICPARTICLEEQUIPMENTCALIBRATIONPROCEDURE4。2.MagneticParticleFieldIndicat(yī)orThemagneticparticlefieldindicatorshowninfig1shallbeusedtodemonstratethedirectionofmagneticflux4.3ExaminationMedium4.3.1MagneticparticleshowninTable2shallbeused。Thecoloroftheparticlesshallprovideadequatecontrastwiththesurfacebeingexamined.Ifitisnotadequate,anothercolorshallbeselectandredemonstrationshallberequired更多資料:無損檢測招聘網(wǎng)http://ndtcn。org中國無損檢測論壇http://bbs.ndtcn.org中國焊接論壇http://bbs。cnweld。orgTable2ManufacturerNameType/colorFinenessShanghaiMat(yī)erialRes。InstituteMagneticSlurryBW-1/Black300Mesh4。3.2。WaterVehiclesandSuspensionMixingratioofratermediummagneticsuspensionis11。0—22.0gmagneticslurryper1000mlwater。4。3.3ConcentrationofWetMagneticparticleSuspensionTheconcentrationisnormallydeterminedbymeasuringitssettlingvolumethroughtheuseofanA(yù)SMEpear—shapecentrifugetube.Beforesampling,runthesuspensionforat(yī)least30-min。toassurethoroughmixingofallparticles.Takea100mlportionofthesuspensionandallowittosettleapproximat(yī)ely30min。Thevolumesettlingoutatthebottomofthetubeisindicat(yī)iveoftheparticleconcentrat(yī)ioninthebath.Bathconcentrationshallbeform1.2to2.4mlper100mlvehicles.ThecalibrationshallbeperformedbyMTlevelⅡorⅢandreviewedbyMTlevelⅢNDEExaminer.Thecalibrat(yī)ionresultsshallberecordedonCALIBRATIONRECORDFORSUSPENSIONCONCENTRATION.4.4IlluminationWhennaturallightisnotenoughforexaminationandevaluat(yī)ion,adequateilluminationisrequiredensuringadequatesensitivityduringtheexaminationandevaluation.5.SurfacePreparation5。1Satisfactoryresultsareusuallyobtainedwhenthesurfaceisintheas—welded,as-rolled,as—cast,oras-forgedconditions.However,surfacepreparationbygrindingormachiningmaybenecessarywheresurfaceirregularitiescouldmaskindicationsduetodiscontinuities。5。2Priortomagneticparticleexaminat(yī)ion,thesurfacetobee(cuò)xaminedandalladjacentareaswithinat(yī)least1in.(25mm)shallbedriedandfreeofalldirt,grease,lint,andscale,weldingfluxandspatter,oilorotherextraneousmatterthat(yī)couldinterferewiththeexamination.5。3Cleaningofthetestsurfacemaybeaccomplishedbydetergents,organicsolvents,ormechanicalmeans。5.4.Whencoatingisleftontheareasofthepartbeingexamined,allcoat(yī)ingshallberemovedpriortoexamination6.Examinat(yī)ionLevelⅡexaminershallperformmagneticexaminationinaccordancewiththerequirementsoftheInstruction,andshallrecordexaminationdataontheMAGNETICPARTICLEEXAMINATIONREPORT.Thetemperatureofthewetmagneticparticlesuspensionandthesurfaceofthepartshallnotexceed135℉(57.3℃)。6。1MagnetizingTechniqueTheACorDCyoketechniqueshallbeappliedtodetectdiscontinuitiesonthesurfaceofthepart。Exceptformaterials1/4in。orless,ACyokesaresuperiortodetectsurfacediscontinuities.6。2.MethodofExaminationExaminationshallbedonebythe“wetmagneticparticlecontinuousmethod;thatis,themagnetizingcurrentremainsonwhilethee(cuò)xaminat(yī)ionmediumisbeingappliedandwhileexcessofthee(cuò)xaminationmediumisbeingremoved.Thedurationofthemagnetizingcurrentistypicallyontheorderof1-3s.6.3ApplicationofwetmagneticParticlesWetmagneticparticlebathshallbeappliedbysparing,brushingorflowingovertheareatobeexaminedduringtheapplicationofthemagnetizingfield.Caremustbetakentopreventapplicationbeforeremovingthemagneticfield.6.4DirectionofMagnetizat(yī)ionEachareamustbemagnetizedinatleasttwodirectionsapproximatelyatrightangletoeachothersothat(yī)alldiscontinuitiesonthesurfaceofpartmaybedetectable(see(cuò)Fig.2)。Theindicationsarenotnormallyobtainedwhendiscontinuitiesareparalleltoappliedmagneticfield.6。5ExaminationCoverageAllexaminationshallbeconductedwithsufficientoverlaptoassure100%coverageattherequiredsensitivity。Theexaminationareashallbemarkedwithlinetosatisfy100%coverageasshowninFig.2。6。6MagnetizingCurrentAlternatingordirectmagnetizingcurrentshallbeusedtoestablishpartmagnetization.6.7MagneticFieldStrengthforYokeTechniqueTheliftingpowerrelatestotheelectromagneticstrengthoftheyoke.Alternatingcurrentelectromagneticyokeshallhavealiftingpowerofatleast10lb(44.5N)atthemaximumpolespacingthat(yī)willbeused.Directcurrentelectromagneticyokeshallhavealiftingpowerofatleast40lb(178N)at(yī)themaximumpolespacingthatwillbeused。6。8.Evaluat(yī)ionofSystemSensitivityWhenitisnecessarytoverifytheadequacyordirectionofthemagnetizingfield,themagneticparticlefieldindicatordescribedinTable2shallbeusedbypositioningtheindicatoronthesurfacetobeexamined.Asuitablefluxorfieldstrengthisindicatedwhenaclearlydefinedlineofmagneticparticlesformsacrossthecopperfaceoftheindicatorwhenthemagneticparticlesareappliedsimultaneouslywiththemagneticforce.Whenaclearlydefinedlineofparticlesisnotformed,orisnotformedinthedesireddirection.Themagnetizingtechniqueshallbechangedoradjusted.7.EvaluationLevelⅡorⅢNDEexaminershallobserveandevaluateindicationsinaccordancewiththeacceptancestandardsofASMECode,andshallrecordevaluationresultontheMAGNETICPARTICLEEXAMINATIONREPORT7.1.Theilluminat(yī)ionduringobservat(yī)ionandevaluationshallsatisfyrequirementofpara。4。4.7.2Discontinuitiesonthesurfaceareindicatedbyretentionoftheexaminationmedium.However,localizedsurfaceirregularitiesduetomachiningmarksorothersurfaceconditionsmayproducefalseindications.7。3.Broadareasofparticleaccumulation,whichmightmaskindicationfromdiscontinuities,areprohibited,andsuchareasshallbecleanedandreexamined。7.4EvaluationofIndicat(yī)ions7.4。1Indicat(yī)ionswillberevealedbyretentionofmagneticparticles,allsuchindicationsarenotnecessarilyimperfectionshowever,sinceexcessivesurfaceroughness,magneticpermeabilityvariations(suchasattheedgeofheataffectedzoned),etc。mayproducesimilarindications。Note:Whenexaminecornerweldedjointssuchasnozzletoshelljoint,adequat(yī)eshoesshallbeusedtofittheshapebeingexamined.TheyokefixedwithshoesshallverifytheliftingpowerrequiredinPara.6。6.Fig.2Max.PitchandDirectionforYokeTechnique.Anindicationistheevidenceofamechanicalimperfection。Onlyindications,whichhaveany,dimensiongreaterthan1/6in。shallbeconsideredrelevant。(a)Alinearindicationisonehavingalengthgreaterthanthreetimesthewidth.(b)Aroundindicat(yī)ionisoneofcircularorellipticalshapewithalengthequaltoorlessthanthreetimesitswidth.(c)Anyquestionableordoubtfulindicationsshallbereexaminedtodeterminewhetherornottheyarerelevant。7.4。2AcceptanceStandardsTheseacceptancestandardsshallapplyunlessothermorerestrictivestandardsarespecifiedforspecificmaterialsorapplicationswithinthisDivision。Allsurfacestobeexaminedshallbefreeof:(a)Relevantlinearindications.(b)Relevantroundedindicat(yī)ionsgreat(yī)erthan3/16in.(c)Fourormorerelevantroundedindicationsinalineseparatedby1/16in.orless,edgetoedge.(d)Anindicat(yī)ionofanimperfectionmaybelargerthantheimperfectionthat(yī)causesit.However,thesizeoftheindicationisthebasisforacceptanceevaluation.8.Demagnetizat(yī)ionWhenresidualmagneticforthinterferethesubsequentprocessingorusage,andequippedinthedrawings,specificat(yī)ionorpurchaseorder,thepartorareashallbedemagnetized.8.1DemagnetizationMethods8.1。1WithdrawalfromAlternatingCurrentCoilThefastestandmostsimpletechniqueistopassthepartthroughahighintensityalternat(yī)ingcurrentcoilandthenslowlywithdrawthepartfromthefieldofthecoil.Acoilof5000to10000ampere-turnsisrecommended.Linefrequencyisusuallyfrom50to60Hzalternatingcurrentbecauseofitsinabilitytopenetrat(yī)e。Alternating-currentyokesmaybeusedforlocaldemagnetizationbyreplacingthepolesonthesurface,movingthemaroundthearea,andslowlywithdrawingtheACyokewhileitisstillenergized。CareshouldbeexercisedtoassurethatthepartisentirelyremovedfromtheinfluenceofthecoilorACyokebeforethedemagnetizingforceisdiscontinued,otherwisethedemagnetizermayhavethereverseeffectofmagnetizingthepart.8.1.2DecreasingAlternat(yī)ingCurrentAnalternat(yī)ivetechniqueforpartdemagnetizationissubjectingtheparttothefieldwhilegraduallyreducingitsstrengthtoadesiredlevel.8.1。3ReversingDirectCurrentTheparttobedemagnetizedissubjectedtoconsecutivestepsofreversedandreduceddirectcurrentmagnetizationtoadesiredlevel(Thisisthemosteffectiveprocessofdemagnetizinglargepartsinwhichthealternatingcurrentfieldhasinsufficientpenetrationtoremovetheinternalresidualmagnetization。)。thistechniquerequiresspecialequipmentforreversingthecurrentwhilesimultaneouslyreducingitinsmallincrements.8.2EffectivenessoftheDemagnetizingOperationcanbeindicat(yī)edbytheuseofappropriatemagneticfieldindicat(yī)orsorfieldstrengthmeters.However,apartmayretainastrongresidualfieldafterhavingbee(cuò)ncircularlymagnetizedandexhibitlittleornoexternalevidenceofthisfield。Therefore,thecircularmagnetizationshouldbeconductedbeforelongitudinalmagnetizationofcompletedemagnetizat(yī)ionisrequired。9Ree(cuò)xaminat(yī)ionforRepairedAreaandNonconformityControl9。1Ree(cuò)xaminat(yī)ionforRepairedAreaThereexaminationforrepairedareashallbethesameasoriginalandarecordofrepairedareashallbenotedaswellastheresultsofthereexaminationforrepairedarea.9.2NonconformityControlAnynonconformityofexamineditemshallbereportedtolevelⅢNDEexaminerandhandledaccordingtoSection6ofQCManual。10。PostCleaningPostcleaningisnecessarywheremagneticparticlematerialcouldinterferewithsubsequentprocessingorservicerequirements.Postcleaningshallbedonetoremovewetparticlesbywipingwithcottonclothorflushingwithsolvent.11。Report11.1Thereportshallbesat(yī)isfactorytotherequirementsofASMECodeforthereportofNDE.11.2。ThereportshallbepreparedbythelevelⅡNDEexaminerwhoengagedinthemagneticparticleexaminat(yī)ionoperat(yī)ionandevaluation,reviewedbythelevelⅡorⅢNDEexaminerandapprovedbytheNDEDepartmentManagerorhisdesignatedNDELevelⅢExaminerpriortosubmissiontotheAI.11。3ThereportshallbekeptinfileintheNDERoomforatleast5years.西安郵電大學(xué)畢業(yè)設(shè)計(jì)(論文)基于AT89C51單片機(jī)酒精濃度檢測器學(xué)院(系):專業(yè)班級(jí):學(xué)生姓名:指導(dǎo)教師:學(xué)位論文原創(chuàng)性聲明本人鄭重聲明:所呈交的論文是本人在導(dǎo)師的指導(dǎo)下獨(dú)立進(jìn)行研究所取得的研究成果.除了文中特別加以標(biāo)注引用的內(nèi)容外,本論文不包括任何其他個(gè)人或集體已經(jīng)發(fā)表或撰寫的成果作品。本人完全意識(shí)到本聲明的法律后果由本人承擔(dān)。作者簽名:年月日學(xué)位論文版權(quán)使用授權(quán)書本學(xué)位論文作者完全了解學(xué)校有關(guān)保障、使用學(xué)位論文的規(guī)定,同意學(xué)校保留并向有關(guān)學(xué)位論文管理部門或機(jī)構(gòu)送交論文的復(fù)印件和電子版,允許論文被查閱和借閱。本人授權(quán)省級(jí)優(yōu)秀學(xué)士論文評(píng)選機(jī)構(gòu)將本學(xué)位論文的全部或部分內(nèi)容編入有關(guān)數(shù)據(jù)進(jìn)行檢索,可以采用影印、縮印或掃描等復(fù)制手段保存和匯編本學(xué)位論文。本學(xué)位論文屬于1、保密囗,在年解密后適用本授權(quán)書2、不保密囗.(請(qǐng)?jiān)谝陨舷鄳?yīng)方框內(nèi)打“√")作者簽名:年月日導(dǎo)師簽名:年月日西安郵電大學(xué)本科生畢業(yè)設(shè)計(jì)(論文)任務(wù)書學(xué)生姓名專業(yè)班級(jí)指導(dǎo)教師工作單位設(shè)計(jì)(論文)題目:基于AT89C51單片機(jī)酒精濃度檢測器設(shè)計(jì)(論文)主要內(nèi)容:本課題的主要功能是設(shè)計(jì)一個(gè)采用AT89C51單片機(jī)的酒精濃度探測儀,酒精傳感器采用MQ—3型,傳感器的作用是將酒精氣體濃度信號(hào)轉(zhuǎn)化為可以讓ADC采集的電信號(hào),同時(shí)讓電信號(hào)驅(qū)動(dòng)LED,LED亮度代表酒精濃度,ADC采集的數(shù)據(jù)傳輸給51單片機(jī),并由51單片機(jī)控制,采用液晶顯示器LCD1602顯示酒精的濃度。要求完成的主要任務(wù):1、查閱不少于15篇的相關(guān)資料,其中英文文獻(xiàn)不少于3篇,并完成開題報(bào)告.2、掌握51系列單片機(jī)原理及編程技術(shù),熟悉ADC0809的工作原理及特性;LCD1602顯示技術(shù)。3、用altiumdesigner繪制其原理圖,由于資金有限,沒有打印出PCB板,用面包板焊接實(shí)物。4、完成不少于5000字的英文文獻(xiàn)翻譯。5、完成不少于14000字的畢業(yè)論文。必讀參考資料:[1]何立民。MCS-51系列單片機(jī)應(yīng)用系統(tǒng)設(shè)計(jì)系統(tǒng)配置與接口技術(shù)[M]。北京:北京航天航空大學(xué)版社,2009.[2]吳建平.傳感原理及器應(yīng)用第二版[M]。浙江科學(xué)技術(shù)出版社,2011.指導(dǎo)教師簽名系主任簽名院長簽名(章)西安郵電大學(xué)本科學(xué)生畢業(yè)設(shè)計(jì)(論文)開題報(bào)告1、檢測儀的目的及意義從英國工業(yè)革命以來,到二十一世紀(jì)信息技術(shù)的高速發(fā)展,傳感技術(shù)越來越走進(jìn)人類的生活,為人類的生活提供了各種方便。傳感器深入社會(huì)生活的各個(gè)領(lǐng)域,在人類的各個(gè)領(lǐng)域都無法代替的作用,目前傳感器向高可靠性,高精度,微小型化,功耗低和數(shù)字化智能化發(fā)展,以便更好的為人類的工作和生活提供服務(wù).本課題是基于單片機(jī)AT89C51的酒精濃度測試儀,主要是檢測酒精氣體的濃度,開車司機(jī)只要將嘴對(duì)著傳感頭使勁吹氣,LCD1206就能準(zhǔn)確顯示出酒精濃度的高低,從而判斷該駕駛員是否有酒后駕車的行為,這樣就可以有效的避免交通事故的發(fā)生。本課題所采用的MQ-3氣敏傳感器,半導(dǎo)體酒精傳感器MQ-3所使用的氣敏材料是在清潔空氣中電導(dǎo)率較低的二氧化錫(SnO2)。當(dāng)傳感器所處環(huán)境中存在酒精蒸汽時(shí),傳感器的電導(dǎo)率隨空氣中酒精氣體濃度的增加而增大.使用簡單的電路即可將電導(dǎo)率的變化轉(zhuǎn)換為與該氣體濃度相對(duì)應(yīng)的輸出信號(hào).MQ—3半導(dǎo)體酒精傳感器對(duì)酒精的靈敏度高,可以抵抗汽油、煙霧、水蒸氣的干擾。這種傳感器可檢測多種濃度酒精氣氛,是一款適合多種應(yīng)用的低成本傳感器。2、CPU和ADC的選擇51單片機(jī)是一種集成電路芯片,采用超大規(guī)模技術(shù)把具有數(shù)據(jù)處理能力(如算術(shù)運(yùn)算,邏輯運(yùn)算、數(shù)據(jù)傳送、中斷處理)的微處理器(CPU),隨機(jī)存取數(shù)據(jù)存儲(chǔ)器(RAM),只讀程序存儲(chǔ)器(ROM),輸入輸出電路(I/O口),可能還包括定時(shí)計(jì)數(shù)器,串行通信口(SCI),顯示驅(qū)動(dòng)電路(LCD或LED驅(qū)動(dòng)電路),脈寬調(diào)制電路(PWM),模擬多路轉(zhuǎn)換器及A/D轉(zhuǎn)換器等電路集成到一塊單塊芯片上,構(gòu)成一個(gè)雖小然而完善的計(jì)算機(jī)系統(tǒng).本課題選用的開發(fā)平臺(tái)為keil單片機(jī)集成開發(fā)環(huán)境。ADC0809是一種逐次比較式8路模擬輸入、8位數(shù)字量輸出的A/D轉(zhuǎn)換器。由圖可見,ADC0809共有28個(gè)引腳,采用雙列直插式封裝。LCD1206顯示具體數(shù)值.根據(jù)以上內(nèi)容選定技術(shù)方案。氣體傳感器遇到酒精氣體后,其阻值會(huì)發(fā)生變化,所要測的電壓發(fā)生也相應(yīng)的變化,驅(qū)動(dòng)相應(yīng)的LED發(fā)光,這樣就可以顯示酒精濃度的高低。單片機(jī)連續(xù)地采集經(jīng)ADC0809模數(shù)轉(zhuǎn)換后的變化的電壓值,數(shù)據(jù)處理后由LCD1206來顯示。3、進(jìn)度安排第1—3周:查閱相關(guān)文獻(xiàn),確定課題的內(nèi)容,確定所需技術(shù)知識(shí)和電路板需要的電子元器件.確定技術(shù)方案,并完成開題報(bào)告.第4—6周:畫出技術(shù)流程圖,編寫C程序。第7-10周:焊接面包,畫出電路圖,并對(duì)軟件調(diào)試。第10-15周:完成并提交論文,對(duì)論文進(jìn)行修改定稿。第16周:完成并完善畢業(yè)論文。第17周:準(zhǔn)備畢業(yè)論文答辯.4、指導(dǎo)教師意見指導(dǎo)教師簽名:年月日目錄TOC\o"1—2"\h\z\u摘要PAGEREF_Toc231794542\hIAbstractPAGEREF_Toc231794543\hIIHYPERLINK\l”_Toc231794544"1緒論P(yáng)AGEREF_Toc231794544\h11.1設(shè)計(jì)背景PAGEREF_Toc231794545\h1HYPERLINK\l"_Toc231794546”1.2氣敏傳感器的研究現(xiàn)狀PAGEREF_Toc231794546\h1HYPERLINK\l”_Toc231794547”1。3設(shè)計(jì)酒精氣體傳感器的意義PAGEREF_Toc231794547\h2HYPERLINK\u一、設(shè)計(jì)目的二、設(shè)計(jì)任務(wù)與要求2.1設(shè)計(jì)任務(wù)2.2設(shè)計(jì)要求三、設(shè)計(jì)步驟及原理分析3。1設(shè)計(jì)方法3。2設(shè)計(jì)步驟3.3設(shè)計(jì)原理分析四、課程設(shè)計(jì)小結(jié)與體會(huì)五、參考文獻(xiàn)TOC\o”1—2”\h\z\u一、設(shè)計(jì)目的設(shè)計(jì)一種基于光強(qiáng)度傳感器BH1750FVI的光照度檢測儀,采用低成本的微控制器進(jìn)行控制,利用I2C總線接口進(jìn)行數(shù)據(jù)傳輸,可在普通的NOKIA5110液晶顯示器上進(jìn)行光強(qiáng)度測量值的實(shí)時(shí)顯示。二、設(shè)計(jì)任務(wù)與要求2.1設(shè)計(jì)任務(wù)針對(duì)傳統(tǒng)測光系統(tǒng)結(jié)構(gòu)復(fù)雜、容易受到紅外、紫外等干擾光線的影響等弊端,改選新型單片測光芯片BH1750作為光強(qiáng)采集器,設(shè)計(jì)并實(shí)現(xiàn)了一個(gè)測光系統(tǒng)。2。2設(shè)計(jì)要求能夠快速檢測環(huán)境的光照強(qiáng)度且能夠在NOKIA5110液晶顯示器上進(jìn)行數(shù)值顯示。三、設(shè)計(jì)步驟及原理分析3.1設(shè)計(jì)方法BH1750是半導(dǎo)體制造商ROHM為適應(yīng)以移動(dòng)電話手機(jī)為首的便攜式機(jī)器和液晶電視等的要求而開發(fā)出的具有優(yōu)良光譜靈敏度特性、16bit串行輸出的單片數(shù)字照度傳感器.由于其面世不久,關(guān)于它的資料十分稀少,目前有關(guān)BH1750的實(shí)用資料僅有一份其官方網(wǎng)站發(fā)布的英文版芯片手冊.在參考該手冊基礎(chǔ)上,結(jié)合實(shí)際測試經(jīng)驗(yàn),和事例程序進(jìn)行設(shè)計(jì)。3.2設(shè)計(jì)步驟1.先了解光強(qiáng)度傳感器BH1750FVI。2。設(shè)計(jì)檢測液晶數(shù)據(jù)的設(shè)計(jì)方案3。監(jiān)測系統(tǒng)結(jié)構(gòu)設(shè)計(jì)4.系統(tǒng)軟件驅(qū)動(dòng)設(shè)計(jì)3.3設(shè)計(jì)原理分析1.不區(qū)分光源數(shù)字型環(huán)境光強(qiáng)度傳感器BH1750FVI是日本RHOM株式會(huì)社近些年推出的一種兩線式串行總線接口的集成電路,可以根據(jù)收集的光線強(qiáng)度數(shù)據(jù)來進(jìn)行環(huán)境監(jiān)測,其具有1~65535lx的高分辨率,可支持較大范圍的光照強(qiáng)度變化。BH1750FVI結(jié)構(gòu)框圖如圖1所示.

從結(jié)構(gòu)框圖可容易看出,外部光照被接近人眼反應(yīng)的高精度光敏二極管PD探測到后,通過集成運(yùn)算放大器將PD電流轉(zhuǎn)換為PD電壓,由模數(shù)轉(zhuǎn)換器獲取16位數(shù)字?jǐn)?shù)據(jù),然后被邏輯和IC界面進(jìn)行數(shù)據(jù)處理與存儲(chǔ)。OSC為內(nèi)部的振蕩器提供內(nèi)部邏輯時(shí)鐘,通過相應(yīng)的指令操作即可讀取出內(nèi)部存儲(chǔ)的光照數(shù)據(jù)。數(shù)據(jù)傳輸使用標(biāo)準(zhǔn)的I2C總線,按照時(shí)序要求操作起來也非常方便。2.NOKIA5110是一款價(jià)廉的液晶顯示器,該顯示器可以顯示15個(gè)漢字、30個(gè)字符,僅僅需要4根I/O數(shù)據(jù)線,其工作電壓為3.3V。它采用NXP公司的PCD8544顯不驅(qū)動(dòng)芯片,NOKIA5110可以使用沒有MISO只有MOSI的SPI協(xié)議,可以利用硬件SPI,但通常只需要軟件程序模擬即可,數(shù)據(jù)傳輸需要嚴(yán)格按照手冊中串行接口時(shí)序圖編寫。其運(yùn)行速度十分理想,是LCD12864顯示器的20倍,LCD1602顯示器的40倍,適用于對(duì)反應(yīng)靈敏度有要求的場合。2.1NOKIA5110液晶顯示器的初始化

接通電源后,NOKIA5110液晶顯示器的內(nèi)部寄存器和RAM的內(nèi)容是不確定的,這時(shí)需要一個(gè)RES低電平脈沖進(jìn)行復(fù)位.當(dāng)VDD變?yōu)楦唠娖?,達(dá)到或高于VDD的最小值之后,給NOKIA5110顯示模塊的復(fù)位端RST引腳輸入低電平(要求復(fù)位電平〈0.3VDD),便進(jìn)行了NOKIA5110液晶顯示器的復(fù)位。圖2為NOKIA5110液晶顯示器的復(fù)位時(shí)序圖。2.2設(shè)置NOKIA5110液晶顯示器的坐標(biāo)

通過查詢NOKIA5110液晶顯示器的指令集與手冊可以知道其功能設(shè)置命令的H和V.其中:H=0使用基本指令集命令,H=1使用擴(kuò)展指令集命令,V=0水平尋址,V=1垂直尋址。數(shù)據(jù)以字節(jié)8位為單位下載到PCD8544的48×84位顯示數(shù)據(jù)RAM矩陣.列通過地址指針尋址,地址范圍為X:0~83(1010011);Y:0~5(101)。

在垂直尋址模式時(shí)(V=1),Y地址在每個(gè)字節(jié)之后遞增,經(jīng)最后的Y地址(Y=5)之后,Y繞回0,X遞增到下一列的地址。存水平尋址模式時(shí)(V=0),X地址在每個(gè)字節(jié)之后遞增,經(jīng)最后的X地址(X=83)之后,X繞回0,Y遞增到下一行的地址。經(jīng)每一個(gè)最后地址之后(X=83,Y=5),地址指針繞回地址(X=0,Y=0).2.3顯示方式

顯示漢字可以采用兩種點(diǎn)陣方式,一種是12×12點(diǎn)陣,一種是16×16點(diǎn)陣。采用12×12點(diǎn)陣漢字時(shí),由于不是8的整數(shù)倍數(shù),因此行與行之間只能隔開,這樣才能完整顯示一個(gè)漢字.英文字符占用6×8個(gè)點(diǎn)陣,可以通過建立一個(gè)ASCII的數(shù)組來進(jìn)行尋址。3.利用BH1750FVI和NOKIA5110液晶顯示器進(jìn)行系統(tǒng)結(jié)構(gòu)的設(shè)計(jì),其中NOKIA5110需要使用5個(gè)I/O口,RST復(fù)位端、SCE芯片使能端、DC模式選擇端、DIN數(shù)據(jù)線、CLK時(shí)鐘線分別接到單片機(jī)的P2.1~P2.5口。由于BH1750FVI使用低電壓3.3V,而傳統(tǒng)單片機(jī)使用的是5V電壓,故需要一個(gè)3.3V電源芯片662k輸出穩(wěn)定的3.3V電壓,BH1750FVI光強(qiáng)度傳感器的ADDR端口接地,測量儀電路圖如圖3所示。4.#include〈REG51.H>#include<math.h>//Keillibrary#include〈stdio.h>//Keillibrary#include〈INTRINS.H>#defineucharunsignedchar#defineuintunsignedint#defineDataPortP0//LCD1602數(shù)據(jù)端口sbitSCL=P1^0;//IIC時(shí)鐘引腳定義sbitSDA=P1^1;//IIC數(shù)據(jù)引腳定義sbitLCM_RS=P2^0;//LCD1602命令端口sbitLCM_RW=P2^1;//LCD1602命令端口sbitLCM_EN=P2^2;//LCD1602命令端口#defineSlaveAddress0x46//定義器件在IIC總線中的從地址,根據(jù)ALTADDRESS地址引腳不同修改//ALTADDRESS引腳接地時(shí)地址為0x46,接電源時(shí)地址為0xB8typedefunsignedcharBYTE;typedefunsignedshortWORD;BYTEBUF[8];//接收數(shù)據(jù)緩存區(qū)ucharge,shi,bai,qian,wan;//顯示變量intdis_data;//變量voiddelay_nms(unsignedintk);voidInitLcd();voidInit_BH1750(void);voidWriteDataLCM(uchardataW);voidWriteCommandLCM(ucharCMD,ucharAttribc);voidDisplayOneChar(ucharX,ucharY,ucharDData);voidconversion(uinttemp_data);voidSingle_Write_BH1750(ucharREG_Address);//單個(gè)寫入數(shù)據(jù)ucharSingle_Read_BH1750(ucharREG_Address);//單個(gè)讀取內(nèi)部寄存器數(shù)據(jù)voidMultiple_Read_BH1750();//連續(xù)的讀取內(nèi)部寄存器數(shù)據(jù)//—————-—-——————voidDelay5us();voidDelay5ms();voidBH1750_Start();//起始信號(hào)voidBH1750_Stop();//停止信號(hào)voidBH1750_SendACK(bitack);//應(yīng)答ACKbitBH1750_RecvACK();//讀ackvoidBH1750_SendByte(BYTEdat);//IIC單個(gè)字節(jié)寫B(tài)YTEBH1750_RecvByte();//IIC單個(gè)字節(jié)讀//———-———————--——-———-————-—-———--//*********************************************************voidconversion(uinttemp_data)//數(shù)據(jù)轉(zhuǎn)換出個(gè),十,百,千,萬{wan=temp_data/10000+0x30;temp_data=temp_data%10000;//取余運(yùn)算qian=temp_data/1000+0x30;temp_data=temp_data%1000;//取余運(yùn)算bai=temp_data/100+0x30;temp_data=temp_data%100;//取余運(yùn)算shi=temp_data/10+0x30;temp_data=temp_data%10;//取余運(yùn)算ge=temp_data+0x30;}//毫秒延時(shí)**************************voiddelay_nms(unsignedintk){unsignedinti,j;for(i=0;i〈k;i++){for(j=0;j<121;j++){;}}}/*******************************/voidWaitForEnable(void){DataPort=0xff;LCM_RS=0;LCM_RW=1;_nop_();LCM_EN=1;_nop_();_nop_();while(DataPort&0x80);LCM_EN=0;}/*******************************/voidWriteCommandLCM(ucharCMD,ucharAttribc){if(Attribc)WaitForEnable();LCM_RS=0;LCM_RW=0;_nop_();DataPort=CMD;_nop_();LCM_EN=1;_nop_();_nop_();LCM_EN=0;}/*******************************/voidWriteDataLCM(uchardataW){WaitForEnable();LCM_RS=1;LCM_RW=0;_nop_();DataPort=dataW;_nop_();LCM_EN=1;_nop_();_nop_();LCM_EN=0;}/***********************************/voidInitLcd(){WriteCommandLCM(0x38,1);WriteCommandLCM(0x08,1);WriteCommandLCM(0x01,1);WriteCommandLCM(0x06,1);WriteCommandLCM(0x0c,1);}/***********************************/voidDisplayOneChar(ucharX,ucharY,ucharDData){Y&=1;X&=15;if(Y)X|=0x40;X|=0x80;WriteCommandLCM(X,0);WriteDataLCM(DData);}/**************************************延時(shí)5微秒(STC90C52RC@12M)不同的工作環(huán)境,需要調(diào)整此函數(shù),注意時(shí)鐘過快時(shí)需要修改當(dāng)改用1T的MCU時(shí),請(qǐng)調(diào)整此延時(shí)函數(shù)**************************************/voidDelay5us(){_nop_();_nop_();_nop_();_nop_();_nop_();_nop_();_nop_();_nop_();_nop_();_nop_();_nop_();_nop_();_nop_();_nop_();_nop_();_nop_();}/**************************************延時(shí)5毫秒(STC90C52RC@12M)不同的工作環(huán)境,需要調(diào)整此函數(shù)當(dāng)改用1T的MCU時(shí),請(qǐng)調(diào)整此延時(shí)函數(shù)**************************************/voidDelay5ms(){WORDn=560;while(n—-);}/**************************************起始信號(hào)**************************************/voidBH1750_Start(){SDA=1;//拉高數(shù)據(jù)線SCL=1;//拉高時(shí)鐘線Delay5us();//延時(shí)SDA=0;//產(chǎn)生下降沿Delay5us();//延時(shí)SCL=0;//拉低時(shí)鐘線}/**************************************停止信號(hào)**************************************/voidBH1750_Stop(){SDA=0;//拉低數(shù)據(jù)線SCL=1;//拉高時(shí)鐘線Delay5us();//延時(shí)SDA=1;//產(chǎn)生上升沿Delay5us();//延時(shí)}/**************************************發(fā)送應(yīng)答信號(hào)入口參數(shù):ack(0:ACK1:NAK)**************************************/voidBH1750_SendACK(bitack){SDA=ack;//寫應(yīng)答信號(hào)SCL=1;//拉高時(shí)鐘線Delay5us();//延時(shí)SCL=0;//拉低時(shí)鐘線Delay5us();//延時(shí)}/**************************************接收應(yīng)答信號(hào)**************************************/bitBH1750_RecvACK(){SCL=1;//拉高時(shí)鐘線Delay5us();//延時(shí)CY=SDA;//讀應(yīng)答信號(hào)SCL=0;//拉低時(shí)鐘線Delay5us();//延時(shí)returnCY;}/**************************************向IIC總線發(fā)送一個(gè)字節(jié)數(shù)據(jù)**************************************/voidBH1750_SendByte(BYTEdat){BYTEi;for(i=0;i〈8;i++)//8位計(jì)數(shù)器{dat〈〈=1;//移出數(shù)據(jù)的最高位SDA=CY;//送數(shù)據(jù)口SCL=1;//拉高時(shí)鐘線Delay5us();//延時(shí)SCL=0;//拉低時(shí)鐘線Delay5us();//延時(shí)}BH1750_RecvACK();}/**************************************從IIC總線接收一個(gè)字節(jié)數(shù)據(jù)**************************************/BYTEBH1750_RecvByte(){BYTEi;BYTEdat=0;SDA=1;//使能內(nèi)部上拉,準(zhǔn)備讀取數(shù)據(jù),for(i=0;i<8;i++)//8位計(jì)數(shù)器{dat〈<=1;SCL=1;//拉高時(shí)鐘線Delay5us();//延時(shí)dat|=SDA;//讀數(shù)據(jù)SCL=0;//拉低時(shí)鐘線Delay5us();//延時(shí)}returndat;}//*********************************voidSingle_Write_BH1750(ucharREG_Address){BH1750_Start();//起始信號(hào)BH1750_SendByte(SlaveAddress);//發(fā)送設(shè)備地址+寫信號(hào)BH1750_SendByte(REG_Address);//內(nèi)部寄存器地址,//BH1750_SendByte(REG_data);//內(nèi)部寄存器數(shù)據(jù),BH17

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論