Test Before You Toss: Using ATP and AI to Assess Milk Freshness

CWSF · 2026 Agriculture, Fisheries & Food Gold Medal

Thumbnail supplied by the source for Test Before You Toss: Using ATP and AI to Assess Milk Freshness

Overview

Food waste is a major issue in Canada, with much of it happening at the household level due to confusion about best-before dates. Many people throw away food that is still usable or rely on look, smell, and taste to judge quality, which are not always reliable. This project aims to reduce unnecessary food waste by developing a fast, simple method to assess milk quality at home. The system uses a handheld ATP bioluminescence test to measure bacterial activity in milk, producing a numerical result (RLU). Since bacterial growth is linked to decreasing quality, this data can be used to classify milk as fresh, nearing spoilage, or spoiled. A custom GPT model is integrated into a website where users input their test results and receive clear recommendations. By combining science, technology, and education, this project helps consumers make better decisions and reduce food waste.

Video

Video

Hi, my name is Wesley Goodridge, and I’m in grade 7 at Aberfoyle Public School. Today, I’ll be telling you about my project, in which I developed a quick, easy to use at home test that tells you how fresh your milk is. Food waste is a major global problem—and in Canada, much of it happens at home. One big reason is confusion around best-before dates, especially for milk.

So I asked a simple question: What if we could test milk freshness instead of guessing?

In this project, I developed a rapid, 1-minute milk test using ATP bioluminescence, which measures bacterial activity. I compared it to standard methods like plate counts and pH measurements and found that ATP was the most sensitive indicator of spoilage.

I then built a AI-powered tool where users enter their milk type and ATP reading. The system tells them if the milk is fresh, close to spoiling, or spoiled—and what to do next.

This creates a fast and objective way to reduce food waste at home.

Because, instead of guessing— we can test before we toss.

Why?

I did this project because I became interested in food waste after visiting the United Nations Agriculture headquarters in Rome, where I saw a display about how much food is wasted around the world. I learned that Canada is one of the biggest contributors to food waste per person, and that much of this waste happens at home. This inspired me to think about how everyday decisions, like throwing away milk, could be improved.

One major problem I discovered is that many people misunderstand best-before dates. These dates indicate quality, not safety, but people often throw away food that is still perfectly fine. I also learned that common methods like looking, smelling, or tasting food are not always reliable for determining freshness. This led me to ask: Can we create a simple, objective test that people can use at home to determine if milk is still fresh?

By reducing unnecessary food waste, this project can help lower greenhouse gas emissions from landfills and conserve valuable resources like water and energy. Ultimately, it shows that small, science-based decisions at home can make a big difference for both people and the planet

How?

My goal was to develop a fast, easy-to-use test that measures bacterial activity in milk and provides clear guidance on whether it should be kept or discarded. This project could benefit households, helping people reduce food waste, save money, and make more informed decisions.

To do the experiments, a simple lab was set up at my house (Picture 1), consisiting of an incubator (for doing bacterial counts), a glove box so that the milk testing was done in a sterile environment, a luminometer to measure adenosine tri-phosphate (ATP), and a water bath to do the Methylene Blue Reduction Test (MBRT). I wore a lab coat, and gloves at all times when doing the experiments.

The rapid milk test was developed by comparing several methods used to detect milk spoilage and determining which one best reflected actual bacterial growth. Milk spoilage is directly related to increasing numbers of bacteria, so the goal was to find a fast method that closely matched bacterial counts. To do this, milk samples were stored in the refrigerator and tested every two days over a 16-day period. At each time point, an aerobic plate count (Picture 2) was performed to measure the number of bacteria in the milk. This method served as the reference standard for determining when spoilage occurred.

At the same time, three rapid testing methods were evaluated on the same samples:

Adenosine Tri-phosphate (ATP) bioluminescence, which measures bacterial activity by detecting energy molecules (ATP) (Picture 3)

pH measurements, which detect changes in acidity as milk spoils (Picture (Video) 4)

The Methylene Blue Reduction Test (MBRT), which indicates bacterial growth through a visible color change (Picture 5)

The results from these methods were compared to the aerobic plate counts to determine how well each method tracked bacterial growth over time.

What?

A surprising result from this study was that based on the aerobic plate counts (Picture 4, red graph at the top), the milk did not spoil over the 16-day refrigerated experiment, even after the best-before date had passed. This demonstrates that properly stored milk can remain at low bacterial levels for extended periods, and that many people may be throwing away perfectly good milk.

Among the methods tested, ATP bioluminescence (Picture 4, purple graph) showed the strongest agreement with bacterial counts, when compared to the Methylene Blue Reduction test (Picture 4, blue graph), and pH measurements (Picture 4, green graph), making it the most accurate and sensitive indicator of spoilage. Based on these findings, ATP was selected as the foundation for the rapid, at-home milk testing system.

Because spoilage occurred very slowly under refrigeration, a second experiment was conducted in which milk was stored at room temperature to accelerate bacterial growth. Samples were collected at different time points and analyzed for both bacterial counts and ATP levels. As spoilage progressed, ATP levels increased in parallel with bacterial numbers.

So What?

Milk testing data was used to train a custom-GPT model (called the Milk Freshness Tester) (Picture 1), using supervised and unsupervised learning to predict milk quality from ATP readings.

In the test, (Picture 2 (Video)) users enter the milk type (skim, 1%, or 2%) and ATP reading, and it gives an instant result showing if the milk is fresh, nearing spoilage, or spoiled, without the need for complex lab equipment.

The test also gives helpful advice. If the milk is fresh, it suggests storage tips. If it is close to spoiling, it gives ideas for using it quickly, like recipes. If it is spoiled, it explains how to safely throw it away.

An informative website (Picture 3) was also created to help people understand best-before dates and food waste. It explains that best-before dates show quality, not safety, and helps people make better decisions at home.

To try the system, users can scan the QR code (Picture 4), click on the Milk Freshness Tester on the website, and enter the milk type (Skim milk, 1%, or 2%) and ATP RLU values from the spoilage chart. This shows how the test works.

The milk test was designed to be fast, portable, and easy to use at home, giving results in one minute (Picture 5). It is simple to understand, teaches that best-before dates are about quality (not safety), and helps reduce food waste. Overall, the test met all design criteria by correctly identifying milk as fresh, near spoilage, or spoiled.

What's Next?

If I were to improve this project, I would include a larger number of milk samples to strengthen the dataset. I would also increase the number of replicates to improve statistical reliability. Another improvement would be trying to make the test work with milk samples that have high fat, since these milks did not work in my test. I also want to make the test more practical by reducing the need for expensive equipment. I also plan to improve the test by expanding it to other foods like yoghurt and mayonnaise.

Thanks

I would like to give special thanks to the Goodridge Lab for providing materials and supplies needed to carry out the experiments. They also helped guide the experimental design and provided advice on how to properly measure and analyze the data, including bacterial counts and ATP readings. Their support helped ensure that my methods were scientifically sound and that my results were reliable. This guidance allowed me to better understand the relationship between bacterial growth and milk spoilage, and to confidently develop and validate my rapid milk testing system.

References

1. United Nations Environment Programme (UNEP). (2024).

2. Food Waste Index Report 2024. https://www.unep.org/resources/publication/food-waste-index-report-2024Made in CA.

(2024). Food waste in Canada: Statistics and facts. https://madeinca.ca/food-waste-canada-statistics/

3. Agri-Food Analytics Lab, Dalhousie University, & Too Good To Go. (2025). The cost of food waste due to best before dates in

Canadian households.

4. Walstra, P., Wouters, J. T. M., & Geurts, T. J. (2006). Dairy science and technology (2nd ed.). CRC Press.

https://biot409.wordpress.com/wp-content/uploads/2014/02/16-dairy-science-and-technology.pdf

Images (26)

Awards (3)

  • Challenge Award
  • Gold Medal
  • Selected for CWSF 2026

Competition history

Related projects

Closest projects by meaning, across every fair and year in the corpus.

Browse more like this

Source: ProjectBoard / Youth Science Canada

Save projects to your library

Sign in with Google to keep track of projects you find interesting, organized into folders. An account also raises your daily allowance for “Has this been done?”, and lets you create a key for the MCP server with a much higher limit than anonymous use. Browsing stays public.

Continue with Google