Skip to content
Food Beverages, Science

How fresh is your milk? Your smartphone can tell

UNSW Sydney 3 mins read

Researchers at UNSW Computer Science and Engineering have developed a smartphone sensor that can detect if milk is fresh or spoiled.

Named VibMilk, the technology uses a smartphone's vibration motor and inertial measurement unit (IMU) to assess milk freshness without needing to open the package.

The UN's Food and Agriculture Organisation has estimated that 20% of dairy products are wasted globally each year – and a huge part of that is made up of wasted milk.

Additionally, a lot of food-borne illnesses have been linked to the intake of spoiled dairy products.

VibMilk allows for real-time detection of whether milk is safe to consume, using a device that many people already own, and has the potential to reduce food waste and improve food safety.

Professor Wen Hu from UNSW Computer Science and Engineering leads the team behind the technology.

“You can smell or taste if milk is off, but that requires opening the package. Doing so exposes it to bacteria, and that accelerates spoilage. VibMilk is non-invasive, which means you can test the freshness of the milk without breaking the seal,” he said.

VibMilk isn’t the first non-invasive way to test the freshness of milk. However, previous methods require either specialised and costly equipment, a custom cup, or only work with semi-transparent or transparent containers; all factors that limit widespread adoption.

How does it work?

Milk goes off due to the growth of bacteria, which increases lactate levels and decreases glucose levels. Milk changes from a colloid to a mixture of curds, whey, and water, affecting its density, viscosity, and surface tension. These different physical properties lead to different responses to vibration signals.

VibMilk captures vibration signals produced by the smartphone motor using the IMU sensor in smartphones. It then leverages machine learning algorithms to analyse the signals and classify the spoiling milk at 23 pH levels

Testing on four common smartphones showed that VibMilk can predict the pH values of milk with an average accuracy of 98.35% and achieved a 100% accuracy for indicating fresh milk.

But why not just read the ‘use-by’ date?

Use-by dates printed on packaging can’t accurately predict when milk will actually go off, says Prof. Hu.

“The ‘use-by’ date represents an indication rather than a definitive expiration. When manufacturers set these dates, they make assumptions about factors like temperature and storage duration based on worst-case scenarios,” he says.

“If milk is kept at the correct conditions (e.g. temperature), it could still be safe to consume a couple days past the labelled date. But if it’s not, it might not even be good until that date.

“That’s why we believe consumers should be able to test food items right around that date or even just past it before making a decision about consumption.

“This can help prevent unnecessary discards, which is crucial in areas facing food shortages. In the future, we aim to collaborate with charities to promote this technology in areas where people don’t have enough food and it’s most beneficial.”

Next steps

To further develop the technology, the team plans to investigate how different packaging materials affect vibration signals, as the signals pass through the packaging.

“While we have good results with our current methods, we can't guarantee the same with products from other manufacturers using different materials. So, before consumers can widely adopt this technology, we need to work with more manufacturers.”

The team is also working with a manufacturer of milk in NSW who is trying to find an efficient and reliable way to quality-check thousands of bottles of milk during production in their factory.

“While we’re looking for something similar, since it’s a factory environment, we don’t need to use a smartphone; we can use more sophisticated, yet non-invasive, sensors. We’re developing a system with them to measure the pH values of their milk before it is sent to stores.”


Key Facts:

Researchers have developed a new way to detect when milk has gone off, which could save thousands of litres from being discarded.


Contact details:

Iris Huisman
Communications & Engagement Officer, UNSW Faculty of Engineering

i.huisman@unsw.edu.au

Media

More from this category

  • Food Beverages
  • 03/01/2025
  • 06:11
Representing Animals Foundation

Veganuary for Pets

WINCHESTER, GB / ACCESSWIRE / January 2, 2025 / Millions of people try vegan diets each January as part of the global Veganuary campaign. In 2024, roughly 25 million people sought a fresh start for their health and the environment through vegan diets. Yet in the decade since Veganuary was founded in 2014, dogs and cats have been almost entirely excluded. Now however, veterinary Professor Andrew Knight is calling for Veganuary to be extended to pets.Writing in The Conversation, Knight notes that dogs and cats may also experience health benefits associated with vegan diets: "By late 2024, 11 studies in…

  • Food Beverages
  • 26/12/2024
  • 08:30
Tasmanian Beekeepers Association

Discover the Sweet Taste of Summer with Leatherwood Honey Recipes

Discover the Sweet Taste of Summer with Leatherwood Honey Recipes Summer is in full swing, and there’s no better way to enjoy the season than with great food and friends, especially on New Year’s Eve. The Tasmanian Beekeepers Association and Tasmanian celebrity chef Ben Milbourne have teamed up to create a number of summer recipes that incorporate Leatherwood Honey. Tasmanian Beekeepers Association president Lindsay Bourke says the recipes were developed as part of the 7 Network TV series ‘Left Off the Map’. “During 2024, the Left Off the Map series was filmed in Tasmania, with BenMilbourne and other presenters showing…

  • Food Beverages
  • 26/12/2024
  • 06:00
Coles

COLES’ HOT CROSS BUNS RETURN WITH A SWEET MISSION

EMBARGOED: THURSDAY 26 DECEMBER 2024 COLES’ HOT CROSS BUNS RETURN WITH A SWEET MISSION For high-res images and video footage click here The season of giving continues this December as Coles’ award-winning hot cross buns hit shelves today, with 20 cents from every six and nine pack of Coles brand hot cross buns sold donated to Redkite in a delicious mission to make a difference and help support families facing childhood cancer.1 Whether you’re a fruit traditionalist, an apple and cinnamon devotee, a choc fanatic, or prefer fruit-free, Coles’ popular hot cross buns are back for $4.50 a pack or…

Media Outreach made fast, easy, simple.

Feature your press release on Medianet's News Hub every time you distribute with Medianet. Pay per release or save with a subscription.