¹ū¶³app

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 Food and Agriculture Organisation has estimated that globally,Ā 20% of dairy productsĀ are wasted each year ā€“ and a huge part of that is made up of wasted milk.

Additionally, a lot of foodborne 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.
Headshot of Professor Wen Hu
Professor Wen Hu
UNSW Computer Science and Engineering

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.

pH values change over time during the milk spoilage process

But why not just read the ā€˜use-byā€™ date?

These dates 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 will still be safe to consume . 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 local manufacturer of milk 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.ā€