The development of an artificial pancreas is placed in the context of the history of the field of feedback control systems, beginning with the water clock of ancient Greece, and including a discussion of current efforts in the control of complex systems. The first generation of artificial pancreas devices included two manipulated variables (insulin and glucose infusion) and nonlinear functions of the error (difference between desired and measured glucose concentration) to minimize hyperglycemia while avoiding hypoglycemia. Dynamic lags between insulin infusion and glucose measurement were relatively small for these intravenous-based systems. Advances in continuous glucose sensing, fast-acting insulin analogs, and a mature insulin pump market bring us close to commercial realization of a closed-loop artificial pancreas. Model predictive control is discussed in-depth as an approach that is well suited for a closed-loop artificial pancreas. A major challenge that remains is handling an unknown glucose disturbance (meal), and an approach is proposed to base a current insulin infusion action on the predicted effect of a meal on future glucose values. Better "meal models" are needed, as a limited knowledge of the effect of a meal on the future glucose values limits the performance of any control algorithm.