Scientists have created a pill-sized sensor that has the capability to one day navigate the digestive tract and track digestive problems in real-time.

In the study, published in the journal Nature Electronics, engineers at MIT and Caltech have developed an ingestible sensor that navigates through the gastrointestinal tract and can one day replace invasive procedures like endoscopy.

For the unversed, endoscopy is a procedure where doctors thread a camera in the digestive tract through the mouth or the anus.

The study, conducted on pigs, could provide clinicians with real-time information on the digestion process from the sensors working in tandem with an electromagnetic field.

The device has a clear covering, which is made of medical-grade silicone. Within the device is a system that senses the electromagnetic field generated by a coil, or secondary sensor, placed outside the body, for instance, on the skin.

“I personally look at this and see tremendous opportunities for other surgical applications where you’re tracking things inside the body,” Mark Rentschler, a professor of mechanical engineering at the University of Colorado Boulder, who wasn’t involved in the study, told Inverse.

While there are similar alternatives available in the market, this pill sensor could provide a detailed mapping of the gastrointestinal tract while tracking the capsule’s real-time location.

“It’s really about offering a potential solution and lowering the barrier of diagnosis or follow-up and having tools that enable that,” Giovanni Traverso, a gastroenterologist at Brigham and Women’s Hospital in Boston and co-author of the new study, told the outlet.

Debuted in 2000, a company called Medtronic released its video capsule endoscopy. Now common, the device allows clinicians to see the inside of the digestive system with a tiny wireless camera.

Additionally, in 2006, the U.S. Food and Drug Administration approved the SmartPill, an ingestible capsule that measures parameters such as pressure, pH, temperature, and transit time as it moves through a person’s gastrointestinal tract.

The MIT-Caltech team’s ingestible sensor is a proof-of-concept. Nevertheless, Traverso hopes their invention could transform the way clinicians manage gastrointestinal disorders in the future.

“When we’re in the hospital, the activities we’re involved in are very different. In fact, we tend to move less,” Traverso noted. “Having tools that allow us to essentially look at how things are working during our [daily] activities give us a different window in how our bodies work in the context of the ones we’re usually living in.”

The team has its work cut out for them. One major issue that needs to be solved is the distance between layers of fat, muscle, or blood and the electromagnetic sensor placed outside the body, which may weaken signal reception.