毕业设计论文 席百强 .doc

用Zigbee实现无线IC卡考勤机设计

收藏

压缩包内文档预览:(预览前20页/共55页)
预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图 预览图
编号:45504331    类型:共享资源    大小:8.39MB    格式:ZIP    上传时间:2020-01-09 上传人:遗**** IP属地:湖北
30
积分
关 键 词:
Zigbee 实现 无线 IC 考勤 设计
资源描述:
用Zigbee实现无线IC卡考勤机设计,Zigbee,实现,无线,IC,考勤,设计
内容简介:
computers and electronics in agriculture 6 2 ( 2 0 0 8 ) 94106available at journal homepage: /locate/compagA ZigBee multi-powered wireless acquisition device forremote sensing applications in precision viticultureRaul Moraisa,b, Miguel A. Fernandesb, Samuel G. Matosb, Carlos Ser odioa,b,P.J.S.G. Ferreirac, M.J.C.S. Reisa,baCentro de Estudos Tecnol ogicos, do Ambiente e da Vida (CETAV), UTAD University, Quinta de Prados, 5001-801 Vila Real, PortugalbDepartamento de Engenharias, Universidade de Tr as-os-Montes e Alto Douro (UTAD), Quinta de Prados, 5001-801 Vila Real, PortugalcSignal Processing Laboratory (SPL), Department Electr onica, Telecomunicac oes e Inform atica/IEETA, Universidade de Aveiro, 3810-193Aveiro, Portugala r t i c l ei n f oArticle history:Received 28 June 2007Received in revised form29 November 2007Accepted 3 December 2007Keywords:ZigBeeWireless sensor networkViticultureAcquisition deviceRemote sensingEnergy harvestinga b s t r a c tThis paper is part of a long-term effort to introduce precision viticulture in the region ofDemarcated Region of Douro. It presents the architecture, hardware and software of a plat-form designed for that purpose, called MPWiNodeZ. A major feature of this platform is itspower-management subsystem, able to recharge batteries with energy harvested from thesurroundingenvironmentfromuptothreesources.Itallowsthesystemtosustainoperationas a general-purpose wireless acquisition device for remote sensing in large coverage areas,where the power to run the devices is always a concern. The MPWiNodeZ, as a ZigBeeTMnetwork element, provides a mesh-type array of acquisition devices ready for deploymentin vineyards. In addition to describing the overall architecture, hardware and software of themonitoring system, the paper also reports on the performance of the module in the field,emphasising the energy issues, crucial to obtain self-sustained operation. The testing wasdone in two stages: the first in the laboratory, to validate the power management and net-working solutions under particularly severe conditions, the second stage in a vineyard. Themeasurements about the behaviour of the system confirm that the hardware and softwaresolutions proposed do indeed lead to good performance. The platform is currently beingused as a simple and compact yet powerful building block for generic remote sensing appli-cations, with characteristics that are well suited to precision viticulture in the DRD region.It is planned to be used as a network of wireless sensors on the canopy of vines, to assist inthe development of grapevine powdery mildew prediction models. 2007 Elsevier B.V. All rights reserved.1.IntroductionPrecision agriculture (PA) and precision viticulture (PV) areproduction systems that promote variable management prac-tices within a field according to site conditions. The conceptCorresponding author at: Centro de Estudos Tecnol ogicos, do Ambiente e da Vida (CETAV), UTAD University, Quinta de Prados, 5001-801Vila Real, Portugal. Tel.: +351 259 350 372; fax: +351 259 350 300.E-mailaddresses:rmoraisutad.pt(R.Morais),miguelseia(M.A.Fernandes),smatosutad.pt(S.G.Matos),cserodioutad.pt (C. Ser odio), pjfua.pt (P.J.S.G. Ferreira), mcabralutad.pt (M.J.C.S. Reis).is based on new tools and information sources provided bymodern technologies, such as yield monitoring devices, soil,plant and pest sensors and remote sensing. Despite the bene-fits, such diversity is currently restraining the rate of adoptionof these technological tools, which varies considerably from0168-1699/$ see front matter 2007 Elsevier B.V. All rights reserved.doi:10.1016/pag.2007.12.004computers and electronics in agriculture 6 2 ( 2 0 0 8 ) 9410695country to country, and from region to region (Seelan et al.,2003).The Demarcated Region of Douro (DRD) (a UNESCO WorldHeritage Site and the oldest Wine Demarcated Region of theWorld), due to its unique characteristics, poses very specificchallenges, mainly due to the topographic profile, pronouncedclimatic variations and complex soil characteristics. Grapeharvest and disease predictions as well as the assessment ofthegrape value are currently left to the grapegrowers, withoutthe help of decision-support mechanisms, in an environmentwhere no significant irrigation systems exists. In order toimprove the quantity and quality of winegrowers products,an array of sensors that monitors the environmental, climaticand physiological parameters is needed.The on-going technological developments in the minia-turization of electronic devices and wireless communicationtechnology have led to the emergence of Wireless SensorNetworks (WSN). The power necessary to effectively run therelated circuitry is currently being scaled down, with thehelp of energy harvested from the environment where thedevices are deployed. Strictly speaking, WSN are arrays ofelectronic devices with sensing capabilities that are inter-connected using a radio network. Many architectures exist,ranging from micro-devices with embedded smart sensorsto complete self-powered acquisition devices that support alarge variety of external sensors (Morais et al., 1996; Gomideet al., 2001; Beckwith et al., 2004; Delin et al., 2005; Hart andMartinez, 2006). Regarding network support, many protocolssuch as Bluetooth, ZigBee and proprietary forms of radio net-work interconnections exist (Lee et al., 2002; Beckwith et al.,2004; Wang et al., 2006).There are several key issues to address when selectinga suitable technology for wireless data transfer. One of themost important criteria is the network support, usually deter-mined by the application target, which limits the availableoffer. Other key factors include data transfer rates and powerconsumption. Many stand-alone radio-frequency transceiversare suited for cable replacement (point-to-point connections),oftenusingproprietaryprotocolstoenhancedatatransferreli-ability. However, in these RF devices, mesh-type networks areusually not supported due to the complexity of the softwareimplementation.The well known IEEE 802.11 family of standards is ableto handle very high data rates, which however imply power-demanding devices. The IEEE 802.15.1 (Bluetooth) standard,althoughcapableofsupportingaPersonalAreaNetwork(PAN),is primarily intended for cable replacement solutions. It doeshave the capability to form small star-type networks knownas piconets and scatternets. Within these networks, a mas-ter device performs synchronisation between all connectedslaves, rendering high data rates and continuous data trans-fers possible. Although interesting to deal with a limitednumber of nodes, it has not been widely adopted for thedeployment of large arrays of sensing devices in crops, mainlydue to power demands and restrictions on the number ofnodes and connections.In contrast, the ZigBee environment has been specificallydevelopedtoaddressthedemandsofsensornetworks,includ-ing the need to handle a large number of nodes. ZigBee buildsuponthephysical(PHY)andmediumaccesscontrol(MAC)lay-ers defined by the IEEE 802.15.4 standard (IEEE, 2003), enablingthe creation of complex ad hoc networks with up to 65536devices, suitable for industrial, agricultural, vehicular, resi-dential and medical environments. The intent of IEEE 802.15.4is to provide ultra low power consumption and very shortwake-up times capabilities at very low cost to devices oper-ating in a Low Rate (250kbps) Wireless Personal Area Network(LR-WPAN). To this effect, the IEEE 802.15.4 assumes that thedata transmitted are short and that transmissions occur at alow-duty cycle (active/sleep times ratio), reducing the overallpower needs and enabling the application of batterypoweredembedded systems.The ZigBee standard defines the network layer specifica-tion to allow the formation of three network topologies: star,tree and peer-to-peer. In the latter topology, also known asmesh-type, every network element can communicate withany other within its range. This allows more complex net-work formations to be implemented, such as ad hoc andself-configuring networks. These should contain a uniquecoordinator, responsible for managing all the PAN function-alities and, for instance, retrieving all relevant data from theZigBee network. This mesh-type topology, which relies on therouting mechanisms for multi-hop provided by the networklayer, is a key element for wireless networks of smart acqui-sition devices in the field. ZigBee also defines the type ofdevicebasedonthesetoffunctionsthatisenabledtoperform.The Full-Function Device (FFD) can act as a router while theReduced-Function Device (RFD) is usually an end-device thatis only allowed to communicate with its router or coordinator.In addition, ZigBee also provides a framework for applicationprogramming in the application layer. More details on Zig-Bee/802.15.14 networks can be found in the survey (Barontiet al., 2007) and in (IEEE, 2003).Currently, ZigBee is a promising solution to enhance thedevelopment of ad hoc multi-hop sensor networks, and alot of research effort is being invested in adopting andfinding new solutions for almost every kind of monitoringpurpose (Jinsheng et al., 2006). However, agricultural produc-tion systems suffer from the usual delay in the applicationof these highly innovative technologies. Among the severalaspects that constrain these developments we mention theissues related to power management and availability, and theease with which the systems can be deployed in an openfield.This paper addresses some of these challenges anddescribes a ZigBee multi-powered wireless acquisition device,designed to be part of the remote sensing project of intro-ducing PV in the Demarcated Region of Douro. The systemrepresents an evolution over the SPWAS (Morais et al., 1996)acquisitionstation,contributingtomakehighlyflexibleacqui-sition systems available for application in PV and remotesensing. Its features include the ability to harvest energy fromtheenvironment,inmultipleways.Italsocontainsasoftware-basedmethodthatpreventsautomaticallyswitched-offnodesfrom being switched-on soon after, as their batteries chargeagain. Such cycles have a negative impact on the battery life,and are more difficult and expensive to avoid via hardware.The need to deal with network discovery/connectivity failuresand avoid repetitive and wasteful connection attempts is alsoaddressed.96computers and electronics in agriculture 6 2 ( 2 0 0 8 ) 94106The paper describes the overall architecture of this moni-toring system (Section 2), then the hardware (Section 3) andsoftware (Section 4) of the basic module around which thesystem is built, and then reports on the performance of themodule in the field, emphasising the energy issues, which arecrucial to obtain self-sustained operation. This is the mainexperimental part of the paper (Section 5), and the resultsobtained confirm that the hardware and software solutionsproposed in the paper do indeed lead to good performance.The conclusions and lessons that were learned in the pro-cess are discussed in detail in Section 6, which closes thepaper.2.Remote sensing wireless network forprecision viticultureThe layout of hillside vineyards in the DRD is strongly con-ditioned by the original slope and relief of the parcels ofvines. Also, the soil is mainly based on complex schist whichimposes some constrains in the assessment of its hydrolog-ical aspects. The unique characteristics of these vineyards,as well as the topographic aspects, erosion control, verticalplanting, the intrinsic limited water availability, and widetemperature span across all day and year, demand the mostrecent technological tools, such as distributed monitoring andinformation processing. These may help in understandingvineyard variability and therefore how it might be managed,thus improving the quantity and quality of the wines. A goodexample of using WSN as a key tool to understand produc-tivity variability can be found in Camilli et al. (2007). As anincreasing number of electronic devices with various types ofsensors are embedded in agricultural processes, efficient sys-tem integration has become a critical goal. The huge amountof data retrieved by intensive field data acquisition needsto be centralized and made available on the web, by usingfor instance geographical information systems (GIS). On aregional, or even at a global scale, large plantation infrastruc-tures are the result of the interconnection of multiple localplantations, which is the DRD dominant scenario regardingvineyards.Such a distributed platform, which incorporates informa-tion from remote sensing, from in situ weather conditions,from water source levels, from soil history, and from farmerknowledge about the relative productivity of selected “Man-agement Zones” of the vineyard, can be applied, for instance,to predict yield and diseases, and to disseminate advicethroughout the growing season about the optimum usage ofwater and the chemical treatments needed.To address the relevant issues regarding the deployment ofsuchamonitoringnetworkintheDRDwithitsspecificities,wepropose a remote sensing network architecture, depicted in asimplified way in Fig. 1. The MPWiNodeZ, as a self-sustainingsmart acquisition device, aims to enhance in-field data gath-ering and to give network support to systems such as thosedescribed in (Valente et al., 2006). For each vineyard manage-ment zone (VMZ), a ZigBee network of MPWiNodeZ devicescan be deployed to acquire data on soil moisture content,soil temperature, air temperature, relative humidity and solarradiation, among other parameters. The cluster head (CH)operates as a local (or VMZ) sink node for this wireless sen-sor network. This creates an intermediate level of aggregationnodes that manages the sensor networks and performs localdataintegrationandsupervisionfunctions,whilemaintainingconnectivity through the whole region.Since each wine making company may have vineyardslocated in any location of the DRD, the connectivity betweeneach VMZ and the company office headquarters (shippersoffice in Fig. 1) represents an important issue that must beaddressed. To this effect, the clusters are wirelessly linked tothe shippers office through a TCP/IP-based connection suchas GPRS and 802.11 links.Toaccommodatethedisparatedatasourcesfromvineyardsand its surrounding environment, each acquisition deviceshould also have a high degree of flexibility concerning thetypesofsensorsallowed.Toaccomplishthisgoal,thecommonsignal conditioning procedures of acquiring voltage-, current-,frequency- and resistance-output sensors have been comple-mented with a small set of IEEE 1451 standards to includeinformationabouteachsensorinaTransducerElectronicDataSheet (TEDS). Each acquisition device has the necessary com-puting power to verify and validate its own data and convertthem to international units, thus reducing the amount of pro-cessing at the aggregation node that could have hundreds ofdevices connected.Fig. 2 illustrates the application of a ZigBee network toenhance remote sensing in a PV environment. For simplic-ity, only one parameter is shown for each network element. Inthe case of the MPWiNodeZ device, up to nine parameters canbe measured. The experimental results reported in this papershow that the power management and networking solutionsadopted do work in practice, both in the laboratory and in thefield. The MPWiNodeZ devices will be used to deploy a net-work of wireless sensors on the canopy of vines, which will beused as a tool to develop models to predict the developmentof grapevine powdery mildew.3.The MPWiNodeZ acquisition deviceIn order to better understand various issues in deploying awireless sensor network in remote sensing of environmentalparameters, we have developed a prototype system that sat-isfies the requirements for self-sustaining network nodes inagricultural environments. The MPWiNodeZ (Multi-PoweredWireless Node ZigBee) device is a small custom board aimedto act as a router or as an end-device in ZigBee networks. Itis based on the MPWiNodeX, a generic power-managementplatformthatenablesself-sustainingdevices.Asimilardevice,denoted MPWiNodeS, based on an off-the-shelf RF transceiver(RC1280 from Radiocrafts, Norway), has also been developedand tested to enable simple star-type networks on a propri-etary environment with the main purpose of evaluating andcharacterizingthepower-managementplatform.TheMPWiN-odeZ can manage up to three simultaneously energy sourcesto charge a compact pack of three 1/2 AA-size 650mAh NiMHbatteries.The MPWiNodeZ is built around two varieties of water-proof encapsulations to support the harsh environment thatan open field presents to any electronic device. The power-computers and electronics in agriculture 6 2 ( 2 0 0 8 ) 9410697Fig. 1 Illustration of the on-going implementation of an in-field data acquisition network, based on a ZigBee network ofMPWiNodeZ devices in a precision viticulture environment.management hardware and software systems were carefullydesigned to withstand the operating conditions. To achievemaximum flexibility, the system recharges its batteries usingenergy harvested from the surrounding environment, from upto three sources (photonic energy, kinetic energy from movingwater in irrigation pipes and from wind), avoiding main-tenance and human interference. The MPWiNodeZ devicecombines these energy harvesting methods with a power-conservative software application that avoids the repetitiveuse of the available radio channels when joining an existentnetwork, thus extending battery autonomy. The embeddedsoftware application is ready for the implementation of theIEEE 1451 object model to achieve a higher degree of sensorinteroperability.The core of the MPWiNodeZ is a wireless ?-controller(JN5121 from Jennic, UK) that comprises an 802.15.4 RFtransceiver and the ZigBee stack. Besides the embedded com-munications capabilities, this platform has also been chosento provide reliable signal conditioning to raw sensors andsubsequent data processing. To this effect, it is intendedto employ a scaled-down version of the IEEE 1451.1 objectmodel for smart sensors, thus promoting a well-definedcommunication protocol for high-level sensor-to-networkinteraction.3.1.Hardware overviewThe MPWiNodeZ device offers a rich and flexible set of func-tions that enables a wide range of sensors to be plugged in,regardless of its computation and communication capabili-ties with minimal power consumption. By employing the IEEE1451.1 object model, the MPWiNodeZ device can use this stan-dardized procedure to convert raw data from low-cost analogsensors into meaningful information. The same approach hasalso been followed in Oostdyk et al. (2006) and Ding et al.(2007), where the implementation of the IEEE 1451 has beensimplified to a high-level communication between two ZigBeedevices(thecoordinatorandtheMPWiNodeZ),eachoneactingas a Network Capable Application Processor (NCAP).TheJN5121wireless?-controllerhasbeenchosenasacost-effective solution. This highly integrated device integrates a32-bit RISC processor, with a fully compliant 2.4GHz IEEEFig. 2 Deployment of a wireless sensor network based on a ZigBee mesh-type topology for environment monitoringpurposes.98computers and electronics in agriculture 6 2 ( 2 0 0 8 ) 94106Fig. 3 MPWiNodeZ hardware architecture.802.15.4 transceiver, 64kb of ROM, 96kb of RAM, and incorpo-rates a wide range of digital and analogue peripherals. With alow sleep current (below 5?A), the JN5121 provides a versatilesolution for wireless sensor networking applications.The block diagram of the MPWiNodeZ device is depicted inFig. 3. Besides the ?-controller, it comprises an external 12-bit, A/D converter (AD7888 from Analog Devices, MA, USA).The AD7888 is a micro-power (3?W in power-down mode)ADC with serial interface that operates from a single 2.7Vpower supply. It contains eight single-ended analog inputsand features an on-chip 2.5V precision reference that maybe used (software selectable) for the voltage reference for A/Dconversion instead of using the supply voltage. The power-management block is responsible for charging the systembattery-pack and additionally it provides data on energy har-vested from environment. External sensors are powered bya separate DCDC converter (MAX710 from Maxim, CA, USA)that converts the battery voltage into a regulated 5V or 3.3Voutput, pin selectable. This converter is turned on only whenneeded, otherwise it remains in the shutdown mode. A pho-tograph of the MPWiNodeZ device can be seen in Fig. 4.3.2.Energy harvesting and power managementWhen considering an array of sensing devices that aredeployed across an extensive agricultural area, the energyFig. 4 Photograph of an MPWiNodeZ device.supply system is a crucial issue. The traditional, yet mostused approach is to use batteries, rechargeable or not. How-ever, these energy reservoirs can store a finite amount ofenergy, and their replacement and maintenance representsa severe bottleneck. An emerging technique that circum-vents this limitation is environmental energy harvesting thatexploits energy sources that are ubiquitous to the operatingspace (Raghunathan et al., 2006). In the present applicationtarget, and regarding availability, the most feasible harvestingtechniques are related to solar and kinetic energy sources.The power requirements of the MPWiNodeZ device aremostly satisfied by a low-voltage 0.5W solar panel (MSX005from Solarex, MD, USA), which is used to efficiently chargea compact 3.6V 650mAh NiMH battery-pack. With only thisenergy source and reservoir, the MPWiNodeZ would operateindefinitely, due to its low-duty cycle operation as a ZigBeeend-device. However, this turns out to be insufficient to per-manently run a device operating as a network router. To thiseffect, supplementary kinetic energy is harvested from waterand wind flow. In the first case, power is provided by a hydro-generator placed in the irrigation pipes (which we regard asbeing similar to a power outlet in the field) and, in the sec-ond case, by a small wind-powered generator. Fig. 5 showsphotographs of the energy harvesters that have been used.In addition to providing power, the associated harvestingtechniques double as sensors, yielding data on the amount ofsolar radiation, water flow and wind speed. Fig. 6 shows thesimplified power-management block where, besides the mainfunction of recharging the system battery, it also supplies dataon the amount of solar radiation, wind speed and irrigationwater flow as a density of pulses related with each parameter.Each pulse sequence is applied to a 4:1 precision multi-plexer (MAX4618 from Maxim, CA, USA), which selects thesignal to be filtered (by R1and C1in Fig. 7), in order to generateits mean value. Prior to analog-to-digital conversion, this DCvalue is amplified by a factor of two, using a fixed-gain oper-ational amplifier (MAX4174 from Maxim, CA, USA). Due to itslowpowerconsumption,thisamplifierissimplypoweredfroma digital output of the ?-controller. In addition, and since eachpower-management output signals are open-drain, the otherpart of the 4:1 multiplexer is used to connect the appropriatepull-up resistor. By using this approach, based on the use ofthe same components for all inputs, the related measurementchain can be disconnected thus saving puters and electronics in agriculture 6 2 ( 2 0 0 8 ) 9410699Fig. 5 Energy harvesters of the MPWiNodeZ device: (a) the small (60mm diameter by 200mm height) 6-blade Savoniousdesign wind generator; (b) the commercial hydrogenerator designed to be used in smart gas-based water heatingappliances and (c) the 0.5W low-voltage solar panel.4.Software organizationThe MPWiNodeZ was built around the ZigBee standard, to givewireless networking capabilities to the acquisition devices.Monitoring needs, regarding the hypothetical sensing devicesthat may be attached as well as the sampling interval requiredfor each of them, have dictated the implementation of a high-level application protocol. For instance, every attached sensormay have different operating rules that must be transferred,stored and applied by each MPWiNodeZ device. In addition,power-management issues should be addressed to avoid anykindofunpredictedbehaviour,suchasunreliablebatteryoper-ation.Fig. 6 MPWiNodeZ simplified power-management block.4.1.Operation modeThe software was designed to meet the demands of battery-operated systems. One major concern is the possibility ofsystem oscillations, or more precisely system on and offcycles, caused by partially charged batteries. The cycles areusually triggered by a battery voltage drop, a consequence ofnearly drained batteries. The voltage drop leads to the sys-tem being turned off. The battery voltage then rises again,because the load is removed, and the system may be switchedon again, and so on. The traditional approach to prevent thisundesirable oscillating situation is to add some hysteresis toFig. 7 Analog processing of the power-managementoutput signals.100computers and electronics in agriculture 6 2 ( 2 0 0 8 ) 94106Fig. 8 Overview of the MPWiNodeZ state machineimplementation.the power-management circuits. In the case of the MPWiN-odeZ device, the solution was implemented in software, andcompletely avoids the oscillation problem.The application code (developed under the Jennic Code-Blocks environment) that was implemented in MPWiNodeZdevice follows the generic state machine represented in Fig. 8.After a power-on, the hardware is properly configured and leftin a state of minimum current consumption, State 0. After thisvery first initialization stage, a sleep time T1is used beforegoing to State 1.State 1 represents the idle state where the battery voltagelevel is monitored. Every T2s, the system wakes-up and sam-ples the battery voltage level. If the battery level is higher thana predetermined value, the system goes to State 2 after thesleep time T3, otherwise remains in State 1. After switchingto State 1, which means that the battery has enough energy,the MPWiNodeZ device tries to discover a nearby router orcoordinator for binding. If successful, it is assumed that theacquisitiondevicehasthesufficientconditionstooperatenor-mally and tries, after the short time T4, to join the existingZigBee network (State 3) in order to acquire and store thenetwork parameters for later use. If discovery and joining con-ditions are not met, it returns to the idle state after the sleeptime T10.State4reflectsthedataacquisitionandtransmissiontasks.The first time that the MPWiNodeZ device goes to this state(on the transition 34), it waits the fixed sleep time T5. Thesub-states 4.1, 4.2, 4.3 and 4.4 (separated by the time T6) areresponsible for setting the necessary timing tasks in the dataacquisition process (sensors power-on time, capture period,etc.).Attheend(sub-state4.4),the802.15.4radiosystemofthe?-controller is powered on (T7interval) to send the acquireddata using the saved network parameters. If an acknowledge-ment is received from the network layer (indicating that datahas been transferred to the nearby router or coordinator), theMPWiNodeZ enters in sleep mode during the time T9that rep-resents the time between data samples, user defined. In caseof failure, it returns to State 1.Besides the above-mentioned, states 1, 2, 3, 4 and 5 haveadditionalconditions(dashedcurvesinFig.8),concerningbat-tery voltage levels, that must be met. Whenever the batteryTable 1 Time intervals typical valuesTime intervalValue (s)DescriptionT110Power-up to idle mode timeT2600Battery monitoring time intervalT3120Battery hysteresis timeT42Time allowed to join networkT560First acquisition intervalT61Acquisition timing tasksT70.1Radio and protocol power-up timeT83ACK wait timeT9User defined time (by rules)T10120Jump to idle state timevoltage falls below a predetermined value, the MPWiNodeZreturns directly to the idle mode waiting for the battery to beoperative. Table 1 shows these time intervals (used by default)and gives a short description for each one.4.2.Functional rules and configurationOne of the goals of the MPWiNodeZ device is to promote theon-board extraction of meaningful information about the rawsensors that can be connected. To this effect, and as a firststep to adopt the IEEE 1451 family of standards concerningsmart sensors, the 1451.0 definition of TEDS is used, mainlyto convert raw data into metadata. As a result of this imple-mentation, the MPWiNodeZ is able to perform some localprocessing tasks and return meaningful sensor data over thenetwork such as the sensor value of the measured parameterin engineering units, rather than the unprocessed, raw resultof an analog-to-digital conversion.The TEDS is an electronic data sheet in a standardized for-mat stored in the ?-controller flash memory that describeseach attached transducer through the Transducer InterfaceModule (TIM). Since the MPWiNodeZ has a total input capabil-ity of 9 channels (8 analog inputs and a digital counter input),eachchannelintheTIMmustbedescribed.Forthatpurpose,achannel TEDS was developed. It contains information of eachtransducer such as the transducer type, range limits, phys-ical units and timing restrictions. In this first step to adoptIEEE1451, each channel TEDS was stored in the ?-controllerflash memory only during the programming process. If sometransducer attached to some input channel is changed, a newprogramming procedure is needed. In the near future, weintend to upload each TEDS through the wireless network.Besidethecharacterizationofeachtransducer,thebehaviour of the entire MPWiNodeZ device should also bedefined. In our implementation, it is defined by a set of func-tional rules. These rules occupies only four bytes (valid forMPWiNodeZ and MPWiNodeS devices), thus being suitable toupload through the ZigBee network. Table 2 shows the bit cod-ing of these 4-byte rules, where a short description is alsogiven.These 4-byte rules settings virtually define the full-operation mode of each networked MPWiNodeZ device.Besides the usual procedure of enabling each data acquisitionchannel sampling and time window between each samplingprocedure, they also allow other important settings such asthe definition of the transmit power level that may be used.When in automatic mode, each MPWiNodeZ device uses thecomputers and electronics in agriculture 6 2 ( 2 0 0 8 ) 94106101Table 2 The 4-byte rules that defines the MPWiNodeZ operation modeBitBit-codingDefault valueShort descriptionRules 1-byte coding7Counter timebase:10Defines the frequency measurement time window6Counter timebase:01Options are 50, 100, 150 and 200ms5Average samples1Selectstheaverageproceduretobeapplied.Withthisoption,eachsample=(6burstacquisitionsminvaluemaxvalue)4DCPulse Windgenerator0Measures the DC value of the wind generator pulses3DCPulse Hydrogenerator0Measures the DC value of the hydrogenerator pulses2Frequency Measurement0Selects a frequency measurement on the counter input1DCPulse SolarPanel1Measures the DC value of the solar-panel pulse output0Battery voltage acquisition1Measures the MPWiNodeX battery voltageRules 2-byte coding7Supply voltage (MPWiNodeZ)0JN5121 function to measure power supply6On-chip temp. (MPWiNodeZ)0JN5121 function to measure on-chip temperature5Reserved for future use04Reserved for future use03Reserved for future use02Reserved for future use01Reserved for future use00Reserved for future use0Rules 3-byte coding7ADCChannel#07 select bit1Acquire signal from the external ADC channel #076ADCChannel#06 select bit1Acquire signal from the external ADC channel #065ADCChannel#05 select bit1Acquire signal from the external ADC channel #054ADCChannel#04 select bit0Acquire signal from the external ADC channel #043ADCChannel#03 select bit0Acquire signal from the external ADC channel #032ADCChannel#02 select bit0Acquire signal from the external ADC channel #021ADCChannel#01 select bit0Acquire signal from the external ADC channel #010ADCChannel#00 select bit0Acquire signal from the external ADC channel #00Rules 4-byte coding7TimeBetweenSampling:20Defines the time interval between acquisition tasks (T9).Options are 30, 60, 120, 300, 600 and 1800s. During theselected interval, the system is in a low-power sleep mode.6TimeBetweenSampling:105TimeBetweenSampling:004DisableAcquisitionOnWake0No data is acquiredwakes regularly to eventually receivenew rules.3TransmitPowerLevel:20Definition of the transmit power level, ranging from theminimum to maximum in 6 steps and the auto-adjust optionbased on the RSSI information and LQI (Link QualityIndication).2TransmitPowerLevel:111TransmitPowerLevel:010Use TEDS information1With this option active, raw sensor data (ADC count) isconverted to engineering units based on the correspondingTEDS metadata.Link Quality Indication (LQI) of the wireless ?-controller toadjust the transmitted power, thus optimizing energy usageduring each data transfer.The identification of the sender also poses specific prob-lemsthatmustbeaddressed.Whenworkingwithamesh-typenetwork topology, sender identification is not always possi-ble (an example is when the sender is more than two hopsfromthecoordinator).Toovercomethisissue,wehavedecidedto transmit the sender identification along with sensor data.Fig. 9 shows the ZigBee protocol KVP (Key Value Pair) frameused in data transmission. Essentially, our ZigBee payloadcomprises the sender identification, the 4-byte device operat-ing rules and data payload flowing between the MPWiNodeZdevice and the network coordinator. This data payload fieldcontains the data acquired from the attached sensors aswell as the time stamp which will be discussed in the nextsection.4.3.Time stampTime synchronization is a common requirement for wirelesssensor networks since it allows collective signal processing,sensor and source localization, data aggregation, and dis-tributed sensing (Milenkovi c et al., 2006). In some applicationsofwirelesspersonalareanetworks,synchronizedtimestampsare critical for proper correlation of data coming from differ-ent sensors and for an efficient sharing of the communicationchannel. Time stamping is also important in the case of inter-mittent communication within multi-hop networks that cansignificantly postpone transmission of the sensors data.Remotesensinginprecisionagricultureisoneexampleofanetworkingsensingapplicationwherereal-timerequirementsare not strict. Due to the process inertia, most of the mea-surements are commonly taken with a time base of severalminutes, which relaxes the algorithms that provide a time102computers and electronics in agriculture 6 2 ( 2 0 0 8 ) 94106Fig. 9 ZigBee Application Framework frame format usedin the MPWiNodeZ device.stamp for each data sample. Such time scales are appropri-ate for parameters such as air and soil temperature, relativehumidity, soil moisture, solar radiation, precipitation, windspeed and sap flow. For the planned sensing network appli-cations of the MPWiNodeZ device, the time stamps do notrequire precision of seconds; 1min is a typical value.The time stamp is usually tagged to a data sample by theZigBee coordinator every time that a data frame is received.However, a more flexible mechanism has been added in orderto support acquisition devices that have an embedded Real-Time Clock (RTC). The general idea is to add a time stamp assoonaspossible,attheoriginofthedataifatallpossible.IftheMPWiNodeZ device uses a low-power RTC (in our case DS1302from Dallas Semiconductor, CA, USA), a valid time stamp datais immediately transmitted to the coordinator. If not, the timestamp is reset to 0, indicating that the next node must insertit. A network router with RTC hardware capabilities may haveto insert all the time stamps if none of the nodes have themechanism for doing so. Otherwise, the insertion of the timestamp is left to the network coordinator. Fig. 10 illustrates thedescribed process where the seconds field in the time stamp isused for illustration purposes only. In this example, device Atakes some measurements at Coordinator Time (CT) 15:43:28.Since device A does not have a RTC, it simply clears the timestamp field. Device C, which has a RTC, receives the data pay-load at CT 15:43:36, inserting that time in the time stamp field.Finally, the data reaches the coordinator at CT 15:43:40, whichinserts the samples values in the internal database with the15:43 time stamp.5.Experimental resultsIn order to properly evaluate the MPWiNodeZ device, a two-phase experimental methodology was used. It validates thepower-management solutions during all active time peri-ods (acquisition, processing, transmission and reception),and tests the operational issues regarding software imple-mentation of the state machine under critical networkconditions.The first phase took place in a controlled laboratorial envi-ronment, where a small ZigBee network was formed by usinga coordinator (connected to a laptop through a RS232 link),two network routers (one hop away from the coordinator) andtwo MPWiNodeZ devices (as the one shown in Fig. 4) as end-devices, each connected to its router.The second experimental phase was performed under realoperating conditions in a nearby vineyard. To this effect, anMPWiNodeZ was used to acquire air and soil temperature, rel-ative humidity and solar radiation data, as depicted in Fig. 11.To test the discovery and joining procedures of the ZigBeeapplication framework, two routers (actually two MPWiNodeZdevices running the router application software) were usedin between the MPWiNodeZ under test and the coordinator(located in the laboratory).The main goal of the first stage experiments was the vali-dation of all software solutions, including the described statemachine and the evaluation of the power-management plat-form in low-duty cycle operation modes and under criticalsituations, such as the power-up conditions after a batterycharging cycle has been initiated. The handling of these sit-uations usually requires a large amount of power that weneeded to quantify and measure, especially when runningnetwork discovery/joining procedures. Because this first stageof the experimental setup exercises the system under partic-ularly severe conditions, it provides important insight aboutthe deployment of ZigBee-based systems running on batterieschargedfromenergyharvestedfromthesurroundingenviron-ment. In order to take proper and representative waveformsof battery voltage and current consumption profiles, this eval-uation had to be performed in the laboratory. To best describereal operating conditions, several low-power analog sensorswere used: three temperature sensors for measuring two airand one soil temperature (LM60B from National Semiconduc-tor, CA, USA), one relative humidity sensor (HybridCap fromPanametrics, USA) and two solar radiation sensors (TSL251and TSL230 both from Texas Instruments, USA). The samplingrate of acquired data was kept randomly variable between 30sand 30min to create several battery discharging profiles.Fig. 10 Illustration of the insertion of a time stamp in the MPWiNodeZ acquired puters and electronics in agriculture 6 2 ( 2 0 0 8 ) 94106103Fig. 11 Photograph of an MPWiNodeZ device used in environment monitoring in a vineyard (air and soil temperature,solar radiation and relative humidity in this case).Fig.12showsthefirstcyclestartingfromthepower-upcon-dition (state 0) until the acknowledge has been received after asuccessful data transmission (state 5). The power supply cur-rent was measured by using a precision 6 1/2 digit multimeter(Keithleymodel2000)withdataloggingcapabilitiesconnectedto a computer. For this purpose, the maximum number of datapoints allowed (1000) was used. To fit this power consumptionprofile into a 1000-point window with sufficient resolution toalso describe system operation throughout the entire cycle,the time periods between states were reduced, specificallyT1=T3=T5=7s.As can be observed from Fig. 12, the total time betweenState 2 and the end of State 3 is approximately 2s (T4), whichrepresents the most power-demanding period. In fact, duringthis period the MPWiNodeZ device must search an availableFig. 12 Power supply current profile for a normal work and issue a joining request. In order to save a signif-icant amount of battery energy, it is only allowed a one-shotjoining process. If it fails, the system will resume T10+T3later,according to Fig. 8. After this stage, where the network param-eters are acquired and saved for later use, the first acquisitiontask will be triggered T5later. For normal operation, the acqui-sition process will then be repeated every T9s. Under theapplication scope of the MPWiNodeZ device, T9may take val-ues of the order of several minutes. With a reasonable valueof 10min, probably even greater, a coarse average current con-sumption would be given by?i? =I?T?+ I9T9T?+ T9(1)where I?corresponds to the average current of the activeperiod (State 4.4State 5). Considering T?T8=2s, T9=600s,I?40mA and the measured sleep current I9=0.11mA, theexpression (1) leads to the average value of 243?A.Fig. 13 illustrates the case when no network is availableat that time. As expected, the MPWiNodeZ fails the dis-covery/joining process and continues to try every T10+T3,assuming that the battery has enough energy.During this process, and considering a current consump-tion of 50mA during T4and 110?A otherwise (sleep times T10and T3), the average value of current consumption is given by?i? =50T4+ 0.11T10+ 0.11T3T4+ T10+ T3(mA)(2)which for the intended application scope with T10=120s,T3=120s and T4=2s, results in an average current consump-tion of approximately 522?A.During the normal acquisition process, initiated on State 4,the ?-controller checks the battery conditions and loads from104computers and electronics in agriculture 6 2 ( 2 0 0 8 ) 94106Fig. 13 Power supply current profile during the discoveryand joining network procedures.memory the operational rules that specify which channels tobe sampled. Fig. 14 shows some waveforms that illustrate thisprocedure.The DCDC converter that supplies the external sensorsis turned-on during approximately 100ms in order to sta-bilize the voltage output. After this time, external sensorsare sampled by the analog-to-digital converter which willenter automatically in a sleep mode after the required con-versions. At the same time, if rules apply, the multiplexer isenabled to start averaging the pulse outputs from the power-management block (solar panel in this case). The bottomwaveforms of Fig. 14 show this procedure. During this enableperiod, a pulse train appears at the output of the multiplexerin order to be filtered. After the necessary voltage stabilisa-tion time, the amplifier is powered on, supplying the signal, which is amplified by a factor of two, to the ?-controller internal ADC. The time that the multiplexer isenabled can also be observed in Fig. 12 after the State 4. Ascan be seen, at the end of time T5, the sensors are turnedon and data acquired. After that, the ?-controller enables themultiplexer and goes sleep mode again. After a period of 2s,it wakes and turns on the amplifier (current consumption hasrisenfrom110?Ato400?A).Aftertheacquisition,theMPWiN-Fig. 14 Data acquisition-related waveforms.Fig. 15 Power supply current consumption of theMPWiNodeZ device as a router.odeZ performs all computations and send the data samplesover the ZigBee network.After the first evaluation phase, one MPWiNodeZ device,still operating as an RFD, was tested as an acquisition deviceoperating under real conditions, as seen in Fig. 11, and send-ing real-time data over a ZigBee network. The objective of thissecond evaluation phase was the validation of the describedstatemachinebutunderoperationasaZigBeenetworkrouter.For this evaluation scenario, the ZigBee network topologyhas changed to one coordinator, two network routers (bothMPWiNodeZ, one being under evaluation) and an end-device(located in the vineyard). The power supply current consump-tion of the router device has been traced and is shown inFig.15,whereitcanbeseentherouterjoiningprocess(first2s).After this first stage, the MPWiNodeZ operates as expected,routing packets from the end-device to the coordinator andvice-versa. As can be seen, a current consumption of almost50mA at all times places significant demands on the power-management system, which may need an energy supplementharvested from the surrounding environment.Fig. 16 shows the battery voltage profile of the MPWiN-odeZ device located in the vineyard. The battery was chargedby the low-power solar panel that was also used to mea-sure the solar irradiance. The result of this measurement isFig. 16 Battery voltage profile of the MPWiNodeZ deviceduring a 6-day puters and electronics in agriculture 6 2 ( 2 0 0 8 ) 94106105illustrated as the value, which is only showed forbattery correlation purposes. In this 6-day window, the bat-tery was kept in the charging mode until its voltage reachesalmost 4.2V. When it happens, the software procedure keepsthe battery in a float condition providing a trickle chargemechanism. Data were received by the ZigBee coordinatorat intervals of 60s, which we consider the most demandingcondition in practice, considering the scope of this MPWiN-odeZapplication.ThebatteryvoltageprofiledepictedinFig.16has been determined in lowmedium solar irradiance val-ues (less than 100W/m2), the batteries being charged withthis energy source only. As can be seen, even with a datatransmission every 60s, the battery voltage was always above3.9V.6.Final remarks and conclusionsWe have shown the feasibility of a ZigBee-based remotesensing network, intended for precision viticulture in theDemarcated Region of Douro. The network nodes are pow-ered by batteries that are recharged with energy harvestedfrom the environment. The power-management aspects havebeen found to be particularly critical, the main issues beingthe onoff cycles caused by partially charged batteries, andconnectivity/network failures that lead to repeatedly unsuc-cessful connection attempts. We have designed the nodes todeal correctly with these issues, and tested the correctness ofthe solutions adopted by testing the nodes under particularlysevere conditions.The testing and deployment of the devices was a two stageprocess. In the first stage, the devices were tested in the lab-oratory to validate the solutions that had been implemented,with particular emphasis on the power-management aspects.The power consumption profiles measured during the testsvalidated the software-based solution, based on a finite statemachine. The second and final stage was the deployment ofa network of devices in the field (see Fig. 11), a vineyard, withthe cooperation of a winegrower. All results obtained so farconfirm that the system works as envisaged, and operatesreliably. We have concluded that the system nodes are ableto sustain themselves based on solar energy alone; in otherwords, a ZigBee-based sensor network powered by batteriesrecharged by solar energy alone is feasible, if the networkingand power-management issues are handled as proposed. Nonew hardware or software issues appeared when operatingthe system in the field.The system is in principle also able to harvest kineticenergyfromwindandwaterinpipes.However,testingoftheseharvesting techniques has not been performed, for two rea-sons: first, these energy sources are more relevant to routers,which need a permanent energy supply, than to networknodes, which are less critical and can shut themselves offif necessary. Second, the performance of the nodes was ourmain concern and the main purpose of our study. The sys-tem was endowed with the possibility of harvesting fromboth solar and kinetic energy sources in anticipation of futureapplications, including for example applications in green-houses. A router placed inside a greenhouse would clearlybenefit from harvesting kinetic energy from water in pipesinside the greenhouse itself. The router current consumptionof 50mA would drain fully charged 650mAh batteries in lessthan 13h. The fact that the amount of solar energy is likelyto be reduced by the filtering effect of the greenhouse itselfprovides additional motivation to consider alternate energysources. The testing of the router and nodes under suchcircumstances is planned and will be reported in a futurework.AcknowledgmentsThe authors would like to thank Portugal Telecom Innovation(PT Inovac ao), which partially supported this work throughthe project “Wireless Farm”. Electronic components sam-ples for the developed prototypes were kindly supplied byMaxim Integrated Products Inc., CA, USA (MAX856, MAX982,MAX710, MAX4618, and DS1302), Analog Devices, MA, USA(AD7888BRZ),andCoilcraft,IL,USA(Inductors),afactwegrate-fully acknowledge.referencesBaronti, P., Pillai, P., Chook, V.W., Chessa, S., Gotta, A., Fu, Y.F.,2007. Wireless sensor networks: a survey on the state of theart and the 802.15.4 and ZigBee standards. Comp. Commun.30, 16551695.Beckwith, R., Teibel, D., Bowen, P., 2004. Report from the field:results from an agricultural wireless sensor network. In:Proceedings of the Local Computer Networks, 2004, 29thAnnual IEEE International Conference, November 1618, pp.471478.Camilli, A., Cugnasca, C.E., Saraiva, A.M., Hirakawa, A.R., Corr ea,P.L.P., 2007. From wireless sensors to field mapping: anatomyof an application for precision agriculture. Comp. Electron.Agric. 58, 2536.Delin, K.A., Jackson, S.P., Johnson, D.W., Burleigh, S.C., Woodrow,R.R., McAuley, J.M., Dohm, J.M., Ip, F., Ferr e, T.P., Rucker, D.F.,Baker, V.R., 2005. Environmental studies with the sensor web:principles and practice. Sensors 5, 103117.Ding, H., Zhang, B., Ding, Y., Tao, B., 2007. On a novel low-costweb-based power sensor via the Internet. Sens. Actuators A:Phys. 136, 456466.Gomide, R.L., Inamasu, R.Y., Queiroz, D.M., Mantovani, E.C.,Santos, W.F., 2001. An automatic data acquisition and controlmobile laboratory network for crop production systems datamanagement and spatial variability studies in the braziliancenter-west regi
温馨提示:
1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
2: 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
3.本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
提示  人人文库网所有资源均是用户自行上传分享,仅供网友学习交流,未经上传用户书面授权,请勿作他用。
关于本文
本文标题:用Zigbee实现无线IC卡考勤机设计
链接地址:https://www.renrendoc.com/p-45504331.html

官方联系方式

2:不支持迅雷下载,请使用浏览器下载   
3:不支持QQ浏览器下载,请用其他浏览器   
4:下载后的文档和图纸-无水印   
5:文档经过压缩,下载后原文更清晰   
关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

网站客服QQ:2881952447     

copyright@ 2020-2025  renrendoc.com 人人文库版权所有   联系电话:400-852-1180

备案号:蜀ICP备2022000484号-2       经营许可证: 川B2-20220663       公网安备川公网安备: 51019002004831号

本站为文档C2C交易模式,即用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知人人文库网,我们立即给予删除!