How does this Arduino liquid level sensor work?

I have been interested in this liquid level sensor which has this schematic. I need to understand the principal behind its working because I'd like to replicate it. I have two platinum wires which I would like to put to use for it.

The reason I am asking this question is because I thought you could not use DC for liquid level sensor as that would lead to ionic migration and eventual drop in voltage measured, but I guess this sensor is not measuring voltage between any electrodes?

Your concern is correct. This type of sensor actually measured "conductivity" of the liquid. So if you have a non conducting liquid it will not provide a satisfactory reading.

My liquid is conducting.

This module is an application of the current amplification by a transistor.
When the liquid level is high enough to conduct the current between the
base and the positive power supply, a certain amount of current is
generated between the base and the emitter. And in a mean while, an
electric current is produced in a certain amplification factor between the
collector and the emitter, and applied to the resistant in the emitter to
produce a voltage. Then, this voltage will be collected by an AD conv

Expected result
When the module is inserted into water, the serial port outputs data. The higher the water level, the greater the data.

So one need not worry about ionic migration (due to DC supply) and its effects in voltage drop?

Ask WaveShare...
https://service.waveshare.com/

That's just one of the issues that doesn't make this work reliably beyond a one-off demo.

Changes in conductivity of your liquid (slightly higher or lower salt contents) are going to throw off your measurement.

Corrosion of the traces due to electrolysis of the copper is also going to affect your readings.

Among other problems, but given the general level of ignorance, plenty of this type of sensor are sold.

Platinum wires may work for a while if you use AC excitation, sparingly, but a noncontact level sensor is a better idea.

Why only for a while? Why sparingly?

Chemical reactions, etc. Try it and let us know how well it works for you.

sure :+1:

Sparingly because eventually things will corrode. One common trick, if we want to call it a trick, is to just pulse the electrodes at time intervals, get a reading then wait before repeating the process. As mentioned and simply put while these little one off designes are cute for juniour's science project there is a reason they don't turn up in commercial and industrial applications.

Ron

Where the two electrodes do work and stainless steel works fine, is where the sensors are cleaned by the machine. Our 15 year old dish washer tells the dishes are clean by the resistivity of the rinse water. The electrodes are thoroughly washed each time we use the machine. I suspect all modern dish washers do the same.
In my former electronic assembly service, our board washer also used two stainless electrodes to determine when the resistivity of the wash water reached 1 meg Ohms, the boards were clean.
Never an electrode problem because the machine washed them. it ran for more than 10 years and the new owner likely is still using it.
So, plan your system so the electrodes are self cleaning and you will be ok!

That's interesting. I didn't think corrosion would be a problem with platinum at all.

Corrosion of the platinum not, indeed.
Corrosion is the wrong word here. What does happen, is that other metal oxides and insoluble (calcium) salts will start building up on the electrodes over time as a result of all the chemical reactions that take place there.
Use of high frequency (3-300 kHz) AC instead of DC when measuring is another way to prevent this, as it basically reverses these reactions.

Migration (aka plating) happens slowly at these potentials, however it is cumulative. You could use AC but its not a perfect solution because particles in solution will not likely return to the same spot when the current is reversed.

A "better" method is to only power the sensor for a very short period of time, take your measurement then remove power. This is not a "solution" but will increase the life of the sensor by the dutycycle. So if you read for 1 ms every second, the life increases by about 1000.

You will still have the problem of the liquid being absorbed by the board and the "very large" variation with changes in conductivity.

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