Inspiration
This monsoon season, Arizona’s roads flooded again and again. At 40th St & Camelback in Phoenix, a driver went into floodwater about 4 feet deep, and moments later a second car drove into the same spot. In Tucson, firefighters made four swift-water rescues on Wilmot Road in one day, and each time the driver had driven into the flooded road. Outside Maricopa, a sheriff’s helicopter had to lift two people out of a car stranded in floodwater on SR 238. In Cordes Lakes and Benson, people died when their cars were swept away. We noticed two things. First, these floods keep hitting the same places: washes, low-water crossings and dips. Second, Phoenix floods aren't like river floods that build for days. A storm miles away can fill a dry wash in minutes, and the road looks fine right up until it isn't. Just 6 inches of fast-moving water can knock an adult off their feet, and 12 inches can carry away a car. Navigation apps go by area-wide Flash Flood Warnings that cover the whole metro, so they can't say which road is underwater right now. So we built TADDPOLE: Turn Around Don't Drive: Protecting Overly Lackadaisical Earthlings, a low-cost sensor that watches a known flood spot and warns people before they drive into it.
What it does
TADDPOLE is a simple to make roadside flood sensor plus a backend that turns its readings into early warnings.
Detect: An ultrasonic sensor mounted above a wash or dip measures the distance down to the surface. Since we know how high it's mounted, that gives the water depth without touching the water.
Verify with AI: A distance sensor can't tell water from a car parked under it. Whenever the distance suddenly gets shorter, a camera takes a photo and Gemini decides what happened: flood_water, object_under_sensor, object_and_water, nothing, or unclear. If something is blocking the sensor, that reading is ignored and the last depth is kept. A stalled car never looks like a flash flood, and a car stuck in a flood doesn't hide the real water level.
Predict: Every reading is stored in Tiger Data as time-series data.
Warn: Send alerts through the application to tell warn the user of the upcoming flooded road.
How we built it
Hardware
- Arduino UNO R4 WiFi + RCWL-1655 waterproof ultrasonic sensor + pointing down at the "road."
- Seeed Studio XIAO ESP32-S3 Sense as the camera: a thumb-sized board with its own camera and Wi-Fi. It serves a photo on request, so the camera and sensor need no wires between them.
- At startup the R4 measures the dry floor distance $$h_0$$, so the water depth is $$d = h_0 - d_{\text{surface}}$$.
- The R4 sends a reading over Wi-Fi every second and based on the risk level the server sends back.
Backend
- Gets the readings and decides when the camera should take a photo: when the depth first rises, on any sudden jump, every few seconds while the water stays high, and once more when it clears.
- Grabs a frame from a Seed ESP-32S3 and sends it to Gemini (3.5 Flash) along with the current depth reading. Gemini replies in a fixed JSON format, so every answer is a clean category plus a one-sentence reason.
- A sudden jump isn't believed until Gemini has looked at it. If Gemini says an object is in the way, those readings are marked
trusted = false. - If Gemini determines that the change in readings is due to the building rain water, the road turns 🔴in the application, so a fast-rising wash gets flagged while it's still shallow.
Data (Tiger Data)
readingsis a hypertable of every depth reading, with atrustedflag.camera_eventsstores every Gemini verdict, its reason, and the photo's filename.time_bucketqueries turn the history into per-minute summaries for charts.
Challenges we ran into
- Avoiding false positives. This was our biggest challenge. An ultrasonic sensor only measures distance, so a car, a person or debris under it looks exactly like rising water. That's why we added a camera: whenever the distance suddenly gets shorter, it takes a photo, and Gemini decides whether it's flood water, an object, or an object standing in water. Readings blocked by an object are ignored, so a parked car never triggers a flood warning.
- Camera latency. Sending each photo to Gemini and waiting for a response slowed our sensor data down a lot. A flood warning is only useful if it's fast, so we had to balance how often we checked with Gemini against keeping the depth readings real-time.
- It has to be independent. We can't have a bulky laptop and a large camera if we want to deploy and maintain these across a community. Keeping everything on small hardware makes the product adaptable.
Accomplishments that we're proud of
- Real-time testing, real water. Most flood projects fake their data because hackathon demos don't wait for weather. Ours runs live: pour water into the tub and the readings, risk level and lights change within seconds.
- It warns before the flood. Flagging a road while the water is still shallow but rising was difficult to get right, but it's important because that's exactly how Arizona flash floods behave: a dry wash can become dangerous within minutes.
- Three layers working together: a cheap sensor for fast readings, the Gemini API for judgment, and Tiger Data to see the trend over time.
- We adapted to our resources. We had some Arduinos beforehand, but no stand or way to position everything. We scraped together materials for a working demo while working within the physical constraints.
- We isolated our hardware. We started with multiple power cords, batteries and connections, tying together a couple of laptops and several Arduinos to coordinate everything. By the end, we had it down to just an Arduino, the sensor and a camera, with a single power source. It fits in a small box and is easy to move and set up again.
What we learned
- Depth isn't enough. Our depth sensor would falsely send flood signals when a hand briefly moved under, or shoe flashed by it. We needed to add verification to avoid these false positives, where we used Gemini API.
- Desert flash floods are a different problem Rain forecasts and 311 reports miss a dry wash that fills in minutes, often in lesser-driven streets that only the community is aware of. Our project enables the community to have a hand in keeping the streets safer from dangerous weather.
- Time-series data is a natural fit. "How fast is it rising?" is a question about trends, and storing every reading made prediction possible.
- Practical skills: ultrasonic timing and filtering, Arduino Wi-Fi, Seeed Microcameras, and getting fixed-format JSON out of an AI model.
What's next for TADDPOLE
- Philanthropic deployment: with support from local agencies such as city government and school districts, we believe these devices can be installed in communities around the Valley at no direct cost to residents.
- An extension, not a replacement: we're not trying to replace the map apps people already use. TADDPOLE's live feed of flooded crossings can be incorporated into existing maps like Waze for Cities. Additionally, it can tie into ALERT and other weather monitoring services available in Arizona, filling their holes in coverage since they watch over large scale weather instead of community roads.
- Community focus: neighborhoods know which crossings flood every year, so communities would help decide where devices go.
- A reinforced structure: with more time, we'd build a real roadside unit (weatherproof housing, solar power, cellular or LoRa connectivity) that can survive actual flooding.
- Instant alerts between drivers: the moment a crossing turns red, warn everyone heading toward it, so the second car never follows the first.
Built With
- alert
- amazon-ec2
- arduino
- docker
- esp32-s3
- fastapi
- flooding
- gemini-api
- openstreetmap
- python
- react
- tiger-data
- typescript
- water