Phone vibrations detect spoiled milk – without opening the carton
An app will accurately detect if your milk has gone bad using an off-the-shelf smartphone’s built-in vibration motor – and you don’t need to open the carton. According to the researchers behind the tech, it could help prevent sickness and liters of the white stuff being poured down the drain.
Picture it: it’s first thing in the morning, you grab the milk from the fridge and add it to your coffee. But instead of liquid white gold, out comes a yellowing, chunky mess. You sniff the carton to double-check that what you’re seeing is right, and the sour stench almost knocks you out. Before you pour it down the sink, you triple-check by looking at the use-by date. Frustratingly, the milk’s still in date.
Those ruined mornings might soon be over, thanks to researchers at the University of New South Wales (UNSW) Sydney. They’ve developed a smartphone app called VibMilk, which detects milk spoilage using an off-the-shelf smartphone’s built-in vibration function – without opening the carton.
“You can smell or taste if milk is off, but that requires opening the package,” said Professor Wen Hu from UNSW’s Computer Science and Engineering Department. “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.”
Milk’s combination of water, fats, proteins, and vitamins provides the perfect medium for growing a variety of bacteria, some of which are harmful to humans. While pasteurization and ultra-high temperature (UHT) treatments are designed to prevent said growth, they’re not always successful, leading to sickness, food recalls, wastage, and associated financial losses.
A study from 2022 found that US families throw out 19% of the dairy products they buy. Many consumers rely on ‘sell by’ or ‘best before’ dates on milk cartons to determine if the product is safe to drink. However, the researchers say these are only rough estimates and can be inaccurate.
“The ‘use by’ date represents an indication rather than a definitive expiration,” Hu said. “When manufacturers set these dates, they make assumptions about factors like temperature and storage duration based on worst-case scenarios. If milk is kept at the correct conditions (e.g., temperature), it will still be safe to consume a couple of days past the labeled date. But if it’s not, it might not even be good until that date.”
So, the researchers devised a solution. As milk goes bad, it changes from a colloid – one substance evenly dispersed in another – to its separate components of curds, whey, and water. Degradation changes the liquid’s physical properties, producing different vibration signals. And, with those changes comes a change in pH, from 6.6 (fresh) to 4.4 (completely spoiled).
The VibMilk app uses the vibration signals produced by a smartphone’s motor and collected by its inertial measurement unit (IMU) to detect the degree of vibration produced. Applying machine learning algorithms to the data, the app assigns it one of 23 pH levels.
Testing the app on four common smartphones with two types of vibration motors – for the x-axis motor, a Google Pixel 6 and Samsung Galaxy S22, and for the z-axis motor, a Samsung Galaxy 21 FE and Google Pixel 5 – the researchers found that VibMilk predicted the milk’s pH with an average accuracy of 98.35%. It detected fresh, unspoiled milk with 100% accuracy.
The method for obtaining the vibration signal is somewhat … low-tech. (The app is opened while the phone is taped to the outside of a milk carton.) However, unlike other methods of detecting spoilage, the app doesn’t require a transparent container or for the container to be opened and doesn’t require expensive and bulky equipment. And, the researchers aren’t done tweaking.
“While we have good results with our current methods, we can’t guarantee the same results with products from other manufacturers using different materials,” said Hu. “So, before consumers can widely adopt this technology, we need to work with more manufacturers.”
VibMilk is not yet available to download on app stores.
The study was published in IEEE: Internet of Things Journal.
Source: UNSW Sydney