STEM I

STEM I is part of the STEM course taught by Dr. Crowthers, and it occurs during August through February. Students complete an Independent Research Project of their own topic choice. This involves brainstorming, background research, methodology, data collection, and reaching conclusions. Students practice technical writing, including a Grant Proposal and a Thesis.

Quad Chart

This Quad Chart gives a summary of my Independent Research Project. In my project, I am designing a robot that detects water repellent soils in post-wildfire environments and provides treatment through soil scarification. The purpose of this project is to accelerate ecosystem recovery after wildfires.

Designing a Robot to Measure Soil Hydrophobicity and Optimize Tilling for Hydration

Wildfires are becoming increasingly frequent, devastating ecosystems and degrading soil health. These disasters promote hydrophobic soil, which repels water and prevents plant regrowth. This project addresses that challenge by automating the detection and treatment of water-repellent soil. By designing a robot that performs soil hydrophobicity testing and delivers an adaptive treatment response, this system aims to accelerate land recovery after wildfires.

Abstract

Wildfires have become a dominant driver of forest loss, causing almost half of all tree loss per year between 2023 and 2024. This is a sharp increase from 2001-2022, when fires accounted for a quarter of annual tree coverage loss (MacCarthy et al., 2025). Forest recovery is only worsened when some areas of soil become hydrophobic, reducing water infiltration and creating conditions that hinder vegetation regrowth. Targeted interventions to remediate hydrophobic soils are critical for supporting reforestation and accelerating regrowth. Although methods such as the water droplet penetration time (WDPT) test are used to identify hydrophobic soils, conducting these processes is labor-intensive and prone to human error. This project focused on the creation of an automated robot for detecting and selectively treating hydrophobic soil. Water droplet behavior was analyzed through a computer vision model with OpenCV, which utilized image preprocessing and frame differencing to estimate WDPT values. To classify final-state soil absorption, two ResNet-18 convolutional neural networks were trained separately on sand and topsoil image datasets, enhancing detection across multiple soil textures. A robotic system was designed in CAD with a rack-and-pinion tillage mechanism capable of adjusting to various scarification depths to treat hydrophobic soils of different severities. This work presents a framework that integrates hydrophobic soil detection with an adaptive treatment. The proposed approach addresses limitations of existing methods and holds potential for improving post-wildfire soil restoration while minimizing soil disturbance.
Keywords: soil hydrophobicity, soil scarification, water droplet penetration time, tillage, wildfires, OpenCV, convolutional neural network

Graphical Abstract

Research Proposal

Engineering Need

Wildfires burn organic matter and alter soil properties, creating hydrophobic soil that prevents water infiltration.​

Objective

To build a robot that detects and autonomously tills hydrophobic soil to restore water absorption.​

Background

Background Infographic

As global climates become warmer and drier, wildfires are becoming increasingly frequent. Since the 1980s, there has been a tenfold increase in fire activity, burning millions of hectares of land worldwide. Large wildfires have increased in the United States at a frightening pace and are predicted to continue due to the changing climate and human activities (Farid et al., 2024). These events have substantial hydrogeological impacts, including effects on soil health and stability.

During high-severity wildfires, organic compounds such as waxes, lipids, and resins in vegetation are vaporized. These gases condense in the cooler soil layers as they move downwards, creating a hydrophobic coating that prevents water penetration. Soil hydrophobicity refers to a property of soil that repels water. A hydrophobic layer of soil prompts many issues, such as sediment in waterways, increased risk of debris flows and flash floods, higher erosion risks, and nutrient loss. The strength and depth of the hydrophobic layer can depend on the intensity and temperature of the wildfire, with water repellency increasing significantly between 175°C and 270°C. It can be seen in various textures of soil and often restores itself gradually with time (Li et al., 2021). However, water-repelling soil still hinders seed germination, plant growth, and overall ecosystem health, making its quick restoration critical. Furthermore, standard vegetation efforts will not be successful if the hydrophobic layer is not broken. Seeds will be less likely to germinate, and plants will struggle to access moisture.

One common method of detecting hydrophobic soil is the water droplet penetration time (WDPT) test. This test examines the time it takes for a water droplet to infiltrate the soil completely and is often used in the field to determine soil hydrophobicity. A material is considered water repellent if the time calculated is greater than 5 seconds. As time increases, the soil is classified as more hydrophobic (Ma et al., 2025). For instance, a WDPT time greater than one minute indicates strongly water repellent soil. The WDPT test is commonly preferred over other techniques because it is inexpensive and easy to perform in the field (Dekker et al., 2009).

After identifying hydrophobic areas, it is essential to treat the soil to prevent further degradation and to speed up the soil recovery process. Soil scarification through methods such as raking and tillage have been observed to improve water infiltration (Amami et al., 2021). Scarification mechanically breaks up the water-repellent layer of the soil and can increase its porosity, improving water penetration. Studies show that seeding combined with soil scarification has more seed growth than seeding without scarification (Rhoades et al., 2015). However, soil scarification has its risks. When applied to soil that is not hydrophobic, it can increase erosion risks by loosening the soil, making it vulnerable to factors such as wind. This makes distinguishing between hydrophobic and non-hydrophobic soil critical before treatment. Furthermore, the depth of the soil scoring should be carefully considered. While a lack of scarification can increase the chances of soil hydrophobicity, deep scarification can reduce organic matter in the soil (Šimon et al., 2009). As a result, breaking up the soil at an appropriate depth relative to the soil’s degree of hydrophobicity is the most effective method of water repellent soil recovery.

WDPT testing and tillage are time-consuming tasks prone to human inconsistencies (Wang et al., 2024). To make the process more effective and accurate, robots can be used to automate these tasks. Automation is especially important in post-wildfire environments, where terrain is unstable and unpredictable. One system addressing post-wildfire soil analysis is the Dropbot, a drone that conducts real-time hydrophobicity testing on rough terrain. It uses camera-captured droplets with AI analysis and light sensors to conduct WDPT testing. Its on-site data processing allows it to gain results without needing laboratory testing. Through these components, the Dropbot provides a field-ready system for soil characterization (Prakash, 2025). However, its primary focus is on data testing and acquisition rather than soil recovery and improvement. Another project for soil rehabilitation is the ReGenBot, a robot designed for soil analysis and treatment distribution. ReGenBot is a ground robot powered by solar energy that is equipped with tank treads for mobility and ultrasonic sensors for obstacle detection. It is able to collect data on nutrient content, temperature, and soil moisture and then distribute fertilizers and treatment based on user specifications. By measuring soil properties and delivering treatment, ReGenBot improves soil recovery. Still, this system mainly targets soil nutrients rather than hydrophobicity detection or physical soil restoration. Additionally, it depends on user interpretation of data and lacks autonomous decision-making (Vinokurova et al., 2022).

Although current robotic systems have improved post-wildfire soil analysis and treatment distribution, some limitations remain. Existing solutions focus on either soil characterization or treatment, rather than combining both processes into a single system. Additionally, many systems rely on user interpretations and fail to respond autonomously to the variability seen in hydrophobic soil. As a result, treatments may be added inefficiently or inappropriately, increasing erosion risks. These constraints highlight the need for a more targeted and responsive approach to post-wildfire hydrophobic soil recovery.

Procedure

Video data was collected using a fixed overhead camera positioned above oil-treated soil and sand samples to maintain a consistent field of view. The robot used for testing was designed in Onshape CAD software and fabricated using Bambu Lab 3D printers. Key components, including the motors, Raspberry Pi, peristaltic pump, camera, and electrical supplies, were purchased independently.

Because no publicly available datasets existed for this application, a dataset was independently created by dispensing water droplets of consistent volume onto soils with varying degrees of hydrophobicity. Hydrophobicity was simulated by treating the sand/soil with oil. The absorption process was recorded for each trial, with videos capturing droplets on sand, topsoil, and mixtures of sand and topsoil.

All video processing and analysis were conducted using Python. OpenCV was used for video input, region-of-interest (ROI) cropping, frame extraction, and pixel differencing. Videos were cropped to predefined ROIs to isolate droplet motion from irrelevant background regions, ensuring that analysis focused solely on water infiltration dynamics. This approach reduced background noise while improving computational efficiency and model accuracy.

Deep learning models were developed using PyTorch, with convolutional neural networks based on a ResNet18 architecture. Torchvision was used for image preprocessing and pretrained model weights. A CNN image classification approach was applied to the final frame of each video to determine whether absorption occurred within the recorded time. To account for visual differences in soil appearance, two separate models were trained (one for lighter soils/sand and one for darker soils), resulting in improved prediction accuracy.

Temporal analysis was used to determine the start and end times of the Water Drop Penetration Time (WDPT). Droplet impact was detected using background subtraction and motion detection, where increased pixel activity within the ROI indicated landing. Absorption time was determined by analyzing frames in reverse chronological order and comparing them to the final frame of the video, which served as a fully absorbed reference. This backward frame differencing approach enabled reliable detection even in cases where absorption occurred gradually.

Model performance was evaluated using metrics derived directly from predictions, including accuracy, precision, recall, F1-score, confusion matrices, and ROC/AUC curves. Predicted WDPT values were also compared to manual measurements to assess agreement between predicted and actual absorption times. This comparison was visualized using a scatter plot of predicted versus actual values and evaluated using regression metrics such as R², MAE, and RMSE.

Procedure Infographric
Figure 1

Figure 1. Scatter plot of predicted and measured WDPT for absorbed droplets. Manual measurements are shown in the gray line, and model predictions are highlighted as green points. MAE = 2.07 s, RMSE = 2.61 s, R² = 0.994.

Figure 2

Figure 2. Absolute WDPT error under three ambient lighting conditions with the robot camera’s LED held constant. Each point represents one trial, and horizontal lines indicate mean error per condition.

Topsoil CNN Model

Table 1

Table 1. Precision, recall, and F1-score summarizing the model’s performance in classifying droplet absorption from topsoil video frames. Performance is significantly above random guessing (p < 0.001, one-sided binomial test, n = 4934).

ROC/AUC Graph

Figure 3. ROC curves illustrating CNN performance for automated droplet absorption detection from soil video recordings, with AUC given as a threshold-independent measure of classification accuracy.

Sand CNN Model

Table 2

Table 2. Precision, recall, and F1-score summarizing the model’s performance in classifying droplet absorption from sand video frames. Performance is significantly above random guessing (p < 0.001, one-sided binomial test, n = 5547).

ROC/AUC Graph

Figure 4. ROC curves illustrating CNN performance for automated droplet absorption detection from sand video recordings, with AUC given as a threshold-independent measure of classification accuracy.

Analysis

The objective of this project was to develop and evaluate a video-based model for detecting droplet presence and conducting the water droplet penetration time (WDPT) test to indicate soil hydrophobicity. From the model’s results, the created robot would apply the appropriate level of tillage. Overall, the model, which includes the OpenCV and machine learning aspects, demonstrated the ability to detect absorption events. For the WDPT calculations with OpenCV, the program displayed strong agreement with the actual measurements, with a low MAE of 2.07 seconds. To categorize soil hydrophobicity, water droplet penetration time (WDPT) is evaluated in time-based ranges. Therefore, the model does not require exact temporal precision to guide robotic treatment responses and gauge soil condition. As the program is reliant on video background and searching for difference in pixels, lighting condition could be a variable affecting the model. Since the camera has LED lights permanently connected to it, the external lighting was changed, and even with no light or patchy light, the program was still able to run and have mean errors less than 3 seconds (Figure 2). This shows that while the model could be improved and adjust to work better in different lightings, it still works with similar accuracy. To complete the model, the ResNet18-based CNNs were trained on video frames to identify droplet presence or absorption. The confusion matrices demonstrate that the model correctly categorized many frames and has accuracies of around 80%. Precision, recall, and F1-score were also above 50%, so the model was able to find most frames of a specific outcome and correctly classify them (Tables 1 & 2). The ROC/AUC graphs show that the sand model has high confidence and accuracy when ranking a positive case over a negative one (Figures 3 & 4). The topsoil model, however, seems to have less confidence, but it’s accuracy (0.809) shows that it has more borderline cases but can still classify frames correctly. Overall, the model accomplished the goal of detecting soil hydrophobicity by analyzing WDPT data.

Discussion & Conclusion

As shown in the model’s accuracy and classification metrics, there is room for improvement, especially the sand model’s bias for predicting droplet presence. However, model performance can be enhanced by inputting a more balanced set of data and including more data points. Originally, the model contained only a convolutional neural network that was fed frames labeled such that the time before droplet landing, droplet presence, and droplet absorption were separated. However, the model could not learn from the data and missed many droplet landings as well as had a high error (MAE = 14.3 seconds). From this, I realized a hybrid approach with computer vision would be effective and require less data. Now, the program performance is undeniably above random guessing (p < 0.001). A one-sided binomial test was used to prove significance, as it is commonly used to evaluate classifier accuracy.

As for the robot, a 3D-printed base was produced along with a tiller system using a rack-and-pinion attachment. The robot has a peristaltic pump to produce identical droplets, and a camera is attached over the water dropper to take a video of the water absorption. For mobility, the robot has four wheels, and another motor is used to control tillage depth. Based on the model’s predictions, the robot is able to adjust its tillage depth.

This work adds onto previous devices for soil hydrophobicity testing, such as the Dropbot, by adding a treatment option. Additionally, while other models such as ActionFormer utilize temporal action localization (TAL) to pinpoint droplet landing and perform the WDPT test, none include a video cutoff function to make it usable in the field (Wang et al., 2024). My model cuts off the videos at around 2 minutes so that it does not spend exorbitant amounts of time measuring the WDPT when it can take minutes to hours. Its ability to detect cases where absorption does not occur allows the cutoff to be effective and improves robot efficiency in the field. The created product will improve treatment of these soils because it acknowledges the variability in soil hydrophobicity and provides specialized remedies. Additionally, the dataset of WDPT videos could help increase understanding of water dynamics in soil. Essentially, all objectives were met. The robot is mobile, and the model can predict WDPT and direct tillage. Future Research In the future, the robot could be improved upon to be more mobile and able to navigate rough terrain. As of right now, my robot has simple wheels, but with a tracked chassis, it could be more robust. Additionally, to make model predictions more accurate in the field, the model could have a ROI detection function. This would help with cases where droplets roll off the fixed ROI area, which would happen quite often on forest floor. Furthermore, the model’s accuracy can increase with more varied data. To further improve the model, the robot could be changed to provide a more controlled environment, such as by enclosing the droplet area and prepping the soil beforehand. By making the model and robot more versatile, this work could be used more successfully on post-wildfire soils and make a significant impact.

Ultimately, this work establishes a foundation for intelligent robotic systems capable of responding autonomously to environmental damage, helping transform post-wildfire recovery efforts from broad treatments to targeted, data-driven restoration.

References

February Fair Poster

Poster for STEM Fair