Pages: [1]   Go Down
Author Topic: Help Required on Auto Water for Plants  (Read 880 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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
« Last Edit: January 24, 2013, 12:58:41 am by vijaybhatter » Logged

Founder of India-Forums.com - Top 2500 sites in the world as per Alexa.

Sweden
Offline Offline
Full Member
***
Karma: 1
Posts: 179
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi!

You should not power the pump directly from the Arduino pins. To much current, it can damage the Arduino.

Buy a relay module:
http://www.buyincoins.com/new_en/details/new-one-1-channel-isolated-5v-relay-module-coupling-for-arduino-pic-avr-dsp-arm-product-9098.html

You connect the digital output directly to the module and the pump to the relay side of the module.

Alternative you can build it yourself. It is just a transistor and a relay with a freewheel diode.
Logged

Global Moderator
UK
Offline Offline
Brattain Member
*****
Karma: 290
Posts: 25795
I don't think you connected the grounds, Dave.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I have a 3.5V~12V Immersible Water Pump and as per its specifications it works at 60mA to 500mA
Even the lower figure is well above the absolute maximum rating for an AVR pin, which is 40mA.
If you tried to run the pump for any length of time, you may well have damaged your processor.
Logged

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

Pages: [1]   Go Up
Jump to: