This page describes a way to remotely measure the water level in a tank.
The principle is the same as traditional pneumatic level gauge, excepted that the dial indicator is replaced by a pressure transducer, and the manually-operated pump is replaced by an aquarium air pump.
When the pump is on, air flows through the weighted PVC pipe to the bottom of the tank, where bubbles appear. At this moment, the air pressure in the PVC pipe is equal to the hydrostatic pressure at the bottom of the tank. As the water pressure at the bottom of the tank is directly proportional to the water level, the same goes for the air pressure in the PVC tube. The air pressure is then converted to an analog voltage by the pressure transducer. This voltage can be read easily by the arduino.
A big advantage of this method with regards to other existing techniques is that no electronic or metallic parts needs to be placed in the tank, where the environmental conditions (mainly humidity) are not favorable. This avoids any risk of corrosion.
Transparent 6/4 PVC tube (6mm outside diameter, 4mm inside diameter) is used here. This one is compatible with the pressure transducer, the one-way valve and the air pump.
The purpose of this component is to prevent the air pressure dropping in the PVC tube when the pump is turned off. Most aquarium air pump are not airtight. Without the one-way valve, the air pressure in the PVC tube would rapidly drop to the atmospheric pressure, and water would enter the tube as soon as the pump is turned off.
The air pump must be powerful enough to make bubbles at the bottom of the tank when it is full. Some pumps may have an one-way valve integrated. If this is the case, there is no need to add another one on the circuit.
Different transducers are suitable. Freescale MPX5050 is one of them. This transducer provides a DC voltage directly proportional to the air pressure. The transducer choice must be driven by its sensitivity (in mV/kPa) and its pressure range (the maximum pressure is obtained when the tank is full).
The MPX5050 pressure transducer output can be directly connected to an arduino analog input. A small RC network is recommended for noise reduction. Optimal R and C values are usually given in the transducer datasheet or application note (750 Ohms / 330nF for the MPX5050).
The air pump is interfaced via an optocoupler and a triac (like the MOC3023 and TIC216). As the pump is an inductive load, proper RC network must be installed on the triac, otherwise it may never turn off. Optimal values depend on triac choice (sensitive gate or not) and can be found in component datasheets.
The pump doesn't need to be working all the time, but only when a measurement is wanted. To the other hand, when the pump is working, rapid pressure variations occur in the pipe, probably due to the bubbles. Therefore, when a measurement is wanted, the pump must be turned on a few seconds (eg 10s, sufficiently for bubbles to appear), then it must be turned off and the measure can be carried on shortly after (eg 100ms). This can be easily implemented in the arduino software.