A self-tuning, nonlinear controller was developed to drive portable or implantable micro-pumps for blood glucose control in diabetic subjects. The parameter estimation is based on a recursive least-square algorithm applied to a discrete time simplified mathematical model of the glucose system; the controller, which is integrated with the estimator, uses an extended minimum-variance method. The software was designed to drive a micro-controller wearable unit, operating with different kinds of glucose sensors, in order to perform chemical and biological experimentations. Some strategies were introduced to avoid hypoglycaemia, even tolerating a reduction in control speed and accuracy. The whole system was tested in a simulation study, performed on a mathematical model implemented on a personal computer. The tests were performed while simulating different controller structures and settings, and patient responses. They showed a satisfactory control behaviour, mostly as far as stability and robustness are concerned, in all simulated conditions.