Beruflich Dokumente
Kultur Dokumente
86980
I hereby declare that this project has not been submitted to any other University for the award of
Bachelor’s Degree in Bachelor of Science Informatics and Computer Science.
Sign: ________________________
Date: ________________________
I certify that this work is being submitted for examination with my approval.
Supervisor’s Approval:
Sign: ________________________
Date: ________________________
1
Table of Contents
ABSTRACT 5
CHAPTER 1: INTRODUCTION 6
2.1 INTRODUCTION 9
2.2 INTERNET OF THINGS 9
2.3 INTERNET OF THINGS IN KENYA 9
2.3.1 Agricultural Sector 10
2.3.2 Security Sector 10
2.3.3 Health Sector 10
2.4 RELATED APPLICATIONS 11
2.4.1 CropX 11
2.4.2 WaterBit 11
2.4.3 eBee Ag 12
CHAPTER 3: METHODOLOGY 15
3.1 Introduction 15
3.2 System Development Methodology 15
3.3 Testing 16
3.4 Development Tools 16
3.4.1 Programming tools 16
3.4.1.1 Programming Language 16
3.4.1.2 Software tools 16
3.4.2 Hardware Tools 17
3.4.2.1 Arduino Microcontroller 17
2
3.4.2.2 Sensors 17
3.4.2.3 Actuators 18
3.4.3 Documentation Tools 19
Chapter 4: SYSTEM ANALYSIS AND DESIGN 20
5.1 Implementation 24
5.1.1 System Specifications 24
5.2 System Testing 24
5.2.1 Test Cases 25
5.2.2 Test Results 25
CHAPTER 6 : CONCLUSIONS AND RECOMMENDATIONS 27
6.1 Summary 27
6.2 Challenges 27
6.2 Recommendations and Future works 27
References 28
APPENDICES 29
3
Table Of Figures
4
ABSTRACT
Agriculture in Kenya dominates the Kenyan economy since it is the largest contributor of
Kenya’s Gross Domestic Product. However, in as much as Kenya’s land is very fertile for
cultivation, the agricultural sector faces a number of challenges. Most farmers lack
sufficient information on how well to cultivate the land in order to get maximum output and
profits. This can be attributed to the use of outdated technology or no technology at all.
Irrigation systems developed by these farmers either provide too much water for the crops
that leads to wastage of water and ultimately insufficient harvest or provide too little water
which also leads to insufficient produce from the crops. The situation at hand is that most
farmers estimate the amount of water that they should irrigate to their crops which at most
times is either not enough or too much therefore getting insufficient yields.
The proposed solution is to work on an Internet of Things project to come up with a way to
allow the farmer to remotely irrigate the land and get real-time data about the farm. The idea
is to make a system that will ensure that different crops get just the right amount of water
they require for maximum yields. The project also aims at providing the farmer with
sufficient information on land and the right crops that can survive on the land according to
the quality of soil that the land has. The project will lead to the development of an automatic
irrigation system that irrigates the land according to the crop’s needs in terms of water. The
farmer will also have a simple android application that will constantly tell the farmer of the
condition of the farm and suggest ways he or she can better improve the land to give
sufficient yields. The farmer will also be able to turn the irrigation system on and off from
the application with just one click from a remote location. The main focus of the project is
to enable remote irrigation of the farm.
5
CHAPTER 1: INTRODUCTION
The agriculture sector is one of the most important sectors in the Kenyan economy. Every
government is given a role to ensure food security in the country and the agriculture sector
is right at the heart of it. The agriculture sector in Kenya contributes to 26% of the Gross
Domestic Product by itself, and in addition to all this, the sector employs almost 40% of
Kenya’s population. Because of just how important and vital the sector is, it attracts very
many stakeholders even internationally because of the exports that the country has.
(FarmersTrend, 2017)
Farming practices have been changing in Kenya over the past couple of years. Some years
ago, farming was not automated. The farmer would manually plough and cultivate the land
which was both labour intensive time consuming. Later, the farmers adopted machines such
as tractors for farming. Recently, farmers have been inco-operating pumps in their farms to
ease the irrigation process.
Irrigation is a specific problem that most farmers face. The irrigation methods employed by
most farmers either end up providing too little water or too much water to the crops. This
usually leads to lower crop yields.
Water is an essential part of the plant’s growth and different crops require different amounts
of water at different stages of their lives. A farmer should be able to monitor the farm
remotely from his mobile phone getting real time data on thing like soil moisture content,
humidity and temperature thereby making him make a more informed decision on the farm.
Farmers need to take all this into consideration when watering their crops. In addition to
this, the proposed system should autonomously provide water to the crops in the farm when
certain conditions are met.
6
1.2 Problem Statement
Irrigation systems developed by farmers either provide too much water for the crops that
leads to wastage of water and ultimately insufficient harvest or provide too little water
which also leads to insufficient produce from the crops. The situation at hand is that most
farmers estimate the amount of water that they should irrigate to their crops which at most
times is either not enough or too much therefore getting insufficient yields.
1.4 Objectives
7
iv. How feasible and scalable is this technology in solving the problem?
1.6 Justification
The development of an IoT based irrigation system that not only irrigates the farm
according to the soil moisture content but also takes into consideration the crop and the
development stage of the crop will take automation of the irrigation system to a whole new
level. The advantages of such a system are many. First, this system will lead to higher yields
for the farmer since the crops will be receiving the right amount of water required according
to its needs. Secondly, the proposed system will save a lot of water that was otherwise
wasted in the normal irrigation methods. This water can be used later or put into better use.
Thirdly, the proposed system makes it easier for the farmer to irrigate the farm since the
irrigation process is automatic. This gives the farmer an opportunity to invest his or her time
into something else that could bring him more profit. The project also involves providing
the farmer with a simple android application that sends real time data like the soil moisture
content of the soil ensuring that the farmer makes more informed decisions about the farm.
The android application will also enable the farmer to control the irrigation system
remotely.
8
CHAPTER 2: LITERATURE REVIEW
2.1 INTRODUCTION
This review discusses the growth and impact of Internet Of Things technology all over the
world and specifically its uptake in Kenya. The review will also focus on implemented
works of Internet of Things in the agricultural sector. The focus will specifically be in the
automated irrigation systems. This chapter will try to highlight the failures of other
implemented work and suggest improvements that can be made in the field.
Internet Of Things is the future in Kenya. Things are changing from M2M to IoT and now
the world is progressing to Internet of Everything(Yehia, 2018). Internet Of Things has
been adopted in a vast number of sectors in Kenya.
9
These are some of the sectors that have adopted IoT in Kenya.
10
whether a patient is infected or not. The company is looking to make it easier to diagnose
malaria and thereby enabling those who are infected to get help faster(Fredric, 2017)
These are some of the projects and applications that have already embraced Internet Of
Things in agriculture.
2.4.1 CropX
CropX is a company that develops IoT-enabled smart irrigation devices that combines
aspects of soil sensors and cloud based analytics. CropX is an affordable device for the
farmers which requires very limited technical know-how in order to use it.(‘CropX Inc.’,
2018.) The device basically takes into consideration the soil moisture content and uses this
to determine whether the farm needs to be irrigated or not. Data from sensors such as the
temperature and soil moisture is also collected and used in data analytics. The company also
offers a website that is connected to the IoT device that offers real time data about the
moisture and enable the user to schedule irrigation through the web interface.
11
2.4.2 WaterBit
WaterBit is a start-up that aims at making autonomous irrigation easier. It aims at
maximizing crop yields and conserve resources. The devices produced by the company also
collects in-field data and gives farmers near real-time insight into the crop conditions. It has
a cloud-based software that lets the farmers analyze and monitor the soil moisture as well as
control the irrigation.
2.4.3 eBee Ag
This company uses drone technology to capture accurate and clear images of the acres of
farmland of the customers enabling the farmers to obtain accurate view and data about their
yields, soil condition and water level. It is designed and developed specifically for
12
agricultural purposes giving clearer images than the satellite images. The images captured
can further be processed into graphical output giving a clearer information about the farm
field and hence cutting costs and making irrigation easier.
13
2.5 CONCEPTUAL FRAMEWORK
The conceptual framework has three fundamental sections; The hardware section consists of
an Arduino Uno board, the required sensors and the appropriate actuators like a microservo
motor. Data collected by the sensors is then sent to the cloud platform for example
ThinkSpeak or Blynk where it is analyzed and can be accessed from any part of the world.
The data will be sent to the cloud either using an Ethernet shield or a WiFi module
connected to the Arduino. Finally, the end user can be able to access this data on the mobile
phone from an application that pulls this data from the cloud.
14
CHAPTER 3: METHODOLOGY
3.1 Introduction
Software development teams are expected to implement one or more software development
methodologies to ensure that the efficiency of the software development process is
improved. It ensures that the software development process is as flawless as possible.
15
3.3 Testing
Considering the fact that scrum methodology is the proposed system development
methodology, the entire development will be test driven. This is because the product is
being continuously evolved and testing is done after every iteration.
This section describes the tools and techniques that will be used in the development phase of
the project. There are three main components of the project.
i. The irrigation automation equipment
ii. Global web server
iii. Android application
Android Studio will be the software used in the development of the android application.
Android Studio is the official integrated development environment for the development of
Android applications.
The open-source Arduino Software(IDE) will be used to write code and upload it on the
arduino board.
16
3.4.2 Hardware Tools
3.4.2.2 Sensors
Sensors will be the main components for collecting data from the farm and later on that data
will be displayed on the android application. This data will also be used to determine
whether to turn on the irrigation system or not. The sensors that will be used for the project
are a soil moisture sensor to measure the soil moisture content and a DHT11 sensor to
measure both the temperature and the humidity of the soil.
17
Figure 8: Soil Moisture Sensor
3.4.2.3 Actuators
Actuators will be the output of the system and will be responsible for the physical turning
on and off the irrigation system. Relays will be used as the actuators in the proposed system.
18
Figure 10: Ethernet Shield
19
Chapter 4: SYSTEM ANALYSIS AND DESIGN
Requirements analysis is the process of determining user expectations for a new or modified
product. These feature are also called requirements and must be quantifiable, relevant and
detailed.
The proposed IoT irrigation system has the following functional requirements of the
hardware:
i. The sensors should gather sensor data and pass it to the Arduino Uno.
ii. The actuators should receive inputs from the Arduino Uno and translate those inputs
into physical actions. For example turn on the irrigation system.
The proposed android application should have the following functional requirements :
i. User Authentication - The user should be able to login into the android application in
order to access the different functionalities that are available.
ii. The user should be able to view the status of the farm
iii. The user should be able to turn the irrigation system on and off remotely.
20
ii. Security will ensure that the confidentiality, availability and integrity of the data
produced is maintained. Authentication ensures that only allowed users can access
the data at anytime.
iii. User Support
iv. This section enables the user to learn more on how to use the system. It also ensures
instant notifications for the user to make them aware of the events taking place in the
system even when the user is away.
21
4.3.1 Use Case Diagram
The use case will illustrate the activities that will be performed by the user.
The system will consist of four actors. The farmer, the soil moisture sensor, the humidity
sensor and the temperature sensor. The sensors will be responsible for collecting as much
data as possible and sending it to a cloud platform. The data will be stored in the cloud
platform and can be analyzed from there. The farmer will be able to view the data collected
by the sensors on an android application and ultimately be able to turn on the irrigation
system remotely.
22
4.3.2 Class Diagram
A class diagram is used to show hierarchical relationships between entities in a system.
23
CHAPTER 5 : SYSTEM IMPLEMENTATION AND TESTING
5.1 Implementation
The main functionalities of the system is to enable remote monitoring of the water requirements in
the farm and autonomous irrigation of the farm. The system has been made using the Blynk
Platform. Blynk is a cloud platform for Android and IOS applications to control Arduino and
Raspberry Pi over the internet. Once the farmer logs into the Blynk platform, they are redirected to
their dashboard. The dashboard has widgets that display the soil moisture content of the farm, the
humidity of the farm and the temperature of the farm. The platform also enables data logging to
ensure that the farmer can observe the trends in the data and come up with better ways to irrigate
the farm. The farmer also has the ability to control the irrigation system using the platform. An
Ethernet shield has been used to connect the arduino Microcontroller to the Blynk cloud in order to
send data from the arduino and to retrieve this data from the cloudplatform.
24
5.2 System Testing
After the integration of modules the whole system was tested. The smart irrigation system was
tested using the blynk platform and it worked properly.
25
required data. confirmed using sensor data at
the Arduino IDE predefined
serial monitor. intervals.
26
farm in order to project was being project was being
enable the farmer presented. presented.
to make more
informed
decisions
27
CHAPTER 6 : CONCLUSIONS AND RECOMMENDATIONS
6.1 Summary
6.2 Challenges
The greatest challenge faced during the implementation of the system was finding the most
appropriate cloud platform to use for the project. Thinkspeak cloud platform and the IBM
cloud platform were both very challenging to use and the documentation provided was not
sufficient.
Another challenge faced was integrating a predictive model using Artificial Neural
Networks.
The addition of a predictive model on the application that will give predictions based on the
data being continuously collected by the sensors to enable the farmer make more informed
decisions about his or her farm.
In addition to this, integration of this system to a weather API that will provide weather
forecast information to the farmer.
28
References
FarmersTrend. (2017, March 29). How agriculture has changed with time in
Kenya.Retrieved 13 July 2018, from
http://www.farmerstrend.co.ke/how-agriculture-has-changed-with-time-in-kenya/
Safaricom going big on IoT | CIO East Africa. (2018). Retrieved 13 July 2018, from
https://www.cio.co.ke/analysis/internet-of-things-analysis/fireside-chat-safaricom-goi
ng-big-iot/
Rahul, T (2018). Learn to create and control virtual LED. Retrieved 27 October 2018
from https://opensource.com/article/18/9/blynk-iot-pushbutton-project
Ahmed, H (2016) .Enter the IoT world now! – Getting started with Blynk. Retrieved
20 October 2018 from
https://www.hackster.io/shakram02/enter-the-iot-world-now-getting-started-with-bly
nk-e99b67
29
Michael, T(2012). Plugging in and Testing the Arduino Ethernet Shield. Retrieved on
20 October 2018 from
https://startingelectronics.org/articles/arduino/arduino-ethernet-shield-plugging-testin
g/
APPENDICES
30
Figure 15: Hardware connections
31
Figure 17: Sending Data to Blynk platform
ACTIVITY WEEKS
15th May. 2018 –8th Nov. 2018
1 2 3 4 5 6 7 8 9 10 11 1 13 1 1 16
- 2 4 5
Project
description
Project proposal
Purchasing
Hardware
Required
Final Project
report plan
Functional spec.
& literature
review
Software design
& Coding
Documentation
Actual
presentations
32
Table 2: Gantt Chart
33