Show Posts
Pages: [1]
1  Topics / Home Automation and Networked Objects / Help Required on Auto Water for Plants on: January 24, 2013, 12:54:34 am
Hi Friends,

I have a 3.5V~12V Immersible Water Pump and as per its specifications it works at 60mA to 500mA and a Moisture Sensor for the plants. Both I have purchased from DFRobot.

The Immersible pump product I am talking about is : http://www.dfrobot.com/index.php?route=product/product&product_id=667

The problem I am facing is with powering the pump using the Arduino UNO with any of the digital pins. When I connect it directly to 5V pin it works fine. So I assume its not getting the required power to start the pump.

My Sketch looks as

Code:
int sensorPin = A0;  
int sensorValue = 0;  
int pumpPin = 2;
int ledPin = 13;


void setup() {
  
  Serial.begin(9600);
  
  pinMode(pumpPin,OUTPUT);
  pinMode(ledPin,OUTPUT);
  digitalWrite(pumpPin,LOW);
  digitalWrite(ledPin,LOW);
  
}

void loop() {
  // read the value from the sensor:
  sensorValue = analogRead(sensorPin);    
  
  
  if (sensorValue >= 500){
    digitalWrite(pumpPin,LOW);
    digitalWrite(ledPin,LOW);
  }
  else
  {
    //Start the Pump and the LED
    digitalWrite(pumpPin,HIGH);
    digitalWrite(ledPin,HIGH);
  }
  
  Serial.println(sensorValue);
  delay(1000);          
                  
}

Everything works fine except powering the pump through the DigitalPins. Any suggestions on how to solve this.

Regards,
Vijay
Pages: [1]