Quality milk is an essential ingredient in many coffees consumed around the world. One Australian university has found a way to test its freshness without opening the carton.
In the coffee industry, milk quality is a crucial factor that directly impacts the taste, safety, and overall consumer experience.
With dairy products contributing significantly to global food waste – especially through spoilage – a breakthrough innovation aims to transform how coffee shops monitor milk freshness, improve quality control, and reduce waste with the help of a technology most people already carry in their pockets: smartphones.
Origins of VibMilk
VibMilk was developed by researchers at the School of Computer Science and Engineering at the University of New South Wales (UNSW), with the primary goal of reducing food waste and improving food safety.
“Globally, around 20 per cent of dairy products are wasted each year, with spoiled milk contributing significantly to this,” says Professor Wen Hu, lead researcher.
He says traditional methods of checking milk freshness, such as smelling or tasting, involve opening the packaging, which can sometimes speed up the spoiling process. To solve this, the UNSW researchers designed a tool to provide a non-invasive, accurate, and accessible solution, leveraging the smartphone’s built-in sensors to assess milk quality without breaking the seal.
The innovation uses a smartphone’s vibration motor to send signals through a sealed milk container, while the phone’s inertial measurement unit (IMU) records the resulting vibrations.
“These signals vary depending on the milk’s physical properties, which change as it spoils,” says Hu.
By analysing these vibration patterns with machine learning algorithms, VibMilk can determine milk freshness without opening the packaging.
The science behind this involves detecting physical changes in milk as it deteriorates. As milk spoils, bacterial growth alters its composition. When lactate levels rise while glucose levels fall, this can cause a shift from a smooth colloid to a mixture of curds, whey, and water. This transformation can affect key properties such as density, viscosity, and surface tension, which in turn changes how the milk responds to vibrations.
The sensor aims to capture and interpret these changes, using them to predict the milk’s pH level – a critical freshness indicator – with an accuracy exceeding 98 per cent.
Real-time milk freshness for coffee
One of VibMilk’s most promising applications is in the fast-paced environment of coffee shops, where baristas must prepare milk-based drinks quickly and ensure quality consistently. The smartphone sensor can deliver freshness readings within seconds after testing, making it practical for use behind the counter even as customers wait.
“This capability could help coffee shops maintain safety standards, reduce waste by avoiding premature disposal of good milk, and ultimately serve better-quality beverages to customers,” Hu says.
By harnessing smartphone technology – already widely used in the hospitality industry – the sensor is designed to offer a practical, scalable, and cost-effective tool for quality control.
“The motivation was to reduce food waste and improve food safety. VibMilk has dual benefits of economic savings and environmental responsibility,” Hu says.
Future development
Despite its potential, the sensor faces some challenges that the researchers are actively addressing. One such limitation is variability in vibration signals caused by different packaging materials and milk brands.
“Currently, the technology performs best with tested containers, but adapting it for broader commercial use requires creating a more generalised machine-learning model that can handle diverse packaging,” Hu says.
“While VibMilk is designed for dairy milk, adapting the technology to popular milk alternatives, such as oat or almond, would likely need retraining or expansion of the algorithm, as these products have different physical properties.”
While the sensor is still undergoing refinements to ensure broad applicability across different milk types and packaging, the research team are also exploring collaborations with cooling product manufacturers to commercialise VibMilk.
But at its core, the innovation of using smartphone vibrations coupled with AI to detect milk freshness positions the sensor as a potentially transformative technology for the coffee industry.
Once fully developed and commercialised, Hu and his colleagues hope to see VibMilk become a standard tool in coffee shops worldwide, helping maintain high standards of taste and safety, reducing waste, and enhancing the coffee experience for millions of consumers.




