solution for indian agriculture …faculty.iitmandi.ac.in/~arti/mtp/arpit.pdfkisanvikas – an...
TRANSCRIPT
1
KISANVIKAS – AN ARDUINO, ANDROID BASED
SOLUTION FOR INDIAN AGRICULTURE
MTP Report submitted to
Indian Institute of Technology Mandi
for the award of the degree
of
B.Tech
by
Arpit Ajay Narechania (B11111)
Abhay Chowdhary (B11101)
under the guidance of
Dr. Arti Kashyap and Dr. Anil Kishan
SCHOOL OF ENGINEERING
INDIAN INSTITUTE OF TECHNOLOGY MANDI
JUNE 2015
2
CERTIFICATE OF APPROVAL
Certified that the thesis entitled KISANVIKAS – AN ARDUINO, ANDROID BASED
SOLUTION FOR INDIAN AGRICULTURE submitted by ARPIT AJAY
NARECHANIA, ABHAY CHOWDHARY to Indian Institute of Technology Mandi, for
the award of the degree of B. Tech has been accepted after examination held today.
Faculty Advisor
Date:
3
CERTIFICATE
This is to certify that the thesis entitled KISANVIKAS – AN ARDUINO, ANDROID
BASED SOLUTION FOR INDIAN AGRICULTURE, submitted by Arpit Ajay
Narechania, Abhay Chowdhary to Indian Institute of Technology Mandi, is a record of
bona fide work under my (our) supervision and is worthy of consideration for the award
of the degree of B. Tech of the Institute.
__________________________ _______________________
Supervisor Supervisor
Date:
4
DECLARATION BY THE STUDENTS
This is to certify that the thesis titled KISANVIKAS – AN ARDUINO, ANDROID
BASED SOLUTION FOR INDIAN AGRICULTURE, submitted by us to the Indian
Institute of Technology Mandi for the award of the degree of B. Tech is a bonazfide
record of work carried out by us under the supervision of Dr. Arti Kashyap and Dr. Anil
Kishan. The contents of this MTP, in full or in parts, have not been submitted to any other
Institute or University for the award of any degree or diploma.
Mandi, 175001
Date: 7th June 2015 Arpit Ajay
Narechania
Abhay Chowdhary
5
List of Figures
User Registration Architecture for the application 5
The Login Screen 5
Process of retrieving weather data from server 6
The response from the weather in JSON format 7
Screenshot – various weather parameters 7
Screenshot – trend of maximum and minimum temperatures 7
Process of retrieving crop Mandi price data from server 8
Screenshot: Result of query for “Cotton on 21st March 2015 in Rajasthan” 8
Process of retrieving agricultural news by parsing RSS feeds 9
List of global news headlines for the topic of Agronomy 9
Screenshot: Redirection to access complete news article from the links 9
Screenshot: Application UI for Vehicle and Equipment database 10
Screenshot: Application UI for Harvested crop database 10
Screenshot: Successful modification to the database entries 10
Screenshot: Map view of the user’s field 11
List of snapshots of the field taken during the agricultural season with some notes 11
Screenshot: KVK locations based on the search query – ‘Gujarat’ 12
Result of KCC contact information for ‘Maharashtra, Goa, Daman, Diu region’ 12
CAD drawing of v1.0 of KisanVikas prototype in Solidworks 13
v1.0 of KisanVikas fabricated and running 13
Wiring diagram of the LCD, ultrasonic and infrared sensors using Fritzing 14
Infrared Sensor successfully detecting obstacles in v1.0 15
LCD screen with statuses of the IR sensors, ultrasonic sensor and pump status 15
Successful manual remote control over the plough actuated a by servo motor 15
6
Architecture of the arduinosensorsactuators network of the v2.0 prototype 16
Block diagram and Fritzing drawing of the Arduino megaandroid connections 17
using HC05 bluetooth module
Isometric CAD of KisanVikas v2.0 in Solidworks 17
Back view of KisanVikas v2.0 18
Front view of KisanVikas v2.0 18
KisanVikas v2.0 fabricated 19
The complete androidarduino system proposed featuring the prototype, 19
GSM operated switching system of pump
Block diagram and Fritzing wiring diagram of the Arduino Mega 20
motor driver connection to the wheels
Screenshot of the application trying to connect to the vehicle over Bluetooth 20
Screenshot of the dashboard with navigation buttons and the indicators 20
Pinconnections of HCSR04 ultrasonic sensor module to Arduino mega 21
Pinconnections of 2 (left and right) infrared (IR) sensor modules. 21
Ultrasonic sensor distance measurement and graph plotting setup 22
Graph being plotted on laptop of the ultrasonic distance sensor readings 22
Graph being plotted on laptop of the ultrasonic distance sensor readings 22
The actual wiring together of the modules – sensors and indicators 23
Video from the phone on the left can be seen in the phone on the right 23
Servo motor connection block diagram 24
Application UI to set plough angle and depth 24
The plough mechanism connected to the servo motor controlled by mobile phone 24
7
Application UI to set seeding distance and depth 25
Seed sowing mechanism: Architecture 25
CAD of the seed sowing mechanism 25
Successful control over a submersible pump using android device 26
Architecture of the mobile MCU interface with the sensoractuator networks 26
The working setup of the GSM controlled pump operation 27
Successful receipt of a test SMS from a SIM card installed on the GSM shield 27
connected to the Arduino mega microcontroller
Arduino Serial Monitor displaying the moisture sensor values 28
Screenshot: Pump operations over Bluetooth 29
Pump operations over GSM 29
Screenshot: Real time graph plotted in the app for the moisture sensor data 29
8
List of Tables
Registered users info in a MySQL database table 5
Database tables of the inventory system in Excel 11
Sensor data tabulated every 2 minutes and exported into Microsoft Excel format 29
9
Abstract
Agriculture accounts for ~15% of the Gross Domestic Product (GDP) of India but
employs close to 50% of the working population. Average yield in India is quite low
compared to other countries. Advances in Information and Communication Technology
(ICT) and the government initiatives in egovernance are only promoting eagriculture in
India. This can not only improve the condition of Indian agriculture but also the life and
working conditions of the farmers. This project proposes KisanVikas (Farmer
Development), an android application, using ICT and promoting egovernance by provide
continuous information pertaining to agriculture like weather forecast, crop prices, news,
government helplines, and an inventory database manager. The app wirelessly controls a
robot which can perform various operations like ploughing, seed sowing and watering
(irrigation). The live video feed from an onboard camera is continuously visible onto the
app for better monitoring. It also connects to an Arduino based wireless sensor network
(WSN) comprising soil moisture, temperature sensors to control switching of water
pumps for watering small fields, irrigation over the Global System for Mobile
communication (GSM) and Bluetooth networks.
Keywords: eagriculture, ICT, (WSN) wireless sensor networks, android application,
arduino, multipurpose agricultural operations
10
CONTENTS
Title Page i
Certificate of Approval ii
Certificate by the Supervisor iii
Declaration iv
List of Figures v
List of Tables viii
Abstract ix
Contents x
Chapter 1 Introduction and Literature Review 1
Chapter 2 Software – Mobile Application (Android) 5
2.1 Sign In and Registration 5
2.2 Weather Forecast 6
2.3 Commodity Market Prices 7
2.4 Agricultural News 8
2.5 Farm Manager (Inventory Management) 9
2.6 Map of Field 11
2.7 Farmer Helplines 12
Chapter 3 Hardware – Wireless Agricultural Operations 13
3.1 KisanVikas v1.0 13
11
3.1.1 Overview 13
3.1.2 Milestones 14
3.1.3 Wiring Diagrams 14
3.2 KisanVikas v2.0 15
3.2.1 Overview 15
3.2.2 Milestones 16
3.2.3 Navigation 19
3.2.4 Obstacle Avoidance and indicators 21
3.2.5 Live Video Streaming 23
3.2.6 Ploughing Mechanism 24
3.2.7 Seed Sowing Mechanism 25
3.2.8 Irrigation and Water Pumping Mechanism 26
3.3 Wireless Pump Operations 27
3.3.1 over GSM 28
3.3.2 over Bluetooth 29
Chapter 4 Results and Discussions 30
4.1 Software – Android application 30
4.2 Hardware – Sensors and Actuators 30
Chapter 5 Conclusions and Future Scope of Study 31
References 32
Appendix SolidWorks drawing sheets of various prototype parts 35
12
Chapter 1 – Introduction and Literature Review
Agriculture, “The backbone of Indian economy” as quoted by MK Gandhi is defined as
an integrated system of techniques to control the growth and harvesting of animal and
vegetables. It is an uncomplicated endeavor comprising of technical and practical
processes that helps in the maintenance of the ecological balance and protects human
resources; most importantly it is a viable food production system (Agro Products 2015).
In 201213 agriculture contributed to 13.9% of the total GDP (Economic Survey & CSO
2014, p. 23), and employed 47% of the total workforce population (World Bank 2014).
The combined efforts of Central Government, State Governments and the farming
community have succeeded in achieving a record production of 264 MT of food grains
during 201314 (Economic Survey & CSO 2014, p. 19). This record production has been
achieved through effective transfer of latest crop production technologies to farmers under
various crop development schemes being implemented by the Department of Agriculture
& Cooperation backed by remunerative prices for various crops through enhanced
minimum support prices. As Indian economy has diversified and grown, agriculture's
contribution to GDP has steadily declined from 1951 to 2014, yet it is still the largest
employment source and a significant piece of the overall socioeconomic development of
India. Crop yield per unit area of all crops have grown since 1950, due to the special
emphasis placed on agriculture in the fiveyear plans and steady improvements in
irrigation, technology, application of modern agricultural practices and provision of
agricultural credit and subsidies since the Green Revolution in India. However,
international comparisons reveal the average yield in India is generally 30% to 50% of the
highest average yield in the world (Economy of India 2014).
There are 38 crore mobile telephones in rural areas, 9 crore farm households and Internet
penetration is currently at 5% but improving (TRAI, GoI 2014). Rural India leads a record
35% surge in use of egovernance. Of the 3.5 billion electronic transactions reported in
2014, 50% of them were from rural areas, which were responsible for only 20% of e
transactions in 2013 (Patil, 2015). This increasing penetration of mobile networks in India
therefore presents an opportunity to make useful information more widely available. This
13
could help agricultural markets operate more efficiently, and overcome some of the
hurdles faced by it.
Mobile or smart phones are becoming an essential device for all types of users
irrespective of the age group. High resolution cameras, high definition video with huge
amount of memory; internet browsing through your handset and 3G and Wireless LAN
connectivity; hardware like GPS, accelerometers, gyroscopes, Bluetooth are common to
find on smartphones these days. Android, the opensource mobile operating system
developed by Google, is quickly becoming the smartphone operating system choice for
all. As of June'14 there were 57,380,000+ Google Android and 4,854,000+ Apple iOS
users in India [Webenza Survey 2014].
The Ministry of Agriculture, Govt. of India, started various schemes in the interests of the
farmers for mobile phones. The mKisan Portal (Ministry of Agriculture, GoI 2014)
inaugurated in July'13 by Honorable President of India has received as of 1,85,40,07,285
messages, 5,74,40,63,746 and 237,777 advises as of 8th April'15. The weekly/ daily stock
availability with dealers of seeds and fertilizers was made available at Rs. 5/month/dealer.
USSD (Unstructured Supplementary Service Data), IVRS (Interactive Voice Response
System) and Pull SMS provide broadcast messages – to get web based services on mobile
without internet, in their language and voice messages for the illiterate. Based on NSS
(National Sample Survey Organization) 59th Round Survey (cited by Singhal, Verma &
Shukla 2011) the information regarding seeds was the most inquired information followed
by the mandi (market) prices by the farmers. Based on the survey, the most important
requirements of the farmers were divided into 3 broad categories knowhow about seed
varieties to use; contextual information for weather, local soil conditions; and market
information about commodity prices.
According to Saravanan R. (2014), there are many mobile advisory services in India, both
by private as well as public sectors. Most of these are however regional services offered
by the state governments directly or by the center for a particular region. Because of this,
there is not only discontinuity in services across the nation but also a language barrier for
outofstate people.
14
Some initiatives in the public sector are Kissan Helpline (Farmer helpline), Mandi on
Mobile Service by BSNL, Kissan Kerala, vKVK (Virtual KrishiVigyan Kendra), and
Mobile based AgroAdvisory System in NorthEast India (m4agriNEI). Private sector
services include Fasal (crop), Awaaz de (voice it), Videokheti (video farming), Mandi
Bhav (market price).
Extensive research has taken place in this field of using information and communication
technology for agricultural purposes. Prabhakar, Jamadagni, & Sudhangathan (2013),
write about a ‘datamule’ which captures data from sensors like soil moisture in the field
and is communicated over WiFi network to a mobile phone. Wilton, Hans and Carlos
(2014) propose a telemetry system to record soil moisture, temperature data and store into
a database for future diagnosis. Ariff, and Ismail (2013) have proposed an android
application to maintain a database of various information related to the livestock in the
farm. Singhal, Verma, and Shukla (2011) have developed an android application which
provides information in the form of crop prices, weather information, farmer loan
schemes, etc to the user.
So utilizing the available technology, it is quite possible to make an android mobile
controlled vehicle which can wirelessly perform certain simple operations for the farmers
improving their lives to a great extent.
Fue, Schueller, et.al (2014) proposed an integrated controller prototype of a solarpowered
system that uses low cost electronic devices to automate drip irrigation and to determine
when and how much to irrigate.
Shivaprasad, Ravishankara and Shobha (June 2014) designed a remote controlled system
for seeding and fertilizing agriculture robot using a microcontroller. It also checked soil
pH, temperature, moisture, humidity.
So it is quite evident that extensive research is being carried in the autonomous agriculture
or robotics in agriculture sector to not only suffice for lack of labor in some countries, but
also improve the overall standard of living of the farmers. In this project a similar system
is proposed which can wirelessly not only sow seeds or fertilizers but also plough and
water (irrigate) the field if required. All this using a mobile application on an android
15
device which is quite common nowadays. Switching on and off of pumps from long
distances over the GSM network using SMSs is also possible to prevent the farmer from
staying back just to operate the pumps. The application also assists the farmer with real
time data inputs about agriculture like weather forecast, crop prices, latest news and
helplines to the nearest Kisan Call Centers (KCC) and Krishi Vigyan Kendras (KVKs) for
guidance, grievance or complaints. It also offers a real time map of the field with
continuous monitoring of the vehicle but also documents the growing crop with time to
time screenshots. An inventory manager will help the farmer better manage his assets and
inventories or any unpaid errands or dues with dealers.
The above mentioned features and their methodologies are explained in detail next.
16
Chapter 2 Software – Mobile Application (Android)
2.1: Sign in and Registration
The app requires the user to sign up with his mobile number, a 4 digit numerical
password. The user is verified by sending a SMS to this number (i.e. itself) and detecting
it. Upon successful verification, the registration details are written through a PHP script
and HTTP Client Server APIs into a MySQL database at a remote central server. The
database table returns JSON data every time the user attempts a sign in which is parsed to
allow further access or not. The registration system architecture [Fig 1] as well as the
recorded user database table are shown [Table 1].
Fig 1: User Registration Architecture for the application
Fig 2: The Login screen
Table 1: Registered users info in a MySQL database table
17
2.2: Weather Forecast:
A HTTP Connection is made to the OpenWeatherMap and Yahoo! Web service over
WiFi/ GPRS which queries the data from servers. The data which the client gets regarding
forecast is in the Extensible Markup Language (XML) and JavaScript Object Notation
(JSON) formats. XML provides a language which can be used between different
platforms and programming languages and still it can express complex messages and
functions. JSON is used primarily to transmit humanreadable text consisting of
attribute–value pairs between a server and web application. Figure 3 shows the
architecture of retrieving information as well as the weather data, which is in the form of
XML [Fig 4] and is parsed before being displayed in the application screen. User can
search based on current GPS location or directly by city name; the 5 days’ forecast
includes information about – weather type, image, minmax temperature, pressure, wind
speed, humidity, clouds; graphical trend over the next week of various parameters are also
available in the app for visual aid [Fig 5]. These data will enable the farmer to better plan
his actions during the agricultural cycle like taking precautionary measures over a
predicted hailstorm, and hence safeguard his interests.
Fig 3: Process of retrieving weather data from server
18
Fig 4: The response from the weather in JSON format
Fig 5: Screenshot various weather parameters
Fig 6: Screenshot: trend of maximum and minimum temperatures over the next 5 days
2.3: Commodity Market Prices:
Agricultural commodities are traded in mandis (markets) at the district level. The
government sets support prices to stabilize the prices but the Mandi prices are dynamic.
The farmer, to access these prices enters the date, crop name and the Indian state. The
19
application uses APIs provided by Open Government Data (OGD) – Platform India to
make HTTP requests to the Agmarket Portal servers from where data in XML format is
received, which, after formatting, is made available on the app in a humanreadable form
[Fig 7]. The result table contains information about market (district name), arrival
quantity (in MT), origin, variety, grade, minimum price, maximum price, and modal price
(in Rs. / quintal) [Fig 8]. With a rough idea about the prices, the chances of a farmer being
exploited and cheated are minimized.
Fig 7: Process of retrieving crop mandi price data from server
Fig 8: Screenshot: Result of query for “Cotton on 21st March 2015 in Rajasthan”
2.4: Agricultural News:
Keeping oneself updated about the happenings in and around the world is essential in
taking precautions or planning for a better produce. An HTTP Connection is made to the
database/ web server over WiFi/ GPRS which gets the data from AgriFeeds and
indiaTogether websites. The data, in the form of RSS Feeds is parsed and then displayed
in viewable form [Fig 9]. News are obtained using RSS feeds on 82 topics globally,
20
national (pertaining to India) or regional (statewise news). Clicking on the headlines
enables reading of the complete article [Fig 11].
Fig 9: Process of retrieving agricultural news by parsing RSS feeds
Fig 10: Screenshot: List of global news headlines for the topic of Agronomy
Fig 11: Screenshot: Redirection to access complete news article from the links
2.5: Farm Manager (Inventory management):
The application has an inbuilt farm manager module with which the user can better manage his field and crops. The farmer can keep a track of his assets, inventories and also his cropping cycle. 1: Vehicles and attachments – name, id, purchase date, cost, last, next servicing dates [Fig 12]
21
2: harvested crops – name, quantity, harvest date, amount unsold and check date [Fig 13]. 3: seeds and fertilizers name, quantity, purchase date, cost, quantity remaining.The app also generates alarms based on these dates to remind the farmer about upcoming servicing, maintenance dates. A SQLite database for android is used to manage (insert, edit, delete, view) the data. The SQLite database is exported to the more common Microsoft Excel format (.xlsx) using Android APIs [Table 2].
Fig 12: Screenshot: Application UI for Vehicle and Equipment database
Fig 13: Screenshot: Application UI for Harvested crop database
Fig 14: Screenshot: Successful modification to the database entries
22
Table 2: Database tables of the inventory system successfully converted into Microsoft
Excel format
2.6: Map of Field:
Google Maps V2.0 API was used to display the area around the farmer’s current position
(supposedly near his field). The map features the terrain, normal, marker only views [Fig
15]. There is also a map screenshot option to take timely snapshots during the crop cycle
[Fig 16] to monitor his crop for healthy growth.
Fig 15: Screenshot: Map view of the user’s field
Fig 16: List of snapshots of the field taken during the agricultural season with some notes
23
2.7: Farmer Helplines:
As stated earlier, the Indian government comes up with time to time schemes and farmer assisting centers fostering egovernance. The Indian government has come up with Kisan Vikas Kendras (KVK), and Kisan Call Centres (KCC) as advisories to respond to issues raised by farmers instantly as well as continuously in their local languages. There is a toll free helpline of the KCC set up by the government at the farmers’ disposal. The application provides the state wise addresses and contact information of the various KVKs [Fig 17] and KCCs [Fig 18] in the country.
Fig 17: Screenshot: KVK locations based on the search query – ‘Gujarat’
Fig 18: Result of KCC contact information for ‘Maharashtra, Goa, Daman, Diu region’
24
Chapter 3: Wireless Agricultural Operations
Section 3.1: KisanVikas v1.0 prototype
3.1.1: Overview
A 4wheeled robot prototype [CAD model Fig 19; fabricated model – Fig 20] was
fabricated to test controlling it wirelessly using an android cell phone. The robot moves
with DC motors driving the rear wheels and is steered using a servo motor connected as
an articulated steer. It featured an onboard plough actuated using a servo motor.
Ultrasonic and infrared sensors were mounted on the front and side of the bot to detect
obstacles and range their distances. 16x2 LCD screen, LEDs and a buzzer were connected
to serve the purpose of indicators to alert the user of special events.
Fig 19: CAD drawing of v1.0 of KisanVikas prototype in SolidworksTM
Fig 20: v1.0 of KisanVikas fabricated and running
25
3.1.2: Milestones:
Successful remote control of the 2 DC motors on the rear wheels
Successful working of the ultrasonic and infrared sensors [Fig 22]. The readings were
sent to the serial monitor of the Arduino IDE for diagnosis and testing purposes. The
readings are also visible on a 16x2 LCD screen connected to the microcontroller.
[Fig 23]
Successful parsing of the distances to sound buzzers in case of distance being out of
range or below a certain threshold (4 cm used) in case of ultrasonic sensor; and when
the infrared sensor changes state due to an obstacle.
Successful manual potentiometer based control over the angle of the servo motor
(plough mechanism) [Fig 25].
3.1.3: Wiring diagrams (drawn using open source Fritzing software)
LCD + Ultrasonic sensor + Infrared Sensors + Arduino Mega microcontroller [Fig 22]
Fig 22: Wiring diagram of the LCD, ultrasonic and infrared sensors using Fritzing
26
Fig 23: Infrared Sensor successfully detecting obstacles in v1.0.
Fig 24: LCD screen with statuses of the IR sensors, ultrasonic sensor and pump status.
Fig 25: Successful manual remote control over the plough actuated a by servo motor.
Section 3.2 – KisanVikas v2.0
3.2.1: Overview
v2.0 is more feature driven and compact than v1.0. It is a 4 wheel drive now with
individual control over every wheel. The articulated servo steering has been let gone. The
CAD screenshots (FV, BV and isometric view) can be seen in Figure 28, Figure 29 and
Figure 30. The fabricated prototype can be seen in Figure 31 and Figures 32.
A HC05 Bluetooth module was connected to the same microcontroller to establish a
duplex communication channel between itself and the android phone [Fig 27]. Because
27
this is a real time connection, there is continuous exchange of data at a high rate. The data
from phone to Arduino controls the robot whereas the return channel contains real time
data of the readings of the ultrasonic and infrared sensors. The complete architecture is
shown in Figure 26.
Fig 26: Architecture of the androidarduinosensorsactuators network of the v2.0
prototype
3.2.2: Milestones
Successful connection between android phone and Arduino mega over Bluetooth
channel using HC05 with dual exchange of data.
Controlling 4 DC motors wirelessly over Bluetooth.
Controlling the angle of a plough using Pulse Width Modulation (PWM Signal
application) onto a Servo motor.
Controlling the rate of flow of water (pumping action) from a reservoir tank on top
of the prototype into the furrows dug by the plough wirelessly over Bluetooth.
Successful switching on and off of pumps remotely (large distances) using the
GSM network based on readings from a soil moisture sensor.
Live video streaming from an on board camera onto the user’s mobile phone.
28
Fig 27: Block diagram and Fritzing drawing of the Arduino megaandroid connections
using HC05 bluetooth module
Fig 28: Isometric CAD of KisanVikas v2.0 in Solidworks
29
Fig 29: Back view of KisanVikas v2.0
Fig 30: Front view of KisanVikas v2.0
30
Fig 31: KisanVikas v2.0 fabricated
Fig 32: The complete androidarduino system proposed featuring the prototype as well as
the GSM operated switching system of pump.
3.2.3 Navigation
The DC motors are connected to the Arduino via a L298 IC powered motor shield [Figure
33] which caters to the current requirements of the motor under load and protects the
microcontroller from overcurrent and burnout. It also allows the direction of the motors
to be reversed as well as allows speed control. The android application connects itself to
the HC05 bluetooth module [Figure 27]. Once successful connection is established, the
dashboard is visible with the navigation buttons, LED indicators and the ultrasonic sensor
graph [Figure 35].
31
Fig 33: Block diagram and Fritzing wiring diagram of the Arduino Megamotor driver
connection to the wheels
Fig 34: Screenshot of the application trying to connect to the vehicle over Bluetooth
Fig 35: Screenshot of the dashboard with navigation buttons and the indicators
32
3.2.4: Obstacle avoidance and indicators
An ultrasonic sensor module is placed in the front of the robot continuously measuring
distance to the nearest obstacle [Fig 36(a)]. Its range of operation was found to be
<~200cm. 2 infrared sensor modules are placed on either side of the vehicle which toggle
their states whenever obstructed by an obstacle [Fig 36(b)]. Real time data from these
sensors is sent to the android smartphone via Bluetooth as well as to the computer over
serial port. Real time graph is observed on the computer/ laptop through Processing IDE
[Fig 38, Fig 39] as well as on the android app using open source graphing libraries –
AchartEngine and GraphView.
Data is also displayed on a 16x2 LCD module fitted on the robot just as in v1.0. A buzzer
functions as a horn to alert human/ animal obstacles and LEDs are also there acting as
indicators.
Fig 36 (a): Pinconnections of HCSR04 ultrasonic sensor module to Arduino mega.
Fig 36 (b): Pinconnections of 2 (left and right) infrared (IR) sensor modules to Arduino
mega.
33
Fig 37: Ultrasonic sensor distance measurement and graph plotting setup
Fig 38: Graph being plotted on laptop of the ultrasonic distance sensor readings
Fig 39: Graph being plotted on laptop of the ultrasonic distance sensor readings
34
Fig 40: The actual wiring together of the modules – infrared, ultrasonic, LCD, motor
driver, motors.
3.2.5: Live Video Streaming
The android dashboard screen [Fig 35] features an option to stream live video from an
android mobile’s camera fitted on the front of the vehicle. Video is streamed over the
WiFi/ 2G network and can be viewed from the farmer’s application just by entering the IP
address of the camera device. Figure 41 shows this functionality in action.
Fig 41: Video from the phone on the left can be seen in the phone on the right
3.2.6: Ploughing mechanism
A plough mechanism was attached to a servo motor fixed on the robot [Fig 44] whose
angle was controlled by Pulse Width Modulation (PWM) signals from the PWM pins of
the Arduino Mega2560 [Fig 42]. A unique property of a servo motor is to apply reverse
torque to retain its position when under load. The farmer can currently control the depth
of the plough by setting in the application UI [Fig 43]. The depth inputted calculates the
angle moved by servo and hence the PWM value.
35
Fig 42: Servo motor connection block diagram
Fig 43: Application UI to set plough angle and depth
Fig 44: The plough mechanism connected to the servo motor controlled by mobile phone
3.2.7: Seed sowing mechanism
A small container with small seeds opened by a latch controlled by a solenoid valve is
fitted on the bottom layer of the prototype. The solenoid is powered externally due to its
heavy current requirements and so a transistor TIP210 is used as a switch to enable high
voltage supply to the solenoid with a low voltage signal from the microcontroller.
Currently, the seeding distance can be set by the farmer which is set in the android app
[Fig 45]. It is maintained by calculating the vehicle speed and accordingly controlling the
opening and closing of the latch operated by the solenoid. Complete architecture is shown
36
in Figure 46. For clarity, Figure 47 shows CAD screenshot of the proposed seed sowing
mechanism.
Fig 45: Application UI to set seeding distance and depth
Fig 46: Seed sowing mechanism: Architecture
Fig 47: CAD of the seed sowing mechanism.
37
3.2.8: Irrigation and water pumping mechanism
The user can wirelessly switch onoff water pumps from the android application directly.
A 6V submersible pump was submerged in a small water tank on vehicle with its
terminals connected to the microcontroller pin and ground. The user can enable or disable
pumping which will either start or stop dispensing fluid (water) from the vehicle onto the
field. This was successfully demonstrated as shown in Figure 48.
Fig 48: Successful control over a submersible pump using android device
Section 3.3: Wireless Pump Operations
The mobile application is designed to establish a dual communication with an Arduino
microcontroller controlled wireless sensor network and water pump. 2 types of wireless
networks, namely GSM and Bluetooth, were used to establish this communication
channel. 1 sensor measuring soil moisture is connected to the microcontroller and it sends
its readings to the android application for diagnosis as well as appropriate decision
making on operating the pumps. The system architecture is shown in Figure 49.
Fig 49: Architecture of the mobile (android) microcontroller (arduino) interface with the
sensoractuator networks.
38
3.3.1: Over GSM
The merit of using this communication channel is that it can be operated over long
distances too. An Arduino GSM shield with a SIM card was connected to the
microcontroller and the wireless sensor network. The farmer queries for the status of the
sensors before taking a decision. The SMS received from the microcontroller contains the
current pump status and the sensor readings at that very instant [Fig 51]. Taking stock of
these readings farmer can remotely switch onoff the water pumps by setting the target
soil moisture parameter. The pump will be switched ON till the farmer specified soil
moisture value is reached. The setup is demonstrated in Figure 50.
Fig 50: The working setup of the GSM controlled pump operation
Fig 51: Successful receipt of a test SMS from a SIM card installed on the GSM shield
connected to the Arduino mega microcontroller.
39
Fig 52: Arduino Serial Monitor displaying the moisture sensor values for dry, semidry
and wet soil conditions.
3.3.2: Over Bluetooth
When the farmer is at his field, he can directly connect the android application with the
wireless pump system over Bluetooth. A HC05 Bluetooth module was connected to the
same microcontroller to establish a duplex communication channel between itself and the
android smart phone [Fig 53]. Data is encrypted, for example, into strings like
<!“data”\n!> where “data” is the actual data for example – start; '<' is the start bit, '!' is the
start confirm bit, ‘\n’ is the end of data bit. Similarly, '!' is the end bit and '>' is the end
confirm bit. This encryption is necessary to avoid any noise (fuzzy data) collected by the
sensors from the environment. For example: The string value for retrieving the sensor
information is <!“57” \n!> which has various sensor readings in the order of moisture.
Because this is a real time connection, there is continuous exchange of data at a high rate.
The application records the sensor readings every 2 minutes and graphs all the sensor
readings over time for diagnosis [Fig 55]. The readings are also saved in a local sqlite
database table only to be exported to the excel format later [Table 3].
40
Fig 53: Screenshot: Pump operations over Bluetooth
Fig 54: Pump operations over GSM
Fig 55: Screenshot: Real time graph plotted in the app for the moisture sensor values
received over Bluetooth.
Table 3: Sensor data tabulated every 2 minutes and exported into Microsoft Excel format
Chapter 4: Results and Discussion
41
As discussed above, the app is successfully communicating with the remote servers to extract information pertaining to crops, etc. Actuators and sensors are all working in tandem.
Section 4.1: Software – Android application
a. Application user database: The sign up process of the android application records the user related information and stores it in a table in a MySQL database hosted at a remote server.
b. Crop results: The data successfully being received from the government servers (http://www.agmarket.nic.in and APIs from http://www.data.gov.in).
c. Weather forecasts: The data is successfully being received from the Yahoo! Weather API servers based on both GPS and search by place.
d. News: Successful retrieving of news on global, national and regional topics using RSS Feeds from government undertaking.
e. Map screenshot database: Database (ListView) of map screenshot along with timestamp and the note associated.
f. Inventory manager: Records of various inventory and assets like Vehicle and Equipment, Harvested crop, seeds and fertilizer quantity, etc.
Section 4.2 – Hardware – Sensors and Actuators
a. Ultrasonic sensor readings: The sensor was installed on the prototype which calculated the distance to the next obstacle. The distances are recorded continuously and when the critical distance goes below a 4 cm threshold (testing value), an alert is sounded and according action is taken. The data recorded is also sent to the android app for the user to monitor and graphed, both on the app and the computer.
b. Infrared sensor readings: Two infrared sensor modules also indicate presence/absence of any nearby obstacles while making turns or so. Their readings and statuses are recorded and seen on the app screen.
c. Pump and moisture sensor: The statuses of the submersible pump and the moisture sensor successfully controlled using the android application over the GSM network. The sensor readings are continuously sent to the android phone over Bluetooth when in vicinity for diagnosis and testing.
d. Plough: The plough mechanism assembled onto the servo motor was successfully tested on 5 separate positions using the android phone’s Bluetooth and HC05 Bluetooth module with the microcontroller.
e. Seed sowing: A servo motor controls the opening which dispenses seeds through 3 separate channels into the furrows created by the plough. The seed sowing setup in action before being mounted onto the robot prototype.
Chapter 7: Conclusion and Future Work
42
KisanVikas will reduce farmer ill health due to severe field working conditions like direct exposure to vehicular vibrations, etc. Research is going on to enable communication over radio frequency as well as WiFi because of their long and very long communication ranges respectively. The possibility of a solar panel to be installed to provide power in remote villages of the country will also be considered. The availability of agricultural information directly in a farmer’s hand without him being dependent on neighbors or zamindars or even waiting for a SMS response from the mKisan portal like schemes, will enable the farmers to take better decisions in short time. This will not only foster greater productivity but will improve a farmer’s life reducing stress and also instilling zeal to learn new technology which is essential in this era of Digital Revolution. Some other areas of agriculture whose information is frequently required by farmers are about seeds and fertilizers, the loan schemes from various banks, etc. The application currently is offered in 8 Indian regional languages but agricultural data from web services is only in English. Future versions and work on the application will be to incorporate the above features.
References
43
1. Agro Products, Introduction: Glimpse. Available from: <http://www.agriculturalproductsindia.com/agro/introduction.html> [20 April 2015].
2. Economic Survey 201314 and Central Statistics Office, Directorate of Economics and Statistics, Ministry of Agriculture, Govt. of India, Pocket Book of Agricultural Statistics 2014, pg. 1923. Available from: <http://www.eands.dacnet.nic.in/latest_2006.htm> [10 April 2015].
3. World Bank Data: Employment in Agriculture (% of total employment) Available from: <http://data.worldbank.org/indicator/SL.AGR.EMPL.ZS> [12 April 2015].
4. Webenza 2014, Android vs. iOS Smartphone Users in India, 2014 – Infograph, Available from: <http://www.webenza.com/androidvsiossmartphoneusersinindia2014infograph/> [15 April 2015].
5. Ministry of Agriculture, Govt. of India 2014, mKisan Portal – Mobile Based Services for Farmers, Available from: <http://www.mkisan.gov.in/images/Detailed%20Writeup%20on%20mKisan.pdf> [1 April 2015].
6. Mittal S., Gandhi S., Tripathy G., 2010, Indian Council for Research on International Economic Relations, Working Paper No. 246, ‘SocioEconomic Impact of Mobile Phones on Indian Agriculture’, Available from: <http://www.mobileactive.org/files/file_uploads/Impact%20of%20Phones%20on%20Indian%20Agriculture.pdf> [12 March 2015].
7. Safe Work, Labor Protection Department, International Labor Organization 2001, Safety and Health in Agriculture, Available from: <http://www.ilo.org/wcmsp5/groups/public/ed_protect/protrav/safework/documents/publication/wcms_110193.pdf> [17 March 2015].
8. Singhal. Manav, Verma. Kshitij, Shukla. Anupam 2011, ‘Krishi Ville — Android based solution for Indian agriculture’, in Advanced Networks and Telecommunication Systems (ANTS), 2011 IEEE 5th International Conference on 1821 Dec. 2011, Bangalore, Pages 1 – 5. Available from: IEEE Xplore Digital Library. [12 January 2015].
9. OpenWeatherMap API, Available from: <https://openweathermap.org/> 10. Agmarket, Directorate of Marketing & Inspection (DMI), Ministry of Agriculture,
Government of India, Available from: <http://www.agmarket.nic.in> [25 January 2015].
11. AgriFeeds, BROWSE NEWS BY SUBJECT, Available from: <http://www.agrifeeds.org/en/browse_by_subject> [12 February 2015].
12. AgriFeeds, BROWSE NEWS BY REGION, Available from: < http://www.agrifeeds.org/en/browse_news_by_region> [12 February 2015].
13. Indiatogether, RSS Feeds, Available from: <http://indiatogether.org/rss_feeds_list> [29 December 2014].
14. Krishi Vigyan Kendra, Ministry of Agriculture: <http://www.icar.org.in/en/krishivigyankendra.htm> [25 December 2014].
15. Wilton Lim, Hans Kaell Torres, and Carlos M. Oppus 2014, ‘An Agricultural Telemetry System Implemented Using an ArduinoAndroid Interface’ in 7th IEEE International Conference Humanoid, Nanotechnology, Information Technology
44
Communication and Control, Environment and Management (HNICEM), Available from: IEEE Xplore Digital Library. [17 January 2015]
16. AChartEngine, Available from: <http://www.achartengine.org/> [2 January 2015]. 17. GraphView, Available from: <http://androidgraphview.org/> [1 January 2015]. 18. Arduino Mega2560 microcontroller, Available from:
<http://www.arduino.cc/en/Main/ArduinoBoardMega2560> [1 January 2015]19. Atmega2560 IC Datasheet, Available from: <http://www.atmel.com/Images/Atmel
25498bitAVRMicrocontrollerATmega6401280128125602561_datasheet.pdf> [1 January 2015].
20. Google Maps API v2, Available from: <https://developers.google.com/maps/> [12 December 2014].
21. Kisan Call Centers, Ministry of Agriculture, Govt. of India, Available from: <http://agricoop.nic.in/policyincentives/kisancalldetail.htm> [1 February 2015].
22. Krishi Vigyan Kendras, Ministry of Agriculture, Govt. of India, Available from: <http://www.icar.org.in/en/krishivigyankendra.htm> [26 January 2015].
23. Economy of India, (wiki article), 4 May, 2015, Available from: <http://en.wikipedia.org/wiki/Economy_of_India> [9 May 2015].
24. Patil. Gangadhar S., ‘Rural India leads record 35% surge in use of egovernance’, Business Standard, 22 April 2015, Available from: <http://www.businessstandard.com> [23 April 2015].
25. TRAI (Telecom Regulatory Authority of India) 2014, Government of India, Indian Telecom Services Performance Indicator Report for the Quarter ending June, 2014, Available from: <http://www.trai.gov.in/WriteReadData/WhatsNew/Documents/quarterly%20press%20release%20final.pdf> [29 March 2014].
26. Saravanan. R 2014, Mobile Phones for Agricultural Extension: Worldwide mAgri Innovations and Promise for Future, New India Publishing Agency, New Delhi. pp. 175, Available from: <http://www.eagriculture.org/sites/default/files/uploads/kb/2015/03/mextension_india_saravanan_raj_.pdf> [10 March 2015].
27. Prabhakar, T.V., Jamadagni, H.S., Sudhangathan, B.S. 2013, ‘Datamule for Agricultural Applications’ in India Educators' Conference (TIIEC), 2013 Texas Instruments, pp. 369373, Available from: IEEE Xplore Digital Library. [1 December 2014].
28. Kumar, V., Dave, V., Nagrani, R.; Chaudhary, S.; Bhise, M. 2013, ‘Crop cultivation information system on mobile devices’ in Global Humanitarian Technology Conference: South Asia Satellite (GHTCSAS), 2013 IEEE, pp. 196202, Available from: IEEE Xplore Digital Library. [1 December 2014].
29. Open Government Data (OGD) – Platform India, Available from: <http://www.data.gov.in> [3 March 2015].
30. Ariff, M.H., Ismail, I 2013, ‘Livestock information system using Android Smartphone’ in Systems, Process & Control (ICSPC), 2013 IEEE Conference pp. 154158. Available from: IEEE Xplore Digital Library. [10 January 2015].
45
31. Feu, Scheuller, Schumann, Tumbo., ‘A Solarpowered, WiFi Reprogrammable Precision Irrigation Controller’ in Pan African International Conference on Science, Computing and Telecommunications (2014). Available from: IEEE Xplore Digital Library. [12 December 2014].
32. Shivaprasad B. S., Ravishankara M.N., B. N. Shoba., ‘Design and Implementation of Seeding And Fertilizing Agricultural Robot’ in International Journal of Application or Innovation in Engineering & Management (2014), Volume 3, Issue 6. [10 January 2015].
Appendix A
46
CAD drawing sheets of the parts and components used to fabricate the prototype.
1. V2.0 prototype
2. V1.0 prototype
3. 1 Lshaped link
4. 1 Ushaped link
5. 2 Linear link
6. 3 Ushaped link
7. 5 Cshaped link
8. 7 Linear link
9. Arduino UNO
10. Circular link top
11. Circular link bottom
12. HC05 Bluetooth module
13. Breadboard
14. Ceramic capacitor
15. V1.0 chassis bottom
16. V1.0 chassis top
17. Stepper motor
18. DC 300 RPM Central shaft motor
19. Front wheel (Small)
20. Infrared Sensor assembly
21. 16x2 LCD screen
22. Red LED
23. White LED
24. Arduino MEGA 2560
25. Micromax Canvas Smartphone
26. DC Geared Motor
27. L298 based motor driver
28. Plow mechanism
29. Submersible Pump
47
30. L – shaped rectangular link
31. Linear rectangular link
32. Resistor
33. Seed sowing mechanism
34. Servo motor
35. Servo motor assembly
36. Steering system
37. Stepper motor
38. Ultrasonic sensor
39. Wheel v2.0