Two main approaches right now are:
1. Soon to go commercial black-box MiniMed 670G which will be a few thousand Dollars.
2. DIY open-source hybrid loop system with Raspberry Pi at https://diyps.org/2016/05/12/how-i-designed-a-diy-closed-loop-artificial-pancreas/.
See https://www.wired.com/2017/04/wholl-first-meld-machines-diabetics/
Who’ll Be the First to Meld With the Machines? Diabetics | WIRED
Five years ago, the feds would never let a computer deliver a drug that could kill you. Then they approved the artificial pancreas.