Medication Dispensing Device - Biomedical Engineering

advertisement
Automated Medication Dispenser
Kevin Villani, Eva Marie Suarez, Jacquelyn Masse
Team 6
RERC ACCESSIBLE MEDICAL DEVICE COMPETITION 2005-2006
Contact: John Enderle
University of Connecticut
260 Glenbrook Road
Storrs, CT 06269-2247
Phone: (860) 486-5521,
TABLE OF CONTENTS
Abstract
1 Introduction
1.1 Background
1.2 Purpose of Project
1.3 Previous Work Done by Others
1.3.1 Products
1.3.2 Patent Search Results
1.4 Map for Rest of the Report
2 Project Design
2.1 Design Alternatives
2.1.1 Design One
2.1.2 Design Two
2.1.3 Design Three
2.2 Optimal Design
2.2.1 Objective
2.2.2 Subunits
2.2.2.1 Main LabVIEW Program
2.2.2.2 Motor LabVIEW Program
2.2.2.3 Mechanical Components
2.3 Prototype
3 Realistic Constraints
4 Safety Issues
5 Impact of Engineering Solutions
6 Life-Long Learning
7 Budget
8 Team Members Contributions to the Project
9 Conclusion
10 References
11 Acknowledgements
12 Appendix
2
3
3
4
4
4
6
8
9
9
9
12
17
20
20
23
23
43
53
69
89
91
92
94
96
97
99
100
101
102
1
ABSTRACT
There are several devices available on the market that provide medication
dispensing at a predetermined time and are also light and portable. The additional
features on each of the products vary but none of them are as automated as some
clients with disabilities require. The medication dispensing device will contain the
same basic features several of the products on the market advertise, such as an
alarm indicating when a dosage must be taken and a record of pills that need to be
dispensed. In addition to these standard features, the medication dispensing
device will also be capable of cutting pills and tablets of various shapes and sizes
into halves and quarters. Another feature of this device is its easy loading,
requiring no individual container per dose or cassette loading.
The medication dispenser’s innovative design consists of a robotic arm and
cutting assembly which utilizes the symmetry of the pill to guide the position of the
blade. The vacuum on the robotic arm provides a means of transporting the pill
from the storage container, to the cutting assembly, and finally the dispensing
assembly. This device also allows the user via the laptop to obtain information
about the medication being dispensed, the number of pills remaining, the
expiration date of each medication, and activate the dispensing process once the
alarm has sounded. This fully automated system will satisfy the needs of clients
with limited mobility, eye sight, and memory.
2
1 INTRODUCTION
1.1 Background
The pharmaceutical industry is a major component of U.S. economy.
Scientific, social, aging demographic, financial, and convenience factors all
contribute to its growth. Scientific breakthroughs are fueling the development of
medications for conditions that were previously untreatable with drugs. People are
increasing their use of “lifestyle” drugs, such as Viagra and more medication is
being taken by senior citizens, especially as the baby boomer generation is aging.
The expensive costs of prescription drugs are being made more affordable by
many health plans. Furthermore, medications are increasingly being used to treat
chronic disease as a convenient alternative to waiting until the condition requires
surgery.
With individuals taking a growing number of different drugs, the market has
developed several ways of making medications easier to handle. Products range
from simple containers to store pill dosages per day, hand held pill cutting tools,
and medication reminder alarms to more expensive, complex devices. Many of
these devices can be problematic for people with poor eyesight, limited fine motor
skills or mobility, Parkinson’s Disease, or other physical ailments. The lack of
existing products on the market to suit such clientele gives rise to the need for an
automated medical device that will administer medication to the patient in an
accurate, dependable manner.
The following clients are those who these device is being tailored for to
meet their needs:
Bruce was born in 1960. He is an aerospace engineer and vehicle
enthusiast who lives with his wife and one cat. In 1999, he was involved in a
serious motorcycle accident which resulted in the paralysis of his legs and now he
uses a manual wheelchair. He experienced renal failure in 2003 and takes a large
number of medications daily.
Mary was diagnosed with Multiple Sclerosis in 1994. Over the past 10 years
her condition has declined steadily. Now age 50, she uses a walker and is able to
stand without support for 1 minute. She also has poor eyesight.
Sophia was born in 1970 and emigrated to the U.S. from Poland in 1987. In
relatively good health, Sophia had several small strokes in 2003, and now takes
heparin as a precautionary measure. Sophia has limited right arm function and
walks using a cane, but she continues her job as a social worker and is very active
in the community.
Arnold was born in 1952 and since his heart attack in 1999 has worked in
the mailroom of a large manufacturing company. He has diabetes and Parkinson’s
disease, and experiences slight to moderate tremors. He lives alone.
Rose was born in 1941. She is blind and was recently diagnosed with lung
cancer. With the recent death of her husband, Rose is about to move in with her
daughter and son-in-law and her granddaughter, Wanda, but wants to maintain her
independence as well as help out around the house as much as she can.
3
1.2 Purpose of the Project
The device will be cost-efficient and reliable. It must remain accessible and
easy to use for individuals who lack fine motor control, are vision impaired, or are
limited by unsupported vertical access. The size and portability should be suitable
for residential or clinical settings. Automation will be the device’s most
distinguishing feature. It will mechanically regulate medication of 1, ½, or ¼ pills of
various sizes and shapes and will manage many different medications at once.
Ideally, the device will have alarms to signify the time medication needs to be
taken or refilled. Information regarding dosage amounts, times, and expiration
dates will be internally stored and the number of pills remaining in each container
will be displayed.
1.3 Previous Work Done by Others
1.3.1 Products
There are currently several products on the market that claim to be
medicine dispensers. The three most popular items are the MedTime Device, the
MD2, and CompuMed. Each device has different characteristics which may be
beneficial to some clients but an annoyance to others. These characteristic are
described below:
MedTime: The Medtime product is essentially a rotating disk that contains several
compartments in which the pills are separated into to create the appropriate
dosage. The MedTime device also contains a timer and an alarm which can be
programmed to sound when the medication must be taken. Once this alarm goes
off, the disk rotates to reveal the next dosage to be taken. The client then turns the
product over so the pills fall into his/her hand. If a dosage is missed then the disk
will continue to rotate so that the next dosage becomes available. The advantage
of this device is that it is portable, so it can be taken with the client at all times. This
product is also one of the least expensive medication dispensing devices at
$232.95. The disadvantages of this product are its time consuming loading
requirement, the lack of a cutting device, and minimal security. To load the device
all the dosages must be pre-separated which will require the effort of a caretaker in
most cases. The dispensing mechanism of the device is also inadequate for many
elderly, since it requires one to tip the device over to expel the dosage. Not only is
the method of dispensing not safe if there are children present since it is
accessible to anyone, but it also provides the opportunity for the medication to fall
on the ground easily. Those in a wheelchair would not be able to pick up the
medication if it fell on the ground as well as those with poor vision.
MD2: The MD2 is a more sophisticated medication dispensing device than the
MedTime. This product contains the same feature of a timed dispensing
4
mechanism with an alarm to alert the client. The dosage is expelled in a small
plastic container once the release button is pushed by the user which also turns off
the alarm. When a dosage is released any medication instructions that was
programmed into the device is then given orally, such as ‘take with food’. If a
dosage is missed the device can call up to four individuals to alert them that a dose
was not taken. The advantages of this device is that it alerts another individual of a
missed dose rather than moving onto the next one, so the probability of a dosage
not being taken is relatively small. Clients that forget to take their medication are
also likely to forget the instructions or each medication, an error in consumption of
the pills is prevented with this device via the oral instructions. The disadvantage of
this product is mainly its cost. The dispenser costs $919.95 plus an additional
$38.95 per month for the calling feature. The product also does not have a cutter
and has minimal security since the dispensing of the medication is controlled by
the push of a button, which can be done by any individual in the household
including small children. Dispensing the dosage in a small container also requires
the assistance of a caretaker to prepare. Opening this container once dispensed
may also prove difficult for some individuals with limited mobility and poor vision.
CompuMed: The CompuMed shares some similarities with both the MedTime and
the MD2. This device alerts the user that a dosage needs to be taken via an alarm.
The dosage is deposited into a small drawer located on the front of the device. If a
dosage is missed the drawer is withdrawn and the dosage is sent to another
compartment. The machine keeps track of how many doses were missed but does
not alert any caretaker as the MD2 does. It will also provide the medication
instructions on the LCD screen when a dosage is dispensed as the MD2. The
CompuMed has a higher level of security than the other two devices. Although the
dosage is deposited into a drawer where others can access it, the rest of the
medication stored in the product is locked inside with a key. This key is also
needed to change the programming of the device and thus prevents any tampering
that may otherwise occur. The main advantages of this device are its enhanced
security, and lower cost when compared to the MD2. The CompuMed costs
approximately $1045.00, but does not have any additional monthly fees. The
disadvantage of this product is that the medication is loaded into cartridges which
is a time consuming process and limits the amount of medication that can
dispensed. The cartridges need to be changed weekly and are only capable of
dispensing up to four dosages per day. This device also lacks a cutting mechanism
and dispenses the medication into a drawer which may be difficult to extract from
the small drawer for some individuals.
5
A summary of these devices is seen in the table below:
Product
Name
MedTime
Image
PRO
CON
- Timer with alarm
- Portable
- $232.95
- Difficult loading
- No cutting device
- No security feature
MD2
- Timer with alarm
- Gives medication
instructions
- Calls caretaker if
medication not
dispensed or refill is
needed
- Dispenses in small
container
- No cutting device
- No security feature
- $919.95 plus $38.95
per month
CompuMed
- Timer with alarm
- Gives medication
instructions
- Minimal security
- Tracks number of
missed doses
- Pills deposited into
drawer
- Only dispenses up to
4 times per day
- Medicine cassette
needs to be changed
weekly
- No cutting device
- $1045.00
Figure 1. Comparison chart of existing medication dispensing devices
1.3.2 Patent Search Results
There are also several patents published for various types of medication
dispensing devices. A brief summary of the products proposed by each patent is
included below:
Medication Dispenser for Dispensing Flat Dosage Forms (6,527,138): This device
is designed specifically for flat mediations that come on a roll similar to that of a
stamp roll. The device then advances the roll when the next medication needs to
be taken. The dispensing mechanism can be either manual activated, mechanical
or automated. The machine also has the capability to record the number of doses
dispensed.
6
Tamper Resistant Programmable Medicine Dispenser (6,163,736): This device
prevents unauthorized movement of the indexing assembler to prevent untimely
access to medications. It is a small and portable product, but requires the
medications to be separated into the appropriate dosages beforehand.
Medicine Dispenser (5,947,329): This product also provides a security feature
against unauthorized access to the medication by storing the medication in sealed
containers that require deliberate steps to get the medication dispensed. This
device is completely mechanical and includes a counter to track the dosages
dispensed.
Timed Medicine Dispenser (4,207,992): As the title suggests, this a timed
dispenser which alerts the patient when the medication needs to be taken. The
pills need to be pre-separated into the correct dosages as with several of the other
devices.
Medicine Dispensing Device (5,454,793): This device is made specifically for liquid
medications. It dispenses metered quantities from an ampoule and can easily
return to its original state.
Gravity Feeding Pill Medicine Dispenser (4,638,923): This is the only device that
dispenses the medication from the container provided by the pharmacy. It uses
gravity to release the pills from the container. It is economical and easy to use, but
does not contain a system to verify that the pills were extracted from the container
correctly.
Analyzing the products that are available on the market and those described
in the published patents, there are several undesirable characteristics that have
been identified that will be address by our medication dispensing device. The first
of these characteristics is the need to separate the pills into the appropriate
dosage before loading the device. This is a time consuming task, which can be
eliminated by developing a system in which the pills are simply poured into the
apparatus. Several of the devices described also make it difficult to extract the
medications once dispensed from the apparatus. This product needs to designed
for those who have limited mobility and poor eyesight, not just those with a poor
memory. Most importantly, none of the devices contain a cutting tool; therefore all
cutting must be done before the machine is loaded. This is again a time consuming
step when loading the device and is also one that is impossible to complete for
several clients without the aid of a caretaker.
In order to meet these requirements a high level of mechanical, electrical,
and biomedical engineering will need to be implemented. The mechanical
components for the robotic arm and cutting assembly must be precise and reliable,
while the electrical circuitry synchronizes the various components of the device to
function in an assembly line manner, as well as provide power to the motors.
Biomedical engineering skills are needed to ensure the device is easy to use for
7
the clients with a variety of disabilities, providing them the independence they
desire.
The following sections provide detail about the final design and each of its
subunits. Preliminary designs are also provided to demonstrate other
considerations and reasons for choosing each of the components used to
construct the final design. The budget and expected completion date for each task
involved in the development of the device are presented, culminating in a
conclusion about the device.
1.4 Map for the Rest of the Report
The remainder of the report will describe the three design alternatives
considered for this device. The design chosen and each of its subunits will be
described in detail, followed by a description of the function of the prototype. The
realistic constraints incorporated into the final design are discussed and the safety
issues considered as well. The impact of engineering solutions in a global,
economic, environmental, and social context is discussed as well as any new
material and techniques learned by either of the team members. The report
provides an update budget and concludes with a description of each team
members contribution to the project, a conclusion, references and
acknowledgements.
8
2 PROJECT DESIGN
2.1 Design Alternatives
2.1.1 Design One
The first design featured a track system where the vacuum assembly and
the cutter could move over to the necessary storage container. This design also
featured a weight verification system, to ensure accurate dosages are dispensed.
All these components are located within the case to allow for ease of access and
ease of replacement
Battery pack
Vacuum fan
Top view
Cutter assembly
Top view
Storing Modules
Lateral view
Vacuum fan
Scale
Dispenser
Figure 2: Basic Component locations within the case
The vacuum retrieval assembly is tasked with the retrieval of pills from the storage
module for delivery to the rejection assembly at dispensing set points. The
9
assembly is made of four components; pill retrieval vacuum tubing, supply tubing,
vertical displacement control and the proportioning valves. A vacuum is drawn on
unit through the primary proportioning valve causing the assembly to lower into the
desired storage module, with spring assistance, where at a specified height the
secondary proportioning valve is actuated. A vacuum is drawn on the retrieval
tubes setting up a pressure differential across the medication. This pressure
differential holds the medication in place for transport to the rejection assembly.
Pressure is passed back to the cavity of the vertical displacement device through
the primary proportioning valve allowing a discharge pressure to raise the vacuum
retrieval assembly. The type of device was chosen to reduce the possibility of
drawing multiple medications in a single pass. This single event can then be
related more accurately to pill retrieval numbers (assembly pictured below).
Proportioning valves
supply
Pill pick up tube
Spring
Vacuum retrieval
assembly
Oriface
plate
Figure 3. Vacuum assembly
From the discussion of vacuum fan requirements the area of the pill pickup
tube is approximately 1.26e-5 m2 or a circle with a 4mm diameter. The pill pick up
tube is located to the left in the picture on previous page. The proportioning valves
are located at the center of the device and control flow into an out of the pill pick up
tubing and through orifice plate. To ensure this portion of the device will operate
properly evaluation of the lifting mechanism is performed similar to the lifting
requirements for the pill. In this case the area of the orifice plate should be
significantly large to allow the fan discharge pressure to raise the assembly. To
reduce the size of the lifting mechanism the assembly weight is reduced through
the use of plastics. Ideally the lifting assembly will weight in at about 1 lb. or ~0.25
Kg. To lower the assembly suction is provided through the orifice plate with the
assistance of the spring to lower the device. Raising the device requires the
discharge pressure to overcome the force due to the weight of the assembly, the
spring resistive force and friction. The spring resistive forces and friction are low
due to the slow operation of the assembly. The spring is provided solely to prevent
binding and speed lowering. Using equations for pressure and weights, the lifting
pressure is determined.
P = F/A
F =mg
A= π(D/2)2
10
Therefore,
D= 2*(mg/ P π)1/2
In this case the area of the orifice plate is determined with an assumed
Discharge pressure equal to the required differential pressure of the device and
spring loading at 10% of the assembly weight. For this case the required orifice
plate diameter is 12mm.
Control of the proportioning valves may only require off and on control;
however more useable control will prove handy during development to establish
specific valve sizes and volumetric flow rates through the valves. No specific motor
controllers are required for operation. Two servo motors available in a variety of
torque setting will allow the operation of the proportioning through a flexible cable.
The servo motors while weighing only a few ounces will be placed below the
retrieval assembly to remove weight from the lifting body of the retrieval assembly.
These servo motors can be purchased for $15.95 or designed from a variety of
ready-made circuit diagrams. Servo are also used to rotate the lifting assembly
and stepper motors are used to reposition the vacuum retrieval assembly
Servo and proportioning
valve assembly
Proportioning valves
Sheath retainer
Sheath retainer
Servo bank
Figure 4. Servo and proportioning valve assembly
This rejection assembly consists of a platform on which the pill will rest on
top of a load cell. The voltage output from the load cell will be translated into the
corresponding weight and compared to a standard to determine of the pill is
acceptable or should be rejected. If I pill is to be dispensed the platform on which
the pill rests will tilt in one direction, or tilt in the opposite direction if the pill is
rejected. This tilting mechanism is controlled by a stepper motor which is
connected to the platform via a belt. The dispensing assembly is simply a “trap
door” with which the medication rests until requested by the user. The user coded
input sets a register within the microprocessor to 1, or on, and signals the door to
open, dropping the medication into the users hand or container.
Pills that are rejected from the weight verification system are most likely
those that were not cut correctly. The cutter assembly cuts the pills into halves or
quarters and consists of a loader device, cutting blades, template and rotating
11
base. The template on which the pill is deposited from the loader is rotated
clockwise or counterclockwise to engage either the ½ or ¼ cutter blade. The
cutting blade is then engaged and projected down to the medication thereby
segmenting the medication into the require number of segments. From here the
medication is delivered and extracted into the storage module. The cutter
assembly will continue this cycle until all medication is segmented and in storage.
A Microchip’s PIC16F877-20/P microcontroller is used to coordinate the
inputs of the user with instructional outputs to an LCD display. It will also perform
the logic functions needed to signal the device components to run properly at the
user-designated times. A real time clock or RC external oscillator to keep track of
time is used to control the function of the alarm to alert the user a dosage needs to
be taken.
The user interface allows the user to control device functionality by
establishing the medication contained in the unit and the dosage requirements of
the medication. The user is allowed to interface with the device through a numeric
keypad and an LCD screen. This set-up minimizes the information the user must
input to the device by simply prompting the user to input numerical values.
2.1.2 Design Two
The second design drastically changes the manner in which the pills are
moved from location to another in the first design by utilizing a robotic arm and
contains a different cutting mechanism. The components are again all contained
within a casing for safety and maintenance ease.
12
batteries
electronics
LCD
Medication storage area
Medication acceptance
door
Rejection assembly
Figure 5. Design layout
The robotic arm was chosen not only for the “bells and whistle” quality it possesses
but also because it has a wide margin of versatility, one to one control over
medication through process, allows for verification of medication at point of
acceptance and retrieval. This particular robotic arm is made of plexiglass, once
again for aesthetics and strength. The arm serves to accept medication fro the
user, transport for storage, retrieval from storage and transport to pill capture and
cutter and finally for transport to dispensing tray. The arm is modeled around a
lynxmotion 6 axis arm. The major change being the addition of vacuum assembly
and linear gripper to the arm. This arm contains five servo motors for movement in
all directions. For assembly of this parallel plate robotic arm changes to the interdimensions between servo motors allows for a smaller over all design. To the left is
the lynx 6 axis arm and to the right is the proposed changes.
Figure 6. Robotic Arm
The gripper assembly contained two
piezo electric sensors to determine the
pressure exerted on the pill vail. The action
provided by the gripper is in one dimension to
either open or close the unit. To operate the
gripper assembly a stepper motor coupled to a
screw gear rotates, the moveable arm is
coupled to the screw and is moved linearly
outward.
13
Sensor arm
Vacuum pickup arm
8"
Gripper
Assembly
Slide track
gripper
Screw coupling
servo
Piezo electric pressure
sensor
SHUT
Screw coupling
gripper
Slide track
servo
Piezo electric pressure
sensor
OPEN
Figure 7. Gripper Assembly of Robotic Arm
The vacuum assembly maintains the same concept behind its function but is
now mounted on the robotic arm and is rotated into position to pickup by a servo
motor attached to the assembly. Once the robotic arm withdraws the pill from the
container it is deposited as before onto the platform of the weight verification
system, whose design and function remain the same as in design 1.
Design limitations of design 1 are directly answered with the secondary
design of the pill capture and cutting device. This design removes the need for the
user to load pill manually while still retaining as high accuracy is segmenting the
medication dosage. As seen in research pills and tablets do not need to be cut
along a score line to remain consistently segmented correctly. If fact personal
research was conducted to cut tablets lengthwise with high accuracy. With this in
mind the secondary design approach to pill capture and cutting is centered about
geometry. Assuming all pills or tablets that shall be cut have a point of symmetry
14
about them the capture swing arm shaped as an arc is capable of placing the point
of contact between the pill and the swing arm about this center of symmetry. In the
same motion align the cutter along this center of symmetry. This orientation allows
a pill to be segmented in half, by repeating the process ¼ segments are achieved.
With each smaller pill the arc is rotated by torsion spring tension against a slight
axial spin tension thereby positioning the pill to the center point. Concurrently the
underside to the arc acted against the cutter “feeler” and spring tension (of cutter
assembly) to reposition the cutter assembly. With this set up any symmetrical
medication can be centered across the cutter blade providing accurate nonapproximated center points. The assembly consists of a stepper motor, three ball
bearing linear tracks, worm gear and pinion, torsion spring, two axial springs (one
for the swing arm and one for the cutter assembly), base, cutter arm, stage, and
sliding secondary stage.
Secondary stage
Primary stage
Cutter
Swing arm
Figure 8. Cutter Design
15
Figure 9. Cutter Action
All these functions are again controlled by a microcontroller, and utilize the same
user interface as in design 1.
16
2.1.3 Design Three
The third design featured alterations to the robotic arm, a different layout of
all the components, a new storage assembly, introduction to a barcoding system
and PDA device, and the removal of the weight verification system.
Air Control Valve (Burnett
3-way valve 6012)
Arm
Counter balance wieghts
Servo motor
Rotating plate (retrieves
cut pieces)
90.0°
Vaccum line
110
°
Vertically translating
vacuum port
Cutter Assembly
Arm travel arc
Retrieval location
Dispensing tray/Funnel
Storage
Funnel
Sliding plate(removed
during loading)
Figure 10: Overhead View
The robotic arm has been design to be constructed of high density
polyethylene due to its strength and chemical resistance. However prototyping the
17
arm will be conducted with the use of a LEGO® robotic arm kit to allow for
modifications and operating sequences. This arm has two axis of motion. The first
is a horizontal swing arm with a range of 180 degrees limited to 90 degrees for this
Robotic Arm
component
breakdown
Top view
Counter weight
Vacuum supply line
Stepper motor
Coupling
Servo
Pill pick up area
Side View
Figure 11: Robotic Arm
application. The orientation of the swing arm allows for the placement of the
vacuum assembly above any assembly located along the swing arm arc. Control
of the swing arm is via a servo motor and the main PIC controller. The second axis
of movement for the robotic arm involves the translation of the vacuum tube in the
vertical direction. This allows the vacuum tube to drip into storage containers and
to gently place medication on subunits. Control over this action is given to the
stepper motor controller slaved to the PIC controller. The stepper motor is geared
to a worm gear which in turn is coupled to the vacuum pick up unit. By rotating the
stepper motor the worm gear is rotated, this rotation is converted to linear
movement through the threads in the coupling. Rotation of the unit is prevented by
two guide posts toward the front of the unit.
18
Action in horizontal
direction
Top view
Axis
Vacuum assembly
Arm
Vacuum action
Side view
Retrieval angle
axis
45.0°
arm
Medication storage
Base
90.0°
Robotic Arm
Action
Swing angle
(vaccuum supply not
included for simplicity)
Figure 12. Movement of Robotic Arm
The storage assembly from which the pills are taken by the robotic arm
consists of a of a storage reel segmented into twelve containers, a storage reel
cover, fill cover and stepper motor. The storage reel is designed based on a fishing
tackle holder. The compartments within the storage reel are designed such that the
outer edge of each compartment is deeper then the inner portion. Inner and outer
depths are connected by a continual ramp. This allows the medication stored
within the compartment to fall by gravity to the lowest position as medication is
withdrawn. Pills taken from the storage assembly can then be either dispensed or
taken to the cutter assembly which remains the same as design 2.
Using a PDA has many advantages over using just a microcontroller. The
dominating advantage is the storage capabilities. By incorporating a PDA into the
dispensing device, a large amount of information can be stored without the risk of
losing it if power outages occur. A microcontroller will still control the motors of the
cutter and robotic arm however; the PDA allows a separate program to control the
calendar, clock, timers, data storage, and initiation of the device’s actions.
The program for the device will be written in LabVIEW. It will act as the
computational link between the data stored in Excel (also stored on the PDA) and
the microcontroller. It will track the number of pills dispensed and remaining and
will control the timing of the alarms for expiration date and dispensing. The alarm
and displays will output through the existing PDA screen and speaker.
Since the keys on the PDA are very small, a separate keyboard will be
connected to the system for the users to access when turning off the alarm or
entering pill information. A barcode scanner also needs to be integrated into the
system. These two items will be inputs into a USB hub that then directs the
information through a USB port to the PDA, where the information will be stored
and dealt with by LabVIEW and Excel.
19
The barcoding system will be used to reduce errors during the loading
process and to identify the stored data for each medication. When a prescription
needs to be loaded the client will scan the prescription using the barcode scanner
located on the device. This reference number will be compared to those stored in
the excel spreadsheet. The user may then indicate via the PDA any changes they
are making to the amount of pills in the container or obtain information about the
pills already in the device, such as expiration date, number released, etc.
When pills need to be taken, the same dispensing system as in the previous
designs will be implemented.
2.2 Optimal Design
2.2.1 Objective
The prototype features the use of a vacuum mounted upon a robotic arm
that can tilt upward and swing in a horizontal arc to control the flow of pills between
the user, cutter, storage, and dispensing funnel. The horizontal arc movement of
the arm and the vertical movement are controlled by a servo motors. The use of
arc movement reduces space, parts, and I/O needed for the device. The vacuum
is composed of the pill retrieval tubing, vacuum pump, pressure valve and supply
tubing. The pressure sensor is utilized in the program to determine when the
vacuum has picked up a pill, this ensures that a pill is actually being dispensed,
since the program will not continue until a pill is attached to the vacuum tip of the
robotic arm..
The cutter assembly uses our innovative technique that relies on the robotic
arm and the geometry of the pill and capture arm to remove the need for manual
loading of pre-cut pills into a cartridge. The robotic arm places the pill into a chute
that causes it to fall in front of the pill positioner. The positioner then pushes
forward causing the pill to fall into the center of its arc. The point of contact
between the pill and the arc cut in the foam is a point of symmetry on the pill and is
directly associated to the position of the cutter which can then slice the pills,
regardless of the score line’s position. Once cut the positioner retracts causing the
tilting plate to rotate allowing the pills to fall into a temporary storage. After all the
pills are cut, the compartment to which they are assigned positions itself under the
temporary storage. The storage is then opened where the pills fall back into their
storage compartment.
Another unique feature about our design is the ability to use LabVIEW to
store data and initiate commands. The prototype is created using a laptop but
incorporation of a PDA can be done as well. The use of a real time clock that the
program provides is necessary to ensure that medication is dispensed at the
correct time. The program also allows for information regarding each pill to be
clustered together and then combined into an array allowing for any information
regarding any of the pills to be easily withdrawn. The 6024E DAQ that utilizes the
PCMCIA slot allows the program to easily pass signals to each of the motors
through its analog line. The same signal is passed to all motors, but only one motor
20
is turned on at any given time. The on or off function of the motor is controlled by
relay switches that are soldered onto the controller box. The keyboard allows the
user to manually input medication information if necessary and the barcode
scanner can scan medications with previously stored data by comparing the
reference number from the barcode on the prescription bottle to the reference
number stored in each cluster. Using the barcode scanner reduces the amount of
setup the user has to go through when adding pills to the device and reduces
errors that could otherwise occur if medication information had to be input
manually every time.
All of the components of the medication dispensing device were chosen to
suit the requirements and constraints associated with the project. The total cost of
creating our prototype is $376.98. With proper licensing rights from National
Instruments, this project could be manufactured and marketed to the general
population. The cost of the product can also be further reduced when National
Instruments releases the module that allows LabVIEW code to be programmed
onto a microcontroller. Downloading the program onto a microcontroller drastically
reduces the cost of the project since the laptop/PDA can be eliminated and
replaced by a $10 microcontroller and an inexpensive touchscreen.
21
Figure 13. Pathway of Pill
Storage assembly
rotates to correct
storage module
User inputs
number of pills
added and
expiration date
Pills poured into
container
Pill needs to be cut
(indicated by data stored
in spreadsheet)
No
Barcode
scanned
Yes
Blade cuts pill into
halves
Feeler places the
blade in the center as
indicated by the swing
arm
Pill needs to be cut into
quarters
Turntable makes
another rotatation
Yes
Pills remain in storage
container
Cutting process
repeated
No
Secondary stage moves
so pills fall into turntable
Pills released one at a
time onto secondary
stage of cutting device
by robotic arm
Swing arm forces pill
into center
Robotic arm moves over
to the storage container
assembly
Storage container
assembly rotates so the
correct storage module
is accessible to robotic
arm
Vacuum pump is turned
on
Alarm sounds when
indicated by the timer
that a medication
needs to be dispensed
The alarm turns off
Security code entered
by client
Correct
Security code compared
to stored code in
microprocessor
Change in current
sensed by vacuum
Vacuum lowered into
prescription container
Incorrect
Cut pills moved back
to storage container by
robotic arm
Alarm will continue to
sound
No
Continues suction
Trap door pushed open
by an actuator
Process repeated until
the full dosage is
completed
Ye
s
Vacuum lifts from
storage module with pill
Pill released into
dispenser container
Client removes dosage and
closes trap door
22
2.2.2 Subunits
2.2.2.1 Main LabVIEW Program
The program to control the function of the motors and to retrieve the
necessary inputs from the user was designed using LabVIEW. This program was
chosen not only for its user friendly interface, that allows the user to develop the
program using icons rather than knowing all the commands, but also for it
familiarity since we have used this program before in other biomedical engineering
courses. National Instruments, the maker of the program, also provides a PDA
module that allows an executable file to be created and then downloaded onto a
handheld device, which we would have needed if we were still using the viewsonic
super PDA.
The program is divided into two main loops. The first of these loops controls
the regular dispensing function. This loops consists of a while loop that repeats an
iteration every 30 minutes, for testing and demonstration purposes it is currently
set to repeat every minute
Figure 14. Outermost Loop
Within this main while loop there is a sequence structure. This sequence structure
contains the real-time clock in the first frame and the remainder of the program in
the second frame. The real time clock is created by sampling the system time
every time the while loop begins another iteration.
Figure 15. Function to gather system time
23
This time is then passed on to the main program and used to compare the current
time to the time each medication is set to dispense. The event sequence structure
was used to separate the real time clock from the rest of the program to make sure
the time is sampled before the program begins comparing it to the set dispensing
times. If it were contained all in one single program, it is possible the times are
compared before the actual time is sampled by the get system time vi.
In order to compare the system time to the actual time it must first be
formatted. If left unformatted the system time sampled is too precise as it gives the
exact time it was sampled to an accuracy of +/- one millisecond. IT is essentially
impossible to sample the system clock so that it matches the preset times for
dispensing in the program to the exact millisecond. Therefore the system time is
converted to a string so that it only includes the hour and the minute. The times
entered by the user are also converted to this same format so that they can be
compared using the ‘=’ comparison symbol.
Figure 16. Time Comparison
24
Time 1, Time 2, Time 3, and Time 4 represent the four possible times a medication
can be dispensed . These values or withdrawn from the array that contains all the
information about each pill, where each pill’s information is contain within its own
cluster. The clusters are first taken from the array by using an index array. The
individual controls within each cluster is then obtained by using an unbundled by
name. The controls that are used for the remainder of the program are withdrawn
for each of the seven clusters.
A ‘true’ value is passed forward if either of the four times, Time 1, Time 2,
Time 3, or Time 4 equals the system time. This comparison is done for the four
times for each of the seven pills. The ‘true’ or ‘false’ signal that exits the
comparison, is then input to an array. The entire array becomes true if any of the
times equals the system time. This true activates the dispense sequence for that
pill.
Figure 17. Time Comparison
A comparison between the expiration date and the actual date is also completed,
which prevents the pill from being dispensed if the medication is expired. This
comparison is done within the sequence structure for dispensing.
Figure 18. Expiration Date Comparison
25
The current date and the expiration date that is obtained from the cluster of each
pill, is compared with another ‘=’ comparison symbol. If this function returns a ‘true;
value then another sequence structure is initialized. In this sequence structure the
motor vi is activated to rotate the storage modulus so that the compartment with
the expired medication appears in the filler position. A dialog box appears with an
alarm sounding that asks the user to remove the medication and then press ‘OK’,
Once the user has done so the storage modulus is again prompted to rotate to its
original position. The number in container value is also changed to zero to account
for the removal of the pills. This is done through a select comparison where the
comparison between current date and the expiration date determine whether the
true condition, which is the value zero, is to replace the number in container value
or the false value, which is the number in container minus the dispense number.
Figure 19. Pill Number Check
These three events complete the sequence structure for expired medication and
for the sequence for dispensing for that particular pill. The main sequence structure
for dispensing can then progress to the next event which is the dispensing
sequence for the next pill if a ‘true; value was sent from the time comparison.
26
Figure 20. Remove Expired Pills Scenario
As a result of the control of the time comparison and the expiration date
comparison there are three possible events that take place. In the first scenario,
The expiration date comparison is false, indicating that the medication has not
expired but the result from the time comparison is also false, indicating the
medication does not need to be dispensed. In this scenario the result is a do
nothing case where the program moves on to the next pill.
Figure 21. Expired Pills Do Not Need Dispensing
The next scenario is the shown previously where the medication is expired
and does need to be dispensed. The final scenario occurs when a medication
27
needs to be dispensed and the expiration date comparison returns a false value. In
this case the dispense 1 kind vi in initiated. This vi is contained within a while loop
whose iteration is controlled by the number of pills that needs to be dispensed that
is extracted from the cluster of each pill that are located within the array. Since the
first iteration of a while loop is the zeroth iteration. The number to be dispensed is
subtracted by one, so that if two pills needs to be dispensed the first pill will
correspond the zeroth iteration and the second to the first iteration.
Figure 22. Dispense Pill Scenario
When the times for dispensing and the actual time equal one another, the
number of pills in each container is updated. This is done by subtracting the
number of pills in the container by the number being dispensed. This subtraction is
controlled the a select function, where the input of whether to pass forward the true
case or the false case is controlled by the true or false value that outputs from the
time comparison.
Figure 23. Pill Number Update
If true then the number if pills being dispensed is in fact subtracted from the
number of pills in the container. If false then zero is subtracted from the number of
pills in the container. The value of the number of pills is then replaced within the
array by using a bundle by name function is then is passed forward to a replace
28
array subset function. The array is then replaced by using a local variable of the
array in its ‘write’ format.
Figure 24. Local Variable
A message is also displayed to the user when this subtraction is done and the
resulting number of pills is zero. This message is placed in the program so that the
user is alerted to add more pills before the next dispensing time is reached. This
comparison is done using an ‘=0’ comparison function the result of which is passed
into an array. The same OR gate that compares all the values within an array is
then used, making the array true if any of the elements within the array are true. If
true the message is displayed. If false there is a do nothing scenario.
29
Figure 25. No Pills Left Warning
The final event of this main loop is to remind the user that their medication has
been dispensed and needs to be taken. This display message asks the user to
take their medication and continues to sound an alarm until they press ‘OK’. The
alarm was programmed to continue sounding by embedding a beep vi within the
prompt user for input vi.
30
Figure 26. Take Pills Alert
This dispensing sequence can be stopped only by clicking on the ON/OFF button
located on the front panel.
Figure 27. Turn Off Alarm
31
The second loop of the program is another while loop that controls the
addition of more medication., prompting the user to use the barcode scanner to
locate the compartment and then asking the user to indicate the number of pills
being added and the new expiration date. The entire program is contained in a
while loop that repeats an iteration every 100 seconds. The purpose of this main
loop is to continually check the value of the Boolean control that changes the main
case structure to true and thus begins the program. An allowance of 100 seconds
was provided so that the program has time to initiate the sequence before it goes
back to false state. This is necessary since the Boolean control only passes a true
value while the button is actually being pressed, when it is released it returns to the
false condition.
Figure 28. Add More Pills
While the button is not in the pressed position the case structure remains false,
where there is nothing located inside, and it is thus a do-nothing scenario. When
true the program initiates. The first event of the program is to extract the reference
number from each cluster that is located within the array. A dialog box also
appears that asks the user to use the barcode scanner to scan the side of the
prescription bottle they are trying to add.
Figure 29. Check Reference Number
The reference number scanned by the user is then compared to each value
withdrawn from the array for each pill within a while loop. This while loop checks
32
each reference number to the number scanned by the barcode scanner, where
one loop is checking just one reference number to the scanned number, therefore
each comparison is one iteration. When the iteration counter reaches 7, this
signifies that none of the reference numbers match the scanned number and the
loop is stopped and a message is displayed to the user to rescan the number by
using the ‘ADD MORE PILLS’ button, since the message being displayed is not
connected to any other event and thus marks the last event for the main case
structure in that scenario. If a match is found then the cluster for that pill is located
and withdrawn and the while loop is stopped. This is done with an index array
command, where the index number should equal the iteration number of the while
loop.
Figure 30. Check Reference Number
The cluster that is passed through is then unbundled so that the individual controls
can be extracted.
Figure 31. Extract From Array
If the number in the container is equal to zero then the dispense sequence is
allowed to continue, if it is false then an error appears. The program was
33
configured in this manner since the pills that are being added go into the same
container where the pills are currently located, which may be cut. Therefore it is
impossible to know which pills are cut and which need to be cut, as a result pills
are only allowed to be added when the container is empty. The AND gate is
included to make sure the error for container not yet empty only appears when a
match has been located by the previous while loop that compares the reference
numbers.
Figure 32. Avoid Mixing Whole and Cut Pills
If there are no pills left in the container then the ‘true’ scenario is initiated. The first
event of the sequence structure that occurs under the ‘true’ scenario is to move the
storage modulus to the filler position so that the user can add in the pills. This
rotation is done via the motor vi by setting the appropriate duty cycle through and
setting the compartment case structure a ‘true’ value. The duty cycle that
corresponds to each individual compartment is a value that exists in each of their
individual clusters, so this value is extracted when the number in container is
extracted with the unbundled function. A dialog box then appears prompting the
user to enter the number of pills that they are adding that they can obtain from the
side of the prescription container. The user is asked not to press ‘OK’ until they
have dumped the entire bottle into the container via the filler chute since pressing
‘OK’ allows the sequence structure to progress to the next event. The next event in
the sequence structure is moving the compartment back to its original position,
which is again accomplished by setting the compartment Boolean control of the
motor vi to true and passing the duty cycle. This duty cycle is a constant since it is
returning to a home position.
34
Figure 33. Add Pills to Compartment
The next sequence of the structure prompts the user to enter the new expiration
date. This prompt is different than the other and is made as its own vi. Since the
prompt user vi provided by LabVIEW only allows for the entry of numerical values
or strings. The dialog box was created using a while loop that repeats an iterations
every 25 milliseconds. Within the loop there is a time stamp control and a time
stamp indicator that is linked to a terminal so it can be extracted within the
sequence structure. The properties of this vi are set so that the front panel opens
when it is prompted by the sequence structure, and displays the front panel in the
regular dialog box format. Once the user has chosen the new expiration date they
press the ‘DONE’ button which is linked to the stop button of the while loop so the
loop stops and the dialog box is closed.
35
Figure 34. Enter Expiration Date
The value of the number in container entered by the user and the expiration date
entered by the user now needs to be saved into its respective cluster, so that these
new values now appear on the front panel.
Figure 35. Pill # and Expiration Date Saved
The value for the number in container although needs to be modified to account for
any cuts that may be made in the next sequence. The three possible scenarios are
leaving the number in container as is since no cuts will be made, doubling the
number in container since the pills will be cut in half, or multiplying the value by
four if the pills will be cut into quarters. This multiplication is controlled by two case
structures one inside the other. The outer case structure represents the case
where no cute will be made, thus the number of cuts equals zero and send a true
value to the outer case structure. If this value is false, then it can either be 1 for
36
cutting the pills in half or 2 to cut them into quarters. If the number of cutes equals
1 the outer case structure is false and the inner case structure is true. Within the
inner case structure the number in container is multiplied by two.
Figure 36. Check # of Cuts
When the number of cuts equals 2 the outer case structure is false and the inner
case structure is also false. Within the inner case structure the number in container
is multiplied by 4.
Figure 37. Adjust # of Pills
37
The value of the number in container and the expiration date are then passed to a
bundle by name to replace the value currently in the cluster. The cluster is then
replaced by using a replace array subset command. The index for this cluster is
indicated by the iteration number of the while loop where the cluster was first
extracted from the array. A write local variable version of the array attached to the
replace array subset then replaces this cluster in the program.
The final sequence of the sequence structure is the cutting of the pills. If the
pills are not going to be cut, the number of cuts equals zero, the ‘Setup complete’
message is enabled and displayed. When the user pressed ‘OK’ the main loop
ends and returns to its false state. The cuts that need to be done for one pill or for
two are controlled by sequence events placed within case structures. If the pills do
not need to be cut, both case structures are left in the false state.
Figure 38. Pills Stored Without Cutting
38
If the number of cuts equals one then the case structure to cut the pills once is
initiated in the true case while the case structure for cutting the pills twice is left
false and vice-a-versa.
Figure 39. One Cut
The sequence structure for the cutting process begins with a while loop that
contains the cut all pills vi. This program contains the motor sequence to cut one
pill and requires the duty cycle for the arm to reach the appropriate container which
is passed to the program from the cluster. The number of iterations of this loop is
controlled by the number of pills added by the user since each of these pills needs
to be cut. A time delay was inserted to verify that a complete iteration of the cutting
sequence is completed until another begins. The next sequence is the pill dump
program. As the blade is cutting the pills they fall into a funnel. The bottom of this
funnel is covered by a plastic piece. This is done to make sure when the arm goes
to pick up another pill from the container all the pills there are whole pills. Once all
the pills are cut the plastic piece is pulled back and the pills are allowed to fall back
into their compartment. The retraction of this piece is controlled by the pill dump vi.
39
The duty cycle to move the storage modulus so that the correct container is
located under the funnel of the cutter is passed to the pill dump vi from the cluster.
The last sequence event is the same message that was displayed to the user if no
pills were cut, indicating that setup is complete. The cut all pills vi followed by the
pill dump vi is repeated twice if the pills need to be cut in quarters, so that once the
pills are cut in half they are dropped back into their compartment, and the arm is
again activated to pick them up and the entire process is repeated.
Figure 40. Two Cuts
With the cutting sequence complete the main sequence structure is completed as
well. If the ‘ADD MORE PILLS’ button is still not being held down, within 100
seconds the main case structure will return to its do-nothing false state. The
process does need to be repeated for each compartment of pills being added,
which the user may do by pressing the ‘ADD MORE PILLS’ button after seeing the
‘Setup complete dialog box for the previous container.
When using the device the user will only be using the front panel. The front
panel clearly separates each of the clusters, so that the pill name appears as the
40
first control followed by the four possible times the pill can be dispensed. The next
control is the expiration date and then the reference number which is the number
read by the barcode scanner. The final two controls are the number of pills that are
dispensed and the number of cuts made to each pill during the loading process.
Figure 41. Setting # to Dispense
During the initial setup the user will have to use these controls to set the values
and save them using the make values fault command under the Edit drop down
box. To the left of the main screen are the buttons to turn the device on or off,
which essentially stops the main loop for the dispense sequence if turned off. The
other button is the ‘ADD MORE PILLS’ Boolean control, that when pressed for a
second, changes the main case structure to the true state and initiates the loading
process.
41
Figure 42. Power Switch and Add Pills Switch
42
2.2.2.2 Motor Program
In order for the mechanics of the AMD to run at the right times and in the
correct ways, a significant portion of programming deals with motor control. In the
device, seven different motors run the dynamic movement of the device. The
following are brief descriptions of the motors and their functions:
1. Compartment Servo Motor: This motor turns the storage compartment
about its base center with a range of approximately 240°. Programming includes
sending duty cycles for the motor to rotate to 8 different positions.
2. Vertical Arm Servo Motor: This motor is utilized in 3 different positions;
fully up for horizontal movement, fully down for retrieving pills, and slightly raised
for checking if a pill is on the tip.
3. Horizontal Arm Servo Motor: This motor controls the horizontal movement
of the vacuum arm. Its positions include the pick up compartment, the cutter
funnel, and the dispenser.
4. Cutter Servo Motor: This motor is responsible for pressing down on the
blade to cut the pills, requiring only 2 positions.
5. Pill Positioner Servo Motor: This motor moves a plate in and out from
under the cutter funnel to under the blade. It is responsible for the positioning of
the pill from where it is dropped to where it is cut.
6. Pill Dump Servo Motor: This motor moves a plate out from under the cut
pill collecting cup in order to allow the pills to drop into the appropriate storage
compartment.
7. Vacuum Motor: This motor runs the vacuum and is either on or off during
the functioning of the device.
Servo motors basically have an output shaft that will remain at a certain
angular position as long as it is receiving a signal along its input line. As the signal
changes, the position changes. The signal is a pulse sent through the control wire.
The pulse’s width, which is on the scale of milliseconds, determines how far the
motor will turn. The motor becomes very strained and may twitch if the pulse width
is beyond the motor’s turning range.
The control wire through which the signal is sent to the motors originates in
the data acquisition unit (DAQ). In this device, the DAQCard-6024E is used. It has
16 inputs, 2 outputs, 200kS/s, and 12-bit multifunction I/O. Data acquisition is
generally used to gather and convert signals from measurement sources, but in
this case, the main function was to send the signal that was generated in the
computer to the motors. Each of the seven motors utilized a digital line. The DAQ
also collected and processed signals from the pressure sensor into a voltage
reading using two analog lines. A transducer allows the DAQ to convert a physical
phenomenon into a measurable electrical signal, such as voltage or current.
The most basic and versatile program was designed to run any motor to any
position. The following is the front panel to the program, which shows all of the
controls involved for each time the basic program is run.
43
Figure 43. Basic Motor Program Front Panel
Each button turns that particular motor on. Though each motor has its own
relay and multiple motors could run at the same time, they would have to run at the
same duty cycle. Therefore, when this program was used as a subvi, only one
motor was run at a time. To complete an entire action sequence, the subvi was
inserted many times into separate frames within a sequence structure, which will
be described later.
Incorporated into this program was the code from an existing squarewave
generating subvi, shown below. The block diagram shows the complexity involved
with sending the square wave.
Figure 44. Squarewave Generating VI
Even this code contains subvis that each have a function in creating the
signal and sending it to the data acquisition unit (DAQ).
DAQmx Create Virtual Channel: Creates a virtual channel or set of
virtual channels and adds them to a task.
44
DAQmx Timing: Configures the number of samples to acquire or
generate and creates a buffer when needed.
DAQmx Start Task: Transitions the task to the running state to begin
the measurement or generation.
DAQmx Wait Until Done: Waits for the measurement or generation to
complete.
DAQmx Clear Task: Clears the task. Before clearing, this VI stops
the task, if necessary, and releases any resources the task reserved.
The block diagram of the basic motor program also contained code to
control each of the motors separately. A oolean control was wired to a case
structure. The Boolean controls were set as different input terminals to the subvi so
that each time the subvi was used, the on/off conditions of the motors could be
set. As was mentioned previously, only one motor of the six is sent the true value
to give it power. Both the true cases and the false cases contained the DAQ
assistant function, which sends the duty cycle to the DAQ. This means that every
motor is getting a signal, but only one is being told to run.
Figure 45. Code for Activating Motors
45
The DAQ assistant function creates, edits, and runs tasks using NI-DAQmx.
The data terminal can be used as an input for analog and digital output tasks or as
an output for measurement tasks.
At the beginning of the semester, our basic motor control looked
significantly different than it turned out to be (figures and ). Originally, only 4
servo motors were involved with the design, along with a stepper motor. The
stepper motor would have been run by a stepper controller, which we went as far
as soldering onto a surface mount before deciding not to use it. Servo motors
demonstrated greater strength as well as being more dependable in terms of
positioning. Initial position affects the next position for stepper motors, while servo
motors can be directed to move to a position without taking into account where it
starts from.
System Set up
AC
power
PDA cradle
Barcode reader
DC
PDA
Robotic Arm
USB
HUB
Servo
(HS-422)
Servo
(lynx B pan and tilt)
(HS-422)
AC
DAQ
DC
Power
supply
Out to steppers
servos
analog
digital
Cutter assembly
Servo
(HS-475)
Solenoid
Buffers
Stepper
Stepper controller
(A3967SLB)
Pump
Rotating Base
(sub-unit cutter)
Vaccuum
Servo
(HS-645)
Storage reel
Stepper
Stepper controller
(A3967SLB)
Figure 46. Original Motor Control Flow Diagram
46
Keyboard
Laptop
Computer
Robotic Arm
DC
Barcode reader
Servo
6.0 V
Relays
Servo
CTR0
DAQ
analog
Pump
digital
Cutter assembly
Servo
Servo
Vacuum
DC
Pin 2
Pin 4
3.0 V
Servo
Pressure
Sensor
Rotating Base
Servo
Figure 47. Final Motor Control Flow Diagram
Compartment
Pill Drop
Pill Positioner
Cutter Blade
Arm (Vertical)
Arm (Horizontal)
Figure 48. Motor Program as a SubVI
Within larger programs, the above image shows how the basic motor
program looks and is controlled. Each one has six boolean inputs which control
which motor is run. In the image to the left, the horizontal arm is being turned on. In
the image on the right, the vertical arm is run. The duty cycle changes between
being a control and being a constant. On the left, the duty cycle is a control. This
occurs when the program is run where multiple positions could be needed, such
as, when pills are being dispensed. The element of the particular pill array
associated with duty cycle is sent to the structure containing the above image. At
47
other times, the duty cycle does not change and can be set as a constant within
the sequence. This occurs for dispensing the pill once the correct compartment is
at the pick up location, for dumping cut pills from temporary storage once the
proper compartment is underneath, and for cutting pills once the correct
compartment is at the pick up location.
The image to the left shows the way the terminals are set up
on the motor icon. This set up can change depending on how
many inputs and outputs are entering and leaving the subvi.
Figure 49. Terminals of Motor Program
The image below is the block diagram code for dispensing one pill. Within
the main program, it is run multiple times based on how many different medications
need to be dispensed at one dosage time and how many of each pill need to be
dispensed. This process takes a minute or longer to complete for each pill,
depending on the number of attempts the vacuum makes to pick up the pill.
Because of this lengthy process, we decided to only run the time comparison every
half hour in order to give the device time to dispense the necessary amounts of
medication. In the end, the timing loop caused the motors to act completely wrong
and it was removed. We replaced it with a different timing loop that allows us to
easily change how often the loop runs. We can now easily change the loop to run
every minute or 2 minutes for demonstration purposes and have it run every 30
minutes for actual use.
Figure 50. Pill Dispense Sequence
48
The subvi above is built inside a sequence structure, which allows a number
of pieces of code to be executed sequentially. Many times, this subvi was inserted
within another sequence structure in the main program and run sequentially with
other commands and subvis. Once the program is called and has received all the
inputs it needs, it will run from start to finish.
The vi is broken into different blocks. The first block receives the duty cycle
that will rotate the compartments so that the pill to be dispensed is in the position
to be picked up. Each of the motor programs pictured here have all the Boolean
controls shown. To save space, the controls set at false can be deleted since false
is the default setting. This is what is seen in the cutting sequence coming up
shortly. The second block horizontally rotates the arm to the pick up compartment.
The third turns the vacuum on. The vacuum subvi will be explained shortly. Several
things occur in the fourth. It is responsible for ensuring that the vacuum has truly
picked up a pill. Originally, the program did not contain a method of checking the
physical presence of a pill, but the vacuum turned out to be too unreliable to not
include some sort of check. Without this knowledge, dosages would be inaccurate,
as well as the pill count in compartments because the value would decrement even
when a pill was not picked up. Within the while loop is a case structure that makes
the vertical arm send the vacuum tip to the bottom of the pill compartment, wait,
and come partly up while a pressure sensor subvi checks the voltage from the
pressure sensor. This while loop repeats until the subvi reads that the vacuum has
a pill and sends a boolean true to the stop signal of the while loop through the
output terminal. In the rest of the sequence structure, the arm extends fully up, is
moved horizontally to the dispenser, waits for a second, and the vacuum is shut off
to drop the pill. The delay was added so that if there was still any momentum in the
pill, it would not fall past the chute when the vacuum was turned off.
Figure 51. Block Diagram for Vacuum Motor
The two subvis within the dispensing sequence are the vacuum motor
control vi and the pressure sensor vi. The code for the vacuum motor, shown on
the next page, is even simpler than the code for the servo motors because it is only
controlled by a boolean value telling it to be on or off. There is no duty cycle.
Similarly to the servo motor control, the boolean value runs a case structure in
which both the true and the false case contain a DAQ Assistant function, but only
the true case will run the vacuum.
49
Figure 52. Block Diagram for Pressure Sensor
The code from the pressure sensor block diagram is shown above. The
voltage signal coming from the vacuum is collected and processed by the DAQ
and output into an AC/DC estimator (figure ). The DC value is normally at .06 V
when a pill is not present. When a pill gets suctioned to the tip of the vacuum, the
resistance goes up, and so does the voltage, to approximately .1V. The pressure
sensor program compares the DC voltage to a threshold value of .08V and when
the voltage is greater, the comparison function sends a true value out of the vi to
stop the arm from dropping down to find another pill.
Figure 53. Block Diagram for Voltage Estimator
50
Continued
Continued
Figure 54. Block Diagram for Cutting One Pill
The subvi for cutting pills is seen on the previous page. It is a lengthy
sequence broken into 17 different steps. All false Boolean values were hidden to
clean up the appearance of the code. The sequence starts the same way as the
dispensing sequence with the compartment indicated by the duty cycle rotating to
the pick up spot. The vacuum moves to the pick up position, lowers, and runs
through the while loop until it has picked up a pill. The arm then lifts the pill up and
brings it to the cutter where the vacuum is turned off and the pill drops into the
funnel. The positioner plate, which was closed to allow movement of the arm, is
opened to allow the pill to drop in front of the piece. The plate closes, pushing the
pill centered under the cutter. Two commands make the cutter go down and back
up to cut the pill. The last two steps open the positioner to drop the pills in
temporary storage and re-close the positioner. This entire sequence is repeated for
a number of iterations equal to the number of pills the user specified adding,
thereby cutting all pills.
51
After the pills are all cut and are stored into the temporary storage unit, the
following program is run through once.
Figure 55. Block Diagram for Dumping Cut Pills
This program is fairly simple, involving only the compartment motor and the
pill drop motor. The only variable duty cycle is the one to make the appropriate pill
compartment line up under the storage. The pills are released into the
compartment and the compartment moves to a position where no compartments
are under the filling funnel. This is done to prevent pills from getting mixed if a user
tries to store pills without running the program.
52
2.2.2.3 Mechanical Components

Design Overview
o Design
o Operation

Servo Overview
o Servo operating theory
 Pulse wave and duty cycle
o Servo modification
 Gear tab removal
 consequences
o Signal switching
 relay operation

Cutter Assembly Overview
o Tilting Plate
o Roller Bars
o Piston
o Cutter Arm
o Case
o Funnel
o Temporary Storage

Vacuum System Overview
o Vacuum pump
o Filter housing
o Pressure sensor
o Vacuum head
o
Arm Overview
Storage Overview
o Compartment design
o Assembly design


53
Design Overview
Fill Funnel
Dispensering Funnel
Arm assembly
Cutter assembly
Storage assembly
Electronics
Figure 56. Design Overview
Design-The concept revolves around the idea of minimizing the footprint of
the system. To realize this many components lie on top of or within other
components. The major components of the system design are the arm, storage,
cutting assembly, circuitry and the case. To describe the basic locations and
54
alignments the description should start at the base plate, which is made of 0.25inch acrylic plastic in a 12-inch circle. The 10.5-inch lazy susan is mounted just
above the base. On top of the base are the storage compartments. These storage
compartments are secured to the lazy susan to allow for ease of rotation. The
servo to rotate this assembly lies mounted to the arm tower and is attached at the
center of the lazy susan. This arrangement allowing the arm tower to remain in the
center on the design. The arm tower is separated from the lazy susan and storage
compartments by a 0.125-inch gap. This separation allows independent movement
of the storage assembly without disrupting the position of the arm tower. The arm
tower is secured to the mid line plate which in turn is connected to the base plate.
This arrangement separates and secures the arm tower. The arm tower houses
the horizontal servo used for as suggested horizontal movement of the arm. The
vertical movement servo is mounted to the horizontal servo through a pan and tilt
bracket. Attached to this bracket is the curved arm used to position the vacuum
head into the required compartment. Noting that the arm must only reach three
locations, the pickup region, cutter funnel and dispensing region. From here the
vacuum assembly comes into play. The vacuum pump is mounted to the rear of
the unit as well as the filter housing assembly containing the fittings and pressure
detector. The tubing is routed to the proper fitting and to the arm. The electronics
are positioned in the boxed cavity in front of the main operating space. To load and
dispense medication funnels traverse the case to the appropriate locations.
Operation-The device operated by positioning the storage compartment
containing the medication of interest at the pickup region. The horizontal arm
positions above the pickup region and the vertical servo positions the vacuum
head into the compartment. The vacuum is operated and the program looks for a
positive pill capture. Upon receipt of a positive pill capture the sequence completes
and the arm is lifted. The horizontal arm positions the pills to the dispensing region
or the cutter funnel depending on the desires action. If the pill is to be cut the
horizontal servo places the arm above the cutter funnel and the vacuum pump is
secured. This causes the pill to fall into the cutter where the cutting sequence
initiates. This sequence drives the piston in, the cutter down and the piston out.
This entire sequence is repeated for the number of pills to be cut. When complete
the storage compartment servo positions the storage compartment from the pick
up region to the drop out region. Then the drop out servo opens the slide releasing
the ills to the storage container. At which point the pills can be further cut to ¼ by
repeating the sequence or simply to return to the center position.
55
Servomotor Overview
There are six servomotors used in this
design with three requiring modification to
perform the task. The arm requires two
servomotors, the storage assembly another
servo, and the cutter assembly with the
remaining three servos. Of all the servos the
most powerful and unmodified servos are in the
cutter assembly. This in turn makes this
component the most expensive portion of the
mechanical components while it is one of the
smallest. These motors were chosen for the
Figure 57. Servomotor
small package and relatively cheap cost. There
is one control signal for all six servo which is switched at various times to power
energize and de-engergize the servo whose operation is desired. Due to the large
number of servos and the complicated switching control over these servos further
discussion of their control will follow.
Servo Operating Theory -A servo is a geared microprocessor controlled DC
motor. Generally servos sweep over a 90-degree arc. However, removing the
stops within the servo and changing the programming allows for operation at arcs
slightly greater than 180 degrees. Basic servo theory is centered on changing the
pulse width of the control signal. This change in pulse width corresponds to a
position of the servomotor. The position of the gear head is tied to the
potentiometer position to which it is attached. A 1.0 ms pulse rotates the shaft all
the way counter-clockwise. A 1.5 ms pulse puts the rotor at neutral (0 degrees),
and a 2.0 ms pulse will position the shaft all the way clockwise. The pulse is sent
to the servo at a frequency of approximately 50 Hz. The relationship between the
pulse width and the rotor position can be seen in the picture above.
Figure 58 (Lyxnmotion)
56
Servo modification-In order to achieve the required rotation greater than 90
degrees to drive gear stop was removed. Gear tab removal was conducted by
removing the four screws that hold the servomotor together and removing the gear
head. The gear head has a small plastic tab that engages two tabs on the upper
case of the servo to prevent greater than 90-degree rotation. Pictured right is the
gear head with tab in place and removed.
Figure 59. Left unmodified, right modified
Removal of the tab can be completed with a sharp hobby knife being careful not to
destroy the gear head, as it is the location for attachment to the potentiometer and
the servo arm. This modification carries with it two related issues. One the
maximum rotation must not be exceeded or the servomotor will continue to rotate
in a circle until the required potentiometer reading is met. This action can damage
the servomotor itself or the surrounding components.
Servo switching-The main reason for servo control switching is to overcome
the limitation of the data acquisition box associated with LABView. LABView in its
general form is not intended to send out
pulse waves over its digital lines. The
Figure 60. Model: 275-240
signals are not sharp and produce
unwanted servo action. To combat this
the DAQ CLT lines are used. Ideally
both lines could be used to increase the
speed of the machine but in our case
we close to use one line. This line
produces very consistent square pulses.
However with only one line the servos
must be switched on and off to
determine the servo sequencing. This is accomplished with the use a 5-volt relays.
The relay is a double throw set up meaning that the outlet pin can be aligned to
two different sources depending on the position of the solenoid energy state (high
or low). For our use we used only one source, we chose to remove the positive
voltage source from the servo. What this does is to prevent the servo from
57
operating under and induced voltage in the control wire or fluctuation in power
caused by the vacuum pump operation. Therefore each relay receives the same
voltage and grounds while all the servos receive the same control and common
ground.
Figure 61. Relay circuit board (with noise suppressing
capacitor)
58
Cutter Assembly Overview
The cutter assembly consists of three motor servos (HS-645MG, HS-475HB
and HS-402), a commercially available tablet cutter and well as housing plastic.
Within the housing plastic reside several key components, the tilting plate, roller
bars, piston, funnel and springs. Below the cutter housing is the temporary storage
and drop out servo. The cutter operates when a pill is dropped into the funnel
region where the piston is in the shut position. The piston is withdrawn by HS475HB and the pill drops into the loading area. The piston is shut forcing the tilting
plate down under spring tension and aligning the pill between the arms of the
cutter. Scribe marks on the tilting plate as well as a curved piston head help to
center the pill. When the pill is positioned the cutter servo closes cutting the pill to
½ of its original size. The piston is withdrawn causing the tilting plate to open under
spring tension therefore opening the path to the temporary storage below. The
cutter servo is repositioned to the open position under spring tension. Tension in
the foam on the cutter surface forces the cut pill to the exit path. When the required
number of cuts is completed the pill drop out servo opens the temporary storage
exit allowing the pills to exit into their primary storage containers. This action
reduces the cycles for the horizontal and vertical servos allowing for quicker
complete cycle times. However if ¼ cuts are required the cycle is conducted a
second time on the ½ cut medication. Note that only tablets may be cut into ¼
while capsules can be cut to ½.
Figure 62. Complete cutter assembly
59
Tilting Plate-The central
and key component to the
Scrib marks
cutter’s reduction in size and its
ability to center the pill comes
from the tilting plate. The tilting
plate has an inline orientation
Brass sleeve
with the cutting surface, which
is aligned, at 20-degree angle
with the horizontal plane. In its
open position the tilting plate
Brass pin
seals the funnel to prevent pills
from exiting into the cutter
region. The titling plate is
designed and aligned such that
Top view
Side view
Spring attachment
in the closed position a 1mm
raise is maintained between the
Figure 63. Tilting plate (showing scribe marks)
cutting surface and the tilting
plate, this aids in the prevention of pill exit into piston area after cutting before the
exit path is open. Another inherent design to the tilting plate is the scribe marks
noted as helping the pill to become aligned with the centerline of the cutting blade.
These scribe marks consist of a central scribe and symmetrical lines at 30 degrees
to the centerline and parallel to each other. This sets up a system for the pill to be
forced to the center by providing a drag vectored to the centerline. The value of the
resultant force is a function of pill weight. The coefficient of friction between the
rough surface and pill is estimated at ~2.0 and therefore from the following
equation the resultant force is show below. Noting the operating torque of the
positioning servo is 4.8 kg-cm, the sliding force is << then the force exerted by the
servo.
Fr = uFp*sin (30),
Fr = 2*1/2*Fp = Fp = 9.81*Mass,
Fr = gM (g = gravitational acceleration (m/sec^2), M = mass (kilograms)).
Roller Bars-The piston and
roller bars operate in conjunction with
each other. The function of the roller
bars is to provide support and
alignment for the piston to allow for
opening and closing. The roller bars
consist of a brass bar inside a brass
tube setting up a bearing to reduce
friction and drag on the piston. These
roller bars are placed one above and
two below the piston, spaced to allow
the 0.3-inch piston to slide between
the three. The roller bars are aligned
Figure 64. Roller bars
60
through the support case, which provides support to the edges of the piston, and
secured by spring washers at each end of the brass bar.
Piston-The piston primary purpose is to position the pill into the cutter
(pictured below and to the right). The secondary purpose is to drive the tilting plate
down as well as to provide a surface for centering. The head of the piston if made
of high density black foam in a slight curve. The surface of the piston is coated with
low friction plastic. The curvature allows the pill to position against friction to the
lowest point. Due to the 20 degree alignment the lowest point is the peak of the
curvature. The low friction coating helps to reduce friction that would prevent the
positioning of the pill by counteracting
the resultant scribe forces from the
tilting plate. The piston is connected to
the servo motor (HS-465HB) through a
pin and channel arrangement. This
arrangement allows for the smallest
footprint for the servo and control arm.
The Servo arm travel is ~ 3 cm and is
achieved by constructing a parallel
plate arrangement with a 4 cm
channel. The servo is inverted and
mounted above the channel. This
arrangement is also used to limit
space. The servo head is coupled to
the channel by a #4 screw. This screw
and channel translates the circular
motion of the servo to the linear action
required by the piston. The torque
produces by this servo is 4.8 kg-cm @
Figure 65. Cutter Piston
6.0 volts (operational voltage used).
Cutter Arm-The cutter arm really consists of the upper portion of the
commercially available cutter along with an attachment sleeve, spring, servo and
servo head. The servo used here is an HS-645MG producing 9.2 kg-cm @ 6.0
volts (operational voltage used). This servo uses a servo arm which is constructed
of high strength lexan plastic with an overall length of ~6 cm. This length was used
to provide the required force to break the pill as well to avoid the funnel. The cutter
servo is mounted above the upper cutter arm and aligned such that the arm is in
contact with the upper arm at the maximum distance from the axis of the upper
arm. The upper cutter arm is returned to original position via a spring under tension
mounted below the upper cutter arm axis and connected via a curved arm support.
This set up provides an effective and small package for segmentation of
medication.
61
Figure 66. Cutter Blade
Case -the case is essential to provide mounting points for the two servos
and well as to provide lateral support to the piston, tilting plate and spring supports.
The case is constructed of both 0.125 and 0.23-inch acrylic plastic attached using
superglue. Ideally the unit would be constructed using injection molding.
Funnel -the funnel is constructed of
0.125-inch acrylic plastic and allows for pill
direction to the loading region of the cutter
assembly. On the backside of the funnel a
small thin high-density foam is used to
prevent curling out of the pill before it passes
to the cutting area. Curling out refers to the
pill folding up and on top of the piston will
positioning into the cutting area.
Figure 67. Funnel
62
Temporary Storage-the temporary
storage is just that, it is responsible
to retain cut pills during a cutting
sequence to prevent
misappropriation of cut pills with
uncut pills. This area is constructed
from the upper portion of a
Gatorade bottle. The shape and
opening provide a suitable solution
to the problem. The temporary
storage area is located below the
cutter area and exit path. The
Figure 68. Temporary storage and drop out servo
temporary storage area has a pill
drop out servo and associated exit
path coupled to its function. Upon cycle completion the pill drop out servo is
opened allowing the pills to exit into their primary storage area. The mechanism for
linear translation is similar to the piston in that a pin and channel arrangement is
used. Here however the channel is ~7 cm and the servo horn is coupled to a slide
which is supported and aligned by acrylic guides on each side. The sliding plate is
made of both 0.25 inch and 0.125-inch acrylic plastic. The servomotor is inverted
and mounted. All of which is designed to minimize the overall height and width of
the unit.
Vacuum System Overview
The vacuum system is tasked with pill retrieval and relocation within the
operating environment. It is capable of retrieving
medication of various sizes and shapes. The system
P = F/A
is composed of the vacuum pump, tubing, filter, filter
F =mg
housing, pressure sensor, vacuum head unit and
A= πr2
associated fitting. The system generates a vacuum
Therefore,
condition of at most 9.1 in Hg when the vacuum
P= mg/ πr2
head makes a seal with the medication. This
(Equations)
vacuum generation is sensed by the pressure
sensor and transferred to the operating system for pill capture acknowledgement.
Using Polymath 7.1 the system was analyzed to support a maximum weight of 26
g at a 90-degree angle with a time to lift at 2.3 seconds. The requirements of the
system place the operating envelope well within the operating limits of the system.
This translated into pill capture at .0006 seconds after pill seal is attained, therefore
nearly instantaneously.
63
Vacuum pump-Based on the
maximum pill weight and the minimum
pill thickness a vacuum requirement is
identified. This requirement provides
the differential pressure across the
medication to ensure the medication
can be removed from the storage
module and delivered to the cutter
assembly or the dispensing area. By
using simple pressure and weight
definitions a relationship for the
required differential pressure is
attained. By measuring several overthe counter and prescription
medications a minimum thickness was
Figure 69. Sensidyne AA series Micro Air
found to be 4 mm, while the maximum
Pump model 40
mass was approximately 1000mg.
Substituting these values into the equation below a net pressure difference
required was found to be 1.33 Pa. In more traditional units of vacuum this
corresponds to .0003 in Hg. To satisfy this requirement we have selected a
Sensidyne AA series Micro Air Pump model 40. This pump provides a maximum of
9.1 in Hg. This is a piston type pump and requires only about 125 mA to operate at
maximum flow. The flow for this pump is 1460cc/min at maximum flow. While the
selected pump provides sufficient flow and vacuum requirements the ability to
attain a pill from storage proved to be the most difficult problem to address. The
varying size and shape of the medication presented problems for vacuum tip
development. Prior to discussing the construction and operation of the vacuum
head several additional components to the vacuum system should be discussed.
Operation of this pump requires a large capacitor is ground to remove noise. This
pump is also controlled via relay through LABView.
Filter housing-Due to the large amount
Figure 70. Filter housing
of dust and particles released during the
cutting and storage of medication without a
filter in line with the pump, the pump will and
have become impossibly fouled requiring
complete vacuum pump disassembly and
reconstruction. To avoid this the filter housing
made from 11/2 inches pcv tubing and end
caps was built. The housing provides mounts
for both the inlet and outlet pump fitting
(brass) and well as the pressure sensor. The
filter housing by name also houses the filter,
which is made of low-density foam. The flow
path through the filter housing prevents direct connection of the inlet an outlet lines
therefore utilizing the fundamental principal of rapid gases directional transition to
64
help in the removal of particles from the air. In theory the rapid change of direction
of the gas does not overcome the inertia of the suspended particles and they are
removed from the air stream.
Pressure sensor-The
pressure sensor used is a
Motorola MDX10GS sensor. This
sensor outputs a differential
voltage based on the pressure
difference felt across the
pressure and vacuum ports. The
means by which this sensor
operates is through the use of
Figure 71. Interior diagram of MPX10GS
piezoelectric crystals. The crystal
deflects against the differential
pressure across it. This deflection produces a voltage which it additive to the V +
lead therefore producing a differential voltage across pins 2 and four. The
excitation voltage for this sensor is 3 volts to a maximum 6 volts. For our purposes
the sensor is mounted with the vacuum port aligned to measure system pressure.
As seen below the differential pressure is linearly related to the output voltage. For
our use the pressure sensor is not used as and exacting differential pressure
detector and therefore no
temperature compensation is
required. Our concern is simply with
a large change in the output voltage.
This change is measured by
LABView and provides the only
indication to the system of pill
capture. Being the only
measurement this is crucial to proper
system operation. The set point
value for pill capture is 0.35 volts.
This sensor has some serious
considerations related to component
warm-up and transition timing.
However due to the operating
Figure 72. Operating voltages
program timing and warm-up are
incorporated into the sequencing.
Vacuum head-considerations in the design of the vacuum head included the
need to seal pills of various sizes and shapes. With no obvious available sources
for this application a vacuum
Figure 73.Vacuum
Vacuumhead
head(not
construction
materials
shown with
head was constructed out of a
“shovel”)
fishing lure. The fishing lure
was chosen due to its low
melting temperature, pliability
65
and low cost. A custom mold was constructed with the use of a mechanical pencil
and lead refill tube. The resulting vacuum head has a conical interior structure that
is flexible and allows for molding around the pill to provide a seal. The head has a
“shovel” made of flexible plastic sheets to allow for directing pills toward the
vacuum head. The form of the head follows its function. With the tip in hand the
evaluation of the mechanism for capture states with the retrieval angle of 20
degree in this position the capture effect is largely due to the balancing 0.94*weight
of the pill due to the storage container
support of the pill. At elevation referenced by
a 90 degree angle the mechanism is
changed from balancing the weight of the pill
to balancing the frictional force of sliding
(weight of the pill) with the normal force
produced by the differential pressure reduced
by the coefficient of friction between the two.
This is where some safety requirements of
the design are implemented. The coefficient
Figure 74. Vacuum head with shovel
of friction can be estimated at 1-4 however
for safety and estimation of 0.4 referring to
the frictional coefficient between two plastic surfaces was used. A second safety
factor used was a 50%reduction in the suction area due to pinching of the soft
head material.
Arm Overview
The arm assembly is
the major transport method
employed by this device. The
robotic arm was chosen not
only for the “bells and whistle”
quality it possesses but also
because it has a wide margin
of versatility, one to one
control over medication
through process, allows for
verification of medication at
point of retrieval. The Robotic
arm is used to move
medication from storage to
the cutting assembly and from
storage to dispensing.
Additionally the arm is
required as part of cutting
sequences. The Robotic arm
is constructed of Lexan due to
its strength and chemical
Vertical servo
Arm
Horizontal servo
Compartment servo
Outside Arm structure
Inside Arm structure
Figure 75. Drawing of arm and tower
66
Figure 76. Arm (with vertical servo)
resistance and a metallic pan and tilt bracket for mechanical stability. The arm
consists of two HS-422 Servomotors each drawing 180 mA no load at 6.0 volts.
These servomotors control the horizontal and vertical pan of the arm. The
horizontal arm is mounted inside the arm tower and the vertical servomotor is
mounted to the horizontal motor. Attached to the arm is the vacuum head and
associated tubing. This provided the means for the arm to complete its tasks.
The horizontal arm positions above the pickup region and the vertical servo
positions the vacuum head into the compartment. The vacuum is operated and the
program looks for a
positive pill capture.
Upon receipt of a
positive pill capture
the sequence
completes and the
arm is lifted. The
horizontal arm
positions the pills to
the dispensing region
or the cutter funnel
depending on the
desires action. If the
pill is to be cut the
horizontal servo
Figure 77. Arm tower (also shows compartment servo)
places the arm above
the cutter funnel and
the vacuum pump is secured.
Important to the proper operation is the precise alignment of the vacuum
head with the curved arm. The arm is designed to enter the compartment at an arc
just above the compartment face. The vacuum head is aligned such that the plastic
shovel contacts the compartment face and flexes to gain access below the pill.
This forces the pill the vacuum head. The arm is also designed to raise the vacuum
head to a height greater than the cutter funnel to allow passage above the cutter.
Pictured below is the arm and arm tower.
Storage Assembly Overview
The storage compartment is the largest moving component is the design
and contains 7 storage locations for medication, a servomotor for rotation, a lazy
susan for support and an arm tower surround. The operation of this assembly is
key to the device operation. This assembly rotates to position the proper
compartment below the proper location based on need and operation. This is
controlled by previously determined duty cycles for each operation. In fact the
number of specific duty cycles is twenty one for this assembly as compared with
three specific duty cycles associated with the arm. The compartment servo is an
HS-422 drawing 180mA no load at 6 volts.
67
Compartment Design-The compartments are designed to surround the arm
tower segmenting the usable range into 7 compartments. Each compartment
consists of the arm tower surround coupling and three additional plastic dividers.
Each compartment is 9 x 6 cm with a lower surface at a 20 degree angle with the
horizontal. This allows the arm to access the compartment on a circular path. Each
compartment rests and is secured to the lazy susan to allow rotation as one.
Assembly design- the assembly is designed to operated below and around
the arm tower. The two pieces are disconnected and are allowed to move
independently of one another. The lazy susan is mounted on top of the base plate,
the compartments lie on top of the lazy susan while the servo motor is attached at
the center mounted inside the arm tower and the arm tower fits into the coupling.
Figure 78. Base plate
Figure 79. Storage compartments
Figure 80. Arm assembly and storage assembly together
System Current and voltage requirements:
The basic requirements for this system revolve largely around three major
components. The computer, the cutting servomotor(HS-645MG) and the vacuum
pump. Each relay requires ~20 mA for operation while the most powerful servo
requires 450mA no load current at 6 volts. While only one servo is operating at a
time the current requirement is limited to this level of 470mA through the system.
68
While all the other servos in the system require only 180mA no laod at 6 volts, the
highest level is the design requirement. The computer is run from it’s own power
supply and not included in the design requirements. The last item required for
operation is the vacuum pump drawing a maximum of 125 mA at full load.
However the vacuum pump is not run during operation of the cutter motor and
therefore the maximum level from the vaccum pump and any servo is 205 mA.
Again this is less than the maximum level attained by the cutter servo.
2.3 Prototype
Operation
In order to make the device operational the user will have to first install the
program, and set the initial values. The prototype utilizes a laptop to run the
LabVIEW program. Data is transferred to the device via a 6024E PCMCIA DAQ
card that is coupled with a SCB-68 controller box. Only one of the analog lines is
used, so the same signal is sent to each of the motors, but since only one motor
needs to be in operation at any given time, only one is permitted to be in the on
position that is controlled by relays that are on the controller box panel.
To begin the installation process the DAQ card must be inserted into the
PCMCIA slot of the laptop.
Figure 81. Inserting DAQ Card
69
The user must then turn on the laptop and open the AMB LabVIEW program. Once
double clicking on the program the front panel will be displayed. This panel
consists of the text boxes containing the necessary information the user will need
to complete for each pill before a dispensing sequence can begin. The first task is
to assign each column which corresponds to one pill, the name of the pill.
Figure 82. Entering Pill Names
70
The user must then enter the times at which at pill needs to be dispensed. Each
pill can be dispensed up to four times a day, and the time must be entered in
half hour increments since the times are only checked on the half hour.
Figure 83. Entering Dosage Times
71
The user leaves the expiration date and the number in container at zero
because these values will be updated when the ‘ADD MORE PILLS’ program is
inititalized. The following text box is the reference number this is the number
that corresponds to the barcode on the side of the prescription bottle. The user
is asked to use the barcode scanner to accurately fill in this value for each of
the medications.
Figure 84. Enter Reference Number
The user must then enter the number of pills to be dispensed at each of the times
in the dispense text box, where the same number of pills is dispensed each time.
72
Figure 85. Enter Number to Dispense
73
The final text box corresponds to the the number of cuts desired for each pill in
the cuts test box; the user need to enter 0 for no cuts needed, 1 to cut the pill in
half or 2 to cut the pill into quarters
Figure 86. Enter Number of Cuts
For any compartments not used, the information is left blank, except for the
number in container text box where the number 1 should be entered, this value is
needed so the ‘Container Empty’ warning is not received every time this value is
checked.
74
All the values entered by the user must be saved, with LabVIEW the values
need to be set as the default values so the values are not lost if the program is
ever closed. This is done by clicking on edit and then clicking on ‘Make Values
Default’
Figure 87. Make Values Default
75
The program can now be switched to the on position by clicking on the ‘ON’
button, it will turn light green when clicked into the ON position. This begins the
main loop iteration that repeats every 30 minutes.
Figure 88. Turn Program On
76
To finish the installation process the user must add all the medication and
update the expiration date and the number in container value. This is done by
first clicking on the ‘ADD MORE PILLS’ button. This sets the value to ‘true’ for
the main case structure and thus begins the sequence structure in the main
loop to add medication.
Figure 89. Add More Pills
77
After clicking on the ‘ADD MORE PILLS’ a dialog box will appear that asks the
user to insert the reference number to do so the barcode scanner is used to
scan the barcode of the prescription bottle for the compartment that is currently
being filled. This value is then compared to all the reference numbers originally
entered in the beginning portion of the installation procedure. Once a match
has been found the cluster containing the rest of the information of that pill is
passed forward into the rest of the program.
Figure 90. Enter Reference Number
78
After a match is found the compartment servo motor rotates the compartments
so that the correct compartment is in front of the filler position. A second dialog
box then appears prompting the user to indicate the number of pills being
entered. The user is asked to enter this value then click ‘OK’. The number in
container will automatically update if the pills are going to be cut into halves or
quarters. The compartment then rotates back to its home position.
Figure 91. Enter # Pills Added
79
The third dialog box asks to enter the new expiration date, this date is used
keep track of the expired medication. When expired the user is prompted to
remove all the medication and then add more new pills through the ‘ADD
MORE PILLS’ button.
Figure 92. Enter Expiration Date
The cutting sequence then automatically begins if necessary. The sequence varies
if a value of 1 or 2 ( 0 is for no cuts). If 1 is entered for the cuts value then the
cutting cycle only repeats once. If 2 is entered, then the cycle repeats twice. This
cycle consists of the robotic arm first picking up a pill from the correct container
that is in the filler position. This is done by moving the compartment to the filler
position, and then moving the arm horizontally to the filler position, and then
lowering the arm vertically. The vacuum then turns on to pick up the pill.
80
Figure 93.
The arm then drops the pills into the cutter apparatus, by shutting the vacuum off.
Figure 94.
The pill positioner servo motor is connected to a plastic piece with a curved foam
edge that pushes the pill up against the foam block to center the pill for the blade.
81
Figure 95.
The blade servo motor then lowers the blade to cut the pill, cutting the pill along its
line of symmetry into a half its original size.
Figure 96.
82
Once cut, the blade servo motor moves back to its original position, lifting the
balde, and the pill positioner servo moves the positioner back lifting the tilting
mechanism that causes the pill to fall into the funnel.
Figure 97.
This process is repeated for the all pills added to the container, so that all the cut
pills collect in the funnel, keeping them separated from the whole pills. Once all the
pills are cut the slide at the bottom of the funnel moves back allowing the cut pills
to fall back into their compartment.
Figure 98.
83
When the setup process is complete the following message is displayed to the
user. Once the user clicks ‘OK’ the ‘ADD MORE PILLS’ sequence is complete, and
the case structure remains in the ‘false’ state until the button is pushed again. This
procedure is not only for the initial installation process but any time more
medication needs to be added to the device. It has to also be repeated for each
compartment to load each pill.
Figure 99. Set up Complete
84
A much shorter procedure occurs when pills need to be dispensed, which allows
the clients to use the device without the assistance of a caretaker. The only task
the client must remember to do, is leave a cup under the dispense funnel, that will
catch the pills. When the AMD is in the ‘ON’ position the pills will be automatically
dispensed when the current time is equal to the dispense time. The dispense
sequence will initiate, which involves the compartment moving to the filler position,
where the arm then removes the pill from the compartment as described in the
installation procedure. The vacuum then turns off when the arm is over the
dispense chute, allowing the pills to slide into the cup that should be placed at the
end of the slide. This cycle is repeated for the number of pills that need to be
dispensed as stated in the ‘Dispense’ text box. Once all the pills have been
dispensed, the alarm will begin to sound and the dialog box shown below will
appear. The alarm will continue to sound until the user clicks ‘OK’ or hits ‘Enter’.
Figure 100. Take Medication
85
Testing
Testing the device was an ongoing process throughout building the device.
Testing involved running the LabVIEW programs to see if they contained any
errors due to software limitations or incompatible functions, as well as errors in our
logic of the programming. Through testing, we discovered incompatibilities in the
PDA component of our design. It occurred in making sure the dimensions of the
mechanical parts were compatible with their functions. Wire connections were
tested with a protoboard prior to sautering them permanently. Testing was
performed to find out if each part functioned properly first with simple program
control and eventually as a part of the entire program running. Finally, testing was
needed to make sure the final project ran reliably in the way it was intended to be
used by the clients.
Testing the LabVIEW program made it easy to identify problems that were
not so easy to fix. From the first week of programming where we were trying to
develop the alarm to go off while the user prompt was on the screen, we were
testing different codes. Aspects of the program that required the most testing were
the alarm, the timing of running the program, and finding a way to gather the real
time and date and compare it to a compatible form of the dosage times and
expiration date.
The testing that resulted in the least success was the compatibility of
components testing. Even through research and calls to customer service, 2
different PDAs were ordered that could not be used with the device. In the end, a
laptop was used to run LabVIEW. By testing the barcode scanner with LabVIEW,
we discovered that some barcodes did not scan correctly. As a result of this
testing, the clients can be advised not to scan barcodes with letters. The reference
number can still be entered using the keyboard.
Testing the qualities of the parts was helpful in designing better parts. The
cutter alone went through at least 4 different designs before one worked well.
Many times the design seemed fine on paper, but didn’t function well when built.
This made it important to perform tests on all mechanical parts. By testing the
cutter, the most common problem was finding a design that accurately centered
any shape or size pill. Another problem was making sure that enough of the pill
was contained so that it wouldn’t pop or slide out of the cutting area while being
exposed enough to be cut by the blade. The shape of the arm was another design
where several were built until one had just the right amount of length and
curvature. The compartments were rebuilt once testing revealed that the design
would need to be more compact and the arm would need to be mounted in the
center of the compartments. The chutes were redesigned when the case had to be
rebuilt because they would be too short for the second case design. The case was
rebuilt because in building the first design, testing the sizes and flexibility of the
pieces resulted in a bad design. The second dispensing chute tested too sticky to
allow the pills to slide reliably to the end. A third was built and tested fine. The
sponge used to align the pill appeared too soft when we tested the cutting
sequence. It was replaced with a firmer foam. The vacuum tip was tested and
found to be too inflexible at first. A second design was too flexible and would
86
collapse when hitting the pills. A templar reinforcement was added to give a hard
scooping surface with a flexible vacuum tip and adjustments were made in size
until testing revealed good functioning.
Wire connections were constantly being tested with the multimeter and
power supply to make sure proper voltages and currents were going through the
appropriate wires. When malfunctions arose during testing of the device, many
times the wires were tested.
Testing the compatibility between the motor programs and the motors
started off with basic tests. By setting using the front panel of the basic motor
program, a motor was chosen to turn on and a duty cycle chosen. This method of
testing allowed us to find all the duty cycle values needed for the program,
including the compartment motor duty cycle for each compartment under the pick
up spot and under the cutter, the horizontal and vertical positions of the arm, and
the in/out or up/down positions of the cutter blade, positioner, and pill drop plate.
Eventually, sequences were tested. The process of testing, finding problems,
attempting to fix the problem, and retesting was repeated over and over until the
device functioned properly through sequences and eventually through the entire
program cycle. In testing this kind of compatibility, sometimes the problem involved
mechanics, sometimes electrical connections, sometimes human error, and
sometimes programming errors.
Finally came the testing with client constraints.
 Device must be user friendly to wheelchair bound clients and clients using a
walker, cane, or having limited right arm mobility.
o Testing: The device was run while user sat in a wheelchair. The device was
run while user stood leaning on a chair with one arm. The toughest part was
opening the pill bottles, but was completed.

Medication must be protected from pets and pet hair.
o Testing: The device was run with the casing lid closed while plastic shavings
were thrown at the device. The device was stopped, the casing opened, and
inside of box checked for shavings. None were found.

Device must be user friendly to client with poor eyesight.
o Testing: The device was used by a far sighted person without their glasses.
The user said the screen was fuzzy, but could identify the two large buttons
for turning the device on and for adding pills. The buttons also lit up green
when on to help the user be certain they were turned on. Loading the
machine was easy to do. The latch simply needed to be twisted half a turn
and the large funnel for filling is easily visible when the top of the case is
open. The pop up boxes were not easily read so the font was enlarged. The
enter key on the keyboard was identifiable.

Device must be user friendly to blind client who wants the least help from family
as possible.
o Testing: The device was run by a blindfolded volunteer. The volunteer was
unable to perform the add more pills function, but was able to find the large
87
enter key to shut off the alarm when it became audible to them. The external
protrusion of the dispensing spout from the side of the casing made it easy
for the volunteer to locate the cup where the medication had been
dispensed. Thus, testing revealed that a blind person could use the device
on a day to day basis, but would need assistance in adding more pills. A
client with poor or no eyesight would be limited in the amount of
maintenance and troubleshooting they could do because it requires dealing
with small parts and small spaces at times.

Device must be user friendly to client with tremors.
o Testing: The device was run while one volunteer held and shook the wrist of
the user trying to work the device. Pressing the enter key and retrieving the
dispensed pills worked well. Opening the bottle and pouring the pills in the
filling spout was more difficult, but the funnel mouth was wide enough to
catch all the pills. Typing took patience because the keys were smaller than
the enter key. A client with tremors would be limited in the amount of
maintenance and troubleshooting they could do because it requires dealing
with small parts and small spaces at times.
88
3 REALISTIC CONSTRAINTS
This device has several constraints that helped determine the optimal
design and shape the final design. Constraints existed concerning clientele, health
and safety, mechanical aspects, electrical aspects, technical aspects, finances,
time, environmental aspects, and RERC contest rules.

Clientele
o Device must be user friendly to wheelchair bound client.
o Device must accommodate multiple pills
o Medication must be protected from pets and pet hair.
o Device must be user friendly to client using walker.
o Device must be user friendly to client with poor eyesight.
o Device must accommodate client with limited right arm mobility.
o Device must be user friendly to client using a cane.
o Device must be user friendly to client with tremors.
o Device must be user friendly to blind client who wants the least help
from family as possible.

Health and Safety
o Pills must not be compromised in their chemical effectiveness
 Cannot be exposed to high moisture or high heat.
 Cannot be taken if expired.
o Device must not injure client or others within close proximity to
device.
o Device must rest securely on a counter top or in a mounted position.
o Device must not cause electrical fires or contain exposed wires.
o Material composing device must be compatible with pills.

Mechanical
o Device must be portable; therefore it should be small enough to fit on
a countertop.
o Device cannot be loud enough to be bothersome.
o Processes must be completed in a timely, efficient manner.
o Positioning and cutting of pill must be accurate.
o Dispensing of pill must not break or damage the pill.
o Mechanical parts must not present a hazard to the client.

Electrical
o Device must be capable of running on battery or plugging into the
wall.
o Electrical wires must not present a hazard to the client.

Technical
o Product must utilize current technology.
o Product interface must be simple to use.
89
o All parts must be compatible.

Financial
o A $2,000 budget exists for the project.

Time
o 1 semester for designing device.
o Project must be completed and running by end of 2nd semester.

Environment
o Device must protect pills from intense light, dust, pollen, and
fluctuations in heat.
o Device must be suitable for use in a home or clinical environment.

Contest Rules
o Device must cut dispense pills, tablets, and capsules of any shape or
size.
o Device must be able to cut pills or tablets into halves or quarters.
o Device must have a barcode scanner.
o Device must have an alarm to notify clients to take pills.
o Device must have a way of tracking how many pills have been
dispensed.
o Device must track the expiration date.
o Device must store information about medication such as name,
dosage, dosage times, expiration date, and reference number.
90
4 SAFETY ISSUES
Two main issues are targeted regarding safety; the movement of parts and
the regulation of medication.
When the casing is lifted off the device’s internal components, several
points should be kept in mind.
 Keep fingers and objects out of the compartments. If the compartments
would rotate, fingers will get pinched and other objects may break and
could be hazardous to the eyes. The compartments are usually the first
thing to move in many sequences so there would be no warning.
 Use caution when fingers are near blade. Avoid having fingers there at
all by using tools such as a set of tweezers to remove lodged pills or to
replace the sponge.
 Do not keep the device near water. The device contains many electrical
components that could create a hazardous situation if in contact with
water.
The second safety aspect is very important. Taking wrong or compromised
pills could lead to serious health risks and possibly death. This is an automated
machine and its purpose is to deliver accurate dosages, however, mistakes can
occur. Always be familiar with your pill dosages. Additionally, the following should
be kept in mind:
 Do not take pills that have had any liquid spilt on it.
 Do not take pills that have been stored in extreme heat.
 Do not take expired pills.
 Do not program LabVIEW to dispense more or less than the
prescribed amount.
 Do not program LabVIEW to cut pills in half and dispense 2 per dose
when 1 pill is the dosage. This is not efficient for the machine or as
accurate a dosage as taking them whole.
 Do not let children have access to the inside of the device.
 Do not try to dispense anything other than medication.
 If the medication has any special precautions or directions, such as,
take with a glass of water, or do not take within 1 hour of eating, post
a reminder note for yourself above the dispensing chute.
 Keep original prescription bottles somewhere to just in case a
caretaker or family member would want to double check the
information on the front panel with what was prescribed.
 If you know of a vacation or weekend away, keep some pills in the
prescription bottles to use while away. Turn off the program before
leaving.
 Always remember that medications do not work if they are not taken!
91
5 IMPACT OF ENGINEERING SOLUTIONS
The environment concerns surrounding this device are more actively centered
around the medicine in which it actively stores and dispenses and in the
electronics used from control and processing. The third concern is over the
recapture and recycling of the plastic and metal components in the device.
From an obvious standpoint that any environmental concerns surrounding
medication should not be associated with this device but rather with the user. This
is to say that the user is responsible for proper disposal of expired medication
regardless of use of this device. However, guidelines for this disposal should be
given to the user and are as follows:
Tips:
1. Consider all your options for safer, environmentally-friendly disposal of your
unused medications.
2. When you explore safer options expect to hear "Why don't you just flush
them down the toilet?" Just because this method is still common practice
does not make it the most responsible or safest practice.
3. Keep in mind, proper medication disposal is still an emerging environmental
issue. Even experts and officials differ greatly on what should be done about
the problem.
4. Your disposal options can and will vary greatly by your area. You will find a
wide variety of answers to this problem.
5. If you must dispose of your unused medications in the trash, which is still
better and safer than the sewer, you may want to place a little water into
solid medications or solidify liquid medicines with a little kitty litter, sawdust
or flour. This may help keep your medications from being taken accidentally
by a child or pet.
What You Need:



A little persistence, preparation and planning.
Location, if any, of your local household hazardous waste facility.
Location and details of drug recycling programs, if any, in your area.
There is one major concern directly associated with the medication. As
medication is handled and cut there is a release and partial capture of the
medication in the filter and case of the machine. This medication should be treated
as in the above manner, as household hazardous material. Precaution should be
exercised in case removal as air borne particles can contain medication that will
expose technicians to medication not intended for their inhalation. This while not
directly tied to the environment is a basic safety concern surrounding this device.
92
Figure 101. Hazards
The other concern surrounding this device is in the electronics used to
control and process information. Clearly currently the control of disposal of these
items is in terms of hazardous materials. The disposal of these items in landfills is
not allowed and more responsible actions such as recycling or donations should be
examined first. Even non-functioning devices can be recycled to reclaim precious
metal, bulk metal and recyclable plastics. Reusing and recycling the raw material
conserves natural resources and avoid air and water pollution caused during
incineration and the production of green house gases during the manufacturing of
new products. Potentially release hazardous materials include chemicals such as
lead, mercury, cadmium, hexavalent chromium, polybrominated biphenyls or
polybrominated dipyenyl ethers. By design of servos and centralized circuit boards
the recycling of this design is increased providing an easier means of separating
the plastic components from the hazardous electrical components. Below are the
devices most related to this issue.
This device uses a large amount of plastic components. These plastic
components are composes of plastic which are easily recycled for use in a variety
of commercial products. One large recyclable item is the case and storage
assemblies. Pictured below are these largely recyclable items.
Figure 102.
93
6 LIFE-LONG LEARNING
In today's fast paced society one cannot rely on yesterday's information to
develop new ideas for today. To keep up with the increasing speed of technology,
innovation, and discoveries one must participate in life-long learning. Life-long
learning is defined as "all learning activity undertaken throughout life, with the aim
of improving knowledge, skills and competence, within a personal, civic, social
and/or employment-related perspective" (Europa). This concept has become a
popular trend in today's industry, where employees fear being replaced by those
who know the latest information and thus struggle to update their knowledge.
Those with the latest information are the recent graduates of a university, and
those fearing being replaced are the employees close to retirement. In order to
maintain job stability the employees already hired must participate in life-long
learning to compete with the recent graduates. This ongoing battle of which
employee will be more beneficial to the company is based on which employee
withholds more knowledge. As a result, the process of life-long learning must occur
throughout life especially after graduation, if the recent graduate would like to
remain a competitive employee when he/she is close to retirement and the
company is considering hiring a younger task force.
One of the greatest skills obtained throughout the development of the
device is project management. Project management involves not only dividing the
tasks among the team members but also using time management to ensure that
deadlines are met and the product produced is at the highest quality possible.
Dividing the tasks seemed difficult at first, since little was known about how
involved each task may be. As we became familiar with one another's strengths
and weaknesses, it became clear which team members would excel in the
mechanical portion of the project and who would excel in the programming portion.
Learning the strengths and weaknesses of one another is an essential element of
good project management, so people are not only more likely to enjoy the portion
of the project which they are working on, but are also more likely to meet the
deadlines since less background information needs to be studied. It is also
necessary to divide the tasks evenly, so no one person is left with a greater portion
of the work. Time management is also necessary so the minimal amount of time is
used to produce the best product. Wasted time only results is wasted money and
loss of morale. Project management also forces one to keep the clients needs in
consideration at all times. This is the first engineering project designed for another
to use by our class. We therefore have to remember the disabilities the clients may
have and the restrictions it may place on the design on the device. This involves
imagining oneself in another's place when using the device, which is a concept we
have not yet implemented in engineering. The final aspect of project management
that was learned is patience. Patience with one's team members, advisors, and
companies where material was ordered from is essential to ensure that time is
again not wasted and the team moral is upheld.
Another skill obtained from the design process is how to find and ask for
assistance. To find the people with the right knowledge to help with the
project is a task within itself. By attending the LabVIEW seminar not only
94
did we receive some immediate assistance from some of the guests attending
the seminar, but made a valuable relationship with the speaker Bharat. He
use to work as a engineer for National Instruments and therefore knew the
program very well. After meeting him at the seminar and describing our
project to him, he agreed to come provide some assistance when he came to
the area. The mere hour we spent with our group provided us the main
structure on which to build our program. He also showed us how to search the
National Instruments website for any future questions we may have or how to
contact the other engineers. This relation showed the importance of
networking. One must attend seminars and conferences not necessarily for the
material being discussed but for the contacts one may find helpful in the
future.
95
7 BUDGET
Component
Quantity
Unit Price
Extended
Price
Supplier
Servo Motors
Roll-up
Keyboard
Barcode
Scanner
Vacuum Pump
Keyboard
Labels
3
$34.09
$102.26
Lynx Motion
1
$19.59
$19.59
Mwave.com
1
$126.45
$126.45
ID Automation
1
$18.73
$18.73
Skycraft Parts
1
$36.45
$36.45
EnableMart
Plastic
1
$45.00
$15.00
Lynx Motion &
Home Depot
Aluminum
Siding
5
5.00
25.00
Home Depot
Lock
1
3.50
3.50
Home Depot
TOTAL
$376.98
Figure 103. Budget Summary
96
8 TEAM MEMBERS CONTRIBUTION TO THE PROJECT
Team Member 1: Eva Marie Suarez
My main role in the development of the AMD was to develop the main
program in which Jackie’s motor programs were incorporated into. This main
program checks the current time with the dispense time, and initiates the dispense
sequence as needed, alarming the user to take the medication. The main program
also tracks the expiration date, setting off an alarm if the medication is expired. It
keeps track of the number of pills in the container and displays all the necessary
information on the front panel for the caretaker to check on. The second portion of
the main program allows the user to add medication. Adding medication involves
updating the expiration date, the number in the container, and initiating the cutting
sequence and repeating the sequence the appropriate number of times
I also assisted Kevin in the mechanical portion of the project by using my
resources at Tolland Woodworking and Architecture to make any specific or
specialty cuts needed, and also use the heat gun to bend the plastic into certain
forms.
Team Member 2: Jackie Masse
For this project, my main responsibility was to write and test the programs
associated with the device’s motor control. This involved attending a LabVIEW
seminar, learning how to communicate with the motors through a data acquisition
unit, and develop the necessary vi’s and subvi’s to incorporate into the main
program. I designed the basic motor command program to run the motors through
Boolean commands. I incorporated a square wave generator function to
communicate with the motors through digital ports. I designed the programs for
running the cutting sequence, dispensing sequence, pill storing, and worked with
Eva to troubleshoot the main program. I was responsible for keeping records of the
measured duty cycles and any changes that occurred along the way.
Secondary tasks performed included designing and building the first
compartment storage device, helping glue and cut plastic parts of the device,
soldering different wires and surface mounts, testing the device, and
writing/presenting weekly reports.
Team Member 3: Kevin Villani
As a member of team #6 working on the Medication Dispensing Device for
the RERC design competition I have produced the following contributions to the
project. From an initial standpoint I envisioned the basic prototype design. I was
largely involved in the device evolution in appearance and organization. The first
item would be the storage assembly. I was key to the design and implementation
of the mechanical and operational aspects of this subassembly. Secondly would be
97
the arm assembly and tower (which houses the storage compartment servo motor)
from design to implementation and testing. Next would be the vacuum assembly
from vacuum pump selection and tip development to implementation and testing.
Associated sub components of the vacuum assembly are the filter housing and
pressure sensor. Both of which I constructed and/or tested. Last of the major
components would be the design, implementation and testing of the cutter
assembly. An associated sub assembly would be the temporary storage and drop
out servomotor. I was largely involved in the development and testing of this
device. I also assisted in the design, testing and implementation of the following
areas:







Servo motor control (LABView)
Case design (original)
Relay selection
Duty cycles
Visio drawings
Circuit soldering
Circuit noise reduction
98
9 CONCLUSION
Clearly the elderly population is growing. This growth extends an obvious
parallel to increased medication use coupled to regiments that become more
stringent and confusing. Increased medication complexity and growth expands the
current market for medication dispensing devices to minimize errors in medication
dosing. The products currently on the market and those described by the published
patents do not accommodate the needs of the clients requesting our automated
medicine dispensing device. In addition to adding a cutting component, a barcode
reader is included to minimize errors during the loading process. Our product does
not only meet the requirements of our clients but provides the product at a reduced
cost compared to similar products currently on the market, especially when one
considers the device being mass produced where the laptop is replaced by a
touchscreen and a microcontroller.
The completed prototype is a compact, 2’ by 1’ design that incorporates all
the specifications requested. The cutter is capable of cutting the pills into halves or
quarters with significant accuracy. The barcode reader works to reference an
identification number that is given to each pills then uses this number to withdraw
the information pertaining to that particular pill into the rest of the program. The
storage modulus is designed to hold up to 7 different types of medications each of
which can be either tables or capsules of varying size and shape. The device has
also been designed for easy loading and dispensing, where the user only has to
pour all the medication into the filler to load and take the medication from the cup
to retrieve their dispensed pills.
99
10 REFERENCES
e-pill Medication Reminders, Wellesley, MA, 2005.
http://www.epill.com
Lynxmotion LLC., Pekin, IL, 2004.
http://www.lynxmotion.com
National Instruments Corporation, Austin, TX, 2005.
http://www.ni.com
Parallax Inc., Rocklin, California, 2002-2004.
http://www.parallax.com
Europa-Education and Training, 2003
http://europa.eu.int/comm/education/policies/lll/life/what_islll_en.html
100
11 ACKNOWLEDGEMENTS
Dave Kaputa - for guidance with LabVIEW application for our device
Bharat Sandhu – for instruction on LabVIEW
Chris Liebler - for assistance in the mechanical portion of the project and
assistance with proper component selection
RERC Competition- for funding our project
John Enderle – for donating the laptop, DAQ card, controller box, and purchasing
the Viewsonic Airpanel
Tolland Architecture and Woodworking- for lending us the needed to make some of
the specialty cuts
101
12 APPENDIX
12.1 Specifications
Electrical Parameters
Power Sources
Main
PDA
6 volt power supply
rechargeable lithium battery
Display
Number of Characters
Dimensions
laptop
13 inch screen
Motors
Relays
Quantity
Voltage
Amperage
Servo motors
Quantity
Voltage
Vacuum motor
Quantity
Voltage
Amperage
User interface
Accuracy
7
5V
20 mA
6
6V
1
6v
125 mA
laptop keyboard and barcode scanner
(future: PDA, roll up keyboard w/brail letters, and
barcode scanner)
¼ tablet – 90%
Mechanical Parameters
Material
Plastic
Compatible with chemical composition of
Medications used
Weight
Vibration
Size
Anchoring/Mounting System
Gears
Blade
Size
Material
6 lbs
minimal
easily transportable to a home or clinical setting
sits on table
screw and simple
1” razor blade
metal with low reactivity, possibly stainless steel
102
Security
Case screwed shut
Environmental Parameters
Operating temperatures
Storage temperature
Storage humidity
Light level
0-100° F
dependant on medication
airtight
low
Hardware and Software Parameters
Programming
Memory
Barcode reader
LabVIEW
256 MB Memory Stick
Plug n Play type
Input Parameters
Alarm silence
Barcode data
Medication reload
Enter key on keyboard
Reference # brings up following data:
 Medication name
 Dose
 Dispense times
 Expiration dates
 Number of cuts needed
User operated
Output Parameters
Alarm condition
Error condition
Dose/Interval
User input required to stop alarm
Medication expired
# of pills in a container is 0
Reference # not found
Cannot be refilled
Change confirmation
103
Download