People suffering from type 1 diabetes may soon be able to ditch constant finger pricks and manual insulin injections—if they have a smartphone on hand, that is.

Combined with a tiny sensor and wearable insulin pump, a smartphone can stand in for a pancreas, automatically monitoring blood-sugar levels and delivering insulin as needed, researchers report. The system, backed by a $12.6 million grant from the National Institutes of Health, will enter two final phases of international trials this year.

“We’ve been working on this specific artificial pancreas as it’s called since 2006,” lead researcher Boris Kovatchev, director of the UVA Center for Diabetes Technology, told Ars. And 10 years ago, Kovatchev said, the common wisdom in the field was that such an external system would never work. “We show that it’s not only possible, but it can run on a smartphone.”

The system works with a readily available blood-glucose sensor—about the size of a flash drive—that can be worn in a variety of places on the body, such as an arm, leg, or the abdomen. The sensor reads blood-glucose levels every five minutes and wirelessly reports the results to a specially designed app on a nearby android smartphone. The app’s algorithm analyzes the data and wirelessly controls a discreet, wearable insulin pump, which can be hooked to a belt or other piece of clothing. The pump has a very fine needle that delivers insulin into the blood stream.

Together, the "closed-loop" system should act much like a home thermostat, automatically sensing and adjusting the temperature to match preset targets. “If it’s working, you don’t know that it’s there,” Francis Doyle III, dean of Harvard’s Paulson School of Engineering and Applied Sciences, told Ars. Doyle is collaborating with Kovatchev on the system.

The ultimate goal is to make managing type 1 diabetes effortless and automatic, easing the daily lives of the 1.25 million people who suffer from the disease, Doyle said. Currently, patients need to remember to check their blood-glucose levels several times a day with finger prick tests and then manually inject insulin, a hormone normally released by the pancreas that regulates blood-glucose levels.

This is a constant burden, particularly for children. And knowing how much insulin to inject can be a bit of a guessing game. For traditional management strategies and for Kovatchev’s original version of the smartphone app, the goal is to keep blood-glucose levels at a specific target number. This makes it easy to under- or over-shoot that specific target during manual blood-sugar management, and it means an automatic system has to frequently tweak levels.

This is where Doyle’s contribution comes in. He and his colleagues have come up with an improved version of the smartphone app algorithm that doesn’t aim for a specific blood-glucose number, but rather a “zone.” These patient-specific short ranges of healthy blood-glucose levels are easier targets that can be stably maintained, avoiding constant adjustments that can lead to swings, Doyle said. And the new algorithm will be able to adapt to each patient’s sugar shifts and insulin sensitivity.

The researchers are gearing up for two final phases of trials, designed in collaboration with the Food and Drug Administration, that will take place at various clinics in the US, France, Italy, and the Netherlands. The first trial will collect further safety and efficacy data on Kovatchev’s original design and algorithm from 240 patients, each testing the system for a six-month period. Of those 240 patients, 180 will continue with a second six-month-long trial with the system and Doyle’s improved algorithm.The researchers hope to have the trials wrapped up in four years.