An Arduino project of mine involves measuring the amount of water that falls through a liquid dispenser. It is imperative that this value is EXACT since this will be used for further calculations. Now, I have considered and eliminated the following options:

  1. Floating liquid level sensor - Simply not accurate enough. Also, base area of container is much larger than height, so tiny change in height would mean a huge change in volume.
  2. Ultrasonic sensor - An obvious no go simply because of how inaccurate it would be.

So, that leaves me with this:

  1. Counting the number of drops that fall through and multiply by volume of each drop. Lets say I know the volume of each drop. Now, to count, what I have in mind is placing an IR transmitter and receiver below in a way that a water droplet would fall right through the IR beam, and this interference would hopefully be registered by the Arduino. What I want to know, is whether this will actually work. Is the water droplet too small an object to be registered? Are there any other flaws? Is there an easier and better way to do this? Also, here is what I intend to use:

enter image description here

  • 2
    \$\begingroup\$ "EXACT" is not a technical specification. You need to define a realistic specification with an accuracy tolerance. \$\endgroup\$ – Transistor Aug 2 '20 at 20:08
  • \$\begingroup\$ Can you guarantee the exact volume of each drop? Will it change with temperature? \$\endgroup\$ – Solar Mike Aug 2 '20 at 20:14
  • \$\begingroup\$ Please research how rain gauges work (tipping cup, for example). Sometimes it is fun and you can learn a lot by doing something without trying to find out how other people have done it before. But if you have any kind of time or resource constraints, it is usually better to investigate prior work on the same problem. So unless you are on an open-ended voyage of discovery, you should copy the techniques used by rain gauges. \$\endgroup\$ – mkeith Aug 2 '20 at 20:37
  • \$\begingroup\$ instructables.com/id/Arduino-Weather-Station-Part3-Rain \$\endgroup\$ – mkeith Aug 2 '20 at 20:40
  • \$\begingroup\$ A beam-break detector might be able to count drops. But it depends on the extent to which the liquid actually breaks the beam. I think that you will have to build it and try it. I don't think you need a complicated circuit. Just a photo-diode and photo-detector. When any object interrupts the path between emitter and detector, you can count that with your arduino. \$\endgroup\$ – mkeith Aug 2 '20 at 20:42

I suggest you use a peristaltic or other kind of positive displacement metering pump and dispense with (so to speak) trying to measure the fluid flow directly.


First, water droplets usually form in pairs of unequal size. Counting droplets would not be accurate.

Second, liquids cling to the walls of a container, to a lesser or greater extent, due to adhesion vs. surface tension (cohesion). Most measurement methods would not account for liquid left after container appears to be empty.

Third, you omitted measuring the mass of liquid left, e.g. with a strain-gauge scale.

Finally, "EXACT" is meaningless. To the nearest gram? Microgram? Nanogram???


Let the water come from a container which is on a scale. Measuring weight shouldn't be a problem. Be sure that refilling and water consumption are not simultaneous.

BTW People here have said several times that exact=nonsense in practical constructions. They are right. Exact exists only in math and logic. You should start by determining the tolerance and tell something of the volumes vs time.


Not the answer you're looking for? Browse other questions tagged or ask your own question.