Final Report

Home
Deliverables
Project Definition
Customer Needs
Target Specs
Concept Generation
Concept Selection
Project Proposal
Manufacturing Documentation
Final Report

Downloads

Valid HTML 4.01!

Introduction


The final report contains information gained through the prototype, which is used to determine whether or not the device meets the needs of the customer. It contains the following sections:

Technical Description of Proposed Device


The intent of this project is to attempt to emulate the actions that a human would take to dose a syringe. Consequently, the problem does not lend itself naturally to functional decomposition; breaking down the problem into a sequence of steps allows each step in the process to be addressed as its own subproblem. Once each of these subproblems was addressed, the individual solutions were combined to form the final device.

Key Subproblems

From the breakdown of procedure steps, six subproblems were extracted and addressed separately. Each subproblem was addressed separately in order to allow for the best solution to each critical component of the dosing process, however some consideration was taken to guarantee that the solutions to these subproblems were compatible with each other.

The following six subproblems were isolated: bottle loading, bottle mixing, syringe loading, bottle/syringe interface, syringe dosing, and the user interface. Each subproblem will be addressed in the following sections. When developing these systems, the needs of our users were always kept in mind. These user needs are shown below:

Bottle Loading

The first step in the dosing process is to load the bottles into the device. This task is complicated by the fact that a user of this device could have a number of disabilities, including blindness and muscle tremors. Both of these disabilities would make it difficult to accurately and correctly load a bottle. As such, the process was designed to be as forgiving as possible. In other words, if the user could get the bottle to a very general location, the device would then guide the bottle to its final and correct location. The solution to this problem is shown below:

Bottle Drum and Door Mechanism
Figure 1: Bottle Drum

The material used to create the piece is High Performance Composite Material produced by Z Corporation for use with their Z310 rapid prototyping device. There are two holes on the top and bottom of the drum to help ensure proper positioning of the drum during dosing. The piece incorporates a hinged door that drops from the device at a 45 degree angle aided by a spring underneath the door. The door is concavely curved in order to funnel the bottle to the center of the door. The angle of the door would then enable the bottle to slide down into its proper position. Therefore, instead of having to place the bottle into a definitive location, the user can drop the bottle anywhere on the door, and the angle and shape of the door allows the bottle to always slide into the proper position. If the bottle is positioned correctly, the door will shut completely, locking in place through the use of a spring-loaded latch. Correct orientation of the bottle is ensured by the form of the bottle being molded into the back of the cylinder into which the door is closing. For example, if the bottle is upside down, the door will not close. This design ensures that the bottle is loaded correctly without the user having to be perfectly precise in placement.

Bottle Mixing

Loading the bottle(s) is merely the first step of the process. It is important to keep in mind that many diabetics can require the use of 2 different kinds of insulin and as such, can have two different bottles that they may draw insulin from. In some cases, they may need to mix the two types of insulin into a single dose. Therefore, the ability to load two bottles into the device and mechanically move the bottles to choose the proper type of insulin is required. Also, some types of insulin (generally long-acting) require the bottle to be mixed prior to dosing so that the consistency of the insulin is even throughout. Furthermore, it is recommended that the mixing of the bottles be gentle, for shaking the bottle violently or excessively can cause a breakdown in the chemical makeup. In order to maximize efficiency and minimize cost, it proved beneficial to combine the movements of both bottle selection and bottle mixing into one motor-controlled motion. The following concept fulfilled these requirements:

Bottle Mixing Mechanism
Figure 2: Bottle Mixing Concept

As shown in the picture above, the drum that is shown in Figure 2 is coupled to a stepper motor via a « inch diameter shaft. The motor allows for 360 degrees of rotation in either direction, although for our design, the drum will always rotate counter-clockwise. Next, two additional switches are placed on the back of the bottle drum to determine when the bottle is properly aligned with the syringe for dosing. However, not only must the controller know when the bottle drum is aligned but also which type of insulin bottle (long vs. short-acting) is currently in the dosing position. To achieve this, one end of the bottle drum only activates one switch. In other words, depending on which of the two switches is tripped, the microcontroller knows whether that is the side of the drum with the long-acting insulin bottle or the short-acting insulin bottle.

This concept was chosen because of the versatility of the design. This design allows the user to have two bottles loaded simultaneously, removing the need to switch bottles when performing a mixed dose. This concept also allows for a thorough, yet gentle mixing of the insulin. Most importantly, this concept has the capability to switch between the two insulin bottles with the same motion that it uses to mix the insulin, limiting the degrees of freedom of the device, making the device less complicated, less prone to breakdown, and more cost effective.

Syringe Loading

Now that the bottles are properly loaded and mixed, it is necessary to load the syringe. Again, the users of this device may have disabilities that can make accurate placement difficult. Therefore, it was hoped that a guide could be developed to help the user place the syringe in the correct location. Also taken into account was the fact that the syringe will change in length as it is dosed. The mechanism was developed:

Syringe Loading Mechanism
Figure 3: Syringe Loading Mechanism

The material used to create the piece is High Performance Composite Material produced by Z Corporation for use with their Z310 rapid prototyping device. As shown, there are multiple guides incorporated into this design. The first tapered guide, shown at the bottom of Figure 3, will help guide the syringe into the proper place laterally. The vertical placement is ensured by keeping the wings of the syringe flush with the base as it is moved back into the device. Finally, the plunger of the syringe is guided into a separate location by a tapered piece. The area in between allows space for the user's hand to push the syringe in its proper place. This is an entirely external load. This allows for easy access of the user, for the syringe to move up and down, and for the syringe to be removed easily after dosing. The two "pillars" fit into the holes in the drum described above, and, again, help ensure proper positioning during dosing.

Syringe Dosing

In order to dose the syringe with the user-input insulin volume, a mechanism controlled by the microcontroller is required. In its simplest form, the syringe plunger will be actuated by a drive mechanism controlled by a motor. The plunger is connected to the screw by another rapid-prototyped piece attached to the table by two screws.

A drive screw gear will actuate the plunger. Due to their high degree of accuracy, drive screws are the most common type of drive system used in linear motion control. Specifically, an acme drive screw, which consists of a rotating screw and translating nut, will be used. While they are less accurate than ball screws, they are quiet, low-cost, require less maintenance, have smoother motion, work well in vertical orientations, and provide resistance during and after movement. Since the device utilizes a vertical syringe orientation, ideally needs no maintenance, and requires precise accuracy, the acme drive screw is an appropriate choice. This was accomplished by purchasing a linear motion table which utilized an acme screw and allowed for the coupling of a motor to the screw to dose the syringe.

In selecting a motor to drive the acme screw, two major factors were considered. These factors, ease of motor control via the microcontroller and accurate shaft position control, lent themselves most directly to the use of a stepper motor. Stepper motors are specifically designed to rotate the shaft by a precise amount for each current pulse received. This step resolution is very consistent and permits open-loop applications without sacrificing accuracy. Typically, motor stalls occur when the amount of torque necessary to drive the load at the desired speed is not generated. Unique to stepper motors is the fact that decreasing motor speed actually increases available torque output. In the context of normal motor operations, the dosing of the syringe is not a high-speed application, so enough torque will be available such that stalling should be avoided. Finally, though servo motors not only match the accuracy of steppers but also have a built-in feedback mechanism, their high cost and complicated controls ruled out their use.

To control the stepper motor, a UCN5804 IC driver was used. This driver will receive inputs from the microcontroller indicating how many motor steps are required for a specific dose. It will then output the proper current signals to control the motor. The circuitry for the driver is shown below.

Stepper Motor Driver Schematic - Click to Enlarge
Figure 4: Stepper Motor Schematic

The linear motion table and stepper motor allows for bi-directional actuation of the plunger. In other words, the plunger is able to be drawn both backwards and forward. This is an important ability for the removal of bubbles that are generated in the dosing process. In order to remove these bubbles during dosing, it was experimentally verified that by overdrawing ten units of insulin with each dosing, and then pushing the extra ten units back into the bottle would effectively remove any bubbles present in the syringe

Linear Motion Table for Syringe Dosing
Figure 5: Linear Motion Table used in Syringe Dosing

Finally, two optical sensors were used to detect the home position of the linear motion table and an upper limit at which the syringe plunger should not be actuated. After the device has dosed a syringe, the motion table that actuates the syringe must return to an initial state to prepare for the next dosing cycle. In order for the motion table to return to the same spot for each dosing cycle, an optical sensor is used to let the microcontroller know when to stop pulsing the stepper motor on the return path. Similarly, an additional optical sensor is used to prevent the motion table from pulling the plunger entirely out of the syringe barrel.

User Interface

The user interface, like the rest of the device was designed with our user needs in mind. Thus, an interface must be designed that not only accomplishes this objective but also is accessible to individuals with blindness, deafness, neuropathy, and/or tremors.

User Interface [blurry]
Figure 6: User Interface

User Input

The user provides input to the device through a single device: an optical encoder that doubles as a pushbutton. The knob of the encoder can be turned to cycle between user responses to device instructions, or it can be used to dial-in a numerical value, such as a dose amount. Through the pushbutton, the user can enter his/her selection into the device.

Visual Output

The visual output of the device comes from three separate four-character displays. Two of the displays are linked together, through which device instructions or error messages are conveyed to the user. If the message is longer than the eight character span of the two displays, the message is scrolled across the display from right to left at a readable pace. The third display conveys the user's current input selection, whether it is "Yes", "No", or a numerical value. The nature of the text displayed on the user input display depends on the state of the machine at the time.

Audio Output

Messages to the user that are displayed through the mechanism described above are also spoken to the user through a speech synthesizer. The phrase is spoken in regular intervals to remind the user what to do at a particular point in the process. The speech synthesizer also speaks the text contained in the user input display, which provides audio confirmation of the user's selection.

Technical Details

By using a micro controller, each of the device modules could be developed independently, with the only requirement being that each module has a digital interface through which it could interact with the microcontroller. The microcontroller could then act as the brain of the device, transforming user input into visual and audio feedback, as well as controlling mechanical output from the motors in the device.

The PIC18 micro controller by Microchip was selected as the microcontroller for this device because group members were already familiar with the architecture. PIC microcontrollers are 8-bit RISC microcontrollers which can be found in a variety of applications ranging from automobile control systems to biomedical devices. Their relatively short instruction set and simple programming interface have made them a popular choice for hobbyists and instructors to use as teaching tools.

The optical encoder used for user input sends out a standard quadrature signal. Rather than charge the microcontroller with the task of monitoring the output of the encoder, an encoder to counter interface chip was used to convert the quadrature signal to pulses, which fed into three cascaded BCD counters. These counters were used by the micro controller to determine how far the encoder had been turned since it last checked.

The displays used each consisted of four characters, which in turn where composed of a 5x7 led matrix. The display has a built in ROM, which decodes ASCII codes into the proper combination of LEDs to display the character.

Since both the displays and the BCD counters require a large number of pins with which to interface, two I/O expansion ICs were used. The expansion ICs use an I2C interface, which meant that only two of the microcontroller's pins had to be allocated to managing both the displays and the encoder.

The speech output of the device comes from a hobby robotics speech module. It accepts a stream of characters through an I2C interface. It then converts the string of characters into the appropriate audio signal and sends the signal to a built-in speaker. Since the speech module also used an I2C interface, it did not consume any more pin resources than that which was already allocated for the display and encoder circuitry.

Schematic of User Interface - Page 1 - Click to Enlarge
Figure 7: User Interface Schematic - Page 1

Schematic of User Interface - Page 2 - Click to Enlarge
Figure 8: User Interface Schematic - Page 2

Bottle-Syringe Interface

Lowering the bottle drum onto the syringe for dosing was the only subsystem that presented integration difficulty. In order to move the bottle drum up and down, two steel shafts with linear bearings were used. The drum could then move up and down on these shafts. This linear motion was intended to be accomplished via an acme screw turned by a DC motor. The DC motor, in turn, would be controlled by an H-bridge circuit configuration. Finally, the microcontroller would be responsible for then providing the pulses to the H-bridge that would activate the DC motor. Unfortunately, friction in the system proved to be too high and the DC motor tested was inadequate.

Bottle-Syringe Interface Mechanism
Figure 9: Bottle-Syringe Interface

Integrated Solution

With these concept solutions generated for the respective subproblems, these solutions are integrated into a complete system.

The powering of the entire device will be accomplished using 120VAC from a standard electrical outlet. This voltage will need to be stepped-down in order to power the motors, interface, and microcontroller. A commercial power supply will be used to provide the DC voltages needed to power the various components. The overall powering of the device is accomplished through the use of an Elpac triple output external DC power supply. This power supply provided +5, +12, and -12 V. The +5 V output is used to power the digital logic circuitry, while +12 V is used to power the stepper motors. Finally, the -12 V output is used to power two 741 op-amps.

The device exterior was built out of Plexiglas and held together through the use of L brackets and screws.

Two of the many switches can be categorized as safety switches. These switches sense when the door that covers the insulin loading bay and the door that covers the bottle drum are open. If either of these doors happens to be open during the dosing process, the switch opens and the process aborts. This prevents the user from coming into contact with any moving parts.

Final Prototype
Figure 10: Integrated Device

Software Development


Software Overview

In order to make the system responsive and meet key timing requirements a "hard" real-time operating system was necessary. For this device, uC/OS-II (pronounced "micro see oh ess too") was used because the source code for the port to the PIC18 family is freely available and also because of the group's familiarity with the operating system. uC/OS-II features a preemptive real-time kernel with a broad selection of features for managing resources and regulating inter-task communication. By using this real-time operating system, the microcontroller could run multiple tasks simultaneously, each of which could handle a different part of the device. The result is a system that reacts quickly to user input and other changing conditions within the device.

The source code for this device was written entirely in C using the MPLAB IDE provided by Microchip. The C18 compiler, also provided by Microchip, was used because it too was freely available as an educational demo version.

Task Interaction Diagram
Figure 11: Task Interaction Diagram

The following is a brief description of each of the software tasks running in the final application:

Button Task

The button task manages input coming from the optical encoder and pushbutton switch. The button task has three modes of operation. The button task can either as a counting mechanism for entering a dose amount, a user menu selection mechanism to allow the user to choose a response to the device's prompts, or the button task can track nothing and only track pushbutton presses.

The button task waits on a message from a mailbox. If a message is received in the mailbox, the button task changes its mode of operation according to the contents of the message. If it times out waiting on the message, it checks the status of the BCD counters connected to the encoder and updates the user input display accordingly. It then checks the state of the pushbutton part of the optical encoder. If it detects a button press, it sends a message to the main task through a mailbox. The task then loops back and again waits for a message from the mailbox.

Display Task

The display task handles the text that scrolls across the user displays. The task first waits for a message to arrive in a mailbox, which would tell the display task to put a new message on the display. If a new message arrives, it clears the display and prepares to scroll the new phrase accross the display. If it times out waiting on the mailbox, it shifts the existing text over one character, creating the scrolling effect. It then goes back to waiting on the mailbox.

Main Task

The main task is responsible for processing user input received through the button task, and changing the output of the device. The main task is implemented as a finite state machine, with each corresponding to a different step in the syringe dosing process, ranging from gathering user input to actuating the mechanical parts.

Typical flow of events for a given state in the main task is as follows:

  • Prompt the user
  • Wait for response
  • Use response from user to select next state

Alternatively, a state may be flow like this:

  • Send command to motor task
  • Wait for response from motor task as to success of command
  • Use response from motor task to select next state

Since the main task receives all messages from the motor task, it is also responsible for reporting error conditions to the user.

Motor Task

The motor task manages all of the motor output of the device through the digital interfaces built into the motor circuitry. Similar to the button task and the display task, the motor task first waits for a message to arrive in a mailbox. Once a message is received, the motor task carries out the command from the message. When the motor task has completed the command, it sends the result of the command out to a mailbox. The result either indicates success or that the motor task encountered an error.

Although the functions of the motor task could have been broken up into a group of functions, having a task manage all motor functions guaranteed that only one motor could be energized at a given moment. This provided protection against mechanical damage to undesirable motor movements, as well as a safeguard to keep from drawing too much current from the power supply.

Speech Task

The speech task handles all requests to output speech from the speech synthesizer module. Speech requests are entered into a queue. The speech task pulls commands from the queue and sends the appropriate text to the speech module. It then waits until the speech module is finished speaking before it gets the next request from the queue.

Serial Output

In addition to the various tasks, there are also a series of functions that allow text to be sent out to an RS232 serial connection. This functionality is used exclusively for debugging purposes. Consequently there was no need to regulate the text sent to the serial port. This allowed the software developer to send status messages to the serial port, indicating to the developer when certain events were occurring in the system.

Experimental Verification


Despite the device's complexity, the system was ultimately evaluated by its ability to dose insulin to the nearest 0.01 cc. This was the critical design requirement that each subsystem contributed to achieving. In order to test the dosing, the dosing subsystem was independently tested and a calibration curve constructed. This subsystem consisted of the linear motion table, the stepper motion for actuating the motion table screw, and the rapid-prototyped syringe parts. The following calibration curve shows that the dosing was accurate, as evidenced its linearity.

Syringe Dosing Calibration Curve
Figure 12: Syringe Dosing Mechanism Calibration Curve

Due to time constraints, the group was unable to test out other specifications of the device, such as the usability, on human subjects.

Economic Justification


At the end of the project, the final cost of the prototype amounted to just over $1700. This value does not necessarily represent how much it would cost mass produce the device. This is only for the cost of the prototype. The per unit cost of a device produced in mass quantities would be less because bulk purchasing would lower the cost per component, and fixed costs such as those associated with software development would be spread out over the span of more units. In addition, the spatial orientation could be optimized to reduce the amount of material needed for the housing.

-Part OrderedPart NumberDistributorDate OrderedCost
1Optical Encoder61C11-01-08-02Allied Electronics1/29/200528.78
2Display ICPD4337Arrow Electronics, Inc.1/30/200537.85
3Encoder Interface ICLS7183/184US Digital2/2/200516.95
4Microcontroller Evaluation Board and ICDPIC DEM 2Microchip2/4/2005243.83
5Speech Synthesizer BoardSP03Zagros Robotics2/2/200592.45
6Target microcontrollerPIC18F4680Microchip2/24/20050.00
7I/O Expansion ICMAX6956Maxim IC2/14/20050.00
8RS232 - TTL Converter ICMAX3232eMaxim IC2/14/20050.00
9BCD Counter74LS192Debco Electronics Inc.2/10/200512.98
10Logic CMOS - BCD to 7-Segment Latch Decoder10CD4511Electronix Express2/15/20053.25
11LED Grab Bag 100 Piece Assortment32LEDGRABElectronix Express2/15/20055.90
12Diode Grab Bag 50 Piece Assortment32DIODEGRABElectronix Express2/15/20054.75
13101 Piece Capacitor Assortment Mylar Disc and Electrolytic Combo32QTR2CAPElectronix Express2/15/20053.95
14RSR Anti-Static Wrist Strap Medium Size - 6 Ft. Cord 0302-BWS150Electronix Express2/15/20053.50
15Shipping-Electronix Express2/15/20059.00
16Display IC (2)PD4335Arrow Electronics, Inc.2/15/200564.93
17Aluminum-Mount Bronze Bearing 2 Bolt Flange-Mount For 1/4" Shaft Dia, 1-5/8" Base5912K41McMaster-Carr4/4/200515.38
18Hardened Precision 440C Stainless Steel Shaft 1/4" OD, 6" Length6253K11McMaster-Carr4/4/20058.84
19303 Stainless Steel Mounting Flange Fits 1/4" & 3/8" Precision Acme Round Nut1329K11McMaster-Carr4/13/200536.60
20Corrosion-Resistant Precision Acme Round Nut 3/8"-10,10 Turns/In, 1 start95075A227McMaster-Carr4/13/200523.79
21Two-Piece Clamp-On Collar Aluminum, 1/4" Bore, 5/8" Outside Dia, 9/32" Width6436K131McMaster-Carr4/4/200517.04
22Helical Beam Coupling 3/8" X 1/4" Bore, 1-1/4" Outside Dia X 2" Length6208 K31McMaster-Carr4/4/200525.48
23304 Stainless Steel Precision Acme Lead Screw RH Thread, 3/8"-10 Turns/In, 10 TPI, 1 Start, 3'L98980A120McMaster-Carr4/4/200541.89
24Helical Beam Coupling 1/4" X 1/4" Bore, 5/8" Outside Dia X 7/8" Length6208K69McMaster-Carr4/9/200520.75
25Metric Set Screw Collar Steel, 2 mm Bore, 1/4" Outside Dia, 3.5 mm Width57485K61McMaster-Carr4/9/20051.00
26Metric-To-Inch Helical Beam Coupling 6 mm X 1/4" Bore, 30 mm Length, 25 mm Outside Dia2464K3McMaster-Carr4/4/200531.60
27External Retaining Ring for Linear Bearing for 7/8" Bearing OD9968K24McMaster-Carr4/4/20051.76
28Shipping-McMaster-Carr4/4/200511.25
29Shipping-McMaster-Carr4/4/200510.75
30Shipping-McMaster-Carr4/4/20053.75
31Triple Output Power Supplyeps115-nddigi-key4/13/2005134.84
32brackets/screws/acrylic sheet-menards4/13/200548.44
33stepper motors55m048d2u/4031007nddigi-key4/13/200544.42
34last semester stuff-menards/digikey12/1/200490.00
35steppers/nails/ect-digi-key/menards4/28/2005230.83
36Mechanical roller switches-digi-key4/28/200535.59
37infra-red sensors-honey well4/27/200560.00
38linear motion table--1/29/2005100.00
39brackets/screws/acrylic sheet-menards4/28/200575.00
40random audio/plastic/motors-menards4/30/200550.00
41bearings-McMaster-Carr5/1/200552.11
42Brackets and last minute parts-menards5/1/200512.50
-Total---1711.73

Conclusion


The process of dosing a syringe requires, among other faculties, considerable amount of manual dexterity and good vision to execute. Disabilities such as low vision or poor motor control can make this routine task cumbersome or impossible. Existing dosing devices fall short of meeting the needs of the hypothetical clients in that they either are not accessible enough to accommodate the disabilities of the clients or they require the use of expensive proprietary needles and medicine bottles. In most cases, these solutions are built entirely around dosing insulin and lack the flexibility to handle other types of medication. Our proposed device will go the distance where others have fallen short and provide accessible syringe dosing for our hypothetical clients, as well as others with disabilities other than those of our clients.

The syringe dosing device has been carefully designed at each step of the dosing process to be as forgiving as possible, accommodating all types of users. Loading a bottle into the device is as simple as loading a cassette tape into a stereo, and the specially designed syringe holding mechanism guides the user's actions to ensure that it is positioned correctly every time. The user interface for selecting the dose requires only a few button presses before the device is on its way dosing the syringe.

Ultimately, the dosing mechanism was accurate. This was the underlying goal of our project and, thus, we have been largely successful overall. Unfortunately, time constraints prevented us from completely integrating the entire system. Nonetheless, the complete system is functionally sound and fully meets the needs of anticipated customers.


Manufacturing Document - Top - Downloads