This project presents a sound-based system for automatic water filling using an ESP32 microcontroller. The system analyzes audio signals generated during filling to detect when a cup is nearly full and stops the pump to prevent overflow.
This project presents the design and implementation of an automated water filling system based on sound analysis, aimed at improving the precision of conventional water dispensers. Many existing systems fail to accurately detect when a container is full, leading to overflow or underfilling. To address this issue, a solution was developed using an ESP32 microcontroller, a microphone sensor, and a water pump controlled through a relay.
The system operates by continuously monitoring the sound produced during the water filling process. Experimental analysis conducted in a controlled environment revealed a clear relationship between the sound signal amplitude and the water level in the container. Specifically, the amplitude of the recorded signal decreases over time as the cup fills. Based on this observation, an initial algorithm was developed to detect when the signal amplitude drops below a predefined threshold, indicating that the cup is nearly full.
Following laboratory validation, the system was tested in real-world conditions. During this phase, several challenges were identified, including sensitivity to noise, premature stopping, and overflow due to residual water in the pipeline. To overcome these limitations, improvements were introduced. The system was adjusted to stop filling at approximately 90% capacity to compensate for remaining water flow, and a more robust detection method was implemented by calculating average sound intensity values over multiple samples and comparing them to reference values obtained in controlled experiments.
The final algorithm samples audio signals at a fixed frequency, computes average values for each segment, and determines fullness based on consecutive readings falling below a defined threshold. This approach significantly improves reliability and reduces the impact of noise.
The results demonstrate that the system achieves high accuracy across different cup sizes, shapes, and materials. The project successfully meets its objectives and highlights the potential of sound-based sensing for real-world automated dispensing applications.
