By Fergus Walsh
BBC News, Medical correspondent
Scientists in Cambridge say they are moving a step closer to developing an artificial pancreas for people with diabetes.
Jeremy Smith is testing the technology
They are conducting trials in Cambridge with 12 youngsters aged five to 18.
All have type-one diabetes which means their pancreas does not produce insulin - the hormone that regulates blood sugar levels.
Jeremy Smith, who is studying for his A Levels, is one of the volunteers.
The 17-year-old has had several overnight stays at the city's Addenbrookes hospital.
Each time the diabetes care team fit him with a continuous glucose sensor which sits just under the skin.
This beams his blood sugar readings to a monitor.
The idea then is for a computer program to work out the right dose of insulin, which is delivered via an insulin pump.
The artificial pancreas would automate diabetes care and free people from the repeated need for finger prick blood tests and insulin injections.
But the system has not gone live yet. Instead, Jeremy's glucose levels are checked every 15 minutes throughout the night and his insulin dose is altered manually.
It will be another six months before the first automated, hands-free trial is conducted.
The main stumbling block in the development of an artificial pancreas has been mathematical: no-one has perfected a computer program sophisticated enough to work out the right dose of insulin at any moment of the day.
That is why the scientist leading the trial is not a medical doctor, but a mathematician.
Dr Roman Hovorka, from the University of Cambridge, said: "For an artificial pancreas, you need a brain.
"The human body has a very clever way of working out exactly how much insulin the body needs, and we are only just beginning to understand that."
That's why the overnight trials at Addenbrookes are important.
If the team can stabilise Jeremy's glucose levels then it will help devise the algorithm needed to automate his diabetes care.
The trial went well - for the first few hours the glucose levels were flat and stable, although at one point the insulin pump became disconnected.
Jeremy has been wearing the pump for nearly three years and says this has happened only a couple of times.
The experiment will be repeated in a few days.
But the team already has enough data to show it is on track, and believes home testing of the device will happen within a year.
Nonetheless, it is likely to be several more years before a robust, workable device is widely available.
Jeremy Smith is enthusiastic about the trials and convinced an artificial pancreas is the way forward: "It would be life-changing.
"It would give far better glucose control and freedom from the side-effects of diabetes."
Karen Addington, chief executive of Juvenile Diabetes Research Foundation, has type-one diabetes.
Her charity is funding the trials in Cambridge and she is optimistic about the long-term potential of an artificial pancreas.
"Life expectancy with type-one diabetes is reduced by on average 15 years," she said.
"The artificial pancreas would remove the complications associated with the condition, such as heart and kidney disease, blindness, and stroke; it could dramatically improve quality of life, and life expectancy."