ZigBee1,2(1.250200;2.210005):ZigBee,TICC2430RE200B,ZigBee,,。,。:;ZigBee;CC2430;:TP277:A1674-6236(2012)12-0016-05Designofthewirelessinfraredanti-theftalarmsystembasedonZigBeeFANGuo-juan1,FANGuo-qing2(1.ShandongCollegeofMediaandCommunication,Jinan250200,China;2.SuningApplianceNanjingheadquarters,Nanjing210005,China)Abstract:UsingTI'ssinglechipCC2430andinfraredsensorRE200B,thispaperwhichisbasedoninfraredanti-theftwarningtechnologyandZigBeehasfinishedthehardwaredesignandsoftwaredevelopmentofthewirelessinfraredanti-theftalarmsystem.Itsolvedtheproblemsthatexistedinthewirelessalarmsystemnowadayssuchasfalsealarm,highcostandsoon.Thesystemhasbeenproveditsexpectedfunctionsbydebuggingthecircuit.Keywords:wirelessinfraredanti-theftalarm;ZigBee;CC2430;systemdesign:2012-04-12:201204097:“”(2011ZCJG033):(1974—),,,,。:。。、、,,、,、;,、,,,,,,。,。,:1);2),。,、、ZigBee,、,ZigBee:1):,。。2.4GHz,ZigBee;2):,,,,,。ZigBee,1mW,,,。1ZigBee,ZigBeeIEEE,IEEE802.15.4。、、。2.4GHz()、868MHz()915MHz()3,250kbit/s、20kbit/s40kbit/s,10~75m,。ZigBee,,。,。,,,[1]。IEEE.802.15.4ZigBee3:、,1。ElectronicDesignEngineering20Vol.2012No.1220126Jun.2012-16-,(PAN)。,。,,,,PAN,PAN。、,[2]。ZigBee,ZigBee。ZigBeeOSI(OpenSystemInterconnect,),OSI。IEEE802.15.4:MAC,,;ZigBee(NWK)(APL),PHYMAC,。、,。ZigBeeIEEE802.15.4MACZigBee,、,ZigBeeIEEE[3]。2,、[4]。:,2。,。,ZigBee,。,,ZigBee。:1),;2),();3)ZigBeeZigBee,ZigBeeZigBee;4),,,[5]。3ZigBee,。。,,2ZigBee,3,,PCB(Printedcircuitboard)。CC2430TICHIPCONZigBee。CC2420ZigBee,128kB8kBRAM,,27mA25mA。3.1,,,。,:,,。,37℃,10μm。RE200B,BISS0001,。3,CC2430P0.1BISS00012VO。,VO,。CC2430P0.1IO,,,,[6]。3.2CC2430PCCC2430flash,IAR,jtagCC2430flash。3.3MAX3232,+3.3V。1ZigBeeFig.1ZigBeenetworktopology2Fig.2Systemblockdiagramofusernode,ZigBee-17-《》201212《》201212MAX32320.1μF。:4、510nF,2、621μF。3.44。44.1,,。,TIZ-Stack,,IEEE802.15.4/ZigBeeCC2430。Z-Stack,,ZigBee(MeshNetwork)。IAR。IAREmbeddedWorkbench(EW)C/C++。TI/ChipconIEEE802.15.4ZigBeeZigBee2006,ZigBee2006,ZigBee。3Fig.3Infraredhuman-bodydetectionmodulecircuitdiagram4Fig.4Integratedhardwarecircuitdiagram-18-C,,。,。,,、,、ZigBee。,,。Z-Stack,,,,,,,。,,。。Z-stack,,,OSAL,,5。4.2,,。。,,StackRAM、boardI/O、HAL;NVFLASH、MAC、64、NVITEMS、OSAL。,,,,8s,,,,I/OAD,AD,,;。4.3(),,。、。,,。,,,,,。:CONSTuint8strDevice[]=“Device:0x”;CONSTuint8strTemp[]=“Temp:”;CONSTuint8strBattery[]=“Battery:”;CONSTuint8strRE200B[]=“RE200B:”;voidzb_ReceiveDataIndication(uint16source,uint16command,uint16len,uint8*pData){uint8buf[32];uint8*pBuf;uint8tmpLen;uint8sensorReading;if(command==SENSOR_REPORT_CMD_ID){//ReceivedreportfromasensorsensorReading=pData[1];tmpLen=(uint8)osal_strlen((char*)strDevice);pBuf=osal_memcpy(buf,strDevice,tmpLen);_ltoa(source,pBuf,16);pBuf+=4;*pBuf++=‘’;if(pData[0]==BATTERY_REPORT){tmpLen=(uint8)osal_strlen((char*)strBattery);pBuf=osal_memcpy(pBuf,strBattery,tmpLen);*pBuf++=(sensorReading/10)+'0';//conventmsbtoascii*pBuf++=‘.’;//decimalpoint(batteryreadingisinunitsof0.1V*pBuf++=(sensorReading%10)+‘0’;*pBuf++=‘’;*pBuf++=‘V’;}elseif(pData[0]==RE200B_REPORT){tmpLen=(uint8)osal_strlen((char*)strRE200B);pBuf=osal_memcpy(pBuf,strRE200B,tmpLen);*pBuf++=(sensorReading/10)+'0';*pBuf++=‘.’;*pBuf++=(sensorReading%10)+'0';*pBuf++=‘’;*pBuf++=‘V’;}else{5Z-StackFig.5FlowdiagramofZ-Stacksyetem,ZigBee-19-《》201212《》2012123Fig.3Floatingpointadditionmodulesofthesystemsimulationdiagram,,,,,。:[1],.FPGA[J].,2007,23(14):208-209.CHENDong,LIXiao-meng.ImplementationoffloatingpointcalculatorwithFPGAchip[J].Control&Automation,2007,23(14):208-209.[2].IEEE-754[J].,2008,57(8):4738-4745.ZHOUWu-jie.DesignandimplementationofchaoticgeneratorsbasedonIEEE-754standardandfieldprogrammablegatearraytechnology[J].ActaPhysicaSinica,2008,57(8):4738-4745.[3],.[M].:,2007.[4].CPU[D].:,2010.[5],.ALteraFPGA/CPLD[M].:,2009.[6],.VHDL[J]..2005,31(1):21-24SONGZe-ming,CHENWen-kai.DesignoffinitestatemachinebasedonVHDL[J].JournalofBeijingUniversityofTechnology,2005,31(1):21-24.tmpLen=(uint8)osal_strlen((char*)strTemp);pBuf=osal_memcpy(pBuf,strTemp,tmpLen);*pBuf++=(sensorReading/10)+‘0’;*pBuf++=(sensorReading%10)+‘0’;*pBuf++=‘’;*pBuf++=‘C’;}*pBuf++=‘\r’;*pBuf++=‘\n’;*pBuf=‘\0’;#ifdefined(MT_TASK)debug_str((uint8*)buf);#endif}}5ZigBee,,CC2430;RE200BBISS0001MAX3232。IAR,。,。ZigBee,,,:1)。PCInternet,GSM,Internet,。2)。,,,,,。:[1]LAN/MANStandardsCommittee,Part15.2:CoexistenceofWirelessPersonalAreaNetworkswithOtherWirelessDevicesOperatinginUnlicensedFrequencyBands[S],2009.[2],.[J].,2005(3):18-20.LIUShu-qi,SHIGuo-liang.Alarmsystemwithpyroelectricinfraredsensors[J].ElectronicDesignEngineering,2005(3):18-20.[3],,,.ZigBee[M].:,2008.[4],,.[M].:,2006.[5]RuizLB,NogueiraJM,LoureiroAAF.MANNA:AManage-mentArehitectureforWirelessSensorNetorks[J].IEEEeommu-nicationMagazin,2003,41(2):116-125.[6],,,.[M].:,2007.(15)!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!-20-