Engineers have unveiled a strange new device that can harvest electricity from inside the body.

The small voltaic cell is sustained by acidic fluids in the stomach, and can generate enough power to run sensors or drug delivery devices.

It could allow the creation of new tools and treatments that can reside in the gastrointestinal tract for extended periods of time.

Giovanni Traverso, a research affiliate at the Koch Institute for Integrative Cancer Research, and Robert Langer, the David H. Koch Institute Professor at MIT, have previously built and tested many ingestible devices that can be used to sense physiological conditions such as temperature, heart rate, and breathing rate, or to deliver drugs to treat diseases such as malaria.

These devices have been powered by small batteries, which discharge over time and pose safety risks.

Looking for a better way, the research team took inspiration from the simple lemon battery — using just a galvanised nail and a copper penny stuck in a lemon. The citric acid in the lemon carries a small electric current between the two electrodes.

In the human version, the researchers attached zinc and copper electrodes to the surface of an ingestible sensor.

The zinc emits ions into the acid in the stomach to power the voltaic circuit, generating enough energy to power a commercial temperature sensor and a 900-megahertz transmitter.

In tests in pigs, the devices took an average of six days to travel through the digestive tract, producing enough energy to power a temperature sensor and to wirelessly transmit data to a base station located 2 meters away, with a signal sent every 12 seconds.

Once the device moved into the small intestine, which is less acidic than the stomach, the cell generated only about 1/100 of what it produced in the stomach.

The researchers say the device would still work under low power, but just transmit less frequent packets of information.

The current prototype is a cylinder about 40 millimetres long and 12 millimetres in diameter, but the researchers say it could be miniaturised with a custom integrated circuit.

Other experiments showed the power generated by the voltaic cell can be used to release drugs encapsulated by a gold film.

The study is accessible here.