ESP32 Road Quality Mapping Project

ESP32 Road Quality Mapping Project

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: Advanced  ·  Setup: University Lab  ·  Time: Full Year

The Hook

Your car can spot a pothole before your tire does. That matters because bad roads cost time, money, and safety. The cool part here is privacy. Your system can measure road quality without sending any video off the device.

What Is It?

This project uses a tiny camera computer, the ESP32-CAM, to look at the road from inside a car and decide what it sees right away on the device. That local processing is called edge computing. Instead of uploading images, the system sends only the road-quality result, like a pothole alert or lane-quality score.

Think of it like a bouncer at the door. The ESP32-CAM checks the scene, makes a quick decision, and lets only the summary out. That keeps images private and saves bandwidth. It also gives you a real engineering challenge, because the device has very limited memory and processing power.

The crowdsourcing part turns many drives into one shared map. If several trips report rough road segments, you can combine those signals into a heatmap and compare it with OpenStreetMap roads. That lets you study not just detection accuracy, but also how well the system turns messy real-world observations into useful city-scale data.

Why This Is a Good Topic

This is a strong science fair topic because you can test a real engineering tradeoff: privacy, speed, accuracy, and memory use. You can change the model size, detection threshold, or map aggregation method and measure how each choice affects results. The project connects to road safety, urban infrastructure, and low-cost smart-city tools. You can learn embedded AI, data logging, geospatial analysis, and experimental design in one project.

Research Questions

  • How does model size affect pothole detection accuracy on an ESP32-CAM?
  • What is the effect of road speed on lane and pothole detection stability?
  • Does on-device image preprocessing improve detection accuracy under changing light?
  • To what extent does camera mounting angle change false positives on road defects?
  • Which heatmap aggregation method best matches manually verified rough-road segments?
  • How does compression of event data affect the accuracy of the final road-quality map?

Basic Materials

  • ESP32-CAM board with OV2640 camera module.
  • USB to serial adapter for programming the ESP32-CAM.
  • MicroSD card and adapter for local event logging.
  • Smartphone with GPS tracking app.
  • Car phone mount or suction mount for the camera.
  • Power bank or 5 V car USB adapter.
  • Laptop for coding, flashing firmware, and exporting logs.
  • Measuring tape or ruler for mounting geometry checks.
  • Notebook for route labels and ground truth notes.

Advanced Materials

  • ESP32-CAM board with external antenna option.
  • USB oscilloscope or logic analyzer for debugging serial timing.
  • GPS module with higher sampling stability.
  • Inertial measurement unit for bump and vibration logging.
  • Raspberry Pi or laptop for reference-model benchmarking.
  • Calibrated dashcam or action camera for independent validation video.
  • OpenStreetMap editing tools for map alignment checks.
  • GIS software for spatial clustering and heatmap comparison.
  • Battery pack with regulated output for repeatable drive tests.

Software & Tools

  • Arduino IDE: Programs the ESP32-CAM and manages serial debugging.
  • PlatformIO: Organizes larger firmware projects and library dependencies.
  • Python: Cleans detection logs, joins GPS data, and runs analysis.
  • QGIS: Maps road-quality points and compares them with road layers.
  • ImageJ: Helps inspect sample frames and check image quality before testing.

Experiment Steps

  1. Define the single road feature you want to detect first, such as potholes, lane markings, or both.
  2. Choose the smallest signal your device must report, then decide how you will score success with ground truth labels.
  3. Build a baseline pipeline that captures frames, runs inference locally, and logs only summary events with location data.
  4. Plan a calibration set that represents bright sun, shade, dusk, wet pavement, and rough pavement.
  5. Design a map aggregation rule that turns scattered detections into a road-quality heatmap.
  6. Set up a comparison against a simpler baseline, such as GPS-only roughness logging or off-device image labeling, to test the value of edge processing.

Common Pitfalls

  • Mounting the camera at a changing angle, which makes lane geometry and pothole size shift between drives.
  • Training on clean sample images but testing on noisy windshield footage, which causes false confidence.
  • Logging GPS points too sparsely, which smears defects across the wrong road segment.
  • Treating every bump as a pothole, which inflates the heatmap with vibration noise.
  • Ignoring lighting changes from shadows, glare, and dusk, which makes detection fail outside the test route.

What Makes This Competitive

A stronger version of this project does more than detect a road defect. It compares at least two edge-AI designs, measures their speed and power cost, and tests them on roads that vary in lighting and surface type. You can also evaluate spatial accuracy, not just frame-level accuracy, by asking how well the final map matches verified rough segments. That kind of systems-level analysis looks much more serious than a simple demo.

Project Variations

  • Focus only on lane-marking quality and test how wear, shadow, and rain change the score.
  • Replace pothole detection with speed bump and crack detection to compare which road defects are easiest for edge AI.
  • Compare local-only logging with compressed event uploads to see how much map quality changes when bandwidth is limited.

Learn More

  • ESP32-CAM documentation: Search the Espressif docs for camera setup, memory limits, and example projects.
  • OpenStreetMap Wiki: Search the wiki for road tagging, mapping, and data quality workflows.
  • NASA Earthdata: Search for remote sensing and geospatial methods that compare surface features across maps.
  • NIH PubMed: Search for review articles on edge AI, privacy-preserving sensing, and mobile computer vision.
  • MIT OpenCourseWare, Introduction to Computer Science and Programming in Python: Use the Python material to learn data cleaning and analysis.
  • QGIS Documentation: Use the free docs to learn mapping, spatial joins, and heatmap creation.
Shopping Cart