I Built an Open Source Artificial Pancreas!

Sarah Withee

@geekygirlsarah

Artificial Pancreas

Thank you!

Artificial Pancreas???

Quick Rundown of How Carbohydrates Work

  1. You eat carbohydrates
  2. Your body breaks them into glucose and fructose
  3. Glucose goes into blood
  4. Pancreas sees extra glucose, makes hormone insulin
  5. Insulin triggers cells to start using up glucose
  6. Your cells use glucose+insulin for energy

Quick Rundown of Diabetes

Diabetes - When that process doesn't work

 

Type 1 - Auto-immune disease, Insulin-making cells
     destroyed

Type 2 - Cells are resistant to use what you do
     make

 

There are other rarer types too

Quick Rundown of Diabetes

In US, measured in mg/dL (milligrams per deciliter)

 

Normal people:        70-99 mg/dL

Diabetics aim for:  80-150 mg/dL

 

After eating, the number goes up

 

 

Why Diabetes Is Hard

Glucose too high (hyperglycemia)?
     Slowly get bad circulation problems,
     organs slowly die

 

Glucose too low (hypoglycemia)?
     Shaking, sweating, weakness, could land
     in hospital

Why Diabetes Is Hard

 

1 “unit” of insulin = 1/100 mL

Carb ratio: number of carbs / unit of insulin taken
Can be from 3g-50g per unit (3:1 to 50:1)

 

Varies by person, time of day, conditions, and over lifespan

Why Diabetes Is Hard

Carbs start absorbing within
10-20 mins

 

Insulin absorbs slowly
Fastest around 45-60 mins
Absorbs totally over 5 hours

(blue line)

Why Diabetes Is Hard

Stressed?
Sick?
Exercise?
Little bit of alcohol?
Lots of alcohol?
Hormones?

Glucose goes up

Glucose goes up

Glucose goes down

Glucose can go up

Glucose can go down

Glucose can go up/down

Why Diabetes Is Hard

Stressed?
Sick?
Exercise?
Little bit of alcohol?
Lots of alcohol?
Hormones?

Glucose goes up

Glucose goes up

Glucose goes down

Glucose can go up

Glucose can go down

Glucose can go up/down

Continuous
glucose

monitor

Insulin pump

Technology to the Rescue!

So... What's This Artifical Pancreas?

OpenAPS - Open Artificial Pancreas System

 

  • Linux-based IoT Device
  • Has 915 MHz transceiver
  • All open source-based software

CGM sends values over Bluetooth to xDrip+

Stored in Nightscout

Values load into OpenAPS rig

Rig sends RF to pump to dose differently

Live Demo (sorta)!

URL:  clicky

SSHing into "Sar-borg"

"Uh, it's not slimey"

"It can't be real if it's not inside of you, right?"

tl;dr   It's not a REAL pancreas, but replicates the functions

"Whoa... is this safe?"

tl;dr  yes

"It's online... Can't it be hacked?"

tl;dr  anything can be hacked, but it's too obnoxious/slow to do

"Is it annoying to carry all this around?"

tl;dr  kinda, but worth it

"What if you lose internet/battery dies?"

tl;dr  analytics stop, but pump goes back to default

Before Sar-borg

After Sar-borg

Where's It At?

OpenAPS-based system:
- Instructions:  https://openaps.readthedocs.io
- OpenAPS: github.com/openaps/oref0
- Nightscout: github.com/nightscout/cgm-remote-monitor
- xDrip+: github.com/NightscoutFoundation/xDrip

LoopKit-based:
- Instructions:  loopkit.github.io/loopdocs/
- LoopKit: github.com/LoopKit/Loop
- RileyLink: github.com/ps2/rileylink

 

Open Source Software to Change Lives

What if our software could change lives?

 

- Young type 1 children and their parents
- Older people
- Low income
- Those without health insurance

I Built an Artificial Pancreas

By Sarah Withee

I Built an Artificial Pancreas

  • 1,980