CAMBRIDGE, Mass. — Has your child swallowed a small battery? In the future, a tiny robot made from pig gut could capture it and expel it.

Researchers at the Massachusetts Institute of Technology are designing an ingestible robot that could patch wounds, deliver medicine or dislodge a foreign object. They call their experiment an “origami robot” because the accordion-shaped gadget gets folded up and frozen into an ice capsule.

“You swallow the robot, and when it gets to your stomach the ice melts and the robot unfolds,” said Daniela Rus, a professor who directs MIT’s Computer Science and Artificial Intelligence Laboratory. “Then, we can direct it to a very precise location.”

It’s still a long way before the device can be deployed in a human or animal. In the meantime, the researchers have created an artificial stomach made of silicone to test it.

Rus said one of the robot’s most important missions could be to save the lives of children who swallow the disc-shaped button batteries that increasingly power electronic devices. If swallowed, the battery can quickly burn through the stomach lining and be fatal.

The robots could seek out and capture the battery before it causes too much damage, pushing it down through the gastrointestinal tract and out of the body.

The robot’s flexible frame is biodegradable, made of the same dried pig intestine used for sausage casing. The researchers scoured markets in Boston’s Chinatown before finding the right material to build an agile robot body that could dissolve once its mission was accomplished.

MIT’s team has a patent pending and presented its research at a robotics conference in Sweden this spring.