For years, Rian Draeger would go to sleep at night and wonder if he’d slumber throughout the evening with no interruptions.

As an adult living with type 1 diabetes, Draeger has to constantly monitor the amount of glucose in his blood.

During the day, a glucose sensor and insulin pump help keep Draeger stable. They provide data on whether or not he should give himself insulin.

But at night, everything is different.

When he sleeps, sensors are programmed to alert Draeger if his glucose levels rise or fall to dangerous levels. But sometimes Draeger would be sleeping so deeply, he’d miss the alarm. So, when his girlfriend stayed the night, she’d inevitably wake him up to let him know.

“I was getting whacked in the middle of the night,” he said with a laugh.

Now, thanks to a do-it-yourself artificial pancreas (AP) that Draeger uses, his days of getting “whacked” in the middle of the night are few and far between.

On most days when he wakes up, Draeger’s blood glucose level is at a place that makes it possible for him to get up and go about his day.

“When you wake up in range, it saves you a lot of time,” he told Healthline. “It makes your day so much better.”

Read more: People with diabetes more likely to die after a heart attack »

Doing it yourself

For the past few years, a handful of do-it-yourself APs have cropped up online.

These homegrown systems use sophisticated algorithms that allow glucose sensors and insulin pumps to communicate for the first time.

At its core, the technology gives type 1 diabetes patients a more detailed analysis of their glucose level. That precise reading in turn provides the user a more accurate dose of insulin depending on where their glucose levels register.

People within this loosely connected community of homemade APs say their devices are a much-needed piece of technology that “closes the loop” for type 1 diabetes patients to better manage their disease.

Their mantra, “we’re not waiting,” is a direct criticism of the U.S. Food and Drug Administration (FDA), which they say isn’t moving fast enough to bring an AP system to market.

But last week the FDA made a surprise announcement that it approved one kind of AP. The Medtronic MiniMed 670G is for people 14 years of age and older with type 1 diabetes.

The system includes a sensor that automatically monitors blood glucose levels, and a pump with a patch and catheter that adjusts the amount of insulin needed. Users only have to make manual insulin dosage requests to counter the carbohydrates they consume at a meal.

“This first-of-its-kind technology can provide people with type 1 diabetes greater freedom to live their lives without having to consistently and manually monitor baseline glucose levels and administer insulin,” Dr. Jeffrey Shuren, J.D., director of the FDA’s Center for Devices and Radiological Health, said in a press release.

Read more: 29 Things only a person with diabetes would understand »

Constant measurements

More than in the United States have type 1 diabetes, according the U.S. Centers for Disease Control and Prevention (CDC). That amounts to about 5 percent of people who have diabetes, according to the agency.

Having type 1 diabetes means your pancreas doesn’t produce insulin, which is needed to digest and absorb glucose in the body.

People who have the disease monitor their glucose all day, every day. When they wake up, before they eat, before they exercise, before bed, even before a big meeting or presentation.

That happens through a sensor, also known as a continuous glucose monitor (CGM). People can also choose to prick their finger and get a reading through a drop of blood.

An insulin pump, manual shot of insulin, or insulin pen is then used to administer the right amount of the hormone, if needed.

The goal of all this constant monitoring is to stay in 100 range, or flat, according to Draeger. The 26-year-old was diagnosed with diabetes at age 3. He’s used an insulin pump for 14 years and a CGM for four years.

“If I go low, it’s kind of like I’m drunk. I feel anxious, weak, shaky. I lose my concentration,” he said. “If I go high, I just feel [bad]. Dehydrated.”

In particular, “going low” can have consequences. People can lose consciousness in that state.

Read more: What does a diabetes service dog do? »

A lot of work

Draeger said his AP takes away a lot of the guesswork around giving himself an accurate insulin dose, also known as a bolus.

For example, at mealtime he must enter what he plans to eat. The algorithm will then determine if the carbs he is about to consume are refined or complex. Plus, it factors in the absorption rate of the meal.

“Before, I’d look at my CGM and look at my pump. Then I’d have to figure out if I had to give myself more insulin,” he said. “This artificial pancreas — it closes the loop. It will do some treatment decisions for you. It will give me a bolus recommendation and prediction of where I’m headed. I don’t even have to pull out my pump.”

Draeger said his AP provides a newfound comfort. But it was quite the process to get there. After all, it’s not called DIY for nothing.

To make the system work, he had to purchase a radio that connects the CGM, the pump, and the app. Draeger also had to download the Loop app, as he calls it, from GitHub and write the program himself on Xcode. Draeger is not a developer so he enlisted a friend to help.

Sounds like a lot of work? Well, there’s more.

The app only lasts for seven days. That’s because Xcode requires Draeger to have an Apple developer’s account, which he doesn’t. So he has to rebuild the system every week, because the app disappears from his phone.

“There are drawbacks,” he said “It’s also not 100 percent reliable. The radio sometimes doesn’t work.”

Read more: Diabetes treatment without needles »

Safety concerns

The AP system, such as the one Draeger is using, is not FDA-approved. The government agency is aware of these homegrown devices and has stated publically concerns about their overall safety.

Dr. Carol Levy is clinical director for the Mount Sinai Diabetes Center and lead researcher for the hospital’s AP clinical research studies.

She understands the community’s collective frustration with waiting for FDA approval but does not recommend that her patients use a DIY AP.

“These homegrown systems can be problematic,” she told Healthline.

For starters, type 1 diabetes doesn’t act and react the same way in everyone, according to Levy. An algorithm that works well for someone may not be suitable for another person.

This can make it challenging for people who use these devices to keep their blood sugar at the right levels.

Levy and her patients are currently participating in a number of trials on various AP systems. She said there is great promise in many that are currently undergoing analysis, and expects more APs to become available in the coming years.

As for the FDA’s announcement regarding the MiniMed 670B, Levy is thrilled.

“I think it’s huge. It means the FDA will be willing to accept this device,” she said. “It’s a first step. They’re going to keep getting better.”

Draeger agrees.

“This will lead to further innovation in decision support,” he said. “Which is great because it will alleviate the burden and second-guessing associated with daily treatment decisions.”