




已阅读5页,还剩3页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
第1页外文文献资料TemperaturesensorandwirelessmoduleThispaperisdesignedaDS18B20temperaturedataacquisitionsystem,thesystemmainlyconsistsofthemicrocontrollercircuitandadigitalsensorDS18B20based.Software,weusekeilsoftwarewritinganddebuggingtheprogram,thehardwareside,wepassedProteuscircuitsimulationsoftware,hardware,andtest,thesystemissimple,lowpowerconsumption,throughLCD1602displaythemeasuredtemperature.Temperaturemeasurementaccuracyofthesystemisrelativelyhigh,andstablecommunicationwiththemicrocontrollerandPC.DS18B20temperaturesensorisAmericanDALLASSemiconductorslatestsmarttemperaturesensor,animproved,comparedwiththetraditionalthermistortemperaturemeasurementdevices,whichcanbereaddirectlymeasuredtemperature,andcanbebasedonactualrequirementsthroughsimpleprogramming9to12toachieveadigitalreadoutmode.Thisdesignisasimpleandpracticalsmalldigitalthermometer,themaincomponentsusedwithasensor18B20,microcontrollerAT89S52,oneoffourcommoncathodeLED,resistorcapacitornumber.18B20supportbuslineinterface,measurementtemperaturerange-55to+125.Withinrange-10to+85,accuracyof0.5.18B20pooraccuracyof2.Temperaturedirectlytothescenebuslinedigitaltransfer,whichgreatlyimprovesthesystemsinterference.Thesiteissuitablefortemperaturemeasurementinharshenvironments,suchas:environmentalcontrol,equipmentorprocesscontrol,temperatureandotherconsumerelectronicsproducts.Thedigitalthermometerdesignisdividedintofiveparts,themaincontroller,LEDdisplaysection,thesensorpart,theresetpart,clockcircuit.Thatispartofthemastercontrollermicrocontrollerforstoringprogramsandcontrolcircuit;LEDdisplaysectionreferstothefourcommonanodedigitaltube,todisplaythetemperature;sensorpart,thatthetemperaturesensorisusedtocollecttemperature,temperatureconversion;resetsectionthatresetcircuit.Thetotalprocessmeasurementisthe第2页temperaturesensortotheexternalenvironment,andconvertedspreadSCM,SCMaftertreatmenttodeterminethetemperaturewaspassedtothedigitaldisplay.Thisdesigncancompletetemperaturemeasurementrangeis-55to+128,duetolimitedcapacity,cannotachievethealarmfunction.DS18B20worksasfollows:DS18B20internaloscillatorisalowtemperaturecoefficientoftheoscillationfrequencyoftheoscillatorwithtemperaturechangesverylittle,providingastablefrequencycountpulsecounter1.Ahightemperaturecoefficientoftheoscillationfrequencyoftheoscillatorisverysensitivetotemperatureoscillatorprovidesafrequencyvarieswithtemperaturepulsecounter2count.Whichalsoimpliescountingdoor,thedoorisopenedwhenthecount,DS18B20ontheclockpulseafteralowtemperaturecoefficientoftheoscillatoriscounted,andthencompletethetemperaturemeasurement.Countingthedooropentimeisdeterminedbythetemperature,coefficientoscillator,beforeeachmeasurement,thecorrespondingfirstbasewereplacedin-55andsubtractioncounteratemperatureregister,subtractioncounter1andthetemperatureregistersarepresetinthecorrespondingtoabasevalue-55.Subtractioncounter1lowtemperaturecoefficientofthecrystalpulsesignalgeneratedbysubtractioncountdowncounterwhenapresetvaluereducedtozerovalueofthetemperatureregisterwilladdasubtractioncounterpreset1willbere-loaded,subtractioncounterare-startofthelowtemperaturecoefficientcrystalpulsesignaliscounted,sothecycleuntilthecountdowncounter2to0:00,stopaccumulatingtemperatureregistervaluewhenthetemperatureregistersisthemeasuredtemperaturevalue.Aslongasthecounthasnotclosedthedoortorepeattheprocess,untilthetemperaturereachesthemeasuredtemperaturevalueregistervalue,whichistheprincipleofDS18B20temperature.Inaddition,duetotheDS18B20singlewirecommunicationisdonesharinghisstrictconceptslots,sothetimingisveryimportanttoreadandwrite.DS18B20internalcomparatortoquantifythewaytodeterminethetemperatureregistersroundingtheleastsignificantbit.Aftertwocounterstopscounting,thecomparatorwillcounteracountintheremainingvalueisconvertedtotemperaturevaluesarecomparedwith0.25,iflessthan0.25,thelowestbittemperatureregisterissetto0;ifhigherthan0.25,thelowestbitissetto1;ifgreaterthan0.75,thelowestbittemperatureregisterissetto0andthencarry.第3页Thus,aftercomparingthevalueobtainedafterthetemperatureisthetemperatureofthevalueofthefinalregisterread,anditslastrepresentatives0.5,roundingthemaximumquantizationerroris1/2LSB,namely0.25.Temperatureregistertemperaturevaluesexpressedinninedataformat,thehighestbitisthesignbit,theresteightbinarycomplementform,saidtemperature.Attheendofthetemperaturemeasurement,whichisninedatadumptemporarymemoryofthefirsttwobytes,thesignbitofthefirstbyteoccupied,eighttemperaturedataoccupythesecondbyte.DS18B20usingspecifictemperaturemeasurementtechniquestomeasuretemperature.DS18B20lowtemperaturecoefficientofinternaloscillatorfrequencysignaltoproduceastable;thesamehightemperaturecoefficientoscillatorwillbeconvertedintoafrequencysignalmeasuredtemperature.Whencountingthedooropen,DS18B20countadooropeningtimeisdeterminedbythehightemperaturecoefficientoscillator.Therechipslopeaccumulatorcanbecompensatedfornonlinearityfrequency.Temperaturemeasurementresultisstoredintheregister.Temperatureundernormalcircumstancesshouldbenine,butthesignbitextensionintohigheight,soIfinallyreadouttothe16scomplementform.Inaddition,thisdesignalsoappliedtothewirelessmodulenRF24L01.nRF24L01wirelesscommunicationschipsin2.4GHz2.52GHzlicense-freeISMband,efficientGFSKmodulation,anti-jammingcapability;theoperatingfrequencycanbedividedinto125channels,supportshigh-speedfrequencyhoppingcanunimpededintheglobalwirelessmarket.nRF2401supportmulti-pointcommunicationsbetweenamaximumtransferrateofupto1Mb/s.MeanwhilenRF2401chippowerconsumptionisverylow,theoperatingvoltageof1.9V3.6V,with0dBmofpower,1Mb/stransferratetransmitter,theoperatingcurrentisonly11.3mA,theoperatingcurrentisreceivedonly11.7mA,power-downmodeis900nA1,2.nRF24L01iscurrentlythesmallestandleastpowerconsumption,lowcostexternalcomponentsatleastoneRFsystem-on-chip.nRF24L01generalburstmodeisoftenusedtotransmitandreceivedata.Whentransmittingdata,firstnRF24L01configuredtotransmitmode:thenthereceivingnodeaddressTX_ADDRTX_PLDaccordancewiththetimingandvaliddataiswrittenbytheSPIportnRF24L01bufferzone,TX_PLDmustbewritteninacontinuouslowCSN,whilewritingatthetimeoflaunchTX_ADDRtheonce,thenCEissethighforatleast10s,transmitdatadelayedafter130s;ifauto-第4页answeristurnedon,thenenterthedataimmediatelyafterthelaunchnRF24L01receptionmode,receivestheresponsesignal(automaticresponsereceivingaddressshouldreceiveTX_ADDRconsistentnodeaddress).Ifyoureceiveareply,thenthatthecommunicationissuccessful,TX_DSsethigh,whileTX_PLDremovedfromtheTXFIFO;ifnoreplyisreceived,itisautomaticallyre-transmitthedata(automaticretransmissionisturnedon),ifthenumberofretransmissions(ARC)limitisreached,MAX_RTsethigh,TXFIFOdataretentionforretransmissionagain;MAX_RTorTX_DSsethigh,solowIRQinterruptisgeneratedtonotifyMCU.Thelastsuccessfullaunch,ifCEislowthenenteridlemodenRF24L011;ifsendingdatastackandCEishigh,thefirstlaunchintothenext;ifnodataissentinthestack,andCEishigh,thenenteridlemode2.AndtotransmittheaddressanddataintotheFIFOstackareafromnRF24L01chipmicrocontroller.nRF24L01whentransmittingdata,thedataisautomaticallytransmittedtoaddtheprefix,addressandCRCchecksum,thenhigh-speedlaunch.Ifyouturnthechipauto-answerfeature,AfternRF24L01chipdatatransmissionintoreceivemodeimmediately,inordertoreceivetheresponsesignal.Ifyoureceiveareply,thenthecommunicationissuccessful;ifnoreplyisreceived,itisautomaticallyre-launch,ifthenumberofretransmissionsreachestheupperlimitsetbythehigh-profilepositionMAX_RTregister,indicatinglossofcommunication.nRF24L01whenreceivingdata,youmustfirstbeconfiguredtoreceive,afteradelayof130sentersthereceivingstate.WhennRF24L01receiveddata,ifitdetectsavalidaddressandCRC,whenthedataisautomaticallyheaderandCRCcheckcodeisremoved,andthevaliddatapacketstoredinthereceivestack.Ifauto-answeristurnedon,thereceiveratthesametimereturnintothelaunchstateresponsesignal.Afterreceivingprocessiscompleted,nRF24L01noticemicrocontrollerreadsdata.nRF24L01RFprotocolcanbewrittentothecorrespondingconfigurationwordthroughtheSPIportofthechipconfigurationregisterstoreflect.Configurationwordburstmodetotal30B,ismainlyusedtosettheoperatingmode,thetransmissiondatawidth,addresswidth,address,channel,transmissionfrequency,transmissionpower,CRC,workstatus,auto-answerisenabled,thenumberofautomaticretransmission,etc.Onceconfigured,theprocessnRF24L01work,justchangeitscorrespondingbitconfigurationregisterREXNcontent,you第5页cansendandreceivemodetoswitchbetweenmodes.Hardwaredebuggingisrelativelysimple,firstchecktheinductanceoftheweldingiscorrect,thenusedmultimetertestorpowertest.Softwaredebuggingcanwriteyourprogramanddisplayhardwarecorrectnesstest,thenwerethemainprogram,subroutinesreadtemperature,temperatureconversioncommandsubroutinetocalculatethetemperaturedatarefreshsubroutinesubprogramsandrealityprogramminganddebugging,etc.BecauseDS18B20andmicrocontrollerserialdatatransfer,therefore,DS18B20read/muststrictlyensuretheread/writetimingwhenwritingprogram;otherwiseitwillnotreadthemeasurementresults.FornRF24L01debugging,youneedtocollectandtransfertheprogramreceivewrittenprocedures.ThisprocedureusesthemicrocontrollerwritteninassemblerorClanguageprogramminganddebuggingKeilC51compiler.Softwaredebuggingtonormalradiotransmitterandreceiveranddisplaytemperatureandtemperaturechangeswhenthetemperaturechangeisdisplayed,itbasicallycomplete.Performancetestsareavailableandhavebeenmakingmachinefinishedtemperaturethermometertomeasuresimultaneouslycompare.第6页中文翻译稿温度传感器与无线模块本论文是基于DS18B20设计了一种温度数据采集系统,系统主要由单片机电路和一个DS18B20数字传感器构成。软件方面,我们采用keil软件对程序进行编写以及调试,硬件方面,我们通过Proteus软件对硬件电路进行仿真以及测试,该系统结构简单,功耗较低,通过LCD1602显示所测温度。系统的测温精度比较高,并且能稳定的与单片机和PC机通讯。DS18B20温度传感器是美国DALLAS半导体公司最新推出的一种改进型智能温度传感器,与传统的热敏电阻等测温元件相比,它能直接读出被测温度,并且可根据实际要求通过简单的编程实现912位的数字值读数方式。本设计是一款简单实用的小型数字温度计,所采用的主要元件有传感器18B20,单片机AT89S52,四位共阴极数码管一个,电容电阻若干。18B20支持“一线总线”接口,测量温度范围-55+125。在-10+85范围内,精度为0.5。18B20的精度较差为2.。现场温度直接以“一线总线”的数字方式传输,大大提高了系统的抗干扰性。适合于恶劣环境的现场温度测量,如:环境控制、设备或过程控制、测温类消费电子产品等。本次数字温度计的设计共分为五部分,主控制器,LED显示部分,传感器部分,复位部分,时钟电路。主控制器即单片机部分,用于存储程序和控制电路;LED显示部分是指四位共阳极数码管,用来显示温度;传感器部分,即温度传感器,用来采集温度,进行温度转换;复位部分,即复位电路。测量的总过程是,传感器采集到外部环境的温度,并进行转换后传到单片机,经过单片机处理判断后将温度传递到数码管显示。本设计能完成的温度测量范围是-55+128,由于能力有限,不能实现报警功能。DS18B20的工作原理如下:DS18B20内部的低温度系数振荡器是一个振荡频率随温度变化很小的振荡器,为计数器1提供一频率稳定的计数脉冲。高温度系数振荡器是一个振荡频率对温度很敏感的振荡器,为计数器2提供一个频率随温度变化的计数脉冲。其中还隐含着计数门,当计数门打开时,DS18B20就对低温度系数振荡器产生的时钟脉冲后进行计数,进而完成温度测量。计数门的开启时间由高温,度系数振荡器来决定,每次测量前,首先将-55所对应的基数分别置入减法计数器1和温度寄存器中,减法计数器1和温度寄存器被预置在-55所对应的一个基数值。减法计数器1对低温度系数晶振产生的脉冲信号进行减法第7页计数,当减法计数器1的预置值减到0时温度寄存器的值将加1,减法计数器1的预置将重新被装入,减法计数器1重新开始对低温度系数晶振产生的脉冲信号进行计数,如此循环直到减法计数器2计数到0时,停止温度寄存器值的累加,此时温度寄存器中的数值即为所测温度。只要计数门仍未关闭就重复上述过程,直至温度寄存器值达到被测温度值,这就是DS18B20的测温原理。另外,由于DS18B20单线通信功能是分时完成的,他有严格的时隙概念,因此读写时序很重要。DS18B20内部的比较器以四舍五入的量化方式确定温度寄存器的最低有效位。在计数器2停止计数后,比较器将计数器1中的计数剩余值转换为温度值后与0.25进行比较,若低于0.25,温度寄存器的最低位就置0;若高于0.25,最低位就置1;若高于0.75时,温度寄存器的最低位就进位然后置0。这样,经过比较后所得的温度寄存器的值就是最终读取的温度值了,其最后位代表0.5,四舍五入最大量化误差为1/2LSB,即0.25。温度寄存器中的温度值以9位数据格式表示,最高位为符号位,其余8位以二进制补码形式表示温度值。测温结束时,这9位数据转存到暂存存储器的前两个字节中,符号位占用第一字节,8位温度数据占据第二字节。DS18B20测量温度时使用特有的温度测量技术。DS18B20内部的低温度系数振荡器能产生稳定的频率信号;同样的,高温度系数振荡器则将被测温度转换成频率信号。当计数门打开时,DS18B20进行计数,计数门开通时间由高温度系数振荡器决定。芯片内部还有斜率累加器,可对频率的非线性度加以补偿。测量结果存入温度寄存器中。一般情况下的温度值应该为9位,但因符号位扩展成高8位,所以最后以16位补码形式读出。此外,本设计还运用到了无线模块nRF24L01。nRF24L01无线通讯芯片工作在2.4GHz2.52GHz免许可证ISM频段,高效GFSK调制,抗干扰能力强;工作频率可分为125个信道,支持高速跳频,能够在全球无线市场畅通无阻。nRF2401支持多点间通讯,最高传输速率达1Mb/s。同时nRF2401芯片能耗非常低,其工作电压为1.9V3.6V,以0dBm的功率、1Mb/s的传输速率发射时,工作电流只有11.3mA,接收时工作电流只有11.7mA,掉电模式下为900nA1,2。nRF24L01是目前体积最小、功耗最少、外围元件最少的低成本射频系统级芯片之一。nRF24L01一般常采用突发工作模式进行数据的收发。发射数据时,首先将nRF24L01配置为发射模式:接着把接收节点地址TX_AD
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 碧桂园影像管理制度
- 禁毒宣讲室管理制度
- 科室培训与管理制度
- 职业病防治管理制度
- 联合站药剂管理制度
- 肉鸡养殖新管理制度
- 肯德基标准管理制度
- 胃肠镜中心管理制度
- 脑卒中专科管理制度
- 自动化工厂管理制度
- 专题四第1课二、《智能家居系统》说课稿 2023-2024学年青岛版(2018)初中信息技术八年级上册
- 精神科日常护理记录模板
- 2024年江苏苏州高新现代服务业招商中心有限公司招聘笔试真题
- 2025届江苏省徐州市区部分重点中学中考生物押题卷含解析
- 2025海南省交通投资控股限公司招聘30人高频重点提升(共500题)附带答案详解
- 《中国文化导论》课程考试复习题库及答案
- 《江苏省民用建筑工程消防验收常见问题解析及防治指南》2023版
- 咖啡厅食品安全与卫生管理
- DB3701T 29-2022 智慧中药房建设与运行规范
- 2024-2025学年上学期广州六年级英语期末模拟卷1
- 2024新沪教版英语(五四学制)七年级上单词表 (英译汉)
评论
0/150
提交评论