Swimming Pool Water Level Sensor

I have an Arduino that measures various things around my pool: Pressure across filter, water temp before and after heater, etc. It also controls the circulation pump and a sprinkler valve that adds make-up water. I would like to be able to measure the water level so I know when I need to add water and do it automatically. I can't run any wires out to the pool, but I thought I could put a wireless system in the cover to the pool strainer (see attached picture). I could make a new cover and attach some sort of enclosure to the underside. Maybe even 3D print it. In the enclosure would be a sensor that would point down on the water in the strainer and tell me the distance from the sensor to the water. It would then send this info to my main Arduino via RF.

I have been using panStamps in another project and they work great. They are essentially an Arduino Pro Mini v3.3 with an RF transceiver. A panStamp should be able to run a couple months on a CR123 battery if I use sleep mode (that's still to be verified). I think this would work well to send the water level to my main Arduino.

My problem is I don't know how to measure the water level. I need a sensor that can detect the water and won't get messed up if there are leaves in there. In the day the water is moving around and it might be hard to read, but I could set things up so I only process the reading when the pump is off and things are nice and still. I'd like to be able to measure the level to 1/8" resolution, but 1/4" would be okay too. The sensor would be around 5 inches from the water. It won't be submerged, but it will get splashed. When kids play in the pool there are a lot of waves, so I'm pretty sure the surface of the sensor will get wet from time to time. And it would be humid all the time. The sensor should be able to operate on 3 volts.

Any suggestions on how to do this?

Do you need to measure the height or is it enough to measure one fixed point, lets say your minimal level?

There are liquid-level sensors: http://www.omega.com/Green/pdf/LV170.pdf
Think they could work with arduino or something similar.

Well there are ultrasonic distance sensors, but i found many threads and no solution with water-resistant ones like used in cars.
Generally there are waterprooved sensors, i wrote earlier here:

That could be mounted on the cover of your pool strainer? When pump is off i guess these could deliver pretty good distances.

How about something float-able and if the water is high enough, the thing will hit a wire and tell you it's too high.

int levelPin = 9;
void setup()
{
  Serial.begin(9600);
  pinMode(levelPin, INPUT);
}
void loop()
{
  int level = digitalRead(levelPin);
  if (level == HIGH)
  {
    Serial.println("Water is too high!");
  }
}

yosler:
How about something float-able and if the water is high enough, the thing will hit a wire and tell you it's too high.

I don't think that would work to well. Ideally I'd like to have a sensor that used sound or light to measure the distance. If that's not realistic, I could have some sort of probe going down into the water. Not sure what kind of probes are available for something like this, if any.

My first choice would be a sensor that had a variable output that told me the level. But I'm starting to think that's not a realistic option, especially with a couple CR123 batteries powering everything. A float switch like this one at McMaster.com might be best: 50195K93. I could have a small mounting pipe come out of my housing under the lid, with this float switch on the end of it.

dertester:
Generally there are waterprooved sensors, i wrote earlier here:
Question on ultrasonic sensor! - #14 by dertester - Sensors - Arduino Forum

The waterproof ultrasonic sensor might work. I think I'll get one and try it out.

How about this tape level ?

Does the pool have a bottom drain line accessible such that you could plumb-in a small vertical tube making, in effect, a 'U-tube manometer' - and measure the height of the water column?

The tape level suggested by aralrj looks like a good solution to me. Alternatively, I have been successful using a capacitive sensor and 555 timer to sense water level, see Water level sensor w/ nichrome wire no, now capacitive - #17 by dc42 - Project Guidance - Arduino Forum.

How about a good ping sensor and, since water may confuse the sensor, similar to what I said before, have something float on the water(where the sensor is pointing). Program it so that if the sensor says that the distance to the water is too close for more than a few seconds.

Washing machines use cheap pressure transducers. Google for pressure transducer - you can usually get them in specified ranges. The transducer would have to be under water.

Other reliable options are an ultrasonic meter or a bubbler; both are in the thousands of $.

Ping))) sensor:
http://www.parallax.com/tabid/768/productid/92/default.aspx
Very accurate down to the Centimeter up to 3.3 meters. ~$30

I ended up using a simple float switch. Since my sensor is battery powered I wanted something very low power. I ended up using a panStamp which is like and Arduino pro mini with a radio transceiver built in. I set it up to sleep for 8 seconds, wake up, check the level, transmit the status then go back to sleep. The whole thing is attached to my skimmer cover. I also added an accelerometer and set it up for low power setting. I did this so the sensor would know when the cover was not in place. I didn't want it to send out a low water signal when I removed the cover to clean out the skimmer basket. I'm using a CR123 battery and the voltage drops about 1/100 volts per day (the panStamp is also transmitting the battery voltage). So that's not bad. The panStamp does have a different sleep mode which uses even less power. Also the accelerometer is powered all the time, even though it doesn't use much, I could probably power it with an output pin, only turning on power to the accelerometer when I wanted to check it.

I attached a couple pictures of my setup.

Pool Level Detector 1.jpg

Pool Level Detector 2.jpg

Nicely done! Why poll for water level every 8 seconds? Does your pool have a big leak :astonished: ? Seems you could conserve even more power and only wake up every few minutes or longer.

JohnHoward:
Nicely done! Why poll for water level every 8 seconds? Does your pool have a big leak :astonished: ? Seems you could conserve even more power and only wake up every few minutes or longer.

8 seconds is the max sleep time for the panStamp.

Hello ScottG

Seems like you found an elegant solution to a problem I would like to solve. One year into it, how has your solution performed? Did you get reliable readings? How often did you end up having to change the battery?

Thanks!

rno310:
Hello ScottG

Seems like you found an elegant solution to a problem I would like to solve. One year into it, how has your solution performed? Did you get reliable readings? How often did you end up having to change the battery?

It works great. It's very reliable. I think one battery will last all summer. The battery I'm using now was installed May 28, so it's been almost 2 months. You can see the battery voltage over time on Xively (it's channel 15). I've got all the code on GitHub.

I did have an unusual problem the other day. The program adds water in 15 minute increments when it senses the water level is low. I get a text message every time this happens. I got four text messages over an hour indicating the pool just kept adding water. I knew that wasn't right. So I went home and discovered a chipmunk holding onto the float, trying not to drown. The sensor just thought it was low water continuously. That chipmunk was lucky I went home to check on things.

I need to make my code a little smarter so it waits a bit before adding water right away. I do have a 120 minute per day max on the water fill, but I'm going to lower it to 60. I typically only need 15 to 30 minutes a day for water.

Haha! No chipmunk sensor??? Thanks for the links.

ScottG:

rno310:
Hello ScottG

Seems like you found an elegant solution to a problem I would like to solve. One year into it, how has your solution performed? Did you get reliable readings? How often did you end up having to change the battery?

It works great. It's very reliable. I think one battery will last all summer. The battery I'm using now was installed May 28, so it's been almost 2 months. You can see the battery voltage over time on Xively (it's channel 15). I've got all the code on GitHub.

Finally had to change the battery. It was down to 2.4 volts - sensor was still working at the lower voltage. But once these lithium batteries start to go, the voltage falls off pretty quick. It lasted 109 days.

Put a washing machine pressure sensor on one of the pipes near the filter. When the pump and filter are not running, the pressure will be directly proportional to the height difference between the sensor and the water level in the pool.