3 water tank 2 pump auto controller.

Hello;

I’m trying to makes auto water pump controller. I’m found lots of code in google, but the problem is, in my house we have 3 water tanks! and 2 pump. 1.5hp submersible pump only fill the underground reserve tank. And another 1hp pump pulling water from reserve tank to overhead tanks. And there is two water tanks in different size and height. I didn’t find any code in google for this type of scenario.

Now here is the big problem, i’m very new with programing. Then why not i’m buying auto devise.

  1. Because its not available here. 2. It will be fun to makes myself 3. It’s helps me to understand the arduino code.

I’m going to use float switch to sense the water level. I got some similar at
http://www.reefcentral.com/forums/showthread.php?t=2420581
incomplete and not for me also.

So i’m seeking help from here.

Pump2.jpg

Pump3.gif

Your situation does seem to be unique. In the olden days, we used to make a logic flow chart showing all the connections and logical decisions that needed to be made and the resulting actions from each of those decisions.

You can do the same long before you begin to think about coding anything, and even before you buy any hardware.

When you are done, you will know the necessary hardware and will know the logic of any software you need to create.

Paul

As we say in my part of the world, you are putting the cart in front of the horse...

Before you can discuss software, you [u]must[/u] define the hardware. Not the the electronic hardware (Mega, Uno, etc) but rather the plumbing hardware. You need to examine and document the plumbing schematic, the result of this work is a piping diagram. You must also understand how the pumps are controlled and by what devices, this too should be shown in the piping diagram. Differential pressure switches, tank level switches, anything connected to the piping that has wires attached needs to be fully understood and documented.

You must fully understand how the system currently functions if you are to have any chance of success in "automating" that system. If you ignore this most important initial work, you risk burst pipes and water everywhere.

Hi, Welcome to the forum.

Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html

AS @avr_fred has said you need to layout your plumbing in a diagram.

Also the power requirements for the pumps and distances involved between pumps, tanks and where you will be placing your Ardruino controller.

Can you tell us your electronics, programming, Arduino, hardware experience?

Thanks.. Tom... :)

Thanks for replay. I’m really sorry for my late answer. I’m a student of Electrical and Electronics Engineer. I can understand everything expect programming. I’m wanted to use some float switch to sense the water level (just simple 2 wire switch).

Is it possible to control both pump with single arduino (nano or uno). For simplicity i can remove monitoring option.

1st 2 float switch sense the reserve tank water level. If it’s low than pump on, and high pump off. if water not pump within 1 minute (i mean if pump on but water not pull up from ground), then pump off. May be i can use simple transistor switch to sense it using water as a conductor. Current flow between two electrodes when the pump pulling water. **
2nd
** 2 float switch sense the 1st floor tank water level. If it’s low than pump on, and high pump off. if water not pump within 5 second , then pump off. I can use same transistor switch.

** 1 float switch sense the 2nd floor tank water level. If it’s low than pump on.**

Pump.gif

Now you have the engineering problem called "feature creep"!!!! You really need to take time to completely analyze your project before even thinking about software and an Arduino.

Paul

I have not done yet programing c++. So its difficult to me to makes a flow chart and then write the code. So i’m looking help here. Its for my home.
My connection diagram i have showed in attached file roughly. I have found some water pump controller using float switch. But i cant edit for my case.

Pump3.gif

kmFaisal: I have not done yet programing c++. So its difficult to me to makes a flow chart and then write the code. So i'm looking help here. Its for my home. My connection diagram i have showed in attached file roughly. I have found some water pump controller using float switch. But i cant edit for my case.

A "flow chart" is strictly LOGIC! Has nothing to do with code, but can be the basis of code in any language. The purpose of a flow chart is to clarify your logic and to make sure all decisions are stated and the results of those decisions end with a conclusion or an action.

Paul

PM asking for help sent to random contributors are not generally appreciated. I may assume I'm not the only one that got a rather useless

Please help me.

message. Now if you had added an offer for proper monetary compensation for my time and effort it'd have been a whole different story.

wvmarle: PM asking for help sent to random contributors are not generally appreciated. I may assume I'm not the only one that got a rather useless message. Now if you had added an offer for proper monetary compensation for my time and effort it'd have been a whole different story.

Same here, I ignored it.

Paul

A step by step statement of the logic of the system is an essential first step and just requires pencil, paper and thought.

For example

bottom Tank Low?
  turn on bottom pump
  water not flowing?
     turn off bottom pump and issue a warning
bottom Tank FULL?
  turn off bottom pump

mid tank LOW?
   bottom tank not LOW?
      turn on mid pump

etc etc

Have a look at Planning and Implementing a Program

...R

Hello,

if you look at only one pump and one tank, you can start to figure out what is needed. the MEGA or any Arduino can do all three pumps.

first off, you need to know TWO point. the water level when you turn the pump on and the water level when you want to turn the pump off.

but, I belive you will need at least one more. and that is that the water level for the pump is also acceptable.

so, if the pump has sufficient water.... if the tank is below set point (float switch at 1/4 of tank) AND, the tank fill switch is saying the water is below the full switch then... start the pump.

if at any time, the pumping tank water level is too low, shut off the pump.

when the 'full' switch says the tank is full, shut off the pump.

======================

you need to get one pump and one tank working. once you have one working, you only need to do it a two more times.

========================

as a note, say, pump #1 sits in tank #1 and pumps up to tank #2 and pump #2 in in tank #2 and pump #2 is to fill tank #3. you could use the LOW switch on pump #2 as your water level switch to allow that pump to come on.

======================

once you get this working, you can look at more switches to know the actual level. there are even things that detect the actual water level many of us have used an ultrasonic sensor to bounce sound off the water surface and by knowing how long it takes, we can determine the distance, often in CM. the fuller the tank, the lessor the CM. the smaller the gap becomes as the tank fills.

==========================

Please note that you DO NOT want to play with large pumps. if you try to turn them on and off too often, you can burn out the relays or the motors. very bad. VERY expensive.

also, if you want to use an Arduino to turn on a large motor, you will need to have some special motor starter to do that work. you should be able to use a simple relay to send a signal to the starter. a MOTOR STARTER is a special device.

As I see this project, you have at least 4 phases here.

1) software : get a toy pump to fill a bucket and prove the logic works. I use a tiny pump and a trashcan sitting on the floor with one pump and a smaller trashcan on a desk that automatically drains into the first tank.

2) high current, high power AC (?) electrical circuit design

3) low current DC electrical circuit design

4) interfaceing the DC to the AC and troubleshooing

5) physical installation , hoses, valves, sensors, wiring, etc.

WE would ALL advise you STRONGLY to post a picture of your proposed installation. a simple sketch of levels and pump numbers and switch numbers and then to write a sequence that YOU would do if YOU were to do it all manually.

1 check if lower tank has enough water to pump with 2 check level of next tank if needed, turn on the pump monitor the tank level turn off the pump once the level is reached.

YOU would do that. and you can program that pretty easily.

if you can do that, we can have a better understanding and help more easily.

but be warned, as we know more, we will want more detals. motor type, voltage, current, how it turns on and off.....

Without 100% confirmation, I’m not going to connect anything with my motors. This time i’m just looking for arduino Program. I have made a flowchart. Maybe this can be helps. Ignore the relay, connection, motors and others stuff.

Image from Reply #13 so we don’t have to download it. See this Image Guide

21ac68bd25976cb069a59da1e7e46640b6da9e91.jpg

…R

Sorry. I can't read that image even if I enlarge it.

...R

kmFaisal: Try to download it, ihis time.

Sorry. I don't want unnecessary images on my PC.

...R

int LED1 = 9; int LED2 = 10; int LED3 = 11; int LED4 = 12; int BUTTON1 = 2; int BUTTON2 = 4; int BUTTON3 = 6;

void setup(){ pinMode(LED1,OUTPUT); pinMode(LED2,OUTPUT); pinMode(LED3,OUTPUT); pinMode(LED4,OUTPUT); pinMode(BUTTON1,INPUT); pinMode(BUTTON2,INPUT); pinMode(BUTTON3,INPUT); }

void loop(){ if(digitalRead(BUTTON1) == HIGH){ digitalWrite(LED1,HIGH); }else{ digitalWrite(LED1,LOW); } if(digitalRead(BUTTON1) == HIGH){ digitalWrite(LED2,LOW); }else{ digitalWrite(LED2,HIGH); } if(digitalRead(BUTTON1) == LOW){ if(digitalRead(BUTTON2) == HIGH) digitalWrite(LED3,LOW); }else{ {delay(3000);digitalWrite(LED3,HIGH);} } if(digitalRead(BUTTON3) == HIGH){ {delay(3000);digitalWrite(LED4,LOW); digitalWrite(LED3,LOW);} }else{ {delay(3000);digitalWrite(LED4,HIGH); digitalWrite(LED3,LOW);} } }

Needs to spend more time and troubleshooting. Working on it.

Hi,

Please read the first post in any forum entitled how to use this forum. http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code. It will be formatted in a scrolling window that makes it easier to read.

Thabks.. Tom.. :)