Smartphones may soon be capable of running on-the-spot tests for environmental toxins, medical diagnostics, food safety and more, according to a new study conducted by researchers at the University of Illinois.

Together, the team of researchers were able to develop a phone cradle and app for the iPhone using its built-in camera and processing power as a biosensor capable of detecting toxins, proteins, bacteria, viruses and other molecules.

Such technology, the scientists explained in a press release, could enable on-site tracking of groundwater contamination, combine the phone’s GPS data with biosensing data to map the spread of pathogens, or provide immediate and inexpensive medical diagnostic tests in field clinics or contaminant checks in the food processing and distribution chain.

“We’re interested in biodetection that needs to be performed outside of the laboratory,” said team leader Brian Cunningham, a professor of electrical and computer engineering and of bioengineering. “Smartphones are making a big impact on our society – the way we get our information, the way we communicate. And they have really powerful computing capability and imaging. A lot of medical conditions might be monitored very inexpensively and non-invasively using mobile platforms like phones. They can detect molecular things, like pathogens, disease biomarkers or DNA, things that are currently only done in big diagnostic labs with lots of expense and large volumes of blood.”

The wedge-shaped cradle boasts a series of optical components, including lenses and filters, found in much larger and more expensive laboratory devices and holds the phone’s camera in alignment with the optical components.

At the heart of the biosensor is a photonic crystal that acts like a mirror that only reflects one wavelength of light while the rest of the spectrum passes through. For this reason, when anything biological attaches to the photonic crystal – such as protein, cells, pathogens or DNA – the reflected color will shift from a shorter to a longer wavelength.

In regards to the handheld iPhone biosensor, a normal microscope slide is coated with the photonic material and is primed to react to a specific target molecule. Once inserted, the spectrum is measured. Then, after exposure to the test sample, the spectrum is re-measured, allowing the app to determine through the shift how much of the target molecule is in the sample.

The entire test takes only a few minutes and while the cradle holds only about $200 of optical components, it performs as accurately as a large $50,000 spectrophotometer in the laboratory, according to the researchers.

To see a video of the invention at work, click here.