Using water as variable resistor with analog ins

Hi,

I am doing an interactive art installation where I need to measure how much water is in a bowl (3 actually).

It will function as a fountain, with a pump making the water drip into the bowls. The bowls have drains in the bottom, and if you block this with your hand the bowls will fill with water.

I would prefer to do this just by measuring the conductivity of the water. The simplicity is an important part of the work.

There are other parameters of the installation that may affect the conductivity but I'll spare you about those (at the moment at least).

The water can be normal tap water, or have chlorine added (taken from a swimming pool/bathing house), or something else added that is non toxic but beneficial for the conductivity in this scenario.

What problems will arise from using DC current in this case? Health issues? Stability issues? How could I counter this? Use AC somehow?

So far the best results has been when I use the water to conduct between two bare wires, in effect the actual change of conductivity is due to the amount of wire area that is covered by water. In this case I have used fresh water. But would prefer to use the actual water as a variable resistor instead (see pictures with the plastic bottles).

I am now experimenting with metal bowls and connecting either ground or analog pins to it, and have the other one mounted in the bottom of the bowl (see picture with the three metal bowls). This has not worked very good, yet. There is not a significant difference between a full or empty bowl.

I will add som code to auto calibrate max/min values when the bows are filled or empty, once I have a working solution for the measuring part. Thinking about detecting when the water is flowing over using a digital pin.



One thousand thank you's if you can chime in and help the get going! :confused:

Cheers

Interesting..
I think you’ll have to do a bit of research and testing on the electrodes, and corrosion.

There may be advantages in using an AC sensing current to reduce the effects of fouling these electrodes.

Similarly, you may find different frequencies/voltages (in the safe range) will affect the solution you need to use.

Keep us informed !
Good luck.

1 Like

The problem with DC is it will corrode the electrodes. You can minimise this by turning the current off most of the time and only turning it on to make a measurement. What I mean is maybe you need a measurement every second so for 980ms the electrodes are not powered and for 20ms they are while the measurements are made. Another thing to consider is conductivity varies a lot depending on what is in the water (salt, dirt, chlorine...). Also, if people are putting their hands into the water then they will inject electrical noise from the environment that has been picked up by their body.

1 Like

Could you use more than one wire, each cut at different lengths to determine water level?

Also, how long does this neat piece need to be displayed? I think this will have a bearing on the choices you make.

1 Like

Chlorine may be a good idea, to minimise the growth of algae and fungus.

Always connect the reference electrode to ground, the sensing electrode to the analog in and you can generally use INPUT_PULLUP as the bias source, turning it on only in the code which reads the analog input and reverting to INPUT immediately after taking the analog reading, so minimising the DC current.

Unless you can calibrate from time to time with a full bowl, the analog reading will have little meaning for the actual level.

1 Like

You might also want to look at plant watering systems.
These often measure minute differences in conductivity but the programs sometimes use different methods to avoid the DC bias that often corrodes sensors.

OR as already mentioned by @er_name_not_found just use simple wires as level sensors which is the easiest method you can use and does not involve any fancy programming.

2 Likes

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.