Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Help Controlling 2 pumps

  1. Jul 13, 2012 #1
    OK needs some help here and i'm not sure how to accomplish this.

    Basically i have 2 pumps (fill and drain), a resevoir and a bucket. What i want to happen is that i want to fill the bucket from the resevoir up to a point and then as soon as it reaches that point turn the fill pump off and turn the drain pump on. Drain to a point at the bottom and then turn the drain pump off and the fill pump on and repeat forever constantly. I plan on having 2 231 style float switches and an AR relay but i don't think this will work.

    Any ideas on how to accomplish this?
  2. jcsd
  3. Jul 13, 2012 #2
    if your familiar with microprocessor programing, its a case of having a conditional loop dependent upon if the bucket is full or not.

    Some psudo-code

    int Fill_Pump=10;
    int Drain_Pump=11;
    int Bucket_Level=12;
    //Defines input and output pins

    int Bucket_Value=13;
    //Memory Location to store Analog Value of Bucket float switch

    void setup() {

    Bucket_Value= analogRead( Bucket_Level);
    //defines the bucket level value as a stored value

    pinMode(Drain_Pump, OUTPUT);

    void loop()

    while Bucket_Value< <Insert a Predefined value when the bucket would be full>
    digitalWrite(Drain_Pump, LOW);
    digitalWrite(Fill_Pump, HIGH);

    while Bucket_Value> <Insert a Predefined value when the bucket would be empty>
    digitalWrite(Fill_Pump, LOW);
    digitalWrite(Drain_Pump, HIGH);


    For more info, the arduino website can help out with defining some of these values and such.

    The output pins can only handle a small amount of current (200mA max) so a transistor, or a relay that can switch such low currents is needed. Make sure though a fly back diode is used across (when current stops flowing across an inductor, the magnetic field collapses creating a surge of current in the opposite direction).

    Hope this info help
  4. Jul 13, 2012 #3

    jim hardy

    User Avatar
    Science Advisor
    Gold Member

    i drew up a wiring diagram using one relay and two switches.
    But photobucket site keeps bombing my computer. (I HATE computers.)

    Use your relay to control both pumps.
    When relay is energized you'll run the IN (or FILL?) pump.
    and when relay is de-energized you'll run the OUT (DRAIN?) pump.
    So one pump is controlled by a 'norally open' relay contact
    and the other pump by a 'normally closed' relay contact.
    You'll need one additional 'normally open' relay contact to make a 'memory' circiut for the relay.

    Use the level switches to control the relay.
    You'll need a LOW switch that CLOSES when bucket gets empty.
    You'll need a HIGH switch that OPENS when bucket gets full.

    Connect the hi and low limit switches and the relay coil all in series, and to a source of power suitable for the relay. Now the relay has enough information to know whether level is low.

    But , when level is in between the switches the relay needs to remember whether level was most recently low or high so it knows which pump to run.
    In parallel with the LOW switch, connect that extra normally open relay contact.
    Now when LOW switch energizes relaly to start the IN pump, level will soon rise and LOW switch will open.
    But that relay contact you put in parallel with LOW switch holds relay energized until bucket fills. That's memory.
    When HI switch opens, it de-energizes relay stopping IN pump and starting OUT pump. Soon bucket will empty and cycle starts again.

    Reason to have relay energized to make FILL pump run is so a burnt out relay coil won't flood the place. You could wire it the other way but this way is fail-safe....... you might do a sump pump the other way.

    Can you draw that and write the logic statements for it? I gave up on Paint and Photobucket in frustration. .

    hope this helps too.

    old jim

    by the way - 'normally open' and 'normally closed' refer to the state of the contact when the relay is not energized, as if you just took it out of its box and are holding it in your hand. They do NOT refer to the state of the circuit or to water level.
    Last edited: Jul 13, 2012
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook