Test your own food with your smartphone

Healthy and safe food

People with a peanut or nut allergy always have to mind what they eat. Photo: Shutterstock

Estimated reading time: 9 minutes

If you are allergic to certain substances, you want to be able to see at a glance whether a product contains ingredients that could be harmful. Over the past few years, scientists at Wageningen University & Research and their European colleagues have been working on an app that does just that.

Whether it is milk, eggs, peanuts or nuts, people who are allergic to certain foods always need to be on the lookout. And everyone runs a small risk of encountering hazardous toxins in their food, such as mycotoxins in maize, milk and ginger. Europe has strict laws aimed at preventing such substances, but products that are unsafe are still found on the market. That may be the result of a manufacturer deliberately flouting the rules, or accidental because a particular production line was not as clean as it should have been. To track down such unsafe products, inspectors check samples of food for the presence of toxins or allergens. However, the chance of finding something is small because these are often random checks without grounds for suspicion. Those samples still need to go to the lab for analysis (which takes several days and involves expensive analysts and equipment), even if there is usually no issue. At the same time, products that do contain allergens or toxins are very likely to escape notice.

What if a food inspector was able to check the food using something as simple as the camera on their smartphone

Inspectors perform randomised checks to detect toxins and allergens in food. Photo: Shutterstock

The European research project FoodSmartphone was started in 2017 to close the loopholes in the control system. What if a food inspector was able to check the food using something as simple as the camera on their smartphone, and only had to send the sample to the lab for analysis if they suspected an issue? This approach is comparable to the coronavirus self-test. Without the self-test, you would need an expensive test and analysis by the Municipal Health Service every time someone had possible symptoms (or needed to be sure). Now you only need that extra check if the self-test gives a positive result.

Universities across Europe

In FoodSmartphone, eleven PhD candidates have spent the past four years doing research at universities across Europe under the guidance of Michel Nielen, professor by special appointment of Analytical Chemistry at Wageningen University & Research. The PhD students set up smartphone tests for a wide variety of toxins and allergens, ranging from toxins in mussels to pesticide traces in fruit and vegetables. If anything could cause harm, a test was developed for it.

‘Biosensors’ formed a crucial element in the tests. Biosensors are tiny devices that let you detect specific molecules. The more such molecules are found, the larger the signal produced by the biosensor. If you place the biosensor in a holder that also contains the smartphone and the food sample, you basically have a miniature, a pocket version of a testing lab.

Detection of peanuts and hazelnuts

In Wageningen, Gina Ross studied the detection of peanuts and hazelnuts in food for her PhD research. That may sound trivial, but even a tiny amount can be the difference between life and death for people with an allergy. She constructed a miniature lab that can also be used by ‘ordinary’ people so that they do not have to worry about eating a biscuit with their tea or having lunch out. That this meets a need is clear from the comments on the WUR weblog about Ross’s research. “It brought tears to my eyes. Finally my son, who has a severe peanut allergy, will be able to eat safely outside the home!” posted one reader last year.

I made a miniature version of the set-up so that it can be used by the people who need it

A miniature test lab with a biosensor so the smartphone can measure the molecules in the food sample. Photo: Gina Ross

Grinding up a piece of biscuit and dissolving it in a test liquid, squirting that solution onto a plastic plate and placing it in a holder that also holds your smartphone; that way, anyone can do a self-test. Photo: Gina Ross

After four years of work, Ross has developed a method that lets people test their own food, from preparing the food sample to detecting the allergens. Let’s take the biscuit with your tea as an example. The packaging is very likely to say “could contain traces of nuts” or “was prepared in a factory where nuts are processed”. But does it actually contain those allergens or not? To find out, you grind up a piece of the biscuit and dissolve it in a test liquid. That solution then has to be injected onto a plastic plate. The plate is inserted into a holder that also contains your smartphone, in such a way that it faces the camera lens. Finally, a paper test strip is added to the specimen, not unlike the strip you get in a Covid self-test. The smartphone camera shows you whether only the control line appears or whether additional lines are visible. If there are no additional lines, you can take a bite of the biscuit without concern because no peanut or hazelnut molecules were found. And if those extra lines do appear? Then you are better off sticking to just the cup of tea.


Ross used a 3D printer to build the holder for the phone and sample, meaning she is not dependent on manufacturers; she (or anyone else) can build the necessary equipment independently. “Normally, the materials for analytical chemistry can only be found in a lab,” she says, explaining her approach. “I made a miniature version of the laboratory set-up so that it can be used by the people who really need it.”

Watch this video to see how Gina Ross’s mini-lab works.

The coronavirus pandemic gave the FoodSmartphone an unexpected boost. That is because the pandemic has got us used to collecting our own samples (via a swab in the nose), preparing them (inserting the swab in a reaction fluid in a test tube) and performing a test (using the test strip). However, self-tests also have a reputation for not being entirely reliable, which is a disadvantage when it comes to generating confidence in the method for self-testing food samples.

People can test their own food, from preparing the food sample to detecting the allergens

The self-test can detect peanut and hazelnut traces in biscuits. Photo: Shutterstock

The beauty of science

Ross’s FoodSmartphone adventure has now ended. She produced a proof of concept but there is still a long way to go. That is why she hopes her successors will continue working on it, for example with the automated processing and interpretation of the camera images of the sample. That could be done by building an app that uploads the images to an external server, where an algorithm determines whether allergens have been found. “At the moment the consumer has to interpret the results themselves and decide whether allergens have been found. Fortunately someone else will be able to continue from where I left off. That’s the beauty of science.” Her collaboration with colleagues across Europe has given her an extensive network, says Ross. “I was mainly working on my research alone, but I collaborated with researchers from Sweden, the UK and the Czech Republic for some projects. The nice thing is that I don’t just have contact internationally with people in my field of research but also with people from other disciplines. That is incredibly valuable.” Ross cannot say whether the FoodSmartphone will come on the market and when. “A lot of scientific inventions never get beyond a proof of concept, and they remain within the university. That is the downside of research like this. You develop something positive that could help a lot of people, but you can’t get it onto the market because of all the safety rules. Those rules are there for a reason, but it can still be very frustrating.” If the FoodSmartphone does eventually come on the market, Ross hopes users will collect as much data as possible so that the underlying detection system can be improved continuously. We are familiar with such citizen science in the form of measurements of air quality and noise nuisance by members of the general public that are passed on and used to supplement the regular measurements. Ross thinks something similar could be done with her FoodSmartphone. “I tested it with a 15-year-old. He could carry out a test successfully after minimal training. That was really satisfying because the key aim of our research is decentralising analytical chemistry, taking it from the lab to your mobile phone. That seems to have worked.”

European research context

FoodSmartphone addresses the following European policy challenge: Improving food safety Wageningen University & Research groups involved: Wageningen Food Safety Research, Laboratory of Organic Chemistry, Laboratory of BioNano Technology and the Toxicology department European countries involved: Czech Republic, Spain, Sweden, Switzerland and United Kingdom

Duration: 2017 – 2022

Share this article