Water level controller

Is it possible to implement water level controller in the real world using arduino?
if yes then which arduino module should i use and which sensor?

Any Arduino would do. A Uno would suffice and is the easiest to use. The sensor depends somewhat on exactly what you want to know and how it is installed. The switch could be a s simple as this.

Water level of what? A kettle? A swimming pool?

Water level controller which would be used in industry.

An utterly meaningless description.

Nick_Pyner:
An utterly meaningless description.

+1

I'll try an answer despite the useless communication with the thread starter:
How you measure water level depends basically on two main factors:

  1. Do you need a binary (water has reached threshold: yes/no) or quantitative measurement (water level is at X %)? All binary sensors can be turned into discreet quantitative sensors by placing multiple ones at different levels.
  2. What environment will your sensor live in (constantly clean water, water with particles, algae grow ...)?

Other factors:
3. Will false positive (e.g. pump runs dry) or false negative (e.g. container overflows) or both result in bad things to happen?
4. How much space do you have?
5. Will the reservoir go completely dry regularly, or below a threshold where you are not interested anymore?
6. WIll the sensor be immersed most of the time or not?

In some cases, for clean environments and binary sensing, a floating switch or the suggested optical switch will work. I assume especially the latter will fail with algae grow and dirt layers.

I have the same problem in two situations and I will experiment with these two solutions soon:

  1. We have a drainage shaft next to our house where rain water has to be pumped into a higher sewer when the level goes to high. This is controlled by a floater on a pump. When this pump fails, the water level will rise too high and press into our basement. A false negative will flood our basement, a false positive will only cause me to have a look. Here, I need at least a binary sensor for dirty, algae-ridden environments. Since bad things happen in case of failure and a binary sensor would only be triggered in emergency cases, I want control values, so I want quantitative sensing for at least an interval around the threshold (so the lower part is regularly used).
    For this, I will use an acrylic glass tube with a rigid, air-tight separator in the top quarter, leading to two compartments. I will place two cheap pressure sensors in the two compartments and seal the ends with very loose plastic foil (loose enough to allow the foil to form a pocket of 20% of the full volume of the compartment). Might place a bag of silica gel in there, too. Then I will place the lower end below the threshold and measure the pressure difference. When the lower end is immersed in water, the pressure will push the plastic foil into the tube and I will measure a considerable pressure difference to the top one that measures the environment. With a BMP280, a resolution of 1mm should be possible, but you will only be able to sense up to around 1m of water at sea level before the sensor saturates and a little more at higher altitudes. (1mm per m). At the lowest dry point on earth, at the shore of the Dead Sea, you are down to around 60cm max. All approximate levels that change by a few millimeters based on the daily weather conditions. Perhaps someone can suggest another sensor that is as cheap and accurate but covers a wider pressure range. The BMP280 is really cheap from Aliexpress, though.
    Since the water level drops below tube level, the pressure in the bottom compartment will be leveled regularly. Else, air has to be blown in on a regular basis.
    This should be very resistant against measuring errors if the tube and the seals are build well. No dirt or algae will influence the measurement.

  2. I am building an automatic watering device for the plant in my second study, which I do not visit every day. It should stop watering when the tank is empty and send a warning. A false positive will destroy my pump, a false negative will inform me that I have to refill water and I will just have a look. I will probably start with a floater, but I read another interesting approach: measure the capacity of a plate or tube capacitor, i.e. two metal plates or a metal rod in a metal tube. Capacity will grow linearly with the water level along the rod up to the 78-fold of the initial level. Measurement could be done with a 555 IC.
    This should also work pretty soundly, but I am concerned about dirt getting caught between the plates and algae to grow, so that my measurement degrades over time.

Other possibilities:

  • Measuring the current between electrodes - these will corrode with time. Pulsed measurements may reduce this, but eventually, your measurements will degrade. Used for stuff that is usally NOT in water, leak warners, e.G.
  • Measuring the current through a slightly heated thermistor. If immersed in water, it will cool down. Used for oil tanks, AFAIK.
  • Using distance sensors (light or sound) to detect the distance to the surface. People report success with this in their cisterns, but I would expect issues regarding dirt, dew ... Also, when placed close to the walls, the ultrasonic ones tend to report the diagonal distance to the wall from some distance on. I am having a similar problem with an HC-SR04 that is supposed to report how far my garage door is away, but starts to report how far away the ceiling is after about 50cm. It is okay to sense if the door is open or closed, though.
  • Using a floater and reed switches