I have a property with a 1m deep pond that is used to supply water for irrigation. When it rains, the pond fills up to the point of overflowing which can cause the property to flood up. What I would like to do is pump water out of the pond until it reaches a certain level if rain is expected on a certain day (it takes several hours to pump water out), stop pumping if the property starts to flood up. There is about 20 meters between where the pump is located and where I can detect flooding and both are within wifi range. I'm debating whether to use a barometer or to just use weather underground as a datasource. The pond itself is silted and considered to be quite "dirty" so whatever I come up with for water level detection should not have any parts that can get clogged. I need suggestions on how to detect water level, how to forecast rain, and how to get flooding information across.

Personally I wouldn't waste the time trying to predict he weather. Instead an easier solution would be to use a simple water level float switch that clicks the pump on the second there is an water level change. If adjusted correctly the pump will start running just after it begins raining and should be more than enough to counter the falling rain. Worst that happens is you need to buy a bigger pump. With that solution you wouldn't have to rely on the weather forecast being correct, wifi connection working or even the connection to the weather site working.

I didn't quite follow why you said "stop pumping if the property starts to flood up" but apart from that it seems to me that what you want is a bilge pump with the float switch used to set the level you want to hold the water at.

I only provide help via the forum - please do not contact me for private consultancy.

I didn't quite follow why you said "stop pumping if the property starts to flood up" but apart from that it seems to me that what you want is a bilge pump with the float switch used to set the level you want to hold the water at.

If the area outside the pond is already flooded, what that means is that any water that is pumped out of the pond will ultimately just flow back into the pond, which is why it's better to just stop and wait until the water drains out a little before we start pumping again.

I'm thinking of the issues regarding a physical float switch. Will it work correctly in a body of water as big as a pond?

If the area outside the pond is already flooded, what that means is that any water that is pumped out of the pond will ultimately just flow back into the pond, which is why it's better to just stop and wait until the water drains out a little before we start pumping again.

Now I'm a little unclear what you're trying to achieve. If you're simply pumping the pond out to the surrounding land, couldn't you simply install an overflow pipe?

I'm thinking of the issues regarding a physical float switch. Will it work correctly in a body of water as big as a pond?

The typical commercial float switch is actually a tilt switch which floats on a tether. It will work in a body of water of any size, as long as the surface is calm and there is no significant water flow.

I only provide help via the forum - please do not contact me for private consultancy.

Now I'm a little unclear what you're trying to achieve. If you're simply pumping the pond out to the surrounding land, couldn't you simply install an overflow pipe?

Allow me to re-describe my problem.

I have an uneven property where there are two ways for the water to flow, one is through a smallish drain towards the municipality and another to the pond on the premises. Usually the water output through the municipality pipe is low and when we have heavy rain, it becomes useless, which is why to alleviate flooding we prepare the pond to accept rainwater by pumping some water out. However during normal periods the pond is used as a water source for irrigation which is why the low pond levels should not be maintained all the time such as with a simple float switch + pump combination.

The way it works now is that when we see dark clouds we will start pumping. If there is heavy rain and the municipality's system is inundated and the pond is full then all pumping should stop until the water level has gone down again.

This is a relatively common problem in this part of the world and many do choose to maintain a permanently low water level but this wastes a lot of water.

Ideally the rain prediction should come from a barometer or a weather feed and the water levels indicating whether to pump or not should come from a series of sensors.

Much clearer now. Then it sounds like step one is to set up your weather forecasting system and see whether you can get it doing usable predictions. Once you have that, sensing water levels and controlling the pump shouldn't be too hard.

I think I follow you now. I suggest using a float switch in the pond set to turn the pump off at the 'low' level, and a float switch at the municipal output set to turn the pump off at the 'high' level, and a third override switch to turn the pump off when heavy rain is not expected. You could control this override switch manually. If you can tolerate a wired solution then you can get this working without any electronicsw at all - just the three switches wired in series with the pump.

If you come up with a weather prediction system you're willing to trust, I expect it would run on the PC. You could replace the manual override switch with a relay (power switch tail, X10 outlet etc) controlled from the PC via an Arduino. If the weather prediction system seems to work, you might choose to turn the whole system off manually during seasons where you think heavy rain is unlikely and want to avoid dumping your precious irrigation water due to a forecasting error.

I only provide help via the forum - please do not contact me for private consultancy.

I think I follow you now. I suggest using a float switch in the pond set to turn the pump off at the 'low' level, and a float switch at the municipal output set to turn the pump off at the 'high' level, and a third override switch to turn the pump off when heavy rain is not expected. You could control this override switch manually. If you can tolerate a wired solution then you can get this working without any electronicsw at all - just the three switches wired in series with the pump.

Thanks @PeterH I looked around for float switches and this may work, however as I'm in the Arduino forum I just want to use the Arduinos for it's geek factor and am wondering if I can use something like infrared. This looks pretty interesting to me http://howmuchsnow.com/waterlevel/ the fact that I can actually capture measurements may lead to interesting applications later on.

If you come up with a weather prediction system you're willing to trust, I expect it would run on the PC. You could replace the manual override switch with a relay (power switch tail, X10 outlet etc) controlled from the PC via an Arduino. If the weather prediction system seems to work, you might choose to turn the whole system off manually during seasons where you think heavy rain is unlikely and want to avoid dumping your precious irrigation water due to a forecasting error.

I may not have to use a PC, I see there are two methods of using an Arduino for predicting the weather. One is getting data through the internet and another is by using a barometer. Either of these should work. However if I use the internet method, firstly I will have access to a pool of data from professional weather providers and secondly I can send the water level to web server which I can store or graph. This is quite tempting.