Remote Monitoring and Automatic Controlling of Water Tank Level ...

93 downloads 0 Views 2MB Size Report
Chapter One. Introduction. 1.1 Introduction. Storage tanks are artificial containers that hold liquids, compressed gases. (gas tank) or mediums used for the short- ...
Remote Monitoring and Automatic Controlling of Water Tank Level Based on GSM STUDENT’S NAME Salema Kindawi Aqeel Mahdi

A project report submitted in partial fulfilment of the requirements for the award of the degree of Bachelor of Computer Techniques Engineering at University College of Humanity Studies.

Supervised by Mr. Ali Jasim Ramadhan Al-Aameri

2016-2017 Najaf, Iraq

Scanned by CamScanner

Scanned by CamScanner

Specially dedicated to my beloved family.

ACKNOWLEDGEMENTS

I would like to thank everyone who had contributed to the successful completion of this project. I would like to express my gratitude to my research supervisor, Mr. Ali Jasim Ramadhan Al-Aameri for his invaluable advice, guidance and his enormous patience throughout the development of the research. In addition, I would also like to express my gratitude to my loving family and friends who had helped and given me encouragement.

III

Remote Monitoring and Automatic Controlling of Water Tank Level Based on GSM ABSTRACT

In this work, we are designed a real time wireless monitoring / controlling system for the water tank based on GSM, and supported alarming subsystem. The main hardware that is used in the implemented system includes Arduino UNO MCU, HC-SR04 Ultra Sonic sensor and SIM900 GSM transceiver. The system has been implemented practically at low cost and low power and gave expected and accurate results.

IV

TABLE OF CONTENTS SUPERVISOR CERTIFICATE EXAMINING COMMITTEE CERTIFICATE ACKNOWLEDGEMENTS ABSTRACT TABLE OF CONTENTS

I II III IV V

CHAPTER 1

2

3

4

Introduction 1.1 Introduction 1.2 Problem 1.3 Objective

1 3 3

System Arcitecture 2.1 System Architecture 2.2 The Principle of Measurement 2.2.1 Arduino UNO 2.2.2 Ultrasonic Sensor 2.2.3 Power Switch 2.2.4 GSM

4 7 10 16 19 21

Results and Discussions 3.1 Results 3.2 Discussions

25 27

Conclusions and Future Works 4.1 Conclusions 4.2 Future Works

28 28

REFERENCES

29

V

CHAPTER ONE INTRODUCTION

Chapter One

Introduction

Chapter One Introduction 1.1 Introduction Storage tanks are artificial containers that hold liquids, compressed gases (gas tank) or mediums used for the short- or long-term storage of heat or cold. Large above ground storage tanks filled with hydrocarbon and hazardous liquids such as oil, oil derived products, chemicals and process plant liquids are in widespread use in the UK, Europe and throughout the world. The tanks are generally spread across a large area and use manual detection and measurement methods which are still under development. This makes it more laborious and time consuming to monitor the tank levels [1]. Remote monitoring and data collection systems are necessary to collect information from the tanks and monitor the same. So it is necessary to build a system which can be accurate, fast in measurement and simple to install and handle, but has an intelligence [2] which takes decisions in real-time and alerts and communicates when necessary. The data acquisition is done by the sensors used to sense the changes in the liquid level of the tank and is stored in the system’s memory. A server collects the information sent from the onboard microcontroller through a GSM modem in the tank; saves it to a database and displays it on a website graphically. Such intelligent monitoring systems help in effective management of tanks, by assessing the status of the tanks periodically allowing optimized logistical supply of product and minimized inventory holding [3]. Efficient utilization of the low power modes of the microcontroller reduces power consumption and extends the longevity and reliability of the system with less maintenance cost [4]. Innovative solutions to tackle emergency applications need to be designed for critically sensitive application and can be achieved by developing effective embedded software, WSN architectures and communication protocols, which are robust, thereby increasing the lifetime of the network. Analog to Digital Converters (ADC’s) can be used to interface the sensors, which are used in data acquisition and sensing the parameters, to help in building sensor interface to the control unit (microcontroller). The collected data will need to be wirelessly transmitted and that can be done by using WSN services which introducing low power and low cost features [5]. Scalability is another important parameter and determines the longevity of the system. A system thus developed should be scalable without major changes to the working system. There are systems which have been implemented for specific liquids like water. Typically, the measurements of liquids are 1

Chapter One

Introduction

done using various sensors which need physical contact with the liquid. These might induce wear and tear and introduce maintenance costs and decrease the longevity of the system [7]. Ultrasonic sensors can be used to sense the liquid level by placing the sensors at a specified portion in the tank, calculating the level of liquid by time of flight of the ultrasonic wave and correlation with respect to the dimension of the tank, to get a more accurate value [8]. The values thus collected needs to be sent to a server using a wireless communication medium, so that this can be correlated at the server for display on the tank software system. The data collected at the server end is displayed on a GUI , thus communicating to the user about the level of liquid, in real time and also evaluating the variation of liquid levels over a period of time.This would accommodate efficient storage, dispensing of liquids and chemicals inside the tanks. As GSM technology is used, it helps the system to be installed in industries, liquid storage fields, oil-tank and trucks. These measurements are sent to a server via a GSM module through GPRS. The GPRS is activated and the TCP/IP sockets are used to communicate to and from the server. The server stores the values in memory and ensures that fluid inventory levels are maintained, and helps in identifying problems such as tank leaks and fluid theft. The various components of the system includes an ultrasonic sensor, a thermistor to get the temperature values of the system, a microcontroller which contains the processor and the analogue to digital converter to measure the temperature and the GSM module used to connect to the server. The processing of the sensor data is done by the microcontroller and communicates to the server periodically as defined during installation. Addition of the nodes or system to the main network is simpler. 1.2 Problem The importance of the knowing the level of the tanks is very significant in different applications like the estimate the level of fuel oil tank, water tank and shipment tanks. 1.3 Objective Design and implementation a system works by real time to observe the level of the water continuously inside a water tank with automatic controlling and remote monitoring by depending on GSM subsystem.

2

CHAPTER TWO System Architecture

Chapter Two

System Architecture

Chapter Two System Architecture 2.1 System Architecture The various modules used in the system can be divided into four subsystems which are as follows [see figure 1]:- 1. Ultrasonic sensor: The ultrasonic sensor is placed with its face directed to the liquid surface. The module is connected to the microcontroller which is used to determine the depth of the liquid in the tank by measuring the time of flight. 2. Microcontroller: - An ARM based 32 bit controller, the STM32F100R8T6B is used to control the overall operation of the system. This controller has an analogue to digital converter, two USART links and also has features which enable the system to go to low-power mode. 3. GSM Module: - The GSM module used here is a Huawei MG323-B which uses the serial communication link to and from the microcontroller. This is a UART link and uses AT Commands to communicate with the GSM module and configures the same to GPRS mode and sends and receives packet of data wirelessly. 4. Server: - The GSM module directly connects to the server which collects these values and represents them on the webpage graphically. The data is tabulated and the variation of liquid is shown on a graph. These readings make the system more user-friendly and also communicate the information to the user more effectively. a. Components of the System The components of the system can be divided into software and hardware. The global climatic change during the first half of the twentieth century has brought a tremendous impact on the high mountainous glacial environment. Due to the faster rate of ice and snow melting, possibly caused by the global warming, the sea level is increasing rapidly and resulting in a sudden discharge of large volumes of water and debris causing flooding of the low lying areas. With this ever-increasing regularity of flood damage, a definite need has emerged for an early warning for regions deemed to be 'at high risk' from flooding. Furthermore, the high level of damage to properties and loss of lives are the underlying factor in the development an early warning system Flood Level Monitoring System. Currently in the South Pacific the Metrological departments get the weather data from the satellite and then predict the average rainfall in the area. Research has been done on Flood monitoring system using GIS hydrological model in China [1]. Again with the use of satellite this system reads the water level and then subtracts the surface elevation to get the height of flood. Moreover most of Flood level systems depend on on satellite to predict the flood data [2, 4

Chapter Two

System Architecture

3]. However there was a need of a system which automatically reads the data rather than predicting in the threatened area and then alerts the residence instantly. Mobile Phones have become one of the most popular communication devices amongst the people all over the world. At present with the world population of around 6.7 billion, 60% use mobile phones. This is about 4.1 billion mobile phone users and this assistive technology is used in all facets of our livelihood. Since the GSM network started its operation in 1991, the SMS has become popular as it provides cheap, convenient and a faster method of communication [4]. Recent advances in the automation showed that the billing system for electricity, gas or water uses GSM module based SMS metering service rather than assigning personnel to visit each house and secure the meter readings manually, where these SMS are sent only from module to users [8]. Even remote greenhouse measure and control systems are SMS based. Then there is an advert of SMS based intelligent homes which are designed to alert the users via SMS in case of emergencies [8]. The owners of smart homes can inter alia switch on/off their lights and appliances via SMS from work, functions or anywhere away from home. Zigbee and Wi-Fi technology is also used for wireless remote controlling; however the distance is very small when compared to GSM control. The Pacific Island countries are scattered over one third of the globe. The region's islands are classified into two groups, high islands and low islands. The since most of the islands are near the equator, the do face tropical cyclones almost every year. The Fiji Islands has a long standing history of tropical cyclones and flash flooding on an annual basis. Frequent severe tropical rainstorms cause major flooding on Fiji’s two main islands—Viti Levu and Vanua Levu leaving local authorities struggling to cope with the thousands of people mostly from the low lying areas. Although there are many evacuation centres and authorities on alert, there is severe loss of lives and properties every time there is a flash flooding. This is invariably due to the absence of a proper flood monitoring system that can provide correct and timely information via communication channels that are operational at the time. Radios and TVs, although available in most households, may not be effective due to the power cuts. However, all households have at least a mobile phone. There are three big mobile phone network companies, Vodafone, Inkk and Digicel that provide the service in Fiji, and competition within the companies has made mobile calls and txt messages very cheap. Therefore, communication using mobiles is much more effective.

5

Chapter Two

System Architecture

Figure 1: System Architecture 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13.

Main Tank. Secondary Tank. Pipe. Dc Source 5v/9v/12v. Arduino UNO. HC-SR04 Ultra Sonic. GSM SIM900. Power Switch. AC Source 220v. AC to DC Converter. Water Pump. LEDs & Buzzer. User Mobile Phone.

2.2 The Principle of Measurement An ultrasonic sensor is used to sense the amount of liquid inside the tank. These sensors send out high frequency waves which are reflected back when it strikes an object or liquid surface. The time span between the transmitting and reflecting waves is measured by the microcontroller. This time of flight is used to determine the distance travelled by the waves, and extrapolate the depth of the liquid in the tank from the point where sensor is placed, see figure 2.

6

Chapter Two

System Architecture

Figure 2 Water Level Sensing The microcontroller sends a pulse through the software code, to the ultrasonic sensors which in turn transmits a wave form. Simultaneously, a timer in the software code is activated and runs until the waveform is received back. Once the waveform is received, the sensor sends a signal to the microcontroller and the timer value is counted and the distance is determined. The microcontroller has various timers and timer 3(TIM3) is used because it consumes relatively less current (0.46mA) when compared to all the other timers present in the microcontroller. The software code used here takes three different ranges into consideration to find the distances. The ranges are 1) Short Range, 2) Medium Range and 3) Long Range. The depth of the liquid is calculated accordingly and stored in the flash memory available for transmission to the server via the GSM Module (see figure 3).

Figure 3 Sensing Process 2.2.1 Arduino UNO

Arduino UNO is a microcontroller MCU platform which has many I/O Pins for analog / digital work and it has other components such as small memory storage. ATmega328 is the core component of the Arduino UNO MCU, that it is working as the processor unit [9]. Other components that make up this board include, 14 digital I/O pins, 6 analog inputs, a 16 MHz ceramic resonator, a USB connection, a power jack and a reset button. The Arduino UNO is a model from the Arduino series. Arduino UNO has one USB connector which can be used to upload code or for a power connection. Battery and main power options are available for power connection. The board can work on 6V to 20V. 7

Chapter Two

System Architecture

Less than 5V supply can make the board unstable, whereas more than 12V will overheat and damage the board. The recommended range is 7 volts to 12 volts. The ATmega328 has 32 KB (with 0.5 KB used for the bootloader) of Flash memory. It also has 2 KB of SRAM and 1 KB of EEPROM, see figure 4.

Figure 4 Arduino UNO

8

Chapter Two

System Architecture

The Arduino UNO has a number of facilities to communicate with a computer. The ATmega328 provides serial communication, which is available on digital pins 0 (Receive) and 1 (Transmit). Universal Asynchronous Receiver/Transmitters (UARTs) are present in the Microcontroller to receive and transmit data serially. It transmits one bit at a time at a specified data rate (e.g. 9600bps, 19200bps, etc.). This method of serial communication is sometimes referred to as transistortransistor logic (TTL) serial. Serial communication at a TTL level is between the limits of 0V and Vcc. Vcc is 5V or 3.3V. While I am trying to make the communication secure, a general question that would come up is: Can Arduino UNO code be read from the chip once it is uploaded? When the code is uploaded in the Arduino UNO microprocessor, it is converted into Hexadecimal format. The pulled hexadecimal code is the converted machine code from the original code and is not as same as the original code. This protects the code primarily because the resources required to extract the original code from the machine code will be higher. Secondly, there is one ultimate way to protect the microprocessor, which is by locking boot loader bits. This allows the user to set the microprocessor bit in a way that will not allow anyone (including the authentic user) to read the data from Arduino UNO. The user can erase data from the chip and then upload data but cannot read what is already uploaded and bit locked. The boot loader lock mode can be enabled by software or serial or parallel programming but only can be erased by a chip erase command. The facility provides much needed protection for WSNs. Arduino is open source physical processing which is base on a microcontroller board and an incorporated development environment for the board to be programmed. Arduino gains a few inputs, for example, switches or sensors and control a few multiple outputs, for example, lights, engine and others. Arduino program can run on Windows, Macintosh and Linux operating systems (OS) opposite to most microcontrollers’ frameworks which run only on Windows. Arduino programming is easy to learn and apply to beginners and amateurs. Arduino is an instrument used to build a better version of a computer which can control, interact and sense more than a normal desktop computer. It's an open-source physical processing stage focused around a straightforward microcontroller board, and an environment for composing programs for the board. Arduino can be utilized to create interactive items, taking inputs from a diverse collection of switches or sensors, and controlling an assortment of lights, engines, and other physical outputs. Arduino activities can be remaining solitary, or they can be associated with programs running on your machine (e.g. Flash, Processing and Maxmsp.) The board can be amassed by hand or bought 9

Chapter Two

System Architecture

preassembled; the open-source IDE can be downloaded free of charge. Focused around the Processing media programming environment, the Arduino programming language is an execution of Wiring, a comparative physical computing platform [2]. There are numerous different microcontrollers and microcontroller platforms accessible for physical computing. Parallax Basic Stamp, Netmedia's BX-24, Phidgets, MIT's Handyboard, and numerous others offer comparative usefulness. These apparatuses take the chaotic subtle elements of microcontroller programming and wrap it up in a simple toutilize bundle. Arduino additionally rearranges the methodology of working with microcontrollers; moreover it offers some advantages for instructors, students, and intrigued individuals: • Inexpensive - Arduino boards are moderately cheap compared with other microcontroller boards. The cheapest version of the Arduino module can be amassed by hand, and even the preassembled Arduino modules cost short of what $50. • Cross-platform - The Arduino programming runs multiple operating systems Windows, Macintosh OSX, and Linux working frameworks. So we conclude that Arduino has an advantage as most microcontroller frameworks are constrained to Windows. • Straightforward, clear programming method - The Arduino programming environment is easy to use for novices, yet sufficiently versatile for cutting edge customers to adventure as well. For educators, its favorably engaged around the Processing programming environment, so understudies finding ways to understand how to program in that environment will be familiar with the nature of Arduino. • Open source and extensible programming. The Arduino program language is available as open source, available for development by experienced engineers. The lingo can be reached out through C++ libraries, and people expecting to understand the specific purposes of different interests can make the leap from Arduino to the AVR C programming language on which it is based. Basically, you can incorporate AVR-C code clearly into your Arduino programs if you have to. • Open source and extensible hardware - The Arduino is concentrated around Atmel's Atmega8 and Atmega168 microcontrollers. The plans for the modules are circulated under a Creative Commons license, so experienced circuit designers can make their own particular interpretation of the module, extending it and improving it. slightly inexperienced customers can build the breadboard variation of the module remembering the finished objective to perceive how it capacities and save money [2]. The Arduino Uno is a microcontroller board based on the ATmega328. It has a 16 MHz ceramic resonator, 14 digital input/output pins (of which 6 can be used as PWM outputs), 6 analog inputs, a USB connection, a 10

Chapter Two

System Architecture

power jack, an ICSP header, and a reset button. This board is very simple and can be easily used, everything you need to support the microcontroller is in this board, just plug it in a computer via USB cable and power using an AC-to-DC adapter or battery to get started. The difference seen in the Arduino Uno is that it does not use the FTDI USBto-serial driver chip but, it has the Atmega16U2 (Atmega8U2 up to version R2) programmed as a USBto-serial converter [2]. According to the official site, the Arduino is an open-source electronics prototyping platform based on flexible, lightweight easy-to-use hardware and software. In other words, the Arduino is an Embedded Computing Platform which can be viewed as an interactive system. Arduino platforms can be used for developing stand-alone, possibly distributed applications. Arduino can also be accessed from a computer in order to support data exchanges, e.g. monitoring information. It is intended for artists, designers, hobbyists and anyone interested in creating interactive objects or environments. The Arduino board is always designed with an Atmel AVR microprocessor, a crystal oscillator and a 5-volt linear regulator. However, depending of the type of use, different Arduino boards can support a USB connector, Pins and others elements. Today, a plethora of Arduino boards exists, depending on the embedded application or of interest. In Table 1, official Arduino boards are presented [8]. Although there are many official Arduino versions, there are also several unofficial Arduino based platforms (e.g. Funduino, Sainsmart etc.) because both, the manufacturing process and the programs which are being developed, are Open source. So, anyone who wishes to build his own Arduino, he can freely make one without paying royalties to the designer. Arduino board can be powered via USB, or via an external power adapter of 9 Volts DC and 1 Ampere. The power source is chosen automatically. It has power PINS which are: VIN (the input pin of the Arduino board which is connected to an external power supply), 5V (it gives a regulated 5V from the regulator on the board), 3V3 (it gives 3.3 volts), the IOREF (it provides the voltage reference with which the microcontroller operates) and the GND. Arduino has a Serial communication (RX & TX), external interrupts, PWM Pins (3, 5, 6, 9, 10, and 11), SPI Pins (10, 11, 12, and 13), and TWI (A4 or SDA pin and A5 or SCL pin. Support TWI communication using the Wire library), AREF (Reference voltage for the analogue inputs), Reset (Bring this line LOW to reset the microcontroller). The Arduino UNO can communicate with a computer, with another Arduino, or with other microcontrollers. The ATmega328 provides UART TTL (5V) serial communication, which is available on digital 11

Chapter Two

System Architecture

pins 0 (RX) and 1 (TX). The Arduino software includes a serial monitor which allows simple text to be sent to and from the Arduino board. The RX and TX LEDs on the board will flash when data is being transmitted via the USB-to-serial chip and USB connection to the computer (but not for serial communication on pins 0 and 1). The ATmega328 also supports I2C (TWI) and SPI communication. The Arduino software includes a Wire library to simplify use of the I2C bus. Finally, the Arduino can be reset by a button that is assembled on its board. But if the Arduino is powered by USB, every time it starts, it does a reset. It also has the ability to reset automatically by a program running from a PC. One of the hardware flow control lines (DTR) of the ATmega8U2/16U2 is connected to the reset line of the ATmega328 via a 100 nanofarad capacitor. When this line is asserted (taken low), the reset line drops long enough to reset the chip. 2.2.2 Ultrasonic Sensor

Ultrasonic sensor ranging module HCSR04 provides 2cm-400cm noncontact measurement function, the ranging accuracy can reach to 3mm.the module includes ultrasonic transmitter, receiver and a control circuit. The ultrasonic distance sensor provides precise, non-contact distance measurements from about 0.8 to 120 inches. The ultrasonic sensor emits short bursts of sound and listens for this sound to echo off of nearby objects. The frequency of the sound is too high for humans to hear (it is ultrasonic). The ultrasonic sensor measures the time of flight of the sound burst. A user then computes the distance to an object using this time of flight and the speed of sound (1,126 ft. /s). This sensor uses ultrasonic sound to measure distance just like bats and dolphins do. Ultrasonic sound has such a high pitch that humans cannot hear it. This particular sensor sends out an ultrasonic sound that has a frequency of about 40 kHz, see figure 5.

12

Chapter Two

System Architecture

Figure 5 Ultrasonic Sensor The sensor has two main parts: A transducer that creates an ultrasonic sound and another listens to its echo. The basic work principle of work:  Using I/O trigger for at least 10us high level.  The module automatically sends eight 40 KHz and whether there is a pulse signal back.  If the signal back, through high level, time of high output I/O duration is the time from sending ultrasonic to returning. Test distance= (high level time * velocity of sound (340m/s)/2) Sound travels at approximately 340 meters per second. This corresponds to about 29.412us (microseconds) per centimeter. To measure the distance the sound has travelled we use the formula: Distance = (Time x Speed of Sound) / 2. The "2" is in the formula because the sound has to travel back and forth. First the sound travels away from the sensor, and then it bounces off of a surface and returns back. The easy way to read the distance as centimeters is use the formula: Centimeters = ((Microseconds / 2) / 29). For example, if it takes 100us (microseconds) for the ultrasonic sound to bounce back, then the distance is (100 / 2) / 29) centimeters or about 1.7 centimeters, see figure 6.

13

Chapter Two

System Architecture

Figure 6 Sensing Operation Wire connecting direct as following  5V Supply  Trigger Pulse Input  Echo Pulse Output  0V Ground  Electric Parameters  Working Voltage : DC 5 V  Working Current : 15mA  Working Frequency : 40Hz  Max Range : 4m  Min Range : 2cm  Measuring Angle : 15 degree  Trigger Input Signal : 10uS TTL pulse  Echo output signal : input TTL lever signal& the range in proportion  Dimension : 45*20*15mm Timing diagram The Timing diagram is shown below. You only need to supply a short 10uS pulse to the trigger input to start the ranging, and then the module will send out an 8 cycle burst of ultrasound at 40 kHz and raise its echo. The Echo is a distance object that is pulse width and the range in proportion. We can calculate the range through the time interval between sending trigger signal and receiving echo signal.

14

Chapter Two

System Architecture

2.2.3 Power Switch

The control circuit is shown in figure 7, and its features below:

Figure 7 Power Switch • 120vac (PSTK-120) and 240vac (PSTK-240) versions with customizable control signal voltage. • Can be wired for either normally open (NO) or normally closed (NC) operation. • This is a parts kit; assembly is required. User provides power cords to match country of use. • 3 to 26vdc control signal range. • Drive directly from microcontroller pin with as little as 3vdc @ 3ma. • 20 amp switching capacity; 5300vrms isolation. • Two wire control signal; no separate dc power source required. • No exposed ac wiring. • LED status indicator.

15

Chapter Two

System Architecture

On each end of the PCB are three large pads labeled "LOAD" and three large pads labeled "LINE.” These pads also connect to the smaller pads for the optional terminal blocks J1 and J2 respectively. The LOAD side connects to the load usually a corded receptacle. The LINE side connects to the source of power usually a corded plug. In the next steps, solder the power cords to the large solder pads or connect them to the terminal blocks as follows: L(ine) pad: Black wire (US) or Brown wire. N(eutral) pad: White wire (US) or Blue wire. G(round, safety) pad: Green wire (US) or Green/Yellow wire. When using the terminal blocks, turn the screws CCW to open the gates in the wire slots, insert the stripped wires, and turn the screws CW to tighten.

Figure 8: European cord attached to Line side terminal block.

Figure 9: US/Canadian cord attached to Line side terminal block. 10. Attach the plug side or "male" power cord to the pads labeled “LINE” or terminal block J2. This is the power cord that normally connects to the source of electrical power. 2.2.4 GSM

In the same project, we need some external pins to save data or the type of connection that is not found on this Arduino board. In this case, we must find a way to extend the Arduino by using a shield. The shield has 16

Chapter Two

System Architecture

the same number of pins and the same PCB design of the Arduino layout. The shield can be stacked above the Arduino which adds extra functionality. Figure 4 shows examples of the Arduino shield, see figure 10.

Figure 19 GSM Shield The Arduino is placed on the bottom and the other shields are stacked over it. This picture is by John Boxall. There are a large number of shields available on the market, each with a unique purpose. Some are developed by the Arduino Company and others are developed by other persons or companies. For examples the GSM/GPRS shield, the Motor shield, the Ethernet shield, the Analog video output, LCD displays and so on. Therefore, the idea is to use a shield to add a specific feature to the Arduino without developing a new circuit to implement this feature. This is one example of an Arduino shield. It works to connect with the GSM network. Before discussing this shield, it is important to know what it means, how the GSM network operates and how the SIM900 GSM/GPRS works with this network. GSM is an acronym for the Global System for Mobile Communication. The GSM network differs from the analog mobile network such that subscription and mobile are separated. The subscription data are stored in the Subscriber Identity Module (SIM). The SIM is a smart card. With this card, we can use any device if it is accessible. The radio devices are called mobile equipment (ME). From these, we can say the Mobile Station consist of two parts: MS = SIM + ME [23, 212]. Figure 5 shows the structure of the GSM network. After knowing what it means, we know what the GSM network consists of and what the Structure of this network consists of. Now, we want to 17

Chapter Two

System Architecture

know about GPRS. GPRS is an acronym for General Packet Radio Service. GPRS is a mobile data service for 2G and 3G cellular communication for mobile communications (GSM). The data rate in 2G systems is 56 to 114 kbit per second. In the 3G system, a moderate speed data transfer is provided by using Time Division Multiple Access (TDMA) channels. Figure 6 shows the structure of the GPRS network. GPRS is a cheaper mobile data service than SMS and data is transmitted more quickly than SMS. The GPRS splits the information when it is transmitted, but related packets are assembled at the other end of GPRS. After understanding how GSM and GPRS operate, it is now easy to understand the SIM900 GSM/GPRS shield. It is small in size and easy to use. This shield is a TTLModem that operates in serial and the baud rate can be from 9600 to 115200. The SIM900 operates at many frequencies including 850 MHz, 900 MHz and 1800 MHz. The shield is designed to operate at 3.3V or 5V and works easily with, and connects directly to the Microcontroller. This modem is suitable for SMS as well. The modem can also be connected to the Arduino by using a UART connection. Figure 11 shows the SIM900 GSM/GPRD and Figure 8 shows the GSM/GPRS Shield. The many features of the SIM900 GSM/GPRS are listed below. 1- Built-in TTL (serial communication). 2- Built-in SIM Card holder. 3- Audio Interface Connectors. 4- Speaker and Headphone jacks. 5- Normal Operation Temperature: -20°C to +55°C. 6- Input Voltage:5V to 12V DC.

Figure 11 SIM 900 The SIM900 GSM/GPRS has many uses in many applications, including transfer of data between two machines (Machine 2 Machine) in different places and remote control of a device. It also uses a remote in Wireless Sensor Networks to transfer sensor data to a web server and vehicle tracking systems to trace everything with GPS.

18

CHAPTER Three RESULTS AND DISCUSSIONS

Chapter Three

Results and Discussions

Chapter Three Results and Discussions 3.1 Results 3.1.1 System Initiating

3.1.2 Level Calculation

25

Chapter Three

Results and Discussions

3.1.3 Low Water Tank Level Condition

Display Example:

3.1.4 High Water Tank Level Condition

Display Example:

26

Chapter Three

Results and Discussions

3.1.5 GSM Messages: 3.1.5.a Low Water Level Case

3.1.5.b High Water Level Case

3.2 Discussions From the obtained results, we notice that the system is worked correctly in real time.

27

CHAPTER Four CONCLUSIONS AND FUTURE WORKS

Chapter Four

Conclusions and Future Works

Chapter Four Conclusions and Future Works 4.1 Conclusions From the obtained results, we conclude that the system processes of monitoring and controlling are working correctly in real time. 4.2 Future Works We are suggesting to add anthers sensors to the system such as temperature sensor and PH sensor.

28

REFERENCES

References 1. Microcontroller chip Technology, 2001, PIC16F84A Datasheet. http://www.alldatasheet.com/datasheet-pdf/pdf/77366/MICROCHIP/PIC16F84A.html 2. Deepiga, M.T. and Sivasankari, M.A., 2015. Smart Water Monitoring System Using Wireless Sensor Network at Home/Office. International Research Journal of Engineering and Technology (IRJET), 2(04), pp.1305-1314. https://www.irjet.net/archives/V2/i4/Irjet-v2i4218.pdf 3. Islam, N.S. and Wasi-ur-Rahman, M., 2009, December. An intelligent SMS-based remote water metering system. In Computers and Information Technology, 2009. ICCIT'09. 12th International Conference on (pp. 443-447). IEEE. http://ieeexplore.ieee.org/document/5407279/ 3. Al-Ali, A.R., Rousan, M.A. and Mohandes, M., 2004, April. GSM-based wireless home appliances monitoring & control system. In Information and Communication Technologies: From Theory to Applications, 2004. Proceedings. 2004 International Conference on (pp. 237-238). IEEE. http://ieeexplore.ieee.org/document/1307712/ 4. Rosolem, J.B., Dini, D.C., Penze, R.S., Floridia, C., Leonardi, A.A., Loichate, M.D. and Durelli, A.S., 2013. Fiber optic bending sensor for water level monitoring: Development and field test: A review. IEEE Sensors Journal, 13(11), pp.4113-4120. http://ieeexplore.ieee.org/document/6578069/ 5. Shaker, M. and Imran, A.A., 2013. Greenhouse Micro Climate Monitoring Based On WSN with Smart Irrigation Technique. World Academy of Science, Engineering and Technology, International Journal of Electrical, Computer, Energetic, Electronic and Communication Engineering, 7(12), pp.1566-1571. https://www.waset.org/Publication/greenhouse-micro-climate-monitoring-based-on-wsnwith-smart-irrigation-technique/9996619 https://www.researchgate.net/publication/281443196_Greenhouse_Micro_Climate_Monit oring_Based_On_WSN_with_Smart_Irrigation_Technique?_iepl%5BviewId%5D=cQM5 0mct41qlSRV604QrHURf&_iepl%5BprofilePublicationItemVariant%5D=default&_iepl %5Bcontexts%5D%5B0%5D=prfpi&_iepl%5BtargetEntityId%5D=PB%3A281443196& _iepl%5BinteractionType%5D=publicationTitle 6. Reza, S.K., Tariq, S.A.M. and Reza, S.M., 2010, October. Microcontroller based automated water level sensing and controlling: design and implementation issue. In Proceedings of the world congress on engineering and computer science (Vol. 1, pp. 2022). www.iaeng.org/publication/WCECS2010/WCECS2010_pp220-224.pdf 7. Ebere, E.V. and Francisca, O.O., 2013. Microcontroller based automatic water level control system. International Journal of Innovative Research in Computer and Communication Engineering, 1(6), pp.1390-1396. https://www.ijircce.com/upload/2013/august/1C_Microcontroller.pdf 8. Johari, A., Wahab, M.H.A., Latif, N.S.A., Ayob, M.E., Ayob, M.I., Ayob, M.A. and Mohd, M.N.H., 2011. Tank Water Level Monitoring System using GSM Network. Int. J. Computer Sci. and Info. Tech, 2(3), pp.1114-1120. http://www.ijcsit.com/docs/Volume%202/vol2issue3/ijcsit2011020334.pdf 29

References 9. Jasim, S., Shaker, M. and Imran, A.A., Greenhouse Automation Based on Wireless Sensor Network with Novel Diagnostic Subsystem. Editors-in-Chief, p.425. http://www.europeanjournalofscientificresearch.com/issues/EJSR_102_3.html https://www.researchgate.net/publication/281443416_Greenhouse_Automation_Based_on _Wireless_Sensor_Network_with_Novel_Diagnostic_Subsystem

30

Suggest Documents