Skip to main content

Arduino Soil moisture sensor

Mobile Control Soil Moisture

              The Mobile Controlled soil checker helps the presence of water in the soil, which could be controlled with the help of Smart phones. The application which is in Smart phone allows it to control the movement of vehicle and also check the presence of water in the soil. The vehicle could be controlled in certain directions such that Front, Back, Left, Right. The servo placed in help the control the movement of soil moisture sensor and soil moisture sensor checks the water presence. The serial monitor in mobile helps in monitoring the vehicle movement and also water presence in the soil.

Apparatus required

1)    Arduino               
2)    Motor Shield                          
3)    Hc-05bluetooth module          
4)    Soil moisture sensor               
5)    Servo                                      
6)    Chasser and Motors                             

*Click the above things to buy it.

Connection

·        Connect Arduino to the motor shield and connect the two motors to  the motor shield with respect to source code
·        Connect the servo with the motor shield in the servo port with respect to source code.
·        Connect the soil moisture sensor output to the A0 and vcc to +5V and Ground to the Ground pin.
·        Connect the Bluetooth module TX pin to Arduino RX pin and the Bluetooth RX pin to Arduino TX pin and +5V and Ground to the Ground pin.

Mobile Monitering
                  
                  Check out these photos to know its working


                     The Black box which allows to knows the movement and control of the vehicles. The arrows allows it for control of directions.

Up = 1      Left = 2    Stop = 3     Right = 4    Back = 5     Soil Checker = 6

*Data which is sent from mobile application to HC-05 Bluetooth module when respective buttons are pressed.

Source Code

#include "AFMotor.h";
#include <Servo.h>
Servo myservo1;
AF_DCMotor motorRight(1, MOTOR12_64KHZ);  
 AF_DCMotor motorLeft(3, MOTOR12_64KHZ);
char input; 
int pos = 0; 
void setup()
{ 
  Serial.begin(9600);
  Serial.println("NBSL TECH SMART CAR");
    myservo1.attach(9);
    motorRight.setSpeed(0); 
  motorLeft.setSpeed(0); 
  motorRight.run(RELEASE); 
  motorLeft.run(RELEASE); 
} 
 
void loop()
{
  motorRight.setSpeed(255); 
  motorLeft.setSpeed (255);
   if(Serial.available()>0) 
  { 
    input= Serial.read();
    if(input=='1')
    {
      pos = 0; {
     Serial.println ("Soil Moisture" );
    myservo1.write(pos);          
  delay(100);
  }   
    Serial.println ("Going forward"); 
    delay (15); 
    motorRight.setSpeed(255); 
    motorLeft.setSpeed(255); 
    motorRight.run(FORWARD); 
    motorLeft.run(FORWARD);
    } 
   if(input=='2') 
    {
      pos = 0; {
     Serial.println ("Soil Moisture" );
    myservo1.write(pos);          
  delay(100);
  } 
   Serial.println ("Going left" ); 
   motorRight.setSpeed(80); 
   motorLeft.setSpeed(255); 
   motorRight.run(BACKWARD); 
   motorLeft.run(FORWARD);
    }
    if(input=='3')  
      {
        pos = 0; {
     Serial.println ("Soil Moisture" );
    myservo1.write(pos);          
  delay(100);
  }
   Serial.println ("Stop!" ); 
   motorRight.setSpeed(0); 
   motorLeft.setSpeed(0); 
   motorRight.run(RELEASE); 
   motorLeft.run(RELEASE);
      }
      if(input=='4')
    { 
   pos = 0; {
     Serial.println ("Soil Moisture" );
    myservo1.write(pos);          
  delay(100);
  }
      Serial.println ("Going right" ); 
   motorRight.setSpeed(255); 
   motorLeft.setSpeed(80); 
   motorRight.run(FORWARD); 
   motorLeft.run(BACKWARD);
  }
  else if(input=='5') 
    { 
    pos = 0; {
     Serial.println ("Soil Moisture" );
    myservo1.write(pos);          
  delay(100);
  }
    Serial.println ("Going backward"); 
    delay (15); 
    motorRight.setSpeed(255); 
    motorLeft.setSpeed(255); 
    motorRight.run(BACKWARD); 
    motorLeft.run(BACKWARD);
    }
   if(input=='6')
{
  pos = 90; {
     Serial.println ("Soil Moisture" );
    myservo1.write(pos);          
  delay(200);
  }
  delay(1500);
    int sensorValue = analogRead(A0);
  Serial.println("SOIL" );
  Serial.println(sensorValue);
  delay(1);
  if (sensorValue < 1000)
 {
  Serial.println("No Required" );
   delay(1000);
 }
 else if (sensorValue >  1000)
 {
Serial.println("Alert! Water Required" );
   delay(1000);
 }
 pos = 0; {
     Serial.println ("Soil Moisture" );
    myservo1.write(pos);          
  delay(200);
  }
}
  }
}
                                                  
       Click Here to Download Mobile App
 
   
  

Comments

  1. This comment has been removed by a blog administrator.

    ReplyDelete

Post a Comment

Popular posts from this blog

India Space Research

INDIAN SPACE RESEARCH                                      The Technology is developing day by day and new innovations are coming out day by day. Many things are runs with help of satellites for example TV receiver, Weather Forecasting, Global positioning systems(GPS), Defense purposes. Thus Aerospace development is very important for an country. INDIA , places 5 th place in space developments. The ISRO is the Indian organization of space research Developments. What is ISRO? ISRO expands as Indian Space Research Organization, which is the Indian space Development organization. ISRO Ranks 5 th place in space research. Who founded ISRO?  Indian Space Research Organization (ISRO) was founded by Jawaharlal Nehru, who is the First Prime Minister of INDIA and Scientist Vikram Sarabhai, who is known as the father of space programs in the year 1962 as Indian National Com...

Top 5 Expensive Cars in the World

5) Bugatti Veyron The Bugatti Veyron is a mid Engine sports car designed and developed by Volkswagen group and manufactured in Molsheim , France . The Top speed of the Bugatti Veyron is 407 km/h and it has 7 Speed direct Shift Automatic Transmission. The Designer of Bugatti Veyron is Jozef Kaban. The Price of Bugatti Veyron is approximately $1.7 million (Rs 12 crore). 4) Aston Martin Valkyrie The Aston Martin Valkyrie is manufactured by Aston Martin and it is the limited production of hybrid electric sports car. The maximum speed of Aston Martin Valkyrie is 402 km/h and it has a 7 speed Ricardo dual clutch transmission. The designer of Aston Martin Valkyrie is Adrian Newey. The price of Aston Martin Valkyrie is approximately $3.2 million (Rs 22 crore). 3) Lamborghini Veneno Roadstar The Lamborghini Veneno Roadstar is manufactured by Lamborghini and only 9 units of Lamborghini Veneno Roadstar were and 8 of them were sold and 1 remained at the facto...

Ice Bergs Melt due to Carbon dioxide

Ice Bergs Melt due to Carbon dioxide What is CO2?                                  CO2 which is expanded has Carbon dioxide . The CO2 in atmosphere is 0.04 and present in Earth Atmosphere. The CO2 is basically an Green House Gas which plays in important role in Maintaining Earth Average Temperature of 57 degrees Fahrenheit . The CO2 is basically an heat trapping effective green house gas. It does not trap all gas molecule on IR radiations and it also remits the IR radiations during night where other else earth average temperature will be 0 degrees Fahrenheit . Any how not only CO2 all green house gases plays an important role in it. How CO2 produced?                              CO2 is given naturally by respiration and deforestation and Main r...