After being diagnosed with a gluten allergy in college, Shireen Yates tried her best to avoid the protein compound found in wheat and similar grains. This was trickier than simply eschewing bread and pasta; gluten can be found in everything from soy sauce and salad dressing to ice cream and beer. Though she’d order carefully, she’d still get sick about one out of every four times she ate out. Eventually she started carrying her own snack packs to conferences and other events. One night she forgot her snack pack while attending a wedding. Starving, she asked a waitress if an appetizer was gluten-free.

“How allergic are you?” the woman responded.

“I was probably really hungry and angry and I said ‘you know what, I’m so tired of that question,’” Yates recalls. She told a friend standing near her she wished she could just take a sample of the food and test it herself.

The friend, a scientist, said well, why not? And just like that, an idea was born.

Today, Yates runs San Francisco-based 6SensorLabs, a company that has created a portable allergen detector to serve just that purpose. The device, Nima (meaning "just" or "fair" in Persian), has two parts: a test tube-like disposable capsule to hold a food sample and a small sensor with a triangular base. You put a piece of a questionable food in the capsule, click it into the base sensor and wait about two minutes for a result. The sensor conducts a quick chemical analysis for gluten and will either read “yes” or “no,” letting you know if it’s safe to go ahead and eat.

Nima is small enough to slip in a purse or backpack pocket, and discreet enough to hold in your lap at a restaurant table. “You don’t want to make too big of a show when you’re at the table,” Yates says.

At the moment, Nima has been developed specifically to test for gluten—the final version of the device, slated to be on the market in 2016, will be able to detect gluten in as little as 20 parts per million, the FDA standard for “gluten-free." Versions of Nima capable of detecting peanuts and dairy products are under development, Yates says, and eventually the company hopes to have devices capable of testing for “all of the other major allergens.”

The company is also developing an app that would allow users to share results, letting other food allergy sufferers know what restaurant meals or processed foods are really safe and warning them about those that are not. This is important, as mislabeling is a major problem for the gluten-avoidant. One study showed five percent of foods labeled “gluten-free” on the U.S. market actually contain gluten.

With food allergies on the rise and Americans ever more concerned with what’s in their meals, devices like Nima will likely find a significant market. According to one study, some one-third of Americans are trying to avoid gluten, either because of celiac disease or a gluten sensitivity, or in the mistaken (but increasingly common) belief that gluten is inherently unhealthy.

Nima is not the only player in the portable allergen-detecting market. A device called the TellSpec Food Sensor is estimated to hit the market in early 2016. Unlike Nima, which analyses food on the spot, the TellSpec scanner sends its information to your smartphone, which transmits it wirelessly to the TellSpec servers for analysis and beams it back to you (in 3 seconds or less, the company claims). Consumers can pre-order the device for $399 and must also pay a monthly or yearly subscription for the analysis service. SCiO, a handheld spectrometer the size of an iPod, can read the chemical makeup of any material, including food (though the company discourages its use for testing for food allergens). It will hit the market this December for $249. In past years, personal allergen-testing devices on the market have either been bulky and non-portable, or (like in the case of UCLA’s iTube) they have required grinding the food for testing, which is not feasible in a restaurant setting.

Devices like Nima still do have some serious limitations. The sensor only tests the bit of food you put into the tube. Say, for example, you’ve snagged a table at Napa Valley’s famed French Laundry. One of your eight courses consists of “Devin Knell’s 3 Year Aged Mangalista Ham, Sweet Pepper ‘Gelée,’ Pine Nut Purée and Crispy Chickpea ‘Panisse’.” You can test different elements together—the ham, the gelée, the purée, the chickpeas. But, mind you, you have to collect samples of all other sauces or trimmings that may appear on the plate, and you can't overflow the tube. At two minutes per tube times multiple courses, that could put a significant slowdown on your dinner and might send chef Thomas Keller glowering in your direction. (OK, a restaurant like French Laundry probably knows exactly what items are gluten-free, but you see the point.)

Yates declined to share an estimate for how much Nima will cost when it does hit the market, though previous reports have suggested the sensor itself would cost less than $150. A waitlist for purchase is available now.