The functional requirements of the agricultural sensor board

Get Complete Project Material File(s) Now! »

The functional requirements

The functional requirements of this project include three parts according to the hardware. They are the functional requirements of Waspmote, the functional requirements of Waspmote Gateway and the functional requirements of Meshlium. As the core part, the functional requirements of Waspmote can be divided into different modules that will be used in communication between the Waspmote and Meshlium. These modules include USB module, utility module, power module, XBee ZigBee Pro module, XBee 868 module, real time clock (RTC) module, accelerator module, SD card module and WIFI module.

The functional requirements of the Waspmote

As the core part of this project, the Waspmote is a wireless sensor device provided by Libelium for developing of wireless sensor network. Currently, the Waspmote has three different radio frequencies 2.4GHz, 868MHz and 900MHz. It works with four different protocols, the ZigBee protocol, the Bluetooth protocol, the GSM/GPRS protocol and the WIFI protocol. A Waspmote equipped with XBee ZigBee Pro module is able to make links up to 7000m while a Waspmote equipped with XBee 868 module is theoretically able to make links up to 12000m. When a Waspmote is not transmitting data, it can be settled to the hibernate mode that just costs 0.6µ A/h for reducing power consumption and sa ving battery. It can also be settled to sleep mode that just cost 60µ A/h. In add ition, Libelium also provides an open source IDE (Integrated Development Environment) including API libraries and a compiler with more than fifty available sensors [14]. An example of the Waspmote with WIFI module is shown in Figure 2-1.
In this project, Waspmote works as a wireless sensor node to collect environmental data with the help of corresponding sensors including temperature sensor MCP9700A, humidity sensor 808H5V5 and soil moisture sensor, store the data in its flash memory like EEPROM or SD card, and use a XBee ZigBee Pro module or a XBee 868 module to transmit the data to a Waspmote Gateway or a Meshlium. To realize the communication purpose, considering the wireless sensor network is influenced by many factors, many different Waspmote modules need to be programmed and tested independently [19].
The real time clock (RTC) module is used in order to setting and reading the time and the alarm clock. Since energy saving is one of the most important factors in designing wireless sensor network, most of the time the Waspmote is in sleep or in hibernate mode. The Waspmote only wakes up when the programmed sleep time is over. When Waspmote wakes up, it collects environmental parameters, stores the collected data in flash memory or SD card, transmits the stored data using wireless communication modules like XBee ZigBee Pro module or XBee 868 module, and afterwards, it changes into sleep mode, deep sleep mode or hibernate mode to decrease energy consumption again.
The SD card module is used for saving environmental parameters collected by corresponding sensors. Because the Waspmote just has 4KB EEPROM (Electrically Erasable Programmable Read-Only Memory), 8KB SRAM (Static RAM) and 128 KB flash memory that are not enough for saving the whole environmental parameters collected by the temperature sensor MCP9700A, the humidity sensor 808H5V5 and the soil moisture sensor. So the external SD card with a maximum size of 2GB is necessary.
The Accelerator module is used for get accelerator and checking the status of the Waspmote. In deployment, the Waspmote could be placed on high places like poles or trees, since the accelerator has a function to check the free fall status by getting the accelerator in X axis, Y axis and Z axis, it can be used to check whether the Waspmote has fallen or not to avoid the missing of data. The GSM/GPRS module is used for using GSM network. With this module, the Waspmote is able to make calls, send and receive messages, upload and download files from FTP web servers. In deployment, when the server is an FTP server, the collected data from the specific sensors may be uploaded to the FTP server to update the data in real time.
The XBee ZigBee Pro module is one of the most important wireless communication modules used on the Waspmote. Based on the ZigBee protocol, this module is used for sending data from Waspmote to Waspmote, from Waspmotes to a Waspmote Gateway and from Waspmotes to a Meshlium. The XBee ZigBee module has a radio range of 500m while the XBee ZigBee Pro module has a range of 7000m that is enough for field deployment to monitor the crops development [20]. The XBee 868 module is another wireless communication module used on the Waspmote. With a higher transmission power and sensitivity, the radio range of the XBee 868 module is 12km. The radio frequency of XBee 868 is 868MHz. Compared to the XBee ZigBee Pro module, the XBee 868 module is more powerful and has a wilder use in monitoring crops development.

The functional requirements of the utility module

As the one of the basic modules, the utility module needs to be tested first. The utility module takes control of several useful parts: USB port, LEDs, flash memory EEPROM, basic sensors including temperature sensor MCP9700A and humidity sensor 808H5V5 and basic libraries including type converting functions [21].
The USB function is used to transmit data from the Waspmote to the IDE’s serial monitor on a PC through an USB cable. Through the IDE provided by Libelium, the Waspmote can print out some important parameters for users to know the status of the running programs better. Besides printing on serial monitor, in this function the serial monitor can also send data to the Waspmote node when the USB port is available [22]. The USB function is important in all other modules for printing out the results of the executed commands to help developers to know the status of the Waspmote. The LED function is used to control the two LEDs embedded on the Waspmote board and to check the different status of the running programs. Both LEDs can be controlled by the uploaded program, including turning on, turning off and blinking for a certain time. When testing the communication module, the LEDs can be used to check whether the network is joined successfully or the data packets are sending correctly.
With a size of 4 KB, the EEPROM can be used to save temporal data. Except for the first 1 KB that is occupied by the operating system, the other 3 KB can be used. In this project the flash memory of Waspmote is not enough for saving the environmental parameters collected by the temperature sensor MCP9700A, the humidity sensor 808H5V5 and the soil moisture sensor, so the SD card module that can be extended to 2 GB will be introduced later.
The basic sensor function is a new function. In Waspmote v1.1, there are not any specific pins on boards for the temperature sensor MCP9700A or the humidity sensor 808H5V5. So an agricultural sensor board is necessary for these corresponding sensors to collect data. The agricultural sensor board is plugged into the Waspmote board and all the needed sensors are plugged into the agricultural sensor board. However, in Waspmote v1.2, the hardware has been changed as well as the API (Application Programming Interface). The basic sensors including the temperature sensor MCP9700A and the humidity sensor 808H5V5, they can be plugged directly on the Waspmote board. Besides, the corresponding specific functions have been developed to collect basic environmental data including air temperature and humidity.
In the utility program, all the functions needed to be tested. The test program had to be compiled and uploaded on the Waspmote v1.2.

The functional requirements of the real time clock module

Considering that saving energy is one of the most important factors in design of wireless sensor network, the Waspmote should have an effective function to change the status between sleep mode and active (ON) mode. The real time clock (RTC) module is used for setting time and alarm clock. As the core part of deceasing energy consumption and saving energy, this part has wild use in the communication between Meshlium and Meshlium.
Real time clock module has an embedded thermometer to get temperature. The getting temperature function will be used later in communications based on XBee ZigBee Pro module and XBee 868 module as a node to collect the temperature [23].
Alarm clock part contains setting alarm clock and getting interruption to wake up. Real time clock module has two alarm clocks. One is based on day/hour/minute/second format. The other is based on hour/minute/second format. So the first alarm clock is used more widely. After setting the alarm clock that defines a corresponding sleep time in program, the Waspmote will change into sleep mode where all modules except the real time clock one are powered off. When the sleep time is over, the real time clock module will send the RTC_INT [24] interruption, when the Waspmote get the RTC_INT interruption, it wakes up from sleep mode to active mode. When Waspmote wakes up, all modules need to be initialized and turned on again.
In the program of real time clock module, it should be focused on the alarm clock part where absolute time and offset time need to be tested as well as the alarm clock 1 and the alarm clock 2 with all corresponding alarm clock modes. These programs should have two versions according to the hardware. One should be uploaded and tested based on the Waspmote v1.1. The other should be uploaded and tested based on the Waspmote v1.2.

READ  SUSTAINABILITY-ORIENTED INNOVATION

The functional requirements of the SD card module

The SD card module is used for saving the environmental data including air temperature, air humidity and soil moisture data from corresponding sensors. Considering that the Waspmote only has 4 KB EEPROM and 128 KB flash memory, when in the deployment, the environmental data needs a large memory to save, so the 2GB extended SD card is necessary.
The SD card module provides basic files operations including reading files, writing files, deleting files, searching content in file, basic folder operations including creating folder, deleting folder, basic SD card operation including calculating the number of files in card and getting the disk size and etc. The checking SD card function is used to check whether the Waspmote has a SD card before storing data in it. It is important to check every time to detect broken SD card event in order to reduce the possibility of losing collected data [25].
The creating and deleting folders functions make the SD card clear in architecture. Because SD card module uses tree architecture, so there could be different layers. Each layer could have different folders and files. The name format of SD card module is 8.3. The name of the created file contains at most 8 letters while the suffix contains at most 3 letters. The change directory function and show files function are also provided for users to check the whole file architecture as well as the content of the SD card.
Because the SD cards are only provided in the Waspmote v1.2 tool kit, the SD card module only needs to be tested on Waspmote v1.2, all functions including operation related to files and operations related to folder are needed to be tested. In our program, the different processes includes checking SD card status, getting basic parameter of SD card including number of files and disk size, creating files, writing files, appending sentences in files, reading files and showing content, deleting files, creating folders, deleting folders and etc. The test program needs to be compiled and uploaded on Waspmote v1.2.

The functional requirements of the GSM/GPRS module

The Waspmote v1.2 tool kit has a Waspmote v1.2 board equipped with a SIM900 module designed for using the GSM network service. When a SIM card is plugged, this module can be used to make and receive calls, send and receive messages, download files from a FTP server as well as upload files to a FTP server. In the project, if the collected environmental data needs to be stored on a FTP server, other Waspmote devices in the same network can send data to the GSM/GPRS module through communication modules like the XBee ZigBee Pro module or the XBee 868 module. And with its GSM/GPRS module, this Waspmote node can resend the data to a FTP server. Besides, when the monitored environmental parameters such as temperature and humidity are outside of the normal level including too high or too low, the GSM/GPRS module could send messages or make calls to the settled phone number.
The GSM/GPRS module provides setting PIN and checking GSM network status functions that need to be used during each initialization to ensure the connection to the GSM network with the used SIM card. In the program, the marking calls and sending messages function are tested on Waspmote v1.2. The functions of uploading files to a FTP server and downloading files from a FTP server are reserved until they are needed on the communications based on the XBee ZigBee Pro module and the XBee 868 module [26].

The functional requirements of accelerometer module

An accelerometer is embedded on the Waspmote board. It provides several functions such as getting acceleration on X axis, Y axis and Z axis, checking free fall status and etc.
In deployment, Waspmote equipped with corresponding sensor could be placed on trees or wire poles for better collecting specific environmental data. In case of falling from high places and losing data without any alarms, technicians can use the accelerometer module to check whether the Waspmote is in free fall status. When the accelerometer checks the free fall status, it can send an interruption named ACC_INT which could wake the Waspmote up from sleep or deep sleep mode, then use the GSM/GPRS module to send messages to technicians as an alarm [27].
The program that includes the functions of getting acceleration on X axis, Y axis and Z axis and check free fall status has been compiled uploaded and tested on both Waspmote v1.1 and Waspmote v1.2. The free fall status is simulated by using hands to protect the Waspmote devices.

The functional requirements of the XBee ZigBee Pro module

As the core part of the project, the XBee ZigBee Pro module is used for sending the collected environmental data from Waspmote to other Waspmotes, from Waspmote to Waspmote Gateway or from Waspmote to Meshlium based on ZigBee protocol. As a communication module that costs lots of energy, most of the time the XBee ZigBee Pro module is in sleep mode until it is the right time to send the packet to destination. When the collected data is enough to fulfill the packet, the XBee ZigBee Pro module is turned on and tries to join the network and send packets.
In the program to make sure that the data is received correctly, the joining network function has been settled to a maximum trying time value called MAX_JOIN_NET_TIME while the sending data function has also been settled to a maximum sending time called MAX_SEND_TIME. For example, in this project the joining network and sending packets will try at most 10 times to reach a node of the network. On one hand, this method tries to make a stable connection and tries to send the packets to the receiver. On the other hand, this method tries to save battery in avoid of wasting too much energy on trying to join network when the network falls off. The settled maximum time has to be considered both on making stable connection and saving energy [28].

Table of contents :

CHAPTER 1 INTRODUCTION
1.1 BACKGROUND
1.2 THE PURPOSE OF PROJECT
1.3 THE STATUS OF RELATED RESEARCH
1.3.1 Wireless sensor network
1.3.2 Smart Agriculture project with Waspmote
1.4 MAIN CONTENT AND ORGANIZATION OF THE THESIS
CHAPTER 2 SYSTEM REQUIREMENT ANALYSIS
2.1 THE GOAL OF THE SYSTEM
2.2 THE FUNCTIONAL REQUIREMENTS
2.2.1 The functional requirements of the Waspmote
2.2.2 The functional requirements of the Waspmote Gateway
2.2.3 The functional requirements of the Meshlium
2.2.4 The functional requirements of the agricultural sensor board
2.3 THE UN-FUNCTIONAL REQUIREMENTS
2.3.1 The un-functional requirements of the Waspmote
2.3.2 The un-functional requirements of the Meshlium
2.4 BRIEF SUMMARY
CHAPTER 3 SYSTEM DESIGN
3.1 DESIGN OF THE WASPMOTE
3.1.1 Design of the real time clock module
3.1.2 Design of the SD card module
3.1.3 Design of the GSM/GPRS module
3.1.4 Design of the accelerometer module
3.1.5 Design of the 802.15.4/ZigBee module
3.1.6 Design of the XBee 868 networking module
3.2 DESIGN OF THE WASPMOTE GATEWAY
3.3 DESIGN OF THE MESHLIUM
3.4 KEY TECHNIQUES
3.5 BRIEF SUMMARY
CHAPTER 4 SYSTEM IMPLEMENTATION AND TESTING
4.1 THE ENVIRONMENT OF SYSTEM IMPLEMENTATION
4.2 KEY PROGRAM FLOW CHARTS
4.3 KEY INTERFACES OF THE SOFTWARE SYSTEM
4.4 SYSTEM TESTING
4.4.1 Test of the real time clock module
4.4.2 Test of the utility module
4.4.3 Test of the SD card module
4.4.4 Test of the accelerator module
4.4.5 Test of the XBee ZigBee Pro module
4.5 BRIEF SUMMARY
REFERENCES

GET THE COMPLETE PROJECT

Related Posts