Professional Documents
Culture Documents
GR-SAKURA
INTRODUCTION AND MOTIVATION
With the worlds population growing day by day, and land resources remaining unchanged,
there is a growing need in optimization of agricultural productivity, and this can be achieved by
automation of agriculture.
Farmers are already using computers on tractors to make agriculture more efficient. So called
i-farming' uses GPS to tell tractors where less pesticide is needed, therefore reducing the
usage of pesticide.
But still there has not been any autonomous process where the farmer need not spend more
time in his farm, and lands controlling the action of fertilizers and pesticides, the harvesting of
fruits, the irrigation, the management of power or the maintenance of plants.
Our system aims at automating the agricultural , by availing the farmers a portable and an easy
tool to use that will automate the various processes that the farmer does.
OUR GOAL
Our goal is to develop a portable system, with one end being a Smart Phone with an Android
application, and the other end being a monitoring system using GR-SAKURA interfaced with
LabVIEW, which commands a wireless controlled robot that performs the tasks of the famer
such as applying pesticides and fertilizer, maintaining the plants, harvesting fruits, analysing the
conditions of crops, managing the power being used in the farm, and controlling the irrigation.
THE CHALLENGE
The challenges of this project are:
-
To implement a Real Image Processing based system that will send real time field
images from a wireless camera to a base station.
To integrate a Robotic Arm to a wireless robot, whose operation will be controlled
remotely from an Android application, and which has the capability to identify and track a
targeted object, such as a fruit on a tree.
To integrate pesticide and fertilizer spraying mechanisms on the wireless controlled
robot.
To control the generation of energy using solar power; the power system needs to switch
to this source, whenever the energy from it is sufficient.
To control the irrigation process, by recycling the used waters.
THE SOLUTION
To the above mentioned problems, we propose a remote controlled robot equipped with a
robotic arm and a wireless camera, whose operation will be controlled by an android application
through GR-SAKURA interfaced to the base station to make easier the task of the farmer by
using the various tools of the robot.
This remote controlled robot will include the following modules:
-
A solar panel that recharges the battery of the Robot, and ensures large power
autonomy of the Robot.
An on-board wireless camera that acquire the field image, and transmit them to the base
station, processes the acquired images, and gives results such as crop quality, insects
found, whether a fruit is ripened or not, etc.
An on board robotic arm used for picking fruits from trees, and some other farm products
,and ultimately can be used to pick various plastic and non-alterable dirtiness on the way
when developed.
A mechanism for assuring an accurate spraying of fertilizer and pesticides.
Monitoring and management of power sources. It will monitor the solar energy source,
and will switch to it whenever its energy is sufficient to power the farm robot.
Ethernet slot:
Using this feature we are able to make the GR-SAKURA act as a server thereby gaining
access to it and controlling the farm activities just by typing the public IP address of the
router present there. Thus through the web farm can be controlled.The port forwarding
has been configured in the router so as to access the SAKURA which is a server. The IP
address of the SAKURA is also configured by us in the range of the router.
The base station monitors the internet database for new updates from the android application,
based on the updates from the android application; the LabVIEW station controls the remote
Robot actions. The station also analyses the images acquired from the wireless camera on the
remote Robot. Apart from these, the LabVIEW station is also equipped with a sensor network
with the GR-SAKURA that monitors the weather, the temperature and the quality of soil and
water;
The LabVIEW station transmits the various data that it has acquired from the farm to an internet
database, which the farmer can monitor using his android application, and from which he can
enable some actions remotely such as the spray of fertilizer, irrigation, fruit picking, etc.
Our project also includes DTMF based control system to control the farm activities in places
which is void of internet. Thus GSM based technology can be used to activate and deactivate
irrigation, fertilizer and other activities.
APPLICATIONS
This system may find extensive application in agriculture and farming; this concept may further
be applied in areas such as industry, and urban cleaning and maintenance.
It also finds an application in power management, by managing the use of alternative source of
energy.
Note:
Project demonstration video link :
http://youtu.be/DtOSvFkG_aA
Appendix I
#include <string.h>
// To do string manupulation
#include <sdmmc.h>
#include <servo.h>
#include <stdio.h>
#include <stdlib.h>
SDMMC mySD;
using namespace std;
// Function declarations
void myFileAccess();
void writeSerial();
void readSerial();
void irrigateServo(int i);
int val;
String temp_val,wind_val,wind_Dir_val,battery_val,solar_val,grid_val,moisture_val;
void setup ()
{
pinMode ( PIN_LED0 , OUTPUT );
pinMode ( PIN_LED1 , OUTPUT );
pinMode ( PIN_LED2 , OUTPUT );
pinMode ( PIN_LED3 , OUTPUT );
myservo.attach(9);
myservo.write(0);
Serial1.begin (19200,SCI_USB1);
void loop ()
Serial.println(val);
void myFileAccess()
{
digitalWrite(PIN_LED2, 1);
File myFile = mySD.open("sample.txt", FILE_WRITE);
if(myFile == false){
Serial.println("Fail to access MMC");
digitalWrite(PIN_LED2, 0);
//goto nextstate;
}
else
{
//Read
myFile = mySD.open("sample.txt", FILE_READ);
while(myFile.available()){
Serial.print((char)myFile.read());
delay(50);
}
delay(200);
myFile.close();
digitalWrite(PIN_LED2, 0);
// End of myFileAccess()
// Function for getting analog sensor values and writing them into serial
void writeSerial()
{
// Reading Wind Speed Sensor value and write into serial port
wind_val = String(analogRead( windPin ));
Serial.println((strw+wind_val));
delay(10);
// Reading Wind Direction Sensor value and write into serial port
wind_Dir_val = String(analogRead( wind_Dir_Pin ));
Serial.println((strd+wind_Dir_val));
delay(10);
// Reading battery voltage Sensor value and write into serial port
battery_val = String(analogRead( battery_Pin ));
Serial.println((strb+battery_val));
delay(10);
// Reading solar voltage Sensor value and write into serial port
solar_val = String(analogRead( solar_Pin ));
Serial.println((strs+solar_val));
delay(10);
// Reading grid power voltage Sensor value and write into serial port
grid_val = String(analogRead( grid_Pin ));
Serial.println((strg+grid_val));
delay(10);
// Reading grid moisture Sensor value and write into serial port
moisture_val = String(analogRead( moisture_Pin ));
Serial.println((strm+moisture_val));
delay(10);
// End of writeSerial()
// Function for read serial data and activate actuators based on that
void readSerial()
{
if ( Serial.available()>0)
{
delay(10);
val = int(Serial.read());
if ( val == 49)
{
digitalWrite ( PIN_LED0, 1);
digitalWrite ( waterEnable, 1);
}
else if ( val == 50 )
{
digitalWrite ( PIN_LED0, 0);
digitalWrite ( waterEnable, 0);
}
else if ( val == 51 )
{
digitalWrite ( PIN_LED1, 1);
digitalWrite ( robotEnable, 1);
}
else if ( val == 52 )
{
digitalWrite ( PIN_LED1, 0);
digitalWrite ( robotEnable, 0);
}
else if ( val == 53 )
{
digitalWrite ( PIN_LED2, 1);
myFileAccess();
digitalWrite ( PIN_LED2, 0);
}
else if ( val == 54 )
{
digitalWrite ( PIN_LED3, 1);
else
{
// End of readSerial()
int pos1 = 0;
{
opened = 1;
// in steps of 1 degree
// tell servo to go to position in variable 'pos'
// waits 15ms for the servo to reach the position
opened = 0;
for(pos2 = 75; pos2 >=0; pos2 -=1)
{
myservo.write(pos2);
delay(15);
digitalWrite(13,HIGH);
}
}
}
int val;
char query;
int home_page = 1;
int temperature = 0;
int light_1;
int light_2;
void setup()
{
pinMode(PIN_LED0,OUTPUT);
pinMode(PIN_LED1,OUTPUT);
pinMode(6,OUTPUT);
pinMode(7,OUTPUT);
pinMode(8,OUTPUT);
pinMode(9,OUTPUT);
digitalWrite(7, 0);
digitalWrite(9, 0);
digitalWrite(6, 0);
digitalWrite(8, 0);
delay(500);
digitalWrite(PIN_LED0, 1);
}
void loop()
{
client = server.available();
if (client)
{
while (!client.connected());
digitalWrite(PIN_LED1, 1);
if(home_page)
{
client.println("<html>");
client.println("<head>");
client.println("<style type=\"text/css\">");
client.println("a{ padding: 5px 5px; background:#F33; color: #FFF;}");
client.println("</style>");
client.println("<title>GR SAKURA</title>");
client.println("</head>");
client.println("<body>");
client.println("<div align=\"center\"><span style=\"font-family:Rockwell; fontsize:48px; color:#3fa9f5;\"> Emtronizian</span><span style=\"font-family:Rockwell; fontsize:48px; color:#595959;\"> - SCT </span>");
client.println("</div>");
client.println("<div align=\"center\" style=\"font-size:32px; color:#60F;
margin:20px;\"><b>ANDROID BASED FARM AUTOMATION USING GR SAKURA</b>");
client.println("</div>");
client.println("<div align=\"center\" style=\"font-size:24px; color:#060;
margin:20px;\">This is a front panel of the farm automation system using GR SAKURA board to
control irrigation and read temperature of a field, using internet connected device from
anywhere around the world.<br>");
client.println("</div>");
client.println("<div align=\"center\" style=\"font-size:24px; color:#040;
margin:20px;\">GR SAKURA board is configured as a webserver for the farm
automation.<br>");
client.println("</div>");
client.println("<center><a
href=\"http://117.207.111.111:80/c\">START</a></center>");
client.println("</body>");
client.println("</html>");
home_page = 0;
}
else
{
Ethernet.processPackets();
query = client.read();
Ethernet.processPackets();
query = client.read();
Ethernet.processPackets();
query = client.read();
Ethernet.processPackets();
query = client.read();
Ethernet.processPackets();
query = client.read();
Ethernet.processPackets();
query = client.read();
if(query == 'a')
{
digitalWrite(6, 1);
digitalWrite(8, 0);
light_1 = 1;
light_2 = 0;
client.println("<html>");
client.println("<head>");
client.println("<title>My Page</title>");
client.println("</head>");
client.println("<body bgcolor=\"#3fa9f5\">");
client.println("<div align=\"center\">");
client.println("<form action=\"http://117.207.111.111:80/a\">");
client.println("<input type=\"submit\" value=\"LIGHT1\">");
client.println("</form>");
if(light_1)
client.println("Irrigation system is activated");
else
client.println("Irrigation system is deactivatedF");
client.println("<form action=\"http://117.207.111.111:80/b\">");
client.println("<input type=\"submit\" value=\"LIGHT2\">");
client.println("</form>");
if(light_2)
client.println("Fertilizer system is activated");
else
client.println("Fertilizer system is deactivated");
client.println("<form action=\"http://117.207.111.111:80/c\">");
client.println("<input type=\"submit\" value=\"TEMPERATURE\">");
client.println("</form>");
client.println("NO TEMPERATURE DATA");
client.println("</div>");
client.println("</body>");
client.println("</html>");
}
else if(query == 'b')
{
digitalWrite(6, 0);
digitalWrite(8, 1);
light_1 = 0;
light_2 = 1;
client.println("<html>");
client.println("<head>");
client.println("<title>My Page</title>");
client.println("</head>");
client.println("<body bgcolor=\"#3fa9f5\">");
client.println("<div align=\"center\">");
client.println("<form action=\"http://117.207.111.111:80/a\">");
client.println("<input type=\"submit\" value=\"LIGHT1\">");
client.println("</form>");
if(light_1)
client.println("Irrigation system is activated");
else
client.println("Irrigation system is deactivated");
client.println("<form action=\"http://117.207.111.111:80/b\">");
client.println("<input type=\"submit\" value=\"LIGHT2\">");
client.println("</form>");
if(light_2)
client.println("Fertilizer system is activated");
else
client.println("Fertilizer system is deactivated");
client.println("<form action=\"http://117.207.111.111:80/c\">");
client.println("</form>");
if(light_2)
client.println("Fertilizer system is activated");
else
client.println("Fertilizer system is deactivated");
client.println("<form action=\"http://117.207.111.111:80/c\">");
client.println("<input type=\"submit\" value=\"TEMPERATURE\">");
client.println("</form>");
client.println("FIELD TEMPERATURE = ");
client.print(temperature);
client.print(" Degrees");
client.println("</div>");
client.println("</body>");
client.println("</html>");
client.println();
}
}
client.stop();
delay(500);
client = 0;
digitalWrite(PIN_LED1, 0);
}else;
}