गुरुवार, ९ मार्च, २०१७

Moistuer sensor project

                                               Moisture sensor project 

. Can we automatically water the plants when i am going on vacation or do i have to bother my neighbors? Sometimes the neighbors do too much of watering and the plants end up dying anyway. There are timer based devices available in India which water the soil on set interval. They do not sense the soil moisture and the ambient temperature to know if the soil actually needs watering or not.
2. Can we know if the soil actually needs to be watered? Irregular watering leads to mineral loss in the soil and might end up rotting the plants.
3. Can we manually water the soil from remote location?
Solution -
The answer is "Yes, we can" to all the above problem. The solution provided is simple and economical. It requires you to know little bit of electrical and electronics but i feel it is similar to having so much of electrical knowledge so that you can change a bulb. Let me know if you feel any step is complicated. I will try to add more information so that it becomes easy.


Materials Needed

1. Soil moisture sensor - (You can search for similar item on ebay)
http://www.ebay.in/itm/Soil-Moisture-DC-5v-Sensor-...
2. Small pump - Toy pump working on 5-6V is enough. Few options available in India are -
http://hacktronics.co.in/home/418-rs-360-small-wat...( this should not be submerged in water)
http://hacktronics.co.in/home/721-small-water-pump...(this should be submerged in water)
3. Arduino -
http://www.ebay.in/itm/291235640103?ssPageName=STR...
4. Pump Controller - (You can make your own circuit with little knowledge of soldering or you can go to shops who sell these electronic equipment and they can point you to people who can help you to solder)
a) Transistor - 2N2222A
b) Resistor - 1K ohm
5. Drip Irrigation Kit - (You can choose depending on how many plants you want to water).
http://www.ebay.in/itm/DRIP-IRRIGATION-KIT-10-PLAN...
6. Connecting Pipe (i used 0.4" pipe) to connect the pump and the drip irrigation main line.


Connect the Soil Sensor to the Arduino
Connect the Pump Controller Board to the Arduino

The Pump Controller Board comprises of -
1. 1k ohm resistor
2. 2N2222A transistor
3. 5V Pump Motor







Setup the Drip Irrigation Kit


There is enough information on the web on how to setup the drip irrigation kit. I am not getting into details of this.
The point to note here is that there are 6 analog pins on arduino that can be used to sense soil moisture. At the very minimum, one can use the same setup to sense 6 plants. But if designed in a better way, one can use the same setup to sense as many plants in multiple of 6.
I am not going into details of this as this is not the objective of this instructable. I will try to publish another instructable for a better design of the drip irrigation kit so that maximum number of the plant soil moisture can be sensed.


arduino programing code

const int VAL_PROBE = 0; //Analog pin 0
const int MOISTURE_LEVEL = 250; // the value after the LED goes on

void setup()
{
  Serial.begin(9600);
  pinMode(13, OUTPUT);
  pinMode(7, OUTPUT);
}

void LedState(int state)
{
  digitalWrite(13,state);
}

void loop()
{
  int moisture = analogRead(VAL_PROBE);
  
  Serial.print("Moisture = ");
  Serial.println(moisture);
  
  if(moisture > MOISTURE_LEVEL)
  {
    LedState(HIGH);
    digitalWrite(7,HIGH);
  }
  else 
  {
    LedState(LOW);
    digitalWrite(7,LOW);
  }
  
  delay(500);
}
 


0 टिप्पणी(ण्या):

टिप्पणी पोस्ट करा