How much water is left decides everything else: whether to spray continuously, cycle, or save the last water for gel. A tank gauge you can read remotely is one of the most useful sensors in any system.
Ways to measure it
| Sensor | How it works | Notes |
| Submersible pressure sensor | A probe on the tank floor measures water pressure, which is proportional to depth | Accurate and robust; usually 4-20 mA output; needs a vented cable |
| Ultrasonic | Measures the distance from the top of the tank to the water surface | No contact with water; condensation, foam and tank shape can confuse it |
| Float switches | Change over at a set level | Simple and reliable; tell you only "above or below" |
| Calculated from flow | Start level minus the water pumped out | A useful backup if the gauge fails; errors accumulate |
Getting a good reading from a 4-20 mA sensor
- A 4-20 mA loop sensor draws 4 mA at zero depth and 20 mA at full scale. A shunt resistor (about 235-250 ohm) turns that into a voltage an Arduino can read.
- Keep the vent tube clear. The cable carries a small tube so the sensor can compare water pressure with air pressure. A blocked or kinked vent turns temperature changes into false depth changes.
- Calibrate against a water meter: draw the tank down, refill it through a meter, and compare litres with the change in reading. Work out litres per centimetre from the tank's diameter.
- Filter glitches: take several quick samples and use the median. Real levels change slowly, so a few seconds' smoothing costs nothing.
- Solder the shunt joints: a loose or heat-sensitive joint shows up as a daily drift that follows the afternoon heat.
- Recognise a failed gauge: a reading below the 4 mA level means a cut cable or dead sensor - not an empty tank. Don't let a burned cable shut the pump down.
Buying a depth sensor
The cheapest source is AliExpress, where submersible pressure-type level sensors (search for "submersible level transmitter" or "QDY30A") cost roughly $40-100 depending on range and cable length; waterproof ultrasonic sensors (e.g. JSN-SR04T) are under $10. When ordering, choose:
- Range: a little more than the depth of your tank (e.g. 0-5 m for a 3 m tank). A much larger range wastes resolution.
- Cable length: enough to reach from the tank floor to where it will be read, without a joint - the cable carries the vent tube.
- Output: the same probe is usually offered with several kinds of connection (below). Pick one before you order.
The different connections, and reading them with an Arduino
All of them can be read by an Arduino.
| Output | How it works | Reading it with an Arduino | Watch for |
| 4-20 mA current loop (2-wire) | The sensor sets the current in its own supply loop: 4 mA at zero depth, 20 mA at full range | Put a resistor (about 235-250 ohm) in the loop and read the voltage on an analog input; or use a cheap "4-20 mA to voltage" converter module (a few dollars on AliExpress) with zero and span adjustments | Needs a 12-24 V supply. The most robust choice: long cables and electrical noise barely affect a current, and a reading below 4 mA shows the cable is cut |
| Voltage (0-5 V, 0.5-4.5 V, 1-5 V or 0-10 V) | The sensor outputs a voltage in proportion to depth | Straight to an analog input for 0-5 V outputs; 0-10 V (or any output on a 3.3 V board such as an ESP32) needs a resistor divider | Simplest to wire, but long cables and noise disturb the reading more. 0.5-4.5 V and 1-5 V outputs can tell a dead sensor from an empty tank; 0-5 V cannot |
| RS-485 (Modbus RTU) | A digital signal: the board asks the sensor for its reading and it replies with a number | Needs an RS-485-to-TTL converter module (e.g. MAX485, about $2) and a Modbus library; the sensor's address, baud rate and register must be set to match | No analog calibration and good over long cables, and several sensors can share one cable, but there is more to get working; a lost reply needs handling in the code |
| Ultrasonic (separate sensor type) | Times an echo from the water surface | Two digital pins (trigger and echo), or a serial output on some models | Mounted in the tank top; condensation, foam and the tank's shape can confuse it |
For most systems 4-20 mA is the best compromise. ARMAC began with an RS-485 depth sensor, had difficulties with it, and changed to a 4-20 mA probe.
The ARMAC approach
- A QDY30A 4-20 mA submersible sensor (0-5 m range), bought on AliExpress, on a vented cable sleeved in fire-resistant silicone.
- A 235 ohm soldered shunt read by an Arduino analog input, calibrated against the house water meter (about 95 L per cm in ARMAC's 30,000 L tank).
- The median of 9 quick samples for each reading, then the median of 5 seconds of readings: this removed most of the 10-20 cm electrical "jumps" seen in the raw data.
- If the gauge fails, the controller estimates the level from the flow meters and carries on; a planned float switch at 0.30 m will give an independent check.
Details: Sensors on ARMAC.AU (tank water level section).
Pages here are kept under the Site Editor's control; see Contributing to add to them.
Discuss this page
Questions, corrections or your own experience of this topic? Add a comment below. You need to be signed in to the forum to comment.