Inspired from puffer fish that blows up in response to threat, scientists from MIT have designed a soft, squishy pill that inflates to the size of a ping-pong ball as soon as it reaches the stomach and can monitor tumors or ulcers and can last for a month.

The pill, which has already been tested in pigs, is made from two types of hydrogels – an inner layer of absorbent particles and an outer protective membrane. These layers give the pill the consistency of jelly, helping it expand rapidly in the stomach and therefore stopping it from passing out the other end, reported BBC.

The inflated pill could be removed at any time by drinking a solution of calcium that makes it shrink to its original size. It is then able to pass safely out of the body. During pig tests, the team was able to track the animals’ daily activities for up to 30 days, as per Daily Mail.

In the lab, the pill was put in solutions of water resembling gastric stomach juices and found it inflated to 100 times its original size within 15 minutes. Also, the pill though soft, but was strong enough to survive regular contraction in stomach.

According to the researchers whose work is reported in the journal Nature Communications, the pill is softer and lasts longer than current alternatives, which are usually made of hard plastic or metal.

Lead researcher Xuanhe Zhao said, “The dream is to have a jell-o-like smart pill that once swallowed stays in the stomach and monitors the patient’s health for a long time such as a month.”

For the future, the team envisions putting different sensors in the puffer pills and delivering them to the stomach. The sensors can monitor signs or bacteria and viruses. In the long term, with tiny cameras inside them, the pills can also check the progress of tumors or ulcers for several weeks.