Virtual Instrumentation-Based Simulation and Monitoring of A Control Valve in A Water Flow System Using ESP32 and MATLAB

26 Oct

Authors: Ishayu Basu, Adhrit Ghosh, Ananya Misra, Dr. Saravanakumar R

Abstract: This paper presents a low-cost virtual instrument for observing the operation of a manually actuated control valve in a water flow system. Two digital vibration sensors are clamped to a pipe section near the valve and connected to the GPIO pins of an ESP32 microcontroller. The ESP32 samples both outputs, attaches a millisecond timestamp to every sample and streams the result as comma-separated text over a USB virtual serial port at 115200 baud. A MATLAB application, named AQUAGUARD, reads and parses the stream and presents a software front panel consisting of a status card for each sensor, two live strip charts over a 15-second moving window and a footer line that summarises the combined sensor state. The rationale is that flow through a partly open valve generates turbulence, which excites pipe-wall vibration that a pipe-mounted sensor can detect as a change of state. Because the sensors give only a binary output, the instrument reports a change in vibration state rather than a flow rate, and no leak diagnosis is claimed. With the valve closed, the dashboard consistently received Sensor 1 = LOW and Sensor 2 = HIGH, which confirmed correct acquisition, serial parsing and display. A simulation mode of the dashboard, driven by synthetic data, is also used to demonstrate the panel behaviour for every combination of sensor states and for pulsed inputs. We also identify a limitation of the present firmware, which transmits only when at least one sensor is HIGH and therefore leaves a stale reading on the panel when both sensors fall LOW, and we describe the correction. The paper documents the architecture, hardware set-up, firmware, software design, operating procedure and a roadmap towards analog vibration sensing, data logging and closed-loop PID valve control.

DOI: https://doi.org/10.5281/zenodo.23658843