We’ve built two generations of venturi pipes to measure flow – the first one and a bigger, sturdier one. Both are now retired. The main pump’s flow is measured by an ifm SM6020, a magnetic-inductive flow meter, and the Raspberry Pi gets a pulse for every millilitre that passes.

No moving parts, nothing in the way
A magnetic-inductive meter uses Faraday’s law: a conductive liquid moving through a magnetic field induces a voltage proportional to its speed. There is no impeller to jam with grain and no narrowing to clog – the wort just flows through an open pipe. The only requirement is that the liquid conducts electricity, and both tap water and wort do so easily.
| Type | ifm SM6020, magnetic-inductive |
| Measuring range | 0.05–35 L/min |
| Media | Conductive liquids, at least 20 µS/cm |
| Medium temperature | −20 to 90 °C |
| Pressure rating | 16 bar |
| Accuracy | ±(0.8 % of the reading + 0.2 % of full scale) |
| Repeatability | ±0.2 % of full scale |
| Response time | < 0.25 s |
| Connection | G ½ (DN15) |
One pulse per millilitre
The SM6020 has a configurable pulse output, and we set it to one pulse per millilitre. The 24 V pulses go through an optocoupler to a GPIO pin on the Raspberry Pi, so the Pi stays isolated from the sensor wiring. An interrupt counts every rising edge, and from there everything is arithmetic:
- Volume is simply the number of pulses × 1 mL.
- Flow is the number of pulses in the last half second, converted to L/min. One pulse in half a second is 0.12 L/min, which is plenty of resolution for a home brewery.
What we use it for
Recirculation. The flow is shown live on the brew screen and in Home Assistant. Combined with the pressure under the false bottom it gives us the resistance of the grain bed and how fast it is changing – an early warning before the mash sets.
Filling to an exact volume. We set the target in Home Assistant and press Start fill. The controller first checks that the valves are set right – only the mash inlet open – then opens the fresh water valve and counts. When the target is reached the valve closes and a notification lands on the phone. A session counter and a running total keep track of how much water went in.
