基于IA4421分布式温度和湿度采集系统(英语原文与翻译)_第1页
基于IA4421分布式温度和湿度采集系统(英语原文与翻译)_第2页
基于IA4421分布式温度和湿度采集系统(英语原文与翻译)_第3页
基于IA4421分布式温度和湿度采集系统(英语原文与翻译)_第4页
基于IA4421分布式温度和湿度采集系统(英语原文与翻译)_第5页
已阅读5页,还剩9页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

..DistributedTemperatureandHumidityAcquisitionSystemBasedonIA4421Abstract-Nurseryshedshavethecharacteristicsofstayingclosely,quantity,parameterchangingslowly,asmallamountofdata,sothearticlepresentsadistributedcentralizedmonitoringsystembasedonashort-rangeradiotransceiverIA4421chip.Thefront-endsystemcircuitchoosesingle-chipSTC89LE52RCasthecontrolofthecore,completeahumiditysensorHSl101,thetemperaturesensorDS18B20circuitandIA4421peripheralcircuitdesign,methodofCRC,aftercompletingfront-endsystemsandhardwaredesignofdatacenter,designgivesthesoftwaredesign,thecorrespondingflowchartandsomeinstances.Keywords-IA4421;DS18B20;HSllOl;CRC;wirelesstransmission;distributedI.INTRODUCTIONTheshort-rangewirelesstransmissiontechnologycangetmorethanonenurseryshedparametersoftemperatureandhumidityandpooledcentralizedmonitoring,thistypeofscenetemperatureandhumidityparameterschangesslowly,ittakesmoreintervaltimeindataacquisition,andtheamountofdatavalueforeachsampleissmall;fromatechnicalperspective,withthemonitoringsystemofthistypewithmanymonitoringpoints,itismoresuitabletousetheadvancedzigbeewirelessnetwork.However,examinefromaneconomicpointofview,suchprogramsaretoomuchexpensive.InthispaperaprogramcameupwithadistributedcentralizedmonitoringbasedonthewirelesschipIA4421,theprogramissuitablefortheabove-mentionedtypeofscene,andithasobviousadvantagesincost.II.SYSTEMANDHARDWAREDESIGNA.SystemcomponentsWithtoomanydistributedmulti-monitoringpointswhichthedistanceisshort<d<100m>anddistribution,systemdecidetoadoptashort-rangewirelesscommunicationchiptoformadistributedwirelessmonitoringsystem,showninFigure1.Therearemfront­endmonitorsandawirelessmonitoringsystemcenter,eachfront-endmonitorhasamicrocontrollercore,collectedbythetemperatureandhumiditysensorstogettemperatureandhumidityparameters,themicrocontrollersendtheparameterstothewirelessmonitoringcenterthroughfront­endwirelesscommunicationschips.Figure1.DistributedwirelessacquisitionsystemWirelessmonitoringcenteristhecenterofthewholesystem,ithastakentothepollingwork,andgiveinstructionswhichwereissuedtothevariousfront-endmonitoringunits,thefront-endmonitoringunitsonlyreceiveditsownpollingcommandandthendecidedtolaunchoutoftheunitdata.Thesystemisdesignedevery3secondspollingprogram,everyminutecanbepolledto20monitoringunitsanditisbettertoextendthepollingcycleordecreasethepollmgintervaltosolvethelarger-scalemonitoringsite.B.Front-endmonitoringunitsFront-endmonitoringunitisresponsibleforthecollectionsiteofthetemperatureandhumidityparameters,andsendthecollectedtothewirelessmonitoringcenter,thecircuitschematicshowninFigure2.DesignusesSTC89LE52RCasthecontrollercore,thecontrollerhastheadvantageofdownloadingtheprogramthroughserialport.Theinstructionsandthecodesarefullycompatiblewiththe51MCUwithinsixinterruptsources,fourmterruptprioritylevels,awatchdogtimer<WDT>,theclockfrequencyupto40MHz[1].ThesystemissuppliedwithDC6V,using3.3VvoltageregulatorchipASM1117-3.3tosupplymicrocontrollerandwirelesschip.Dallascompany'sI-WirebusdigitaltemperaturesensorDS18B20isusedintemperaturemeasurementcircuit.Thedesignusesa3-pinTO-92small-sizepackage,thetemperaturemeasurementrangeof-55to125°C,programmablefor9-12bitA/Dconversionandtheprecisiontemperatureresolutionupto0.0625°C,Thedigitalformatoftemperaturewithconvertedof12bittakesthemaximumtimeof750ms[2].Thedesignuses9bitdigitalformat,thedefaultconversionaccuracyis0.5°C,theconversiontimeisabout100ms[3].Figure2.Circuitoffront-endmonitoringunitsHumidityacquisitionuseshumiditysensorHS1101andNE555inthecircuit,HS1101canaffecttheoscillationfrequencyoftheNE555circuitwhentheoutsidehumiditychangesandthecapacitorvalueofbothendoftheHS1101ischanged,therebychangingtheoutputfrequencyofthetimingcircuit.TheMCUsystemcalculatethehumidityfieldthroughthemeasurementofthefrequencyofitsoutput.Thesitehumidityandtheoutputfrequencycorrespondingrelationship[4]isshowninTable1.TABLEIHUMIDITYANDTHEOUTPUTFREQUENCYCORRESPONDINGRELATIONSHIPRF102030405060708090Fr722471006976685367286600646863306186C.WirelesstransceiverportionandthewirelessmonitoringcentercircuitIntegrationAssociatesproductionofshort-rangewirelesstransceiverchipIA4421isusedinthisdesign.Thisisafullyintegrated,lowpowerconsumptionandrequiresveryfewexternalcomponents,multi-channel,programmable,low­cost,high-performancewirelesscommunicationschip[5].ChiphasaprogrammablePLLfrequencysynthesizerwithhigh-precision,andthesendingletterfrequencyoffsetandreceiverbandwidthisalsoprogrammable,ithasgreatflexibilityinapplications.ThechipusesFSKmodulationmode,theoperatingbandisoptionalforthe433M,868Mand915M,thelargestsendingletterpowerupto8dBm,whenthereceiversensitivityis-109dBmandthebiterrorrateis10-3,theairrateupto115.2kbpS,sendinglettercurrentlessthan24mA,receivingcurrentislessthan10mA.standbycurrentisonly0.3uAthemaximumcommunicationdistanceis100metersto200meters[6].InadditiontothecrystaloscillatorandtheantennatheIA4421peripheralcircuithasonlytwoinductorsandtwocapacitors,andtheirspecificparametersdependonthesystemofcommunicationfrequencyselecting.ThespecificparametersshowninTable2.OtherconnectionwiththeMCUpinnamesareshowninTable3,pin8ofIA4421outputsclocksignal,thereisnouse.WhenIA4421chipisintransmittingmode,theNFFSpinoftheMCUissettinghigh,thenthemicrocontrollersendsinitializationcommandstothetransmittertosetinitializationsettings,whichsetthepreambleofAAH,synchronousformatissettingof2004,thebaudrateis9600bps,theoperatingfrequencyis915MHz,andthensendthecommand8238Htotumonthetransmitter.PinnSELsetslowwhensendingdata,andthenwritedatathroughtheSDI,eachclockcyclewriteonebit.WhenreadingoutthestatusflagbitSDOis1,thatmeanstransmitterhassentabyte,themicrocontrollerwillwritethenextbyteofdata.Whenthechipisinreceivingmode,theNFFSpinissettinglow,theoutputbufferofFIFOconnecteddirectlytotheSDOpin.Setofsynchronousformat,baudrate,operatingfrequencywiththetransmitmode.TheIA4421hasaninternal16RXdataFIFOandreceiverhasFFITreceivinginterrupt,whenthereceiveddatabitsreachesapresetnumber,FFITpinoutputshighlevel,andinstructthemicrocontrollertoreadoutthedatafromtheSDOpin.Wirelessmonitoringofthecentralpartofthecircuitusingthesamemicroprocessorandwirelesstransceiverchipasthefront-endmonitoringunit,RS232interfacecircuitisincreasedinthiscircuit.TABLEIIIA4421CIRCUITPARAMETERSANDFREQUENCYFreq〔MHzC6、C7〔pFL2〔nHL1<nH4334.72739086836.810091536.8100TABLE3IA4421PINSPinNameTypeFunctionPin1SDIDIDatainputoftheserialcontrolinterfacePin2SCKDIClockinputoftheserialcontrolinterfacePin3nSELDIChipselectinputoftheserialcontrolinterface<activelow>Pin4SDODOSerialdataoutputwithbusholdPin5NIRQDOInterruptrequestoutput<activelow>Pin6NFFSDIFIFOselectinput<activelowPin7FFITDOFIFOinterrupt<activehigh>Pin8CLKDOMicrocontrollerclockoutputIII.SYSTEMSOFTWAREOESIGNA.Softwaredesignoffront-endmonitoringunitThemainfunctionofthefront-endmonitoringunitistocollecttemperatureandhumidityparameters,andsendtotheinformationcenter,soitsMCUsoftwareinadditiontothemainprogram,includingtemperaturedataacquisitionandhumiditydataacquisition,thecontrollingofthewirelesssendingletterlogic.Inordertoreducepowerconsumption,themicrocontrollerisalwaysworkinsleepmode[7],itwon'tgointothecollectionandsendingletterstatesuntilthewirelesschipiswokenupbytheinterrupt.Inthesystemaftertheinitializationiscompleted,theMCUdirectlygointothesleepmode,thensetflagB=0.Whenthewirelesschipreceivesawake-upsignal,whenexternalinterrupthappenstheinterruptrequestflagNIRQoutputlowtowakeuptheMCV.TheexternalinterruptwillsetflagB=1,andthenthesystemwillcollectdata.ThesystemflowchartisshowninFigure3.Figure3.MicrocontrollercontrollingprogramflowchartPartofthemainprogramofthefront-endmonitoringunitisshownbelow.voidmain<>{ZHU_Init<>;IA_Init<>;While<1>{if<B==1>{WEN<>;SHI<>;CRC<>;FA<>;B=0;}}}Inordertoensurethereliabilityofdatatransmission,designaddsan8-bitCRC<cyclicredundancycheck>character,theCRCgeneratorpolynomialis:ThegeneratorpolynomialofthelogiccircuitisshowninFigure4.AtthereceivingendusingthesameCRCcalculationinthedatareceiving,iftheremainderiszero,thenthechecksumresultiscorrect,orelseitisthewrongdata.InputMSBLSBFigure4.logiccircuitFront-endmonitoringunitssendfivebyteseachtimetothemonitoringcenterwhensendingdata,itsframeformatisshowninFigure5.AWDHWDLSHICRCFigure5.Thedataframeformatsendingfromfront-endmonitoringunitFigure6.TheflowchartmonitoringcentersystemAmongthem,thefirstbyteArepresentstheserialnumbersoffront-endmonitoringunits,suchasO1H,02Hand03H.ThesecondbyteWDHisonbehalfof8highbitsoftemperaturedata.ThethirdbyteWDLisonbehalfof8lowbitsoftemperaturedata.ThefourthbyteofSHIisconvertedhumiditydata.ThefifthbyteCRCisrepresentedtheremainderofthefirstfourbytesofCRCwhichisencoded.B.MicrocontrollersoftwaredesignofmonitoringcenterThemonitoringcenter'smainfunctionistosendpollingsignals,andtoreceivethecollectedtemperatureandhumiditydata.Ifthedataiscorrect,thedatawillbesenttothehostcomputerviaRS232.MonitoringcentersystemflowchartisshowninFigure6.Afterthepollingsignalisissued,themonitoringcenterwillwaitfor2secondstoreceivedata,ifthedataiserrorornotreceived,thenthesystemwillrecordthepollingdatasignalandfindthecauseoftheerrortofacilitateassoonaspossible.IV.CONCLUSIONThispaperpresentsanewlow-costdistributedtemperatureandhumidityacquisitionsystem.Thesystemcancollectdataofdifferentlocationsforcentralizedmonitoring.Theexperimentsshowthatthesystemdesignisreasonable,thetransmissionofthedataisaccurateandreliable,thetransmissiondistanceisabout100meters.Wirelesssystemisconvenientandflexible,itcanmeettheneedsofavarietyofcollectionsites,itisbroadprospectsfordevelopment.REFERENCES[1]MeiLifeng,SingleChipMicrocomputerPrincipleandInterfaceTechnology[M]Beijing:TsinghuaUniversityPress,2007.[2]ZhangKefan,ShuHua.IA4421digitalwirelesstemperaturesensordesign[J].Modemelectronictechnology,2008,20:189-191.[3]LiuXiaoyang,ZhouYantao,I-linebusstructureoftheDSI8B20serialnumbersearchalgorithm[J].ComputingTechnologyandAutomation,2010,29<1>:38-42.[4]ZhangPing,Increaseddual555Timerdigitalmethodofmeasuringhumidity[J].AutomationTechnologyandApplications,2007,<09>.[5]PanYuanyuan,YanGuozheng,HuangBiao,IA4420miniaturebidirectionalRFcommunicationsystem[1].ControlTechnology,2006,25<5>:81-83.[6]ZouQihong,LiuLan,ZhaoJun,LPC2131andIA4421-basedwirelessdataacquisitionsystem[J].InformationandElectronicEngineering,2009,<02>.[7]TingHuang,ShiGuoliang,WongKwan.Single-chipwirelesscommunicationsystemdesign[J].Microprocesso,2010,<03>.基于IA4421分布式温度和湿度采集系统摘要—苗圃棚具有密植、数量大、参数变化缓慢、数据少的特点,所以本文提出了一种基于短程无线电收发机IA4421芯片的分布式集中监测系统。前端电路系统选择STC89LE52RC单片机作为控制核心,完成湿度传感器HS1101和温度传感器DS18B20电路的数据采集和无线电收发机IA4421芯片外围电路的设计,CRC数据校验,在完成数据中心前端系统和硬件设计之后,给出相应的的软件设计、相应的流程图和一些实例。关键字—IA4421;DS18B20;HS1101;CRC;无线传输;分布式1.简介短程无线传输技术可以获得多个苗圃棚的温度和湿度并进行集中监测,这种类型的现场的温度和湿度参数变化缓慢,因此采集数据的时间间隔可以更长一些,而且数据的数量对于每个样本的价值很小;从技术的角度来看,利用许多监控点的监测系统更适合使用先进的无线个域网络。但是,从经济的角度来看,这样的项目费用太高。本文提出了基于无线IA4421芯片的分布式集中的监测系统,这个方案适用于上述类型的情况,而且有明显的成本优势。2.系统和硬件设计系统组件在距离小<d<100m>和分散的区域内有很多分布式的多个监测点,系统可以采用短程无线通信芯片组成的分布式无线监控系统,如图1。有m个前端监测和一个无线监控系统中心,每个前端监测有一个微控制器中心,收集温度和湿度传感器获取的温度和湿度参数,微控制器通过前端无线通信芯片发送温度和湿度参数到无线监测中心。图1分布式无线采集系统无线监控中心是整个系统的中心,采取查询检测的方式把指令送给不同的前端监测单元,前端监测单元只接收自己的查询命令,然后才发射出该单元采集的数据。该系统采取每3秒查询一个前端检测点的方式,每分钟可以查询20个监测单元,可以更好的延长查询周期或者减少查询间隔来解决大规模的监测站点的问题。B.前端监测单元前端监测单元负责采集现场的温度和湿度参数,并将采集到的数据送到无线监测中心,电路原理图如图2所示。该设计采用STC89LE52RC作为控制器的核心,控制器利用串行口下载程序。这些指令和代码充分兼容有六个中断源、四个中断优先级、一个看门狗〔WDT>、时钟频率高达40MHz的51单片机[1]。该系统使用3.3V电压稳压器ASM1117-3.3芯片给微控制器和无线通信芯片提供6V直流电压。达拉斯公司的单总线数字温度传感器DS18B20应用于温度测量电路。这个设计使用了3管脚TO-92小尺寸封装,温度测量范围-55°C到125°C,可编程为9-12位的A/D转换和温度分辨率高达至0.0625°C,用12位的转换的温度数字格式的转换最大时间为750ms[2]。该设计使用了9位数字格式,默认的转换精度为0.5°C,转换时间大约是100ms[3]。图2前端监测单元电路湿度采集在电路中使用湿度传感器HS1101和定时器NE555,当外界湿度变化和HS1101两端的电容值变化时,HS1101可以影响定时器NE555电路的振荡频率,从而改变定时电路的输出频率。单片机系统通过测量其输出的频率计算湿度场。测量现场的湿度和输出频率对应的关系[4]如表1所示。表1湿度和输出频率对应的关系RF102030405060708090Fr722471006976685367286600646863306186C.无线收发机部分和无线监测中心电路短程无线收发器IA4421芯片的设计应用了集成联接。这是一个高度集成、低功耗和需要很少外部组件、多通道、可编程、低成本、高性能的无线通信芯片[5]。芯片有一个高精度的可编程锁相环频率合成器,发送信道频率偏移和接收机带宽也可编程,在应用中有很大的灵活性。该芯片采用移频键控调制模式,可选择的操作的频带有433M、868M和915M,当接收机灵敏度是-109dBm和错误率是10-3、传送速率是115.2kbpS、发送信道电流小于24mA、接收电流小于10mA时,最大的发送信道功率高达8dBm。待机电流只有0.3uA,最大的通信距离是100米至200米[6]。除了晶体振荡器和天线的IA4421外围电路只有两个电感和两个电容器,他们的具体参数取决于通信系统的频率选择。具体参数如表2所示。其他连接单片机管脚的名称如表3所示,IA4421芯片的8管脚是输出时钟信号,没有使用。当IA4421芯片处在发射模式下,微控制器的NFFS管脚设置为高电平,那么微控制器给发射机发送初始化命令设置初始化设置,这是设置AAH的前序,设置2DD4的同步格式,波特率是9600bps,操作频率是915MHz,然后发送命令8238H打开发射机。当发射数据时nSEL管脚处于低电平,然后通过SDI写数据,每个时钟周期写一位。当状态标志位SDO读取的是1时,这意味着发射机已经发送出一个字节,微控制器将编写下一个字节的数据。当芯片在接收模式下,NFFS管脚设置为低电平,FIFO的输出缓冲区直接连接到SDO管脚。发射模式要设置同步格式、波特率、操作频率。IA4421有一个内部的16RX数据FIFO管脚和接收机有接收中断的FFIT管脚,当接收到的数据位达到预置数时,管脚FFIT输出高电平,命令微控制器从管脚SDO读出数据。无线监测核心部分的电路使用相同的微处理器和无线收发器芯片作为前端监测单元,这个电路增加了RS232接口电路。表2IA4421的电路参数和频率Freq〔MHzC6、C7〔pFL2〔nHL1<nH4334.72739086836.810091536.8100表3IA4421的管脚管脚名称类型功能管脚1SDIDI串行控制数据输入接口管脚2SCKDI串行控制时钟输入接口管脚3nSELDI串行控制芯片选择输入接口〔低电平有效管脚4SDODO支持总线串行数据输出管脚5NIRQDO中断请求输出〔低电平有效管脚6NFFSDIFIFO选择输入〔低电平有效管脚7FFITDOFIFO中断〔高电平有效管脚8CLKDO微控制器时钟输出系统的软件设计前端监测单元的软件设计前端监测单元的主要功能是采集温度和湿度参数,并把数据发送到信息中心,所以它的单片机软件除了主程序之外,还包括温度数据采集、湿度数据采集与无线传输信道逻辑的控制的程序。为了降低功耗,单片机常常工作在睡眠模式[7],它不会去采集和发送信道状态直到有中断唤醒无线通信芯片。在系统初始化完成后,单片机直接进入睡眠模式,然后设置标志位B=0。当无线芯片接收到唤醒信号时,当外部中断发生在中断请求标志NIRQ输出低电平时唤醒单片机。外部中断将设置标志位B=1,然后系统将采集数据。这个系统流程图如图3所示。接收到一个请求信号?定时器计接收到一个请求信号?定时器计时是否到?标志B=0开始系统的初始化标志B=1?温度和湿度数据采集数据编码和通过无线发射到监测中心睡眠开始系统的初始化标志B=1?温度和湿度数据采集数据编码和通过无线发射到监测中心睡眠NY标志B=0标志B=0中断开始中断结束YNY 图3微控制器控制程序流程图前端监测单元的部分主程序如下所示:voidmain<>{ZHU_Init<>;IA_Init<>;While<1>{if<B==1>

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论