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

What if you could control the Internet

At present situation internet is the basic need for us, we are using the internet for many purposes from medicine to aerospace internet is used and helps in day to day life activates. Internet is spread out in all the areas and we could say it is the most powerful tool in the world, if you got a chance to control the internet what will you do.                                                Image Credit : Internet In general, more than 5 billion google searches are done all over the world and millions of hours videos are watches in facebook and YouTube daily. What if you got a chance to control the internet, whether it is possible to control the internet, the internet is actually controlled with the help of 7 keys and by 14 peoples all around the world. They maintain the DNS which helps in accessing the internet all around the world. The DNS helps in accessing ...

Dual Led Flasher

               Dual Led Flasher Using 555 IC This is an simple project to show the Dual Flashing Led With 555 IC. Let us discuss this project below. Components Required   1.       555 IC 2.       10K ohm resistor 3.       10uf capacitor 4.       LEDs 5.       BreadBoard 6.       Connecting Wires 7.       9v Battery Circuit Diagram Procedure · Insert the 555 IC in the breadboard and then connect resistors and capacitor shown in figure · Then insert an single piece wire Connecting 8 th  And 4 th  terminal of 555 IC · Then insert the another single piece wire Connecting  6 th And 2 nd terminal of the 555 IC · Next connect an LED 1 Positive end to the 3 rd pin of the 555 IC and connect Negati...

Corona Virus

In present situation our entire world is under a high alert due to the spread of the corona virus. Many lives have been lost due to this virus breakthrough. This corona virus was found on humans in 2019 and before that this is not identified in humans. It is a zoonotic, which means a virus which is spread from the animals to humans is termed as the zoonotic. Corona is not only the first zoonotic disease already Rabies, Swine flu, etc are categorized as zoonotic diseases. Why Corona Virus is so Dangerous \Till now there is no proper medicine for the corona virus, this is because we cannot find from which animal this corona virus came from, according to the report of World Health Organization this Corona virus are spread from the Civet Cat and this is an new type of virus human ever seen, so time required to find medicine for this corona virus. Symptoms of Corona Virus & Precautions The major symptoms of the corona virus are Fever, Cough, Shortness of ...