The sensors could also be used to detect food pressing on the stomach, helping doctors to monitor food intake by patients being treated for obesity.
The flexible devices are based on piezoelectric materials, which generate a current and voltage when they are mechanically deformed.
They also incorporate polymers with elasticity similar to that of human skin, so that they can conform to the skin and stretch when the skin stretches.
For the study, published in the journal Nature Biomedical Engineering, researchers from Massachusetts Institute of Technology (MIT) and Brigham and Women's Hospital in the US demonstrated that the sensor remains active in the stomachs of pigs for up to two days.
More From This Section
"Having flexibility has the potential to impart significantly improved safety, simply because it makes it easier to transit through the GI tract," said Giovanni Traverso, a research affiliate at MIT.
To make the new sensor, researchers first fabricated electronic circuits on a silicon wafer.
The circuits contain two electrodes: a gold electrode placed atop a piezolelectric material called PZT, and a platinum electrode on the underside of the PZT.
Once the circuit is fabricated, it can be removed from the silicon wafer and printed onto a flexible polymer called polyimide.
In tests in pigs, the sensors successfully adhered to the stomach lining after being delivered endoscopically.
Through external cables, the sensors transmitted information about how much voltage the piezoelectrical sensor generated, from which the researchers could calculate how much the stomach wall was moving, as well as distinguish when food or liquid were ingested.
"For the first time, we showed that a flexible, piezoelectric device can stay in the stomach up to two days without any electrical or mechanical degradation," Canan Dagdeviren, an assistant professor in MIT.
Doctors could also use it to help measure the food intake of patients being treated for obesity.
"Having a window into what an individual is actually ingesting at home is helpful, because sometimes it's difficult for patients to really benchmark themselves and know how much is being consumed," Traverso said.
In future versions of the device, the researchers plan to harvest some of the energy generated by the piezoelectric material to power other features, including additional sensors and wireless transmitters.