ESP32 Pipe Leak Location System

ESP32 Pipe Leak Location System

ISEF Category: Embedded Systems

Ready to Turn This Idea Into a Real Project?

This guide was put together with the help of AI research tools to give you a solid starting point.But a competitive science fair project lives in the details: refining your research question, fine-tuning your variables, analyzing your data, and presenting your findings like a seasoned scientist.

For next steps tailored to your interests, skill level, and timeline, work one-on-one with a MehtA+ mentor. Learn more about MehtA+ Science & Engineering Research Mentorship →

Subcategory: Internet of Things  ·  Difficulty: Intermediate  ·  Setup: School Lab  ·  Time: 1 to 2 Months

The Hook

A tiny leak can waste hundreds of gallons before anyone notices. Pipes also act like a whisper network, carrying vibration along the metal or plastic. If you can compare those vibrations at two points, you can estimate where the leak sits. That turns a simple sensor project into a real search tool.

What Is It?

This project uses two sensors on a pipe to listen for vibration from a leak. Think of it like trying to find where a clap happened in a hallway. The sound reaches each sensor at a slightly different time, and that time gap gives you a clue about location.

The core idea is called time-difference-of-arrival. That means you measure how much later one signal arrives than the other. Cross-correlation is the math trick that helps you find that delay. You compare the two waveforms and look for the best match after one is shifted in time.

Your sensors can be piezo contact mics, which pick up vibration through direct contact with the pipe instead of air sound. An ESP32 reads the signals and sends data for analysis. If you test the system against known leak points or controlled micro-leaks, you can see how well the location estimate matches reality.

Why This Is a Good Topic

This is a strong science fair topic because you can test one clear variable, measure a real signal, and compare your estimate against a known leak position. It connects to water loss, building maintenance, and smart home monitoring. You can also learn sensor placement, signal processing, calibration, and error analysis without needing a university lab.

Research Questions

  • How does the distance between two piezo sensors affect leak-location accuracy?
  • What is the effect of pipe material on cross-correlation signal quality?
  • Does sensor clamp pressure change the strength of the detected vibration signal?
  • To what extent does leak size change the time-delay estimate between nodes?
  • Which sensor spacing gives the lowest location error for a given pipe length?
  • How does background household noise affect false leak detections?

Basic Materials

  • ESP32 development board.
  • Two piezo contact microphones or piezo discs.
  • Breadboard and jumper wires.
  • Resistors for basic signal conditioning.
  • Computer with USB cable for data logging.
  • Pipe section, or access to a test pipe setup.
  • Pipe clamps or tape for mounting sensors.
  • Known leak source or controlled micro-leak setup approved by a teacher or adult.
  • Measuring tape for sensor spacing and ground truth position.
  • Notebook or spreadsheet for recording results.

Advanced Materials

  • ESP32 development board with external ADC if needed.
  • Two or more calibrated piezo contact sensors.
  • Differential amplifier or signal conditioning circuit.
  • Oscilloscope or logic analyzer for waveform validation.
  • Pipe test rig with interchangeable pipe materials.
  • Precision leak fixture or flow-controlled micro-leak source.
  • Reference microphone or accelerometer for comparison testing.
  • DAQ system or audio interface for synchronized sampling.
  • Mounting brackets with repeatable clamp force.
  • Acoustic isolation materials for repeatability checks.

Software & Tools

  • Arduino IDE: Programs the ESP32 and streams sensor data to your computer.
  • Python: Processes waveforms, runs cross-correlation, and calculates location error.
  • NumPy: Handles signal arrays and numerical calculations for timing analysis.
  • Pandas: Organizes trial data, sensor settings, and error metrics.
  • ImageJ: Helps if you also analyze pipe photos, clamp placement, or leak setup images.

Experiment Steps

  1. Define the exact leak-location question you want to answer and the pipe setup you will test.
  2. Choose the one sensor geometry you will hold constant, such as spacing, clamp type, and pipe material.
  3. Design a data pipeline that keeps the two sensor signals synchronized and easy to compare.
  4. Plan a calibration method that converts time delay into distance along the pipe.
  5. Build controls that separate real leak vibration from background noise and handling noise.
  6. Decide how you will judge success, then compare predicted leak positions against known positions.

Common Pitfalls

  • Mounting the two sensors unevenly, which creates timing differences that look like leak location errors.
  • Testing on a pipe with loose fittings, which adds random vibration that hides the leak signal.
  • Using unsynchronized sampling, which makes cross-correlation peaks unreliable.
  • Ignoring pipe material changes, which makes results from metal and PVC look the same when they are not.
  • Changing clamp pressure between trials, which alters signal amplitude and shifts your detection threshold.

What Makes This Competitive

A class-level version of this project finds a leak. A stronger version explains when, why, and how the method works best. You can push it by comparing pipe materials, sensor spacing, and leak sizes with the same analysis pipeline. Strong statistical treatment, careful controls, and a clear error model will make your work stand out.

Project Variations

  • Test the system on copper, PVC, and PEX pipes to see how material changes vibration travel.
  • Compare piezo contact microphones with accelerometers to see which sensor gives cleaner timing data.
  • Add a third sensor node and test whether a multi-node setup improves location estimates in noisy conditions.

Learn More

  • NIH PubMed: Search for review articles on pipe leak detection, acoustic sensing, and cross-correlation methods.
  • NASA Open Data Portal: Explore signal processing examples and sensor data analysis workflows you can adapt.
  • MIT OpenCourseWare Signals and Systems: Review the math behind correlation, sampling, and time delay estimation.
  • USGS Water Science School: Learn why water loss matters and how leaks affect water systems.
  • IEEE Xplore: Search for conference papers on acoustic leak detection in pipelines and IoT sensing.
Shopping Cart