For people who need to avoid gluten, dining out is a bit like a game of Russian roulette.

Each bite could be hiding a dangerous secret.

While the chicken salad may not look ominous, the hidden dangers of cross-contamination are real.

Did the person building the salad have flour on their hands?

Was the grilled chicken breast cooked in the same skillet as a breaded chicken breast?

Did the cook accidentally put croutons on the salad before realizing it was supposed to be gluten-free, and then quickly remove them?

Anyone with a food allergy who eats outside their home knows this is the risk they take, which is why so many don’t take the risk at all.

However, for people with a gluten sensitivity or celiac disease, avoiding dinner out may become a thing of the past.

At least the engineers and creators at 6SensorLabs in San Francisco hope so. They have created a portable gluten sensor.

The sensor, called Nima, can detect gluten in food, even at the levels you see with cross-contamination.

Read more: List of foods to avoid with gluten intolerance »

What Nima can do

Before Nima, a chemical analysis had to be performed in a laboratory setting.

For the average person, that is far too expensive and cumbersome — and it doesn’t help with the day-to-day reality of trying to eat foods that are safe.

Nima can detect gluten proteins in food in a matter of minutes.

To test a sample of food, you insert a pea-size amount into a capsule, and then slide the capsule into the Nima sensor.

The sensor is small — 3” by 3 1/2” — and weighs only 3 ounces. That makes it easy to stick in a purse, backpack, or back pocket.

Once the food is inserted, the sensor chemically reacts with any gluten and binds to the proteins. In two to three minutes, Nima will display a reading.

A smiley face means the food is gluten-free. A wheat icon means it’s not.

Nima’s sensors can detect gluten at 20 parts per million. That’s the Food and Drug Administration’s (FDA) standard for labeling a food gluten-free.

Once you have the reading, you can sync the data with your Nima app on iPhone or Android.

You can use it to create a journal for yourself as a way to remember which restaurants were safe and which weren’t.

You can also share the information to the broader Nima community and add to a growing list of safe and reliable gluten-free restaurants. You can also alert people to watch out for possible problem dishes or restaurants.

“Nima is providing thousands of people an extra tool at the dinner table before they eat for added peace of mind at mealtime,” Shireen Yates, chief executive officer, and co-founder of Nima, told Healthline. “We’ve heard community members say Nima gave them back their social lives, or that with Nima they were finally able to feel like a real family and enjoy a dinner outside of the home without anxiety weighing on them.”

Read more: Is non-celiac gluten sensitivity a real thing? »

What Nima can’t do

Nima is certainly a breakthrough for the gluten-free community, but it’s not a panacea for all dining concerns.

For starters, the sample you test in Nima is small compared with an entire plate of food.

So, while the sample you test may be gluten-free, cross-contamination is still possible with other elements in your dish.

For that reason, Yates and the creators of Nima stress that the sensor isn’t designed to provide absolute security and assurance.

“Nima can’t guarantee an entire plate is gluten-free, since you are only taking a small sample,” said Yates. “But our community members use it as an additional tool before they eat, in addition to the precautions they already take.”

Nima has several other limitations, too.

“Nima can’t detect gluten that has been fermented — soy sauce, beer, etc. — because [the fermenting process] breaks down the gluten protein so antibodies can no longer detect it,” Yates explained. “This is the same for most gluten testing kits.”

You also cannot test alcohol. The distillation process affects gluten proteins, so the test result may not be accurate.

Likewise, foods with heavy amounts of vinegar shouldn’t be tested. The vinegar’s acidity can damage the sensor.

At $279, the cost of NIMA maybe also be a hindrance for some people.

In addition to that starting cost, you have to pay for capsule replacements. The capsules, at around $5, can only be used once.

Read more: A gluten-free diet may not make you any healthier »

The future of food allergy sensors

While Nima is designed for gluten-sensitive users, 6SensorLabs has plans for other allergen areas.

“In the immediate future, Nima is developing sensors for peanut, milk, and tree nuts, rolling out in 2017 and 2018,” Yates said. “In the long term, the possibilities are endless. We could test for additives, pesticides, antibiotics, or even lead in water. Our innovation around this fast, portable sensor can be applied to many different uses.”

The demand for such devices would appear to be high, if you look at articles like the one written by Sara Chodosh for the January issue of Popular Science.

Yates said Nima and other devices should provide some comfort for people with diet restrictions.

“We want people to know what’s in their food and help them feel their best after they eat,” she said. “We think everyone should have a seat at the table.”