A Zigbee Based Smart Sensing Platform for MonitoringEnvironmental ParametersM. Haefke*, S. C. Mukhopadhyay! and H. Ewald**...
datasets it is possible to make a relative correctoutlook for the next few days. The data of thesensors have to be exact w...
Figure 1: Saturation of water in Air at Sea levelAlmost all weather aspects can be traced back to theamount of solar radia...
4.2. Temperature MeasurementThe temperature, as the most important weatherinfo can be measured in different ways. Thereele...
Figure 7: Daily Humidity change captured with HIH-40104.4. Light Intensity MeasurementA value which is very important for ...
(9)To make the pressure comparable with other thepressure has to be correct. The Sensor makes aninternal temperature corre...
Figure 14: Electrical connection of XBee Modul withMicrocontroller4.6.3.Configuration and SetupTo configure the XBee Modul...
of for example machines which expose heat has tobe reduced.The sensors consume less than 10mA whilemeasuring. The biggest ...
Upcoming SlideShare
Loading in …5

A zigbee based smart sensing platform for monitoring enviromental parameters


Published on

For more projects visit @ www.nanocdac.com

Published in: Technology, Business
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

A zigbee based smart sensing platform for monitoring enviromental parameters

  1. 1. A Zigbee Based Smart Sensing Platform for MonitoringEnvironmental ParametersM. Haefke*, S. C. Mukhopadhyay! and H. Ewald** University of Rostock, Rostock, Germany!School of Engineering and Advance TechnologyMassey University,Palmerston North, New Zealand.Abstract: The ability to monitor environmental conditions is crucial to research in fields ranging from climatevariability to agriculture and zoology. Being able to document baseline and changing environmental parametersover time is increasingly essential important and researchers are relying more and more on unattended weatherstations for this propose. A Zigbee Based Smart Sensing Platform for Monitoring Environmental Parameters hasbeen designed and developed. The smart weather station consists of SiLab C8051F020 microcontroller basedmeasuring units which collect the value of the temperature, relative humidity, pressure and sunlight. These unitssend their data wireless to a central station, which collects the data, stores and displays them into a database. Thefacility of adding a few more sensors and a few more stations has been provided.Keywords: Zigbee, Smart Sensing, Environmental monitoring, wireless sensor network, weather station,temperature measurement, pressure measurement, humidity measurement, light measurement.1. IntroductionHuman beings are meteor-sensitive. We feel good,when the sun shines and get melancholic if the skyis grey. The emotion is connected to weatherconditions, experiences memories and is one of themost discussed aspects of our live. The Greekswere the first meteorologists (7thcentury B.C.).Thales of Miletus associated weather withmovement of the stars and planets [1]. Since thenhumans always tried to forecast the weather, to plansowing and harvesting of plants, to decide how todress and to plan their outdoor activities.In the past these forecasts were made by higheducated man with a big knowledge and experiencelater instruments were designed to measure theactual situation, beginning with the firstthermometer invented by Galileo in 1593[1].Since the 1940’s forecasts for the weather arecomputer calculated models, using the previousdata of weather stations on the ground collectedmanually by persons operating this stations,satellite pictures and offshore data collected bymeasurement buoy. The weather observing isgetting more and more automatic, because themanual collection data are not continuously and thevariation caused by wrong reading can change thewhole forecast in addition the use of a wirelessstand alone station can reduce the cost ofmaintaining the weather station, reduce the risk oflosing data and can be placed at critical locations,without endanger an observer.There are several different producers of weatherstations, with all kind of sensors. These stations canbe wireless or connected with a wire to a Serverstoring the data and make it possible to access them[2][3]. These Stations can only be operated with thegiven software which makes it difficult to accessthe data and use them for different purposes,additionally these stations are very expensive.Therefore, this research motivates to develop aweather station that has the followingcharacteristics:Usage of low cost equipmentFlexible data-handling to use the data fordifferent purposeSensors should be as accurate as possibleWireless connection to get the data fromdifferent sensors and to make the set up aseasy as possibleA possible number of at least 6 differentstations per central station to make acomparison possibleThe present paper describes the development of awireless weather station measuring temperature,humidity, pressure and light intensity.2. The importance of environmentalparametersModern weather forecasts are a result of a computercalculated model, which uses a mesh of weatherstations, weather balloons and satellites around theworld. Based on the actual conditions and long time978-1-4244-7935-1/11/$26.00 ©2011 IEEE
  2. 2. datasets it is possible to make a relative correctoutlook for the next few days. The data of thesensors have to be exact with the lowest accuracypossible to get an exact forecast [4]. Additional tothe accuracy the number of stations has to be veryhigh so that the mesh cells are very small. Modernforecast systems use a resolution of one station per32km [5]. A lower resolution is difficult to produce,because the costs per weather station are very high.But to improve the simulations a smaller grid sizewould be necessary [6].The weather data is also necessary of otherpurposes. For example in agriculture it is necessaryto know the past and actual conditions on the fieldsto plan the use of fertilizer, aerial spraying,watering or harvest or in zoology, the population ofinsects and bigger animals is directly correspondingto the former weather condition which makes thesedata necessary for research and fight againstupcoming pests [7].3. Measurement of EnvironmentalparametersThere are several important values to be measured.The most important weather element is thetemperature. It is an element to which human life,and also plant and animal life is sensitive. Thetemperature is measured by different types ofthermometers classified in four groups:Liquid in glass thermometersDeformation thermometersLiquid in metal thermometersElectrical thermometersFor an automatic weather station only the electricalthermometers can be used because all of the otherthermometers need personal to read the temperaturefrom the scale.The second value to be measured is the pressure.The pressure is measured in kPa and is a value ofthe weight of the air above the sensor. As a result ofthe air’s constant and complex movements and thechanges in its temperature and its water vapourcontent, the weight of the air above a fixed point iscontinually changing. Therefore the pressure isnever constant for long and is an important featureof the weather by reason of the relations to otherweather changes. The instrument to get the airpressure is a Barometer.Barometers can be divided in 3 groups:Mercury BarometersAneroid BarometersDigital BarometersFor an automatic weather station again only thedigital instrument can be used. Because the pressureis addicted to different environmental conditionsfour corrections are necessary to make a barometerreading comparable with other readings of otherplaces [8].Temperature correction – as a convention allpressure readings are scaled to 0°C1. Gravity correction – the force of gravityvaries over the earth’s surface because theearth is not a perfect sphere (the equatorialdiameter is 43km greater than its polardiameter).2. Instrumental error correction – like allsensors, even barometers have an internalerror, which has to be corrected bycomparing the value with the exact valuegiven by a reference.3. Altitude correction –all barometer readingsare reduced to sea-level for the purpose ofcomparisonIn New Zealand the error caused by the gravity-differences is minimal so that if the measurement iscorrect only a temperature and an altitudecorrection are necessary.The most variable gas in the atmosphere is thewater vapour, measured by the humidity. For zeroup to 4% of the volume is water. It’s extremelyimportant to man’s existence on the earth andconstitutes one of the primary elements of weather.It not only contributes to the heating and cooling ofthe earth’s surface but is directly related to thedistribution and extent of precipitation over theearth [1].There are different ways to make the amount ofwater in the air comparable. The first is to measurethe absolute Humidity that means the actual mass ofwater vapour in a given volume of air, for example3 grams of water in a cubic meter of air. The secondand most common way is the Relative Humidity. Itis the percentage of water vapour present in the aircomparison with saturation conditions. Relativehumidity UR (in per cent) of moist air is defined:Where r is the actual amount of water vapour in theair and rw the maximum capacity of vapour the aircan hold, before it starts to condensate [8]. Thisfactor depends on the temperature and can be seenin Figure 1. If the relative humidity reaches 100%the air is saturated with water and some of the watervapour becomes liquid, this is also called the DewPoint [1].
  3. 3. Figure 1: Saturation of water in Air at Sea levelAlmost all weather aspects can be traced back to theamount of solar radiation that reaches the surface ofthe earth. Therefore the sunlight should bemeasured as well. The light intensity changes withthe seasons. In the summer is the time with thehighest amount because the sun has its greatestnoon elevation.The sunlight can be measured in different ways.One way is to measure the energy brought by thesun to a specific area on the earth-surface, on allwavelength (in W/m2) and the other way is to getthe intensity of illumination for a specificwavelength (in lux). In this paper the lightaccording to the visual perception (the illumination)is measured.4. Description of the developed SystemThe developed system is based on aMicrocontroller, communicating with a centralstation (Figure 2). The Microcontroller is connectedto different sensors, which giving analog voltagesignals. These signals are measured and“translated” into the responding value. All of thesevalues are send trough the XBee Module to a basestation, which stores the data into an AccessDatabase. The Values can then be displayed in theGUI running on a computer.Figure 2: Block diagram of developed System4.1. Microcontroller C8051F020The Microcontroller C8051F020 is the programmedusing “C” language for the operation of theabovementioned tasks in this project. TheMicrocontroller is produced by the SiliconLaboratories, Inc. [9][10].To operate the chip a study of the architecture wasnecessary. The functioning of the microcontroller,stated below:- The C8051F020 device is a fully integratedmixed-signal System-on-a-Chip MCU with 64digital I/O pins- High-Speed pipelined 8051-compatible CIP-51 microcontroller core (up to 25 MIPS)- In-system, full-speed, non-intrusive debuginterface (on-chip)- True 12-bit (C8051F020) or 10-bit 100 ksps 8-channel ADC with analog multiplexer- True 8-bit ADC 500 ksps 8-channel ADC withanalog multiplexer- Two 12-bit DACs with programmable updatescheduling- 64k bytes of in-system programmable FLASHmemory- 4352 (4096 + 256) bytes of on-chip RAM- External Data Memory Interface with 64k byteaddress space- SPI, SMBus/I2C, and (2) UART serialinterfaces implemented in hardware- Five general purpose 16-bit Timers- Programmable Counter/Timer Array with fivecapture/compare modules- On-chip Watchdog Timer, VDD Monitor, andTemperature Sensor0. -15 -10 -5 0 5 10 15 20 25 30 35 40SaturationWaterVaporing/m³Temperatur in °C
  4. 4. 4.2. Temperature MeasurementThe temperature, as the most important weatherinfo can be measured in different ways. Thereelectrical sensors with different type ofmeasurement, such as change of resistance orthermo elements. There are also integrated circuits,which give different output signals, such as serialdata or analog values.Figure 3: Circuit of temperature sensor DS600The temperature in this project is measured with anintegrated circuit, the DS600 temperature sensorproduced by MAXIM - Dallas Semiconductor TheSensor gives an analog output depending on themeasured temperature. This voltage has to bemeasured by the microcontroller using a 12bitAnalog-to-Digital converter (ADC). The IC has anaccuracy of ±0.5°C and a linear output with6.45mV/°C and an offset of 509mV (Figure )[11].Figure 4: DS600 Output characteristicThe Output of the ADC has to be converted intothe right value. The ADC-value is first comparedwith the Reference Voltage of 2.4V (1) and thenwith the characteristic of the DS 600 to get theValue for the Temperature (T) (2).(1)-(2)The captured Temperature can be seen in Figure 5.Figure 5: Daily temperature in °C change captured byDS6004.3. Humidity MeasurementThe Humidity is measured with and integratedcircuit, the HIH-4010 produced by HoneywellInternational Inc. Like the temperature sensor, theHumidity sensor gives an analog output, which ismeasured by the 12Bit ADC of the C8051F020(Figure 6).Figure 6: Humidity measuring circuitThe Humidity sensor has and accuracy of ±3.4%relative Humidity [12]. To get the Humidity fromthe analog input the formulas (3) and (4) areneeded.(3)-(4)The calculated Humidity (H) needs to betemperature corrected (5). The temperature (T) isgiven by the DS600 sensor.-(5)The daily trend of the humidity can be seen inFigure 7.
  5. 5. Figure 7: Daily Humidity change captured with HIH-40104.4. Light Intensity MeasurementA value which is very important for thedevelopment of plants and which influences thewell-being of human beings is the light-strength.For that purpose a light measurement circuit(Figure 8) with a Photodiode has been used tomeasure the light intensity. The photo diodeBPW21 has a color-correction filter, giving anapproximation to the spectral response of thehuman eye [13] .Figure 8: Light measurement circuitFigure 9. Short Circuit Current vs. IlluminanceTo convert the measured ADC-Value into theillumination the formulas (6) and (7) are used.- (6)(7)The daily change of the light intensity can be seenin Figure 10.Figure 10: Daily light intensity captured with BPW214.5. Pressure MeasurementThe weather is directly connected to the air-pressure. Low pressure is associated with badweather and a rapid change of the pressure means adrastic change in weather, for example andupcoming storm can be forecasted by looking at thelast hours of pressure measurement.The Pressure was measured with the integratedcircuit MPX-4100 build by Motorola. The usedcircuit can be seen in Figure 11. The circuit needs a5V power supply and the output to the ADC isbetween 0 and 5 V what makes a voltage dividernecessary.Figure 11: Pressure measurement circuitThe pressure can be calculated with Formula (8)and (9) [14].(8)
  6. 6. (9)To make the pressure comparable with other thepressure has to be correct. The Sensor makes aninternal temperature correction, so that there is onlythe height correction to be done.If you look at a infinite thin layer of air with theheight dh in these thin layer the density isconstant. If the density is constant the pressure dpchanges like in fluids:- (10)From this it follows that the height is:- (11)If the temperature in every height is constant andthe air mass is also the same we can say, by usingthe Boyle’s law: and , that(12)If you set this in the formula for the height (11) andintegrate the equation over the whole height youget:- (13)By transpose this formula to p(h) you get thebarometric formula- (14)With the density of and a pressure ofyou get the air pressure depending onthe altitude (Figure 12).Figure 12: Air-Pressure addicted to altitudeThe corrected air pressure captured over 24h hourscan be seen in Figure 13.Figure 13: Air-Pressure change captured with MPX-41004.6. CommunicationTo save the data measured by the sensors it wasnecessary to build a network between the sensorsand to set up a computer receiving and storing thevalues. For the communication ZigBee moduleswere used. These provide a wide range and a coupleof low power modes, which could be used to reducethe current consumption of the circuit. In additionthe network-setup is easy and fast, so that anextension of new Stations is possible withoutproblems.4.6.1.XBee ModulThese Modules provide a possibility to build aneasy to configure Network, with a high datarate upto 230400 Baud/s. They come in a preconfiguredmode and establish the communicationautomatically. In addition they are powered by 2.7to 3,3V and can be connected to the C8051F020without any additional power-supply circuit[10][15].4.6.2.Electrical ConnectionTo connect the XBee module to the Microcontrolleronly 4 wires are necessary. The Power-Supply(3.3V), Ground and TX and RX of theMicrocontroller are connected to VCC, GND, DINand DOUT of the XBee module (Figure 14).60065070075080085090095010001050010020030040050060070080090010001100120013001400150016001700Air-PressureinhPaHeight above Sea-Level in m
  7. 7. Figure 14: Electrical connection of XBee Modul withMicrocontroller4.6.3.Configuration and SetupTo configure the XBee Modules, the providedsoftware X-CTU is used. To set up a network thefollowing conditions have to be fulfilled:• Each network needs one Coordinator andseveral End-Devices• All modules have to have the same firmwareand PAN-IDIf everything is setup correct, the coordinatorestablishes a connection to the End-Devicesautomatically.The Coordinator sends Broadcast Commands, andthe End-Devices can send to Coordinator only.Although a Mesh-Network is possible, where theEnd-Devices act like a Router and forward datafrom devices which are out of the range from theCoordinator.4.6.4.Communication ProtocolThe transmission of the XBee Modules doesn’tprovide a checksum or any other possibility toverify the correctness of the received data. To avoidcorrupted data and to see which station was sendingthe data an own communication protocol is needed.The send string for the weather stations contained27 characters (Figure 15). The first three chars arethe name of the station, then each divided by aminus the sensor data.Figure 15: Data Communication ProtocolEach Station sends their data every 2 seconds to thecoordinator. Where the data has to be collected andtested for correctness.4.7. GUIThe Graphical User Interface was programmed inC# and captures the serial communication. Thestring received as serial Data is split into 5 parts(the address and sensors) and saved in an AccessDatabase. In this stage the GUI also tests the datafor correctness.The Database contains a Table in which thedifferent Settings for the sensors are stored. Thatmakes it possible to attach different sensors and tochange the position of the sensor data in the sendstring (4.6.4 Communication Protocol). It is alsopossible to make a calibration for each sensor, forexample to get the dot in the temperature. To getthe right value of the sensor the send data must bedivided by 100 but in the reality this value maydiversify to get the right value. In the GUI it ispossible to display whether one or multiple sensors(Figure 16) to give the user the chance to showdifferent graphs and to compare different stations.Figure 16: GUI showing all 4 Sensors of one Weather Station5. Outcome and AnalysisSix prototype weather stations (Figure 17) havebeen fabricated and successfully tested over morethan 24 hours.Figure 17: Developed Weather Station connected to theC8051F020 MicrocontrollerThe weather data captured by the sensorscorrespond directly to the data that are given bynon-electrical sensing elements, like thermometers,barometers and hygrometers.The data show, that there are some problems to besolved, for example is the humidity and thepressure sensor very sensitive to direct sunshine, sothat a casing is needed that is impervious to light.For the correctness of the data is necessary that theposition of the sensor is chosen well. The Influence
  8. 8. of for example machines which expose heat has tobe reduced.The sensors consume less than 10mA whilemeasuring. The biggest amount of energy is usedfor the wireless communication (35mA whilesending). The usage of the XBee module sleepmode and reducing the communication time isessential to reduce power consumption.Nonetheless a battery powered weather station canbe build. The usage of solar or wind-turbine poweris also conceivable.6. Conclusion and Future WorkIn this paper we have propose a environmentalmonitoring system with a mesh network structurecontrolled by a central station. The differentstations are equipped with temperature-, relativehumidity-, pressure- and sunlight-sensors. Initialcomponent testing of sensor performance hasreflected good results in sensing and radiocommunication. The outcome provides a variableplatform for different sensors to measure necessaryvalues. Further development on downsizing thesystem, using alternative energy sources andanalysis of the measured data is scheduled next.7. References[1] Farrand, John. Weather. New York, 1990.[2] Columbia-Weather. “Pegasus EX PortableWeather Station - Columbia WeatherSystems, Inc.”http://www.columbiaweather.com/PegasusEX-Brochure.pdf (accessed June 3, 2010).[3] Irox. “Irox - Produkte - PRO-X2 USB.”http://www.irox.com/data_access/irox/downloads/bedienungsanleitungen/PRO_X2_e.pdf (accessed June 3, 2010).[4] Beniston, Martin. From Turbulence toClimate: Numerical Investigations of theAtmosphere with a Hierarchy of Models.Berlin: Springer, 1998.[5] Kalnay, Eugenia. Atmospheric Modeling,Data Assimilation and Predictability.Cambridge: Cambridge University Press,2003.[6] Pielke, Roger A. Mesoscalemeteorological modeling. San Diego:Academic Press, 2002.[7] Prodata. “Agriculture.” Prodata Weathersystems.http://www.weatherstations.co.uk/agriculture.htm (accessed June 3, 2010).[8] Blair, Thomas A., and Robert C. Fite.Weather Elements. Englewood Cliffs, N.J.:Prentice-Hall, 1965.[9] Silicon-Labs. “C8051F020 Datasheet pdf -Mixed-Signal 64KB ISP FLASH MCU.”DatasheetCatalog.org.http://www.datasheetcatalog.org/datasheets2/43/4308973_1.pdf (accessed June 6,2010).[10]Gupta, Sen Gourab, and Tin Chew Moi.Embedded Programming with Field-Programmable Mixed-SignalμControllers. 2005.[11]Products, Maxim Integrated. “DS600 ±0.5Accurate Analog-Output TemperatureSensor.” Analog, linear, and mixed-signaldevices from Maxim/DallasSemiconductor. http://datasheets.maxim-ic.com/en/ds/DS600.pdf (accessed Juni 6,2010).[12]Honeywell. “HIH-4010/4020/4021 SeriesHumidity Sensors.” Honeywell Sensingand Control.http://sensing.honeywell.com/index.cfm/ci_id/142534/la_id/1/document/1/re_id/0(accessed Juni 2, 2010).[13]Siemens. “BPW21 Datasheet pdf - SiliconPhotodiode for the visible spectral range.”DatasheetCatalog.org.http://www.datasheetcatalog.org/datasheet/siemens/BPW21.pdf (accessed June 6,2010).[14]Motorola. “MPX4100 Datasheet pdf -INTEGRATED PRESSURE SENSOR 20to 105 kPa.” DatasheetCatalog.com.http://www.datasheetcatalog.org/datasheet/motorola/MPX4100AS.pdf (accessed June2, 2010).[15]Digi. “XBee® & XBee-PRO® 802.15.4OEM RF Modules - Digi International.”http://ftp1.digi.com/support/documentation/90000982_B.pdf (accessed June 6, 2010).