Go Down

Topic: Don't Understand How To Operate AdaFruit Pump (Read 3504 times) previous topic - next topic

vigilanf

Hello, I am very new to Arduino. I purchased the peristaltic pump from Adafruit as well as an inventor kit from Sparkfun. My first step was to create the motor circuit found in the inventor kit (circuit #12). I ran the code and the stock motor (from the inventor kit) that runs at 1-3V, and it worked fine. I then switched the stock inventor kit motor out with my Adafruit pump (12V 5000RPM). When I started the motor, I could hear it being powered, but the motor did not spin the metal pin, thus water did not pump. My guess is that the adafruit pump requires more torque. Does anyone know how to get it to work? Any advice would be much appreciated. 

fungus


The motor says "12V" on it. You need a 12V supply and something to switch it, eg. a MOSFET.



No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

vigilanf

Thank you. I also went ahead and bought an arduino motor shield. Will this enable me to operate multiple pumps?

harddrive123

Based on the spec sheet you have 2 controllers.

Because your new to arduino(electronics?) I'd recommend you only run 1 pump/motor per controller.

Make sure you follow there instructions when it comes to hooking up the power, should you be using 12V or more then 12V sources.
Come check out hdtechs.ca

vigilanf

Thank You. I am new to electronics and Arduino, so I will start by just operating one pump. I have the following:

1. Arduino Uno
2. Arduino Motor Shield
2. 12V motor (adafruit pump)

I have a 12V external power supply as well (wall-wart). If anyone could help with how to create the circuit and create the Arduino code so I can at least power the pump on and off...it would be much appreciated.




michinyon

Is google broken in your country ?

http://arduino-for-beginners.blogspot.com.au/2011/03/controlling-12v-dc-motorfan-with.html

http://www.instructables.com/id/Use-Arduino-with-TIP120-transistor-to-control-moto/

http://forum.arduino.cc/index.php/topic,12237.0.html

https://learn.adafruit.com/adafruit-motor-shield-v2-for-arduino/powering-motors

http://forum.arduino.cc/index.php/topic,11860.0.html

hazimassy

i am using 2 pumps, i need to start the 1st pump for 2 hour and after 2 hour 1 pump need to stop and second pump wants to start and vise-versa. but the problem is the when starting the program i wait for 2 hour and 1st pump starting after 2 hour and i work for 2 hour and second pump start after 2 hour and vise-versa. can anyone help me.



const long oneSecond = 1000;  // a second is a thousand milliseconds
const long oneMinute = oneSecond * 60;
const long oneHour   = oneMinute * 60;
const long thour = oneHour * 2;
unsigned long interval = 10000        ;
unsigned long interval2 = 10000;
unsigned long interval3 = oneMinute * 10;
unsigned long previousMillis = 0;
unsigned long previousMillis2 = 0;
unsigned long previousMillis3 = 0;

int flot1;
int flot2;
int ph;
int ledState = LOW; 
int ledState2 = LOW;



void setup()
{

 
   
    pinMode(23, OUTPUT);// stp1
    pinMode(25, OUTPUT);// stp2
    pinMode(27, OUTPUT);// ffp1
    pinMode(29, OUTPUT);// ffp2
    pinMode(47, OUTPUT);// oil
    pinMode(49, OUTPUT);// ph dosing
    pinMode(37, INPUT);// ph
    pinMode(39, INPUT);// flot1
    pinMode(41, INPUT);// flot2

     digitalWrite(23, LOW);
     digitalWrite(25, HIGH);
     digitalWrite(27, HIGH);
     digitalWrite(29, LOW);
     digitalWrite(47, HIGH);
     digitalWrite(49, HIGH);


}

void loop() {

    ph = digitalRead(37);
    flot1 = digitalRead(39);
    flot2 = digitalRead(41);
     
      if (ph==HIGH)
      {

        digitalWrite(23, HIGH);
        digitalWrite(25, HIGH);
        digitalWrite(49, LOW);
        previousMillis = 0;

        te(27, ledState2);
                       
                    }
              }
              else
                  {

                    digitalWrite(29, HIGH);
                    digitalWrite(27, HIGH);
                    previousMillis2 = 0;
                  }
      }
      else
      {

        digitalWrite(49, HIGH);
       
        if (flot1  == HIGH)
        {
 
          unsigned long currentMillis = millis();
          if (currentMillis - previousMillis >= interval)
          {
            previousMillis = currentMillis;
            if (ledState == LOW)
            {
            ledState = HIGH;
            digitalWrite(25, LOW);
            }
            else
            {
            ledState = LOW;
            digitalWrite(25, HIGH);
            }
             digitalWrite(23, ledState);

          }
        }
        else
        {

          digitalWrite(23, HIGH);//
          digitalWrite(25, HIGH);//
          previousMillis = 0;
        }
        if (flot2  == HIGH)
                  {
                 
                    unsigned long currentMillis2 = millis();
                    if (currentMillis2 - previousMillis2 >= interval2)
                        {
                          previousMillis2 = currentMillis2;
                         
                          if (ledState2 == LOW)
                          {
                          ledState2 = HIGH;
                          digitalWrite(29, LOW);
                       
                          }
                          else
                          {
                          ledState2 = LOW;
                          digitalWrite(29, HIGH);
                          }
                           digitalWrite(27, ledState2);
                           
                        }
                  }
                  else
                  {
               
                    digitalWrite(27, HIGH);
                    digitalWrite(29, HIGH);
                    previousMillis2 = 0;
                  }
      }
}
   
            {
            ledState = LOW;
            digitalWrite(25, HIGH);
            }
             digitalWrite(23, ledState);

          }
        }

Paul_KD7HB


wvmarle

I'm always impressed by those first posters seemingly having no problem finding long dead threads, but failing to find (and read, or simply ignore) the forum sticky!
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

adwsystems

#9
May 28, 2019, 01:48 pm Last Edit: May 28, 2019, 01:49 pm by adwsystems
I'm always impressed by those first posters seemingly having no problem finding long dead threads, but failing to find (and read, or simply ignore) the forum sticky!
Totally agree. Never occurred to me.

You totally get karma point for that!

Go Up