How to design an insulin pump Learn about the purpose of an insulin pump, its overall workings, and the requirements needed for its design as well as implementation. By Asha Ganesan Applications Engineer Cypress Semiconductor In the body, insulin is a hormone vital to carbohydrate regulation and fat metabolism. It is secreted regularly within the body and aids in converting incoming glucose into energy. When a normal human being s body cannot secrete enough insulin, his/her blood glucose level rises, resulting in many adverse medical conditions. To treat this problem, certain medicines are used to trigger more insulin secretion within the body. However, this doesn t suit many diabetic patients. Therefore, many of those suffering from diabetes take regular doses of insulin injections. The disadvantage of this approach is that the insulin is injected only in bulk at repetitive intervals and is not continuously mixed with blood as it when secreted during a body s normal functioning. Today, many physicians recommend the use of insulin pumps, which are portable devices attached to the body permanently and deliver constant amounts of insulin to the body via a catheter placed under the skin. The functioning of an insulin pump closely resembles the way in which insulin is secreted normally. Figure 1 shows how an insulin pump is interfaced with a human body. Figure 1: Interfacing Insulin pump with the human body. As per today s statistics, 366 million people around the world suffer from diabetes, yet only around 0.1 per cent of them wear insulin pumps to treat it. Measurement of insulin dosage Insulin is measured in units where 100 units of insulin is equivalent to 1 ml. In other words, one unit is 10 µl. The insulin pump usually feeds insulin to the body in two formats. They are known as a bolus dose and a basal dose. A bolus dose is one that is pumped to cover food eaten or to correct a high blood glucose level. The amount of insulin fed to the body would be high at this dose. A basal dose is one that is pumped continuously at an adjustable basal rate to deliver insulin needed between meals and at night. Figure 2 indicates the profile of insulin units pumped into the body during bolus dosage and basal dosage during a 24-hour window. EE Times-Asia eetasia.com Copyright 2013 emedia Asia Ltd. Page 1 of 5
Figure 2: Insulin dosage concentration vs. time. The duration of bolus dosage shown here is just an example. The duration of bolus and basal doses varies from person to person and should be given as per the physician s recommendations. This means the insulin pump user must have the ability to modify the profile of the rapid-acting insulin by shaping the bolus accordingly. Users can experiment with different bolus shapes to determine which is best for any given food so that they can improve control of blood sugar by adapting the bolus shape to their needs. Overall working of an insulin pump An insulin pump or any electronic device used in a critical medical application like this must meet FDA standards, and hence this article takes all these standards into consideration. 2 A block diagram of an insulin pump is shown in figure 3. Figure 3: Block diagram of an insulin pump. The device includes: A control unit: A processing module is required to control the position of the piston (shown in Figure 3). A reservoir: A reservoir or a cartridge is needed to store the insulin that is to be fed to the body. Typical capacity is around 2-3 ml (200 to 300 insulin units). The reservoir needs to be re-filled whenever it is near empty. A disposable infusion set: The disposable infusion set includes a cannula (a tube with an injection needle) for subcutaneous insertion under the skin (the layer under the skin where the injection needle is inserted) and a tubing EE Times-Asia eetasia.com Copyright 2013 emedia Asia Ltd. Page 2 of 5
system to interface the insulin reservoir to the cannula (similar to the typical syringe with piston and needle). A related sub-product for controlling/managing diabetes is a continuous blood glucose monitor. This device provides real-time glucose-level monitoring through a subcutaneous sensor. The sensor can be left in place for several days at a time, which reduces the need for the patient to test multiple individual blood samples. Future developments would bring in a closed loop system with the glucose monitor as a feedback sensor to change the dosage rate. The glucose monitor used in the feedback loop can also be designed using a programmable SoC. 3 A separate SoC can be used for this or the entire closed loop system can be integrated in a single SoC. Implementing an insulin monitor using a PSoC Figure 4 shows a block diagram of the interface between the processor in this case, an SoC from Cypress PSoC family and the reservoir and infusion set. Figure 4: Block diagram showing the implementation of an insulin pump built using a programmable SoC, in this example the PSoC family from Cypress. Section 1: Controlling the injection of insulin As discussed earlier, some logic must be available to control the position of the piston. A DC motor or even a stepper motor may be used to drive a screw, which in turn pushes the piston. Since the rate at which the insulin is injected is extremely small, the piston has to be pushed very slowly with many revolutions of the motor. This is achieved using a gear logic. Note that this motor control logic cannot be used as an open loop system as it would lead to a change in speed if the load is changed. Thus, some feedback sensors like rotary encoders can be used to monitor the current speed at EE Times-Asia eetasia.com Copyright 2013 emedia Asia Ltd. Page 3 of 5
which the motor is running and also some logic can be used to compare it with the required speed and accordingly modify certain settings in the motor drive control. Link [4] provides a detailed implementation of how to monitor/control the motor speed by the use of rotary encoders using the PSoC3/5. Since the insulin injected has to be greater during the bolus stage and lessor during the basal stage, the motor has to be driven at a faster speed during the bolus stage and at a slower speed during the basal stage. Thus, the logic must be able to shift between the two modes. Section 2: RTC and EEPROM We can use the SoC s internal RTC (real-time clock) block to store the current date and time in internal EEPROM (electrically erasable programmable read-only memory). This allows the date and time to be stored even if the device is powered off. The system can also store the date and time at which the cartridge/ reservoir has to be refilled (easily determined since the system knows the rate at which insulin is pumped into the body) as well as the capacity of the reservoir. The system can also drive an alarm (i.e., a loudspeaker driven by an internal DAC) to indicate when the reservoir becomes empty. As stated in the previous section, the system needs to know when to switch the motor speed to the one suited for bolus mode and when to the one suited for basal mode. For this, counter blocks available in PSoC 3 and 5 can be used with a very low frequency source clock on the order of 1Hz. This 1Hz clock can be derived from the 32.768 crystal used to drive the RTC. Section 3: Avoiding blockage through the flowpath As a safety precaution, it is important to monitor if the insulin is properly being injected into the body or if there is any blockage in the flowpath. If there is a blood clot or a tissue development at the place where the needle is injected that blocks the flow of insulin, for example, the pressure in the cartridge will increase. We can use a pressure sensor (silicon pressure sensors are available) 5 surrounding the cannula and feed its output to the processor. Similar to a strain gauge sensor, a pressure sensor converts pressure to a corresponding change in resistance. To detect a change in resistance, the sensor can be placed in a wheatstone s bridge to generate a differential voltage which can then be fed into the SoC for further processing. Also, the insulin to be fed into the body must be maintained within a suitable temperature range to prevent denaturing. This can be achieved by monitoring the temperature of the insulin in the reservoir or the cannula through a sensor like a thermistor that can then be interfaced to SoC. Finally, two analogue inputs one from pressure sensor and the other from the temperature sensor are fed to the SoC to monitor their current status via an integrated ADC. PSoC 3 and 5, for example, have high precision analogue front-ends to do such operations with resolution up to 20 bits and the ability to multiplex the signals through the same ADC. The resultant digital values can be compared with the stored threshold values to detect if there is a blockage (i.e., when the pressure sensor reading exceeds its threshold) or if the insulin has denatured (i.e., when the thermistor reading exceeds its threshold). The SoC can then sound an alarm or flash an LED if a blockage has occurred. This alarm can also be used to sound when the battery is almost drained. Section 4: Power management in this portable device The alkaline batteries (i.e., non-rechargeable) used in portable medical devices typically provide up to 1.5 V. An internal boost regulator in the SoC can boost this to the appropriate voltage to operate the SoC, 1.8 V in the case of PSoC 3/5. This boost regulator can boost even voltages as low as 0.5 V to be 1.8 V. Lithium batteries are recommended when using rechargeable batteries. Since this a handheld portable device, power consumption plays a major role in efficient operation given that the battery cannot be recharged or replaced often. Thus, the SoC needs to support multiple low power modes, including sleep/hibernate when the device is not in use, to aid in conserving battery power. PSoC 3 and 5 offer an additional low power mode known as alternate active mode where the CPU is turned off but certain digital and analogue blocks can still be operated. This enables an architecture where the insulin pump can operate the majority of time without the CPU. This means CPU operation (say an interrupt) is only needed when we are switching between bolus and basal dosages. Section 5: Display + I/O interface If the duration of basal and bolus stage has to be changed or if the concentration has to be changed with the duration fixed, there is no need for re-designing the entire system. The user only has adjust the system by a means such as pressing buttons. The touch sensing solutions, which Cypress Semiconductor provides as an in-built feature in PSoC, can replace the traditional mechanical buttons which are being used as of today. With the ability to also directly control a high-quality Graphics or segment LCD, the same display used to show information such as the current status and when the next re-fill will be required can also serve as the user interface by implementing a resistive touch screen on top of the LCD display screen. EE Times-Asia eetasia.com Copyright 2013 emedia Asia Ltd. Page 4 of 5
Section 6: USB features By implementing a communications port such as USB so that the device can talk to a PC, the insulin pump can log important data such as the time instances of insulin injection and dosage duration. USB also enables the option of charging the device s battery through a PC. Other considerations From the above description, it is observed that: 1. Each of the blockage sensing methods (pressure sensor, temperature sensor, etc.) requires a high-precision analogue front-end (AFE). With a traditional MCU, discrete components would be required to perform the necessary input measurements, increasing system size and cost compared to a SoC with an integrated analogue front-end that allows many different sensors to be interfaced to the CPU. 2. Insulin pumps are battery-powered devices so active power consumption and sleep current are important considerations. Also there is a need for boosting the voltage as the traditional MCUs operate at higher voltage range when the battery input provides a lower voltage than is required to power the MCU. These issues are eliminated by the high level of integration in SoC architectures. 3. Insulin pumps use a display to show the current status. A processor module supporting LCD direct drive or LCD control simplifies system design. 4. An insulin pump requires memory for storing the dosage history as well as certain thresholds for later comparison. EEPROM or another permanent memory storage technology needs to therefore be available, preferably integrated on the processor or SoC. 5. A serial communications interface such as USB allows data to be easily logged to PC periodically. 6. A touch screen user interface allows for a more intuitive and simplified interface. In addition, it eliminates the need for mechanical buttons which can wear. 7. Proper circuitry is needed for controlling the motor, which in turn pushes the piston to inject insulin into the body. 8. Certain insulin pumps also require the current glucose status within the body to adjust the flow rate. Traditional MCUs aren t appropriate for such a closed loop system as they would require additional external analogue ICs to implemented this. In contrast, an SoC has the elements required to create a closed loop system in a cost-effective manner. References [1] Importance of Electronics in Medical Applications - Part I. http://www.eetimes.com/design/medicaldesign/4407326/electronics-in-medical-apps-part-i--fertility-monitor-design-?ecosystem=medical-design [2] FDA rules in the design of medical equipments. http://www.fda.gov/medicaldevices/deviceregulationandguidance/standards/default.htm [3] Blood Glucose Monitor using PSoC. http://www.cypress.com/?rid=43661&source=header [4] Design of motor control system using SoCs. http://www.embedded.com/design/mcus-processors-andsocs/4405205/1/trade-offs-between-programmable-socs-vs--dedicated-mcus-in-motor-control [5] Silicon pressure sensors. http://www.mouser.com/catalog/645/usd/2049.pdf About the author Asha Ganesan earned her Bachelor s degree in electronics and communication at College of Engineering Guindy. She is currently working as an applications engineer at Cypress Semiconductor. She is gaining experience in PSoC 3 and PSoC 5 products and she assists customers with their PSoC 3/5 projects. EE Times-Asia eetasia.com Copyright 2013 emedia Asia Ltd. Page 5 of 5