Measuring water-level in a plastic storage box

Hey fellow creators!

I'm currently working on an automated aeroponic system, where I need to measure the exact state of the water level in a plastic storage box (E.g. in percentage). After some searching on both google and here, I've not found anything or anyone doing exactly that.
I've thought about:

  • A distance sensor and some kind of floating material inside a pipe or alike (I'm not sure if the distance sensor can reflect properly on the surface).
  • A pressure sensor(FSR) in the bottom of the box
  • A hall effect sensor outside and some floating magnet on the inside (I guess that this one could not get anything else than measure if the water level exceeded some specific point, which is not what I want)

Please, do you have any suggestions? :slight_smile:

Best, pakken!

Possibilities include e-tape 12 eTape Liquid Level Sensor + extras : ID 464 : $39.95 : Adafruit Industries, Unique & fun DIY electronics and kits and capacitive sensing Water level sensor w/ nichrome wire no, now capacitive - #17 by dc42 - Project Guidance - Arduino Forum.

Getting the fuel tank sender out of a dead car would have to be simpler than anything you have mentioned.

I modified this project Building a Capacitive Liquid Sensor : 8 Steps (with Pictures) - Instructables
I use two strips of copper (stained glass edge foil) about 3/4 " apart and a ATTiny with Capacitance Sensor library
Arduino Playground - HomePage, that just sends the raw data over I2C, using the Tiny Wire library. The main reader program on the Arduino reads the value then constrains it to a range from the high to the low values that are stored in Eeprom, then maps it to 0-100 and pretty much uses his function to display a bar graph. I have also set it up to display % full for four tanks on a 1602 LCD instead. There is a menu to set the high and low values on each tank, as each one will vary according to how thick, dirty, depth, material of the tank,etc to store them in eeprom.
PM me if you want sample code and a PDF of the sensor board, its very simple, easy to make yourself. My first ones were on strip board, about 5/8" X 1".

I believe that the best sensor for water lever is a pressure sensor because it has the longest duration even in salty water or other liquids. But is not cheap.

Maybe a cheaper alternative can be a load cell in the bottom of tank (but outside!).

You also can measure the amount that leaves (or comes into) the storage box with sensor, don't know the correct word in English.
In German its called Durchflussmenge :wink:

Durchflussmenge-> Flux meter

You say this is an aeroponics system - i assume you mean Aquaponics ? If so - you do not want anything that will contact the water

  1. You could have issues with poisoning your fish
  2. You WILL get continual algie build growing on anything you put in the water.

The only way i have found to do this is as follows

  1. get a small PVC about 60mm in size and approx 150 mm longer than the depth of your tub
  2. get an end cap that fits the PVC pipe
  3. drill a number of holes in the bottom end of the pipe - lots of small holes is better to stop worms and other critters getting in
  4. Get an Ultrasonic sensor
  5. get a small childs ball that floats and that will fit in the tube - make sure it is not a tight fit as slime WILL grow on the ball.

You then fit the ultrasonic sensor in the end cap that clips onto the top of the tube (opposite the end with the holes)

Stand the tube in the water and secure it so the bottom is flat on the bottom of your tub and can not move

Insert the ball and put the end cap with the ultrasonic sensor on the top

Calibrate the distance from the ball to the sensor - obviously you could overfill as the top of the ball with be higher than the water level and you could also drain completely as the ball will only rest on the bottom and its diameter will be the difference in height.

On a regular basis make sure you clean out the bottom of the tube as GUNK will grow in there and throw off your low level reading


If so - you do not want anything that will contact the water

You can put a pressure sensor inside a suitable enclosure filled with water.
You can use a pressure sensor that is already in a steel enclosure, screwed on the tank bottom, or near the bottom, and have the cable outside.