Engineers from UC Berkeley and Taiwan's National Chiao Tung University have created a smart, 3-D printed cap that can determine when food -- in this particular case, milk -- has gone bad. The results were published yesterday in the journal Microsystems & Nanoengineering.

The end result of the study sounds minor, but sniffing out spoiled milk can be tricky. (It always smells a little off to me, while a friend can't seem to register milk's sour notes and is routinely ruining perfectly good bowls of cereal, mac and cheese, mugs of tea, etc. Not the world's most pressing problem, but a problem nonetheless.)

Related: How This Produce Pioneer Popularized the Kiwi and Forever Changed the American Palate

Luckily, the engineers are on it. Using a technology that embeds electrical components into 3-D printed plastics, they've printed a milk cap that contains a resonant circuit able to detect changes in electrical signals caused by the proliferation of bacteria.

To check whether milk has gone bad or not, all you need to do is tip the container over so it comes in contact with the cap. Voila! No sniffing required.

The underlying technology behind the smart milk cap can be used in other food packaging, the researchers believe. “You could imagine a scenario where you can use your cellphone to check the freshness of food while it’s still on the store shelves," senior author Liwei Lin said in a statement.

Related: How 3-D Printing Is Sweetening Your Eating Experience (VIDEO)