Ok, this now is one of the most fun tasks in development: finding the adequate sensor for our application. Wait: what was our application? Ah, yes: Fluid volume measurement in the process of drinking.
If you ask your favorite web search for “flow sensor” you will be overwhelmed by the range of possible devices and sensing principles, which I don’t want to discuss here is detail. Let’s narrow it down to what we need:
- size: small sensor, which we can fix to a cup
- price: it should only cost a few bucks
- detactable flow speed should cover the range of slow drinking (no liters/second)
- food safety of the used materials
With these requirements, we end up with a way smaller range, and all possible sensors there work with the same principle: the moving fluid forces the rotation of a small magnet. The magnet’s alternating field is detected by a hall sensor. As hall sensors come as tiny, simple and cheap components, we can even ignore the sensor’s electronics and build our own. Perfect for hacking! And – probably even more important – a we do not need a direct contact between the hall sensor and the fluid. The magnetic field easily penetrates through some mm of plastic.
I ordered a few samples of the device type “MJ-HZ41WB” from a Chinese manufacturer, selling for 5$
Tests with this sensor were quite successful. Using an Arduino to count the pulses of the hall sensor while drinking through it, I got reproducible results. The values were quite close to the linear graph provided with the datasheet:
Playing with the device, I discovered that the sensor contained a tiny capsule with the moving magnet, secured by a small metal retainer ring. One sensor got sacrificed to get this capsule out, and [wow!], what an example of clever engineering! The plastic capsule itself serves as the bearing and the flow manipulation mechanism. As you can see in the pics, one side has turbine-line shovels in the fluid’s path, which make the fluid spin. The spinning fluid in return applies a force on the cross-shaped magnet and makes it turn. The rotation speed correlates with the speed of the fluid passing through.
I have seen different, expensive sensors with a complex, magnetic micro-turbine inside. Here, the magnetized ferrite can be a simple cross, the PTFE housing serves as excellent bearing. Simple and cheap.
So: the whole functionality of the flow sensor is more or less contained within this tiny capsule, which could be easily integrated in any other structure. I contacted the manufacturer and asked if I could get the capsules only, and I did. They cost only incredible 1$ if ordered in larger quantities. What a perfect start for a promising project!