Weatherstatiohhhn Thesis
Weatherstatiohhhn Thesis
Bachelor's Thesis
Submitted by: Jan Alexander Wirwahn Supervisors: Dr. Arne Brring & Thomas Bartoschek Mnster, October 2012
Table of Contents
Nomenclature List of Figures List of Tables III V VII
Abstract 1. Introduction 1.1 Motivation ................................................................................................... 1.2 Structure ...................................................................................................... 2. Background 2.1 Open-Source Hardware ............................................................................... 2.2 Climatic Observations ................................................................................. 2.3 Educational Standards ................................................................................. 2.4 Citizen Science ............................................................................................ 2.5 Related Work .............................................................................................. . 3. Requirement Analysis 3.1 School Requirements .................................................................................. 3.2 Climatic Measurements and Values ............................................................ 3.3 Requirements and Categorization ............................................................... 4. Realization of the Weather SenseBox for Schools 4.1 System Components .................................................................................... 4.1.1 Arduino ......................................................................................... 4.1.2 Sensors .......................................................................................... 4.1.3 Prototype Architecture ................................................................. 4.2 Integration into Classes ............................................................................... 5. Evaluation 5.1 Data Evaluation .......................................................................................... 5.2 Practical Workshop ...................................................................................... 6. Conclusion
1 1 1 2 3 3 4 4 6 7 7 7 8 9 10 10 10 12 20 23 26 26 30 34
i i i ii
II
Nomenclature
C AWS CSV DIY DWD EPROM GLOBE GPS hPa IC IDE ifgi ILK IP LAN LED m/sec MC MHz mm ms OSHW OSS PC Pa RH RTC Degrees Celsius Automated Weather Station Comma Separated Value Do it Yourself Deutscher Wetterdienst (German Meteorological Service) Electrically Erasable Programmable Read-Only Memory Global Learning and Observations to Benefit the Environment Global Positioning System Hectopascal Inter-Integrated Circuit Integrated Development Environment Institute for Geoinformatics Institute for Landscape Ecology Internet Protocol Local Area Network Light-Emitting Diode Meter per Second Microcontroller Megahertz Millimeter Millisecond Open-Source Hardware Open-Source Software Personal Computer Pascal Relative Humidity Real Time Clock
III
Serial Clock Serial Data The Sloan Digital Sky Survey Second Serial Peripheral Interface Uncompensated Pressure Uncompensated Temperature Volts World Meteorological Organization
IV
List of Figures
4.1.1 Figure 1: The Arduino Mega 2560 R3 microcontroller board [26]. 4.1.1 Figure 2: The Arduino Ethernet Shield [29]. 4.1.2 Figure 3: Transmission start sequence for SHT15 [33]. 4.1.2 Figure 4: Measurement sequence of the BMP085 [37]. 4.1.2 Figure 5: Bouncing problem at a digital input. MC will read nine state changes instead of one. 4.1.2 Figure 6: Connection of the rain gauge to the Arduino Mega. 4.1.2 Figure 7: Connection from anemometer to Arduino Mega. 4.1.2 Figure 8: Wiring between wind vane and Arduino Mega 4.1.3 Figure 9: The waterproof box including the core of the station. 4.1.3 Figure 10: Schematic wiring of all components. 4.1.3 Figure 11: Sample from log.csv. Values are: date, time, seconds since start, temperature (C), humidity (%), pressure (pa), rain gauge counter, anemometer counter. 4.1.3 Figure 12: Sample from windlog.csv. Values are: date, time, seconds since start, wind direction. 5.1 5.1 5.1 5.1 5.1 5.1 5.1 5.2 5.2 Figure 13: The prototype of the weather station was setup on the ILK in around 2,5m height. Figure 14: Temperature readings of SHT15 and ILK station. Figure 15: Humidity measurement of the SHT15 compared to ILK station values. Figure 16: Pressure readings of the BMP085 and the ILK station. Figure 17: Nearly no rain fall was measured by the prototype and the ILK station. Figure 18: Wind speed measurements of the prototype and the ILK station. Figure 19: Wind Direction measurements of the prototype and the ILK station. Figure 20: The pupils were introduced to the Arduino Uno microcontroller. Figure 21: The Parrot AR.Drone multicopter with the Arduino board, thermometer, GPS and radio data transmitter.
V
Figure 22: In total we had more male than female participants (a). 66% of the pupils were under the age of 15. Figure 23: The mix of tinkering and programming was well chosen for the workshop (a) and nearly all the pupils found the content very interesting (b). Figure 24: All of the pupils would like to have the weather station integrated into class (a). Also all of them are interested in additional work than just building the station (b). Figure 25: The motivation to work with the Arduino boards after the course was very high.
5.2
VI
List of Tables
3.3 Table 1: Overview and prioritization of the requirements.
4.1.2 Table 2: Properties of the humidity sensor of the SHT15. 4.1.2 Table 3: Properties of the temperature sensor of the SHT15. 4.1.2 Table 4: Cable connections between SHT15 Breakout and Arduino Mega. 4.1.2 Table 5: Main properties of the BMP085. 4.1.2 Table 6: Wiring between BMP085 and Arduino Mega. 4.1.2 Table 7: Measurement mode of the BMP085 and resulting effects. 4.1.2 Table 8: Analog voltage output with corresponding directions [40]. 4.1.2 Table 9: Pin connections of the RTC and the Arduino Mega. 4.2 4.3 4.3 4.3 Table 10: Material costs of the weather station prototype. Table 11: Topics for climatology school lesson in Physics. Modified from [19]. Table 12: Topics for a Arduino based series of Computer Science lessons. Table 13: Climatology teaching series in Geography class.
VII
Abstract
Arduino provides an open source hardware prototyping platform, which allows an easy implementation of sensors and interactive elements. The goal is to make sensor prototyping available for children at early ages. This thesis provides an Arduino based approach of a weather station prototype, designed for the integration in school lessons or as project work. To make this possible, technical requirements according to the prototype and educational requirements for a successful integration in school lessons, have to be considered in equal measure.
1. Introduction
This chapter describes the idea and motivation behind the project. In the following sections, the goals for the thesis are defined as well as its structure is explained.
1.1 Motivation
Children shall be prepared for an independent life in the modern world of today. Already 75% of the teenagers in Germany posses an own PC and even over 90% a mobile phone [1]. Therefore, it is absolutely necessary to teach them computer science and technology, already at early ages. It is very important to assure that children not only know how to use computers, smart phones or other technical products but also understand how such systems work. The idea is to prepare the children to work on and with modern technologies in the future. This should be promoted by the schools as early as possible. Therefore, integrating the work on sensor platforms in school lessons is a chance for schools to deal with the technical development. Letting children build up a product like a weather station, is giving them a sight into the workflow of constructing and programming a complex system. The main goal of this thesis is the deployment and documentation of a weather station prototype, partly based on the SenseBox that was developed during a study project at the Institute for Geoinformatics (ifgi) in Muenster [2]. The SenseBox is a small, lightweight and low cost sensor platform, operating as a web server. It is a solution for a flexible usage of sensor data, which is typically transformed into observations.
One advantage of the SenseBox approach is that the main parts of a data infrastructure, such as configured servers for data storage and the SenseBox portal for visualization of the boxes, already exist. With this portal and its connections between different boxes, it is also possible to compare related datasets. This enables advanced processing, e.g. regional instead of local climatic models or even bringing up correlations between different sensor platforms in the portal. Further server-side development is necessary to make all spatial data available via the internet. The enhancement of databases and data structure will be future work and are not covered by this thesis. The SenseBox weather station is developed in collaboration with the GI@School initiative also located at the ifgi [3]. The thesis will describe the use case for a low level approach of sensor platforms which could be used by high school teachers. The teachers are intended to build up the hardware setup and to implement the microcontroller's firmware together with pupils to improve their technical knowledge. This should be a possibility for pupils to get in touch with a practical approach on technical work. Further statistical evaluation with resulting data from a self-constructed weather station should be more motivating for pupils than just working with abstract data samples. Therefore, a goal is to prepackage a complete DIY-Kit with hardware, software and a construction manual designed for pupils in high school. The outcome of the thesis could be used as part of a high schools subject and has the ability to be well accepted by pupils. An evaluation of a survey in context of the GI@School activities is going to proof this.
1.2 Structure
An overview about ideas and goals was already given in Section 1.1. In the following, Chapter 2 provides background knowledge and discusses topics related to the thesis. Requirements for the prototype and for schools are explained in Chapter 3. Chapter 4 focuses on the construction of the prototype with regard to the purposes already mentioned in the motivation. Moreover, all used sensors are explained in detail as well as the integration into school class. Chapter 5 describes an evaluation of the prototype, compared to a professional weather station. Additionally, it shows first experiences in constructing the station together with pupils from different ages. The final chapter, Chapter 6, includes a discussion about the whole project and identifies aspects for future work.
2. Background
This chapter discusses fundamentals for the development of the prototypical weather station. It provides general information about climatic measurements and educational standards in Germany. For further understanding of the topic Citizen Science and related word are also introduced.
Arduino Platform
Arduino is a prototyping platform containing a microcontroller board (MC) as core element, a programming language and an integrated development environment (IDE) [7]. OSHW MCs from Arduino are based on ATmega8, ATmega168 and latest boards on ATmega2560. They can be used to develop interactive prototypes, which are using input from sensors to control output devices connected to the same board. The capabilities of the MCs allow several methods for in- and outputs of signals. The simplified IDE with a wire-based programming language also allows beginners to realize complex projects in short time. Documentation of the IDE and the language reference can be found on the Arduino homepage [8]. All code samples are released into the public domain. Additionally, the language can be extended with C++ libraries to enable more functionality. All official software tools from Arduino are published under the OSS license and are platform-independent. The well documented Arduino hard- and software makes it even possible to rebuild MCs by oneself [9]. However, pre-assembled Arduino boards are relatively inexpensive compared to other commercial MC platforms available on the market.
3
Geography
There are six areas of competence for Geography that need to be acquired by pupils with intermediate school certificate [16]:
4
Knowledge specific to the subject Spatial orientation Gathering information/methods Communication Evaluation Action
Particularly, the project of this thesis aims at the areas of specific knowledge and gathering information. Working with the weather station will help pupils to understand the weather as a continuous process in the atmosphere. Building up the weather station will deepen their knowledge about gathering climatic values. Naming physical variables as factors in the system of a weather cycle is only one example for that. Field observations can then be used to process information in order to answer geo-scientific questions about climate processes [16].
Computer Science
Educational standards for Computer Science are divided into content- and processcompetences like the following [17]: Content Information and data Algorithms Languages and automats Computer systems Informatics, people and society Process Modeling and implementing Establish and evaluate Structuring and networking Communicate and cooperate Representing and interpreting
The work with the Arduino platform allows enhancement of abilities on both categories. Obviously, algorithms for processing observations, derived from sensor samples, are containing the work with different data types and operators. This as well as methods of hardware communication, which are part of the project, will also exercise the content competences. Moreover, pupils have to collaborate to construct and program the station. Furthermore, evaluating and analyzing the station's data is suitable to exercise process competences.
Physics
Four areas of competences are defined as required basic knowledge for Physics in intermediate school [18]: Knowledge specific to the subject Gathering information/ methods Communication
5
Evaluation
The fundamentals of meteorology and physic of the atmosphere should be discussed in Physics school lessons. As this is not part of the original lesson plans, it can be done as alternative to thermodynamics. It helps to see and understand natural phenomena according to the first area of competence. A concept for integrating meteorology in Physics class can be found in [19]. It includes temperature analysis, dynamics in air pressure, types of humidity and reactions in the atmosphere.
Galaxy Zoo
One example for a Citizen Science initiative is the Galaxy Zoo project which started in 2007 [22]. The Sloan Digital Sky Survey (SDSS) searched for a way to analyze high resolution sky images taken at Apache Point Observatory in New Mexico during their large scale astronomical observations [23]. Interested volunteers were called to classify galaxies on sky images from the SDSS. The idea behind it is that the appearance or rotation direction of a galaxy can tell a lot about its structure.
Globe Project
The Global Learning and Observations to Benefit the Environment (GLOBE) started in 1995 as a worldwide science and education program for primary and secondary schools [24]. Strengthen ecological awareness and science-oriented education are the main goals of
GLOBE. Today it is a network of students, teachers and scientists with contributions from over 24.000 schools from over 100 countries.
3. Requirement Analysis
The Weather SenseBox itself is meant to be a technical project work for pupils at intermediate grade in high schools. The requirements are split into two categories: technical and
educational. The technical category includes functional requirements the prototype has to accomplish and the educational category contains requirements for enabling a successful integration into school class.
The prototypical Weather SenseBox is the basis for future projects. It should not be a single, but a long term project which can be extended in future. Because of that, it should be
7
adaptable to further sensor setups (e.g. for air quality measurement) so that an investment in the new system is more profitable for the schools. Requirement 2: Reserve resources for further sensor upgrades.
Receiving observations from the sensor readings in highest precision is not an aim of the Weather SenseBox. Nevertheless, it is important to measure accurate enough to display the current weather. Therefore, the hardware setup and the implemented software has to be tested and evaluated to ensure correctness of the displayed observations. Requirement 3: Sensor calibration and hardware setup has to be tested and evaluated.
Some knowledge in the principles of electrical engineering and object orientated programming is required to understand the functionality of the station. This means that pupils have to learn about Arduino MCs and their programming. The modules of the station have to be introduced and tested in class by the pupils before constructing the station. Therefore, a detailed documentation of the station should be provided with the station. Requirement 5: Detailed documentation of the weather station and its single components have to be worked out to allow an easy access into the work with Arduino MCs.
Teachers cannot implement the weather station into their classes if it cannot be adopted to the educational standards. In consequence, this thesis must not just focus on the development of a prototype. An approach for a structured work with the topics coming up with the station in the school subjects, which have been mentioned in Section 2.3, have to be pointed out during the different steps of development. Requirement 6: The work on and with the weather station must follow the educational standards.
8
An important point for the schools will be the financial feasibility of such a project. For a successful integration of the Weather SenseBox, it has to be affordable for the schools. This means that choosing equipment for the station has to be considered carefully. An appropriate balance has to be found between functionality and affordability. Requirement 7: The project has to be as low-cost as possible.
Besides the technical evaluation, the work with the prototype should be tried out together with pupils as well. This has to be done directly with the pupils at school or in a school lesson-like environment. During these lessons, the station has to be constructed and put in practice by the pupils themselves. Requirement 8: Evaluate the work with the weather station directly together with pupils from different ages.
3.3 Overview
An overview of all requirements is given in Table 1. The most important thing on the technical side is that the station delivers reliable measurements, which means the sensors have to be calibrated and tested properly. On the educational side, the low-cost ability is crucial for schools. Moreover, it is the good documentation to facilitate a start with the weather station construction kit. Nr. Category 1 2 3 4 5 6 7 8 Tech. Tech. Tech. Edu. Edu. Edu. Edu. Edu. Description Representative Observations Upgradeable Sensor calibration/evaluation Location finding Low Cost Documentation of all Parts of the Station Educational Standards Pupil Evaluation
4.1.1 Arduino
The Arduino components can be seen as the core of the station as they provide main functionality from sensor communication up to data logging. The Arduino Mega and the Arduino Ethernet Shield are introduced in this section.
Main advantage compared to other Arduino boards is the 16MHz operating frequency and a flash memory of 256 Kbytes of the ATmega2560 MC chip [26]. This solves the memory problem that appeared when using the Arduino Uno board at the beginning of the project. If not connected to USB, the board needs an input voltage between 7 and 12V. This can either be done with an AC-to-DC adapter connected to the power jack or with batteries connected to Vin and GND pins on the board. The 5V and 3.3V pins are regulated voltage outputs for power supply of external devices like sensors. In total, there are 54 digital pins on the Arduino Mega. They can be used as input or output and are operating at 5V. To read out the input of a sensor at a digital pin, the function
pinMode(pin, INPUT) has to be called. After that, its state can be checked by calling digitalRead(pin). It returns either HIGH or LOW.
Some of the digital pins have special functions as indicated by their labels printed on the board. For the weather station communication, pins 20 and 21 are used as two of the sensors require a serial two-wire interface (also referred inter-integrated circuit or IC) for communication. Data line (SDA) and clock line (SCL) have to be connected to the corresponding connection of the sensor. It is possible to connect more than one device to the IC bus as each device has its own address. To enable read() and write() functions for sensor communication the Wire library of Arduino has to be used [27]. Pins 50 to 53 are used for the serial peripheral interface (SPI). Most of Arduino compatible shields are using SPI communication and the SPI library [28]. For using functionalities of a certain shield, additional libraries have to be used. Moreover, one of the 16 analog inputs is used. The function analogRead(pin) reads out the incoming voltage and returns a value in 10 bit resolution.
11
It has to be considered that pins 50, 51 and 52 on the Arduino Mega cannot be used as digital in- or output any more when using the Ethernet Shield as they are being used by the SPI bus. Pins 4 and 10, which are used for the W5100 and for the SD card cannot be used as well. All other pins on the shield can be connected in the same way as mentioned in the description of the Arduino Mega. At the current state of the project, the Ethernet Shield is mainly used for data logging. Even though the latest observation is accessible over LAN (IP address is 192.168.0.80) it is not yet completely integrated into the web. During the testing, it turned out that there is a problem with using the W5100 and the SD card at the same time. This problem is caused because both components are sharing the same SPI bus [29]. However, it is planned to establish an external server for data storage. The Arduino will be configured to act as a http client and the SD card capabilities are then deactivated. This should fix the communication problem. To integrate functionalities of the Ethernet Shield into the whole system, Ethernet [30] and SD [31] libraries are used.
4.1.2 Sensors
Characteristics and functionality of each sensor used by the prototype are explained below. Moreover, connection and communication examples are given in this section.
12
The SHT15 from Sensirion includes a capacitive humidity and a band-gap temperature sensor. Electric thermometers have to be protected from radiation and need to be shielded [11]. Both sensors are individually calibrated accurately by the manufacturer and provide digital output [32]. The SHT15 was chosen because of its high resolution, accuracy and its long term stability. Tables 2 and 3 give an overview of the main sensor characteristics taken from the datasheet [33]. Parameter Resolution Accuracy Response Time Operation Range Condition Min. typical 0.4 typical (63%) 0 Typ. 0.05 2.0 8 Max. 0.05 Unit %RH %RH sec %RH
100
Unit C C sec C
For a connection to the MC, the DATA pin needs to be pulled up with a resistor to the power supply pin of the MC. Additionally, VDD and GND must be decoupled with a capacitor [33]. The SHT15 Breakout from SparkFun [34] has implemented these requirements and is used here to reduce the complexity of the circuit. SHT15 Breakout VDD Data SCK GND Arduino Mega Pin 3,3V 5 6 GND
The SHT15 requires recommended source voltage of 3.3V. For communication between the MC and the sensors, a two-wire serial interface is used whereas the serial clock input (SCK) synchronizes traffic of the bidirectional serial data line (SDA or DATA). Connection to the Arduino Mega is done as shown in Table 4. As an example for sending measurement commands to the SHT15, a transmission start sequence (see Figure 3) has to be issued by the MC. The digital pin 5 (connected to DATA)
13
must be set low while SCK is high, followed by a low pulse on SCK. When pin 5 is set high again after SCK is set high again as well, the sequence is complete.
Three address bits (always '000') and additional five command bits ('00011' for temperature, '00101' for pressure) have to be send after that to start a measurement. For communication, the SHT1x library is used [35] so that it is not necessary to implement these sequences step by step.
Air Pressure
For air pressure readings, the digital pressure sensor BMP085 from Bosch Sensortec is used [36]. It is based on the piezo-resistive technology and can be integrated into the system over the IC interface [37]. The digital pressure sensor has an additional temperature sensor integrated. The internal temperature measurement is used to correct the sensor reading as it changes with temperature. The BMP085 was chosen for the prototype because of its good accuracy through individual precise calibration and its long term stability feature. The main characteristics are summarized in Table 5. Parameter Resolution Accuracy Response Time Operation Range Condition Min. typical 0.04 typical Mode 4.5 700 Typ. 0.01 1.0 Max. 0.01 25.5 1100 Unit hPa hPa ms hPa
The IC interface and a read-only-memory register (EPROM) are part of the control unit of the BMP085. In the EPROM eleven 16bit calibration coefficients are stored and used to compensate offset of temperature and pressure readings. As temperature is a factor for air pressure calculation, it has to be known to calculate the true pressure. Reading of the temperature can be done with the piezo-resistive sensor as well.
14
A measurement sequence with the complete algorithm is shown in Figure 4. It has to be implemented to the MC according to this order. After the MC has sent a start sequence, the calibration data is requested from the EPROM registers. The 16 constants need to be read out only once and are stored on the MC. Then the MC has to wait for uncompensated temperature (UT) and pressure (UP) readings from the sensors. The stored calibration data is now used to calculate temperature in C and pressure in Pa. After applying the algorithms, the sensor waits for the next measurement command. As additional factor for true pressure calculation, an oversampling mode can be chosen to set the internal sampling of the sensor for one measurement. Changing the mode to a higher resolution will increase the accuracy of a measurement but also has an impact on energy consumption, reaction time and the long term stability [37]. Table 7 gives an overview about the four oversampling setting modes. As the weather station is designed for long and continuous measurements, standard mode will be sufficient.
Figure 4: Measurement sequence of the BMP085 [37]. 15
As mentioned before, the BMP085 pressure sensor is using the IC protocol to communicate with the microcontroller and has to be connected to SDA and SCL pins on the Arduino Mega as shown in Table 6. BMP085 Breakout SDA SCL XCLR EOC GND VCC Arduino Mega Pin 20 21 Not Connected Not Connected GND 3,3V
The altitude of the instrument has to be taken into account as well, because air pressure decreases with increasing height. For getting comparable values it has to be calculated to sea level pressure [11]. For implementation of the algorithm shown in Figure 4, the bmp085 library is used [38]. Oversampling Setting 0 1 2 3 Internal Samples 1 2 4 8 Conversion Time [ms] 4.5 7.5 13.5 25.5 Noise [hPa] 0.06 0.05 0.04 0.03
Mode Ultra Low Power Standard High Resolution Ultra High Resolution
Working with the BMP085 should be done carefully, because it could be damaged by shocks or when getting in contact with water. Therefore, it should be installed in a dry environment with constant temperature. E.g. the waterproof case which is slightly heated by the microcontroller itself is a good choice.
Precipitation
Rainfall is measured by a gauge included in the Weather Sensor Assembly available from SparkFun Electronics [39]. Each time the bucket is emptied, a reed switch closes once. This corresponds to 0.28mm of rain fall [40]. For each state change of the switch a digital counter is increased by one. A problem that frequently appears at trying to capture the state change of a switch is called bouncing problem. State change means that the input at a digital pin on the Arduino changes from high to low (equals from 5V to 0V) or vice versa. The problem is that each switching
16
contains interferences in the signal before it reaches the level of 5V or 0V. This can lead to multiple counts from only one state switch. A visualization of the problem is shown in Figure 5.
Figure 5: Bouncing problem at a digital input. MC will read nine state changes instead of one.
One solution is either to integrate a capacitor to the circuit or to define a software method with a debounce interval of some milliseconds, which is called every time a state change is recognized. The two wires coming from the rain gauge have to be connected to the Arduino Mega as shown in Figure 6.
The red line must be connected to GND while the green line is pulled-up with a 10k resistor to 5V. The output of the sensor has to be connected to digital pin 19 on the Arduino Mega.
17
A disadvantage of this method is that only rain fall can be measured. To include snow fall in the precipitation measurement a self heated device would be needed. Temperatures below 0 Celsius could also lock up the anemometer. This should be taken into account when analyzing the data of the rain gauge.
Wind Speed
The wind speed is measured with a cup-type anemometer included in the Weather Sensor Assembly [39]. In principle, it works exactly like the rain gauge. At every turn, a magnet passes a switch, which is connected to a digital counter. 0.67 meter per second of wind speed causes the switch to close once per second [40]. Software debouncing is performed as described above. The anemometer is connected with a two wired cable to the wind vane. The two center wires (yellow and red) of the cable coming from the wind vane are used by the anemometer. Again, the red cable needs a pull-up resistor before connecting it to 5V. The yellow cable is connected to GND.
Wind Direction
The wind vane of the Weather Sensor Assembly [39] contains eight switches, each of them connected to a resistor with different resistance values. A magnet switch can close two switches at once which allows to indicate 16 different positions. The voltage of the output cable can be measured at an analog input on the Arduino Mega. Directions for corresponding voltage output can be found in table 8.
18
Direction (Compass) N N-NE NE E-NE E E-SE SE S-SE S S-SW SW W-SW W W-NW NE N-NW
Direction (Degrees) 0 / 360 22.5 45 67.5 90 112.5 135 157.5 180 202.5 225 247.5 270 292.5 315 337.5
Voltage Output 3.84 1.98 2.25 0.41 0.45 0.32 0.90 0.62 1.40 1.19 3.08 2.93 4.62 4.04 4.78 3.43
The green and black outer wires of the cable from the wind vane have to be connected to the Arduino Mega as shown in Figure 8.
As mentioned before, the incoming voltage can be measured with an analog pin on the Arduino Mega. The values, which are read out at the analog input, have to be converted from 10 bit (0-1023) to a scale between 0 and 5V (0 to 5000). The resulting voltage can then be used to grab a corresponding value from a list according to Table 8.
19
Testing of the wind vane showed that voltage values slightly differ from the values given in the table. This could lead to misinterpretation of the signal.
The library RTClib for RTC modules with DS1307 chips from Adafruit [43] is used for the communication between sensor and MC. The library contains easy methods for setting the time on the RTC and for reading out calendar and clock information. The manufacturer stated that one battery can be used for several years. But to avoid loss of information, it is recommended to check voltage not less than twice a year [43].
Cables from the exterior sensors as well as connections for power supply and LAN are connected to the core in a waterproof case, which is shown in Figure 9. The self made bread boards are designed to make assembling and upgrading more easy. No further soldering is needed to setup the station. A schematic overview of the wiring is shown in Figure 10.
At the current state of development, the prototype can read temperature, humidity, pressure, wind speed and direction and rainfall. Samples from the BMP085 (air pressure) and the SHT15 (air temperature and relative humidity) are stored every 10 seconds. After 60 readings ( 10 minutes) the values are summed up and their average is calculated. After that, a time stamp from the RTC, the averaged results and the values of the rain gauge and wind speed counters are stored on the SD card of the Ethernet Shield in a comma separated value file (csv). A sample from the logging file can be found in Figure 11. 12.10.2012,8:0,63600,7.80,66.45,101645,0,1626 12.10.2012,8:10,64200,7.84,65.26,101643,0,1534 12.10.2012,8:20,64800,7.93,63.86,101614,0,1290 12.10.2012,8:30,65400,8.04,62.78,101551,0,1084 12.10.2012,8:40,66000,8.04,61.09,101516,0,1174 12.10.2012,8:50,66600,7.99,57.83,101550,0,1745 12.10.2012,9:0,67200,7.93,49.77,101627,0,1692
Figure 11: Sample from log.csv. Values are: date, time, seconds since start, temperature (C), humidity (% RH), pressure (Pa), rain gauge counter, anemometer counter.
Averaged wind direction is stored in a separate csv file. Samples are taken every ten seconds for only one minute before values are converted (see Section 4.1.1), summed up, averaged and stored to SD. The shorter logging period is resulting from the noise in readings from the wind vane. As mentioned above, the voltage output from the sensor may slightly change for one direction in about some thousandths. By taking the average from 60 readings, noise is summing up as well and could lead to misinterpretation. An example for that is shown in Figure 12. 12.10.2012,8:0,63600,SO-S 12.10.2012,8:1,63660,SO 12.10.2012,8:2,63720,SO 12.10.2012,8:3,63780,SO 12.10.2012,8:4,63840,SO 12.10.2012,8:5,63900,SO
Figure 12: Sample from windlog.csv. Values are: date, time, seconds since start, wind direction.
A summary of the costs for MC and all the devices is given in Table 10. The most expensive part of the prototype is the Weather Sensor Assembly, however, it contains three sensors for the station and a mast for installation. The total price of around 240 makes the weather station affordable for schools.
22
Item Arduino Mega Ethernet Shield + 2GB micro SD card Weather Sensor Assembly SHT15 Breakout BMP085 Breakout Real Time Clock Module + Battery Power Supply Unit Waterproof case Electrical accessories Sum
Price () 47 45 60 35 17 10 8 12 10 244
Physics Lessons
Fundamentals of climatology can be explained in physics class. A concept for that is described in [19] where teaching of thermodynamics is replaced by teaching in climatology. Measurement methods are introduced according to the topic of each lesson. Topics for six lessons can be found in Table 11. Topic Content Activities Comparison of the weather situation to weather forecast, recording of weather observations Measurement of temperature in the environment (air temperature, surface temperature)
Introduction
Climatic variables
Temperature measurements
23
Air pressure, formation of differences in pressure and winds Relationship between pressure and temperature
Air density, measurement methods, height dependency of air pressure Pressure and energy, calculation of temperature gradients, adiabatic changes in temperature Temperature dependency of steam pressure of water, absolute and relative humidity, dew point Conditions of drop and crystal formation, sink rate of precipitation elements
Determination of density / pressure, experimental measurements Experiments for (de-) compression of gases Experiment to evaporation process, steam pressure curve, humidity measurements Experiments for crystallizations and sink rates
Types of precipitation
Table 11: Topics for climatology school lesson in Physics. Modified from [19].
Communication methods
SD cards, XBee, GPS and Arduino shields Using Arduino as server and client
Web enablement
Weather station
Project weather station: construct, program and place outside groups working out project ideas; best voted concept is realized in future project
Arduino contest
Table 12: Topics for a Arduino based series of Computer Science lessons.
Geography Lessons
In Geography lessons, the pupils are thematically prepared for finding a location for the weather station and for analyzing the data. Therefore a top-down approach can be applied. First, they learn about the global weather construct before going down to a regional layer. Afterwards, effects on the climate in urban environments can be discussed before they have to analyze their school campus in order to find an appropriate location for the weather station. Finally, they learn about how to analyze and compare the weather data. In Table 13, a detailed concept for a weather based teaching series is described. Topic Weather process as part of the atmosphere Content Horizontal scales, circulation systems Climate zones, ocean streams, climate change, greenhouse effect Regional influences on the weather, topography of regional environment Heat islands, wind corridors, horizontal, urban planning process Activities Describe layers of the atmosphere in detail Compare climate scenarios, work out simple climate model Identify regional climate, compare to other climate zones Identify reasons for microclimate, develop plans for green cities in groups Finding best location on the school campus, collect metadata for the station
Global Climate
Regional Climate
Weather analysis
Create climatic charts from Different types of climate charts measurements, compare to other schools
5. Evaluation
In this chapter, data from two logging sessions is compared reference station from the Institute of Landscape Ecology (ILK) at the University of Mnster. In addition to that, a workshop for pupils was performed to find out whether children cope with the station or not.
Figure 13: The prototype of the weather station was setup on the ILK in around 2,5m height.
The first measurement was recorded on 7th of October at 10:40 and the last measurement one day later at 14:20. After analyzing the data from that session, calibration of SHT15 and BMP085 were slightly adjusted according to the results. A second round of measurement started at 11th of October at 13:40 and was performed until 12th October at 12:50. The dashed line in the statistics marks the leap in time between the two sessions.
26
Air Temperature
Results of the temperature readings are shown in Figure 14. In total, the tendency of the temperature values from the SHT15 can be used to perform accurate temperature
observations. Sensor adjustment after the first series of measurements improved the results.
Temperature
17 15 13 11 C 9 7 5 3
Relative Humidity
At the beginning of the first measurement period the values of the relative humidity measurement from the SHT15 seemed to be fitting to those of the ILK station. But as displayed in Figure 15, the values of the sensor are breaking down at a point where 70% RH is exceeded. The second measurement period is showing the same abnormality.
Humidity
100 90 80 70 60 50 40 30 20 10 0
% RH
Figure 15: Humidity measurement of the SHT15 compared to ILK station values. 27
This problem may be solved by turning on the heating of the device at high RH values, but this may also affect the measurement. It is also possible that the sensor has been damaged during construction of the station. Exchanging the sensor should make that clear.
Air Pressure
The air pressure values of the ILK station are much more stable and linear than the readings of the BMP085. The ILK's barometer is placed indoors at stable conditions. As described in section 4.1.2, the pressure measurement is sensitive to temperature and humidity and should be performed in an enclosed environment. The BMP085 was placed in the case together with the MC outside on the rooftop of the institute. The idea was that the temperature in the case does not vary as much as air temperature because it is heated slightly by the MC. Electrical interferences could have affected the measurement additionally [11].
Pressure
1060 1050 1040 1030 hPa 1020 1010 1000 990 980
Figure 16: Pressure readings of the BMP085 and the ILK station.
For further testing the temperature of the BMPM085 could be logged as well to get information about the conditions. Due to the fact that temperature compensation is included in the algorithm for calculating the air pressure, it should normally not have such an effect on the reading.
Precipitation
Due to the weather situation during both measurement periods, it was not possible to get comparable measurements. Only at the end of the second time interval the bucket of the rain gauge emptied once. At the same time the ILK station also recognized some rainfall. The two values differ because of the different resolutions of the instruments.
28
Precipitation
0,6 0,5 0,4 0,3 0,2 0,1 6E-16 -0,1
mm
Figure 17: Nearly no rain fall was measured by the prototype and the ILK station.
Wind Speed
Even though the behavior of both curves are nearly the same, wind speed measurements of the prototype are below the values from the ILK station (Figure 18).
Wind Speed
4 3,5 3 m/sec 2,5 2 1,5 1 0,5 0
Figure 18: Wind speed measurements of the prototype and the ILK station.
A possible reason is that the anemometer of the ILK station was placed in a height of five meters, whereas the anemometer of the prototype was placed in only two meter height. There was an obstacle in the center of the rooftop next to the station which could have affected the measurement. Even though this is not the case, approximation could be increased by including an offset factor to the calulation.
Wind Direction
The wind directions measured by the prototype are varying strongly in short intervals. Again, placement of the wind vane should be the reason for that.
29
Placing the wind vane directly next to the ILK's vane has to be tested to proof that.
Wind Direction
350 300 250 Degrees 200 150 100 50 0
Figure 19: Wind direction measurements of the prototype and the ILK station.
For flattening the amplitude of the curve, a boxcar filter is applied to the measurement series from the prototype indicated by the black solid line in Figure 19.
Procedure
Because of the young age of most of the pupils, the course was more focused on crafting than on programming (see Figure 20). The programming part was kept quite simple. We showed
30
and explained them the code sketches, which they had to copy afterwards to get their setup running. Nevertheless, the students were encouraged to discuss problems with the whole group and had to come up with their own ideas, which we tried to implement together to keep the course as dynamic as possible.
Figure 20: The pupils were introduced to the Arduino Uno microcontroller.
At the beginning of the workshop, we explained the Arduino boards in general and gave examples for what they could be used for. After that, the pupils had to build simple electric circuits and had to connect them to the Arduino controller board. This part of the lesson was mainly to get in touch with different electric components like resistors, LEDs, buttons and potentiometers and how they can be combined. For each setup, the controller board had to be programmed according to the actual composition of components and connections to the board. In the main part, the participants worked with environmental sensors. Input values from the sensors were read out first and then used to control different output elements like LEDs, speakers or a data logger. After the preparation part of the project we developed a mobile sensor platform with a multicopter and an Arduino setup mounted on the drone to collect location based temperature data (Figure 21). After a successful implementation, it turned out that the self-construction of the platform also motivated the pupils to do the theoretical data analysis part after a test run. The collected datasets were visualized in a GIS as a final step of that project work.
31
Figure 21: The Parrot AR.Drone multicopter with the Arduino board, thermometer, GPS and radio data transmitter.
As final presentation of the workshop, the concept of the DIY weather station was explained to the pupils. With only some simple instructions and pictures they had to build up the prototype by themselves. Observation during the construction should reveal how well they cope with the provided instructions and if any problems occur using them. As mentioned above a questionnaire had to be filled out to underline the observations.
Questionnaire
A short questionnaire was created to investigate how interesting the work with the Arduino platform and with the weather station is for the pupils. It also included questions about the pupils themselves and their technical experiences. In total six pupils participated in the workshop. As shown in Figure 22 we had 83% male but only 17% female participants. The youngest pupils in the group were two 12 years old children while the oldest was already 18. Four of them were under, and two over 15 years of age.
Gender
17%
83%
Male
Female
Figure 22: In total more male than female pupils participated (a). 66% of the pupils were under 15 years. 32
As mentioned above the low ages of most of the participants made it difficult to discuss the programming part in detail or making them work out the sketches for the different setups on their own. According to that, only the oldest pupil would have preferred more programming work during the course (Figure 23a). All others think that the mixture of tinkering and programming was appropriate. But independent from age, all of them had fun during the course and found the content interesting or very interesting (Figure 23b).
Boring
Very boring
Figure 23: The mix of tinkering and programming was well chosen for the workshop (a) and nearly all the pupils found the content very interesting (b).
All of the pupils, which participated in the workshop liked the idea of a DIY weather station and would like to have it integrated into school class. One of them as a project week and even five as part of a longer series of lessons (Figure 24a). Figure 24b shows that the pupils are not just interested in building up such a weather station, but also in further work with the measurements and possible sensor upgrades.
Figure 24: All of the pupils would like to have the weather station integrated into class (a). Also all of them are interested in additional work than just building the station (b).
33
Figure 25 underlines that the practical, technical work in high school classes is not just a good idea for teachers to get the pupils attention. Furthermore, it is a motivation for the kids to spend time on it non-obligatory. Not just the usage but especially the understanding of how a computer system works will be one result in spending interest and time on projects with the Arduino microcontrollers. The evaluation shows that the simplicity of imaging and integrating a technical project could be learned and supported by the weather station project.
Can you imagine to work with the Arduino boards in you freetime?
6 5 4 3 2 1 0 Yes and I already Yes, the course did inspired me Essentialy yes, No interest at all but not with Arduino
Figure 25: The motivation to work with the Arduino boards after the course was very high.
6. Conclusion
The goal of the thesis was to develop a weather station prototype and a concept for integration in school lessons. The successful solutions and obstacles that occurred during the development are discussed in this section.
6.1 Discussion
Basically the prototype fulfils all requirements, but with some limitation. The reporting of observations is working in principle, but representativeness is strongly dependent on the measurements accuracy. Until now, it is not possible to get accurate measurement from all the sensors of the station, even though, all the sensors were tested independently. Hardware testing was performed throughout all stages of the project. The costs of the hardware setup presented in this thesis are around 240, which could be further reduced by using cheaper sensors. By cutting the cost of the basic station, more budged is left for sensor upgrades. Technically, the hardware provides much more input possibilities than actually used by the sensors of the weather station. If schools do not want to integrate the idea for a series of lessons around this topic, it is easily possible to modify the station for different means. All
34
needed instructions are provided by the DIY manual. In addition, wiring examples and software sketches for single sensor setup can be found in the appendix.
35
References
[1] German Association for Information Technology, Telecommunications and New Media, 2011: Jugend 2.0: Eine reprsentative Untersuchung zum Internetverhalten von 10- bis 18-Jhrigen. BITCOM, Berlin. Brring, A., Remke, A., Lasnia D., 2011: SenseBox: A Generic Sensor Platform for the Web of Things. Institute for Geoinformatics, Mnster. GI@School: Homepage. Online: http://www.gi-at-school.de (last accessed on 2nd October 2012).
[2] [3]
[4]
Open Source Initiative: The Open Source Definition. Online: http://opensource.org/docs/osd (last accessed on 2nd October 2012). Open Source Hardware Association: OSHW Definition. Online: http://www.oshwa.org/definition (last accessed on 2nd October 2012). Definition of Free Cultural Works: Open Source Hardware. Online: http://freedomdefined.org/OSHW (last accessed on 2nd October 2012). Arduino: Homepage. Online: http://arduino.cc/en/ (last accessed on 2nd October 2012). Arduino: Reference. Online: http://arduino.cc/en/Reference/HomePage 2012). (last accessed on 2nd October
[8]
[9]
Oxer, J., Blemings, H., 2009: Practical Arduino: Cool Projects for Open Source Hardware . Apress. World Meteorological Organization: Homepage. Online: http://www.wmo.int (last accessed on 4th October 2012). World Meteorological Organization, 2008: Guide to Meteorological Instruments and Methods of Observation. WMO-No. 8, Geneva. Oke, T.R., 2006: Initial Guidance to Obtain Representative Meteorological Observations at Urban Sites. World Meteorological Organization, Instruments and Observing Methods, IOM Report No. 81, WMO/TD-No. 1250. Bailey, W.G., Oke, T.R., Rouse W.R., 1997: The Surface Climates of Canada. McGill-Queens University Press, Montreal, chapter 13. World Meteorological Organization, 1992: International Meteorological Vocabulary. Second edition, WMO-No. 182,Geneva. Conference of the German Ministers of Education and Cultural Affairs, 2005: Bildungsstandarts der Kultusministerkonferenz: Erluterungen zur Konzeption und Entwicklung. Luchterhand, Munich.
36
[10] [11]
[12]
[13]
[14]
[15]
[16]
Hemmer, I., Hemmer, M., Rhode-Jchtern, T, Ringel, G., Schallhorn, E., 2006: Bildungsstandards in Fach Geographie fr den Mittleren Schulabschluss. German Association for Geography, Berlin. Brinda T. Fothe, M., Friedrich, S., Koerber, B., Phulmann, H., Rhner, G. Schukte, C., 2008: Bildungsstandards Informatik fr die Sekundarstufe I. LOG IN, Volume 28, Nr. 150/151, German Association for Computer Science. Conference of the German Ministers of Education and Cultural Affairs, 2005: Bildungsstandards im Fach Physik fr den Mittleren Schulabschluss. Luchterhand, Munich. Heinz Muckenfu, 1997: Wetterkunde statt Wrmelehre. Naturwissenschaften im Unterricht Physik, Volume 42, Nr. 8, pp. 4-8. Silvertown, J., 2009: A new Dawn for Citizen Science. Trends in Ecology & Evolution, Volume 24. Citizen Science as Participatory Science. Online: http://povesham.wordpress.com/2011/11/27/citizen-science-as-participatoryscience (last accessed on 4th October 2012). Galaxy Zoo. Online: http://www.galaxyzoo.org (last accessed on 4th October 2012). Sloan Digital Sky Survey. Online: http://www.sdss.org (last accessed on 4th October 2012). About GLOBE. Online: http://www.globe.gov/about-globe (last accessed on 4th October 2012). LEGO Education: 8+ LEGO Mindstorms Education. Online: http://education.lego.com/en-us/preschool-and-school/upper-primary/8plusmindstorms-education (last accessed on 4th October 2012). Arduino: Arduino Board Mega 2560. Online: http://arduino.cc/en/Main/ArduinoBoardMega2560 (last accessed on 13th October 2012). Arduino Reference: Wire Library. Online: http://arduino.cc/en/Reference/Wire (last accessed on 13th October 2012). Arduino Reference: SPI Library. Online: http://arduino.cc/en/Reference/SPI (last accessed on 13th October 2012). Arduino: Arduino Ethernet Shield. Online: http://www.arduino.cc/en/Main/ArduinoEthernetShield (last accessed on 13th October 2012). Arduino: Ethernet Library. Online: http://arduino.cc/en/Reference/Ethernet (last accessed on 13th October 2012). Arduino: SD Library. Online: http://www.arduino.cc/en/Reference/SD (last accessed on 13th October 2012).
37
[17]
[18]
[19]
[20] [21]
[26]
[30] [31]
[32]
Sensirion AG: Humidity Sensor SHT15. Online: http://www.sensirion.com/en/products/humidity-temperature/humidity-sensor-sht15 (last accessed on 9th October 2012). Sensirion AG: SHT15 Datasheet. Online: http://www.sensirion.com/fileadmin/user_upload/customers/sensirion/Dokumente/ Humidity/Sensirion_Humidity_SHT1x_Datasheet_V5.pdf (last accessed on 9th October 2012). SparkFun Electronics: Humidity and Temperature Sensor - SHT15 Breakout. Online: https://www.sparkfun.com/products/8257 (last accessed on 9th October 2012). Practicalarduino on github: SHT1x Library. Online: https://github.com/practicalarduino/SHT1x#readme (last accessed on 13th October 2012). Bosch Sensortec: Pressure Sensors. Online: http://www.bosch-sensortec.com/content/language1/html/3477.htm (last accessed on 9th October 2012). Bosch Sensortec: BMP085 Datasheet. Online: http://www.bosch-sensortec.com/content/language1/downloads/BST-BMP085DS000-06.pdf (last accessed on 9th October 2012). Google Project Hosting: Arduino driver for BMP085. Online: http://code.google.com/p/bmp085driver (last accessed on 13th October 2012). SparkFun Electronics: Weather Meters SEN-08942. Online: https://www.sparkfun.com/products/8942 (last accessed on 13th October 2012). SparkFun Electronics: Weather Sensor Assembly Datasheet. Online: http://www.sparkfun.com/datasheets/Sensors/Weather/Weather%20Sensor%20Ass embly..pdf (last accessed on 13th October 2012). Seeed Studio: Grove - RTC. Online: http://www.seeedstudio.com/depot/grove-rtc-p-758.html (last accessed on 13th October 2012). Seeed Studio: Grove - RTC Wiki Page. Online: http://www.seeedstudio.com/wiki/index.php?title=Twig_-_RTC (last accessed on 13th October 2012). Adafruit on github: RTClib Library. Online: https://github.com/adafruit/RTClib (last accessed on 13th October 2012).
[33]
[34] [35]
[36]
[37]
[41]
[42]
[43]
38
A. Appendix
A.1. Software
This section lists the software applications that were used for the development of the prototype and for writing this thesis. Arduino IDE The Arduino IDE has been used implementation of the Arduino program code. Homepage: http://arduino.cc/en/Main/Software Fritzing Word Excel The Fritzing software has been used as tool for designing circuits. Homepage: http://fritzing.org/ The thesis has been written with Microsoft Word. Homepage: http://office.microsoft.com/en-us/word Statistical analysis have been done with Microsoft Excel. Homepage: http://office.microsoft.com/en-us/excel Some of the figures have been created with Microsoft PowerPoint. Homepage: http://office.microsoft.com/en-us/powerpoint GIMP was used for vector image manipulation. Homepage: http://www.gimp.org
PowerPoint GIMP
A.2. Data CD
The compact disc attached to this thesis includes a digital appendix. Data stored in it is described in this section. Instructions A manual for installing the Arduino IDE and the libraries. Location: cd:\ Folder containing the Arduino IDE. Location: cd:\ArduinoIDE\
Arduino IDE
Construction Manual The DIY construction manual for the Weather SenseBox. Location: cd:\DIYmanual\ Arduino Libraries Libraries needed to compile the code of the weather station. Location: cd:\Libraries\
Arduino Source Code The developed software sketches for each sensor and the whole station. Location: cd\SourceCode\ Questionnaire The questionnaire, used at the workshop. Location: cd:\Questionnaire\