Here is one simple design idea of a self-contained optical liquid sensor, realized using generally available electronic components. The sensor is designed specifically for liquid level detection by non-contact methods in clear or very translucent pipes. The sensor, features an infrared light beam from an infrared light sender that becomes refracted and undetectable by the infrared light receiver when the liquid is present, can be mounted on a pipe that is between 3 to 13mm in diameter. This compact and non-invasive sensor device runs on 12 Volt DC. The ‘thru scan’ principle where liquid refracts light beam insures reliable detection, and the Infrared beam technique can help penetrate slurries and other solids with similar detection effect as water/liquid.
This optical liquid sensor was originally designed for a small-scale industrial application, but will also find many hobby/domestic applications. Note that the circuit is designed with simplicity as the top priority. The supply voltage of 12V is usually suitable for industrial use, and the sensor connections are protected against polarity reversal. The infrared sender is built around a common infrared light emitting diode (IRLED1), in the prototype, the 5mm-type IR333-A from EVER LIGHT, which is a high intensity diode molded in a blue transparent plastic package. Similarly, the infrared receiver (IRPD1) is realized with the help of LITE-ON’s LTR-3208E photo transistor available in a 2-pin/5mm special dark plastic package that cut the visible light. However, note that the indicated part numbers of the infrared sender and receiver (IRLED1 & IRPD1) components are not very critical!
When powered, the infrared light sender (IR LED1) lights up. Resistor R1 (470R) is used here to limit the operating current of the infrared LED. In case of a no-liquid condition, light from the infrared sender falls on the infrared receiver with the result that the infrared receiver energises the electro-magnetic relay (RL1) via the driver transistor T1. The spdt (1 C/O) contacts of the relay can be used to turn off an external electric device, or to turn on an acoustic sounder like an alert beeper.
Assemble the circuit on a general-purpose circuit board and after initial testing try to enclose the whole circuit in a suitable forked-box. The 470-Ohm value of the resistor R1 works well with most liquids, but you can increase or decrease this value as per the actual demand. It is recommended that the fabricator must evaluate the water/fluid/chemical combination/mixing situation to determine which resistor value works best before finalizing the design.
Finally note that the detection depends on the index of refraction and the transparence rate of the pipe and the object and the thickness of the pipe.