Foodies who've ever dreamed of having superhero-style vision that could analyze what they are about to eat should keep an eye on the upcoming Sensor+Trade fair in Nuremberg. Scientists from the Fraunhofer Institute of Photonic Microsystems (IPMS) will be exhibiting a tiny prototype spectrometer that can measure factors such as water and protein level in foods, meaning you won't make the mistake of buying fruit that looks good on the outside but is rotten at its core.

The micro electromechanical system (MEMS) spectrometer can probe under the surface of any food type, even when it is enveloped in thin packaging film. The user points it at a piece of fruit, for example, and it reflects back a spectrum of infrared light that the system analyses by comparing it with information stored in a database.

It’s not a new concept, but the advantage of the IPMS technology is that it is cheap to manufacture and, because it's built on silicon wafers that can hold the components of hundreds of spectrometers, far smaller than existing commercial devices.

This means that the spectrometer could be integrated into smartphones and be used to make purchasing recommendations - i.e. an App could tell you when the avocado you are about to buy will be ready to eat.

“We expect spectrometers to develop in the same way that digital cameras did,” says Dr. Heinrich Grüger, who manages the relevant business unit at IPMS. “A camera that cost 500 euros ten years ago is far less capable than the ones you get virtually for free today in your cell phone.”

The scientist expect that the spectrometers become commercially available in three to five years and it’s not only food that the system will be able to read. Other possible applications include the analysis of drugs, cosmetics and even forgery detection.

The Sensor+Trade fair takes place in in Nuremberg, Germany, between May 22 and 24.