Project Number: P09321

receipttrogleΛογισμικό & κατασκευή λογ/κού

29 Οκτ 2013 (πριν από 4 χρόνια και 14 μέρες)

116 εμφανίσεις






Multi
-
Disciplinary Senior Design Conference

Kate Gleason College of Engineering

Rochester Institute of Technology

Rochester, New York 14623



Project Number: P09321


AUTOMATED MEDICINE DISPENSER


Justin Zagorski (ISE)/Project Lead

Rebecca Jaiven (EE)/Lead Engineer

Michael Boquard (CE)/Team Member

Dan Phillips (EE)/Faculty Guide

Ed Hanzlik (ME)/Faculty Advisor


ABSTRACT

The purpose of this project was

to design a secure,
automated pill
-
dispensing system utilizing previously
existing technology developed by
PJSolutions, Inc.
This proof of concept
was to

provide

two individuals
with a 7
-
day supply of six medications take
n twice a
day. The project aimed

to simplify
the

distribution of
medication in a way conventional dispensers do not
,
by providing a set schedule and a secure
environment
.

The proposed design integrated

a
laptop

for development and user interface

and

a

fingerprint scanner for user verification. The primary
user will be able
to approach

the machine and access

medication based on a predetermined schedule by a
pharmacist. The final product is an aluminum
housing that drops cylinders, via
Nitinol

latches,
containing

the

medication
.

The cylinders

fall

down a
ramp

and stop at the bottom to allow easy retrieval.
The housing

includes a place to return empty
cylinders
.
In this paper, the design, fabrication,
control, and testing processes and results will be
d
escribed in detail.


Matthew Jones (ME)/Team Member

Felix Feliz (ME)/Team Member

Shuaib Mansoori (
E
E)/Team Member

John Veenstra

(PJ
Solutions)/Sponsor



NOMENCLATURE

360° Security™
-

The ROM
will keep
a log
monitor

unit interaction. This includes loading,

medication
access
,
delivery, and set

up
.

ADC

-

Analog to Digital Converter

AHA



American Heart Association

API

-

Application Programming Interface

C#
-

Programming Language

EEPROM

-

Electrically Erasable Programmable
Read
-
Only Memory

FIFO

-

First In First Out

FPGA

-

Field Programmable Gate Array

GUI

-

Graphical User Interface

I
2
C

-

Inter
-
Integrated Circuit

I/O

-

Input/output

Mb

-

Megabit






Multi
-
Disciplinary Senior Design Conference

Kate Gleason College of Engineering

Rochester Institute of Technology

Rochester,
New York 14623





Page
2

of
8


PCB

-

Printed Circuit Board

SmartCartridge™
-

The entire medication dispenser

SPI

-

Serial Peripheral Interface

VHDL

-

VHSIC Hardware Description Language

VHSIC

-

Very High Speed Integrated Circuits

INTRODUCTION

A significant

problem in treating illness
es

today is
patients' failure

to take prescription medications
correctly, regardless of patient age.

According to the
AHA
,


t
en percent of all hospital and twenty
-
three

percent of all nursing home admission
s

are due to

patients failing to take prescription
medications
correctly. At any given time, regardless of age
group, up to
fifty
-
nine percent of people taking five

or more medications are taking them improperly.


The current
medication distribution

system is
ineffectively

design
ed
, if one exists at all.

For home
systems it is completely reli
ant on the patient to take
their

own

medication. The systems
available

currently

are the 7
-
day pill sorters or
the pill bottles
themselves, but the timing is co
mpletely up to the
patient, or

caregiver, to remember.

Along with this is
a complete lack of secur
ity;

unless the storage areas
are locked
,

the medication is accessible by anyone.

Automated sorters and dispenser
s

exist
for the home
but are unreliable, bulky,

or

exp
ensive
.

The existing systems in hospitals and

nursing homes
are ve
ry insecure. These systems

consist of cabinets
of medication and rely on an honor system for
retrieving the

proper

medication for a patient. The
nurse take
s

medication and put
s

a note inside listing
what and how much

medication

they
took. This
system has no security or reliability, and it is up to
the nurse or caregiver to have knowledge of
me
dication, assume the system

is organized and
labeled correctly, and remember when to give which
patients the correct medications and dosage.

Th
is

automated medication dispenser

was

designed to
keep medication in a safe and secure location and
allow only patients to have access to their own
medication. The medication is dispensed
afte
r
biometric access is granted to

the user scanning
their
finger
print
.

The system then checks for a matching
patient and if it is time for their dose.

The system is
filled by pharmacists so the correct medication and
dosage are in correct locations determined by a
computer program.

NEEDS

The goal of
this redesign was

to provide a proof of
concept for a new medical dispensing

system at
PJSolution’s request
.
This request

centered on
improving
methods use
d

to keep medicine secure and
make sure it is dispensed in a timely manner as per a
patient’s prescription.

T
he produ
ct
incorporated

360° Security™ and a
SmartCartridge™.

It

contain
ed

a laptop,
interface
d

with a USB, and was

user
-
friendly. I
t
properly
dispense
d

medication, ha
d

biometric access, and
was
mobile
.

SPECIFICATIONS

The original prototype provided was designed

to
dispense tool bits in a mac
hine shop. The
specifications

were to make this more sec
ure, more
mobile, and easier to use
.
A
further
design
requirement was to use
Nitinol

fiber latches to
dispense based on their weight, strength, and compact
design
. The design
was

to have a GUI for easy use,
and incorporate

reliable

biometric access through
a
fingerprint scanner connected

to
the

laptop. The
design was

also required to be safe to use

and
ergonomically sound
.

The previous

design offered no
security;

with
the
improved

user
design
it
incorporate
d

security
features





Multi
-
Disciplinary Senior Design Conference

Kate Gleason College of Engineering

Rochester Institute of Technology

Rochester,
New York 14623





Page
3

of
8


that only allowed access to the medications theough
the biometric scanner
.

The circuitry
was

to be within
the SmartCartridge™ and on the
same board as
the
Nitinol

latches. It also required the incorporation of

differe
nt

levels

of user access

for the different types
of individuals interacting with the device.

The prototype provided was large and bulky and
the
re
-
design was asked to be mobile in size, volume and
wei
ght. Lastly the device was required to be
affordable for use in the home environment.

The patient interaction process is shown in Figure 1
A
while the user setup is shown in figured 1B
.


Figure
1
B
: User Setup

The proposed
implementation into the supply chain
will be as followed:

o

The pharmacist would fill the unit with the
patients’ prescriptions
.

o

The SmartCartridge™ will be transported by
specified delivery personnel

to the place of
residence of the patient
.

o

The SmartCartri
dge™ is then installed in the
patients’ home by connecting it via USB and
ensuring all software is installed and
working properly
.

o

When it is in the correct time window for
the patient to take medication
,

they scan
their fingerprint and it is dispensed.

o

Th
e user puts the empty cylinder into the
return area provided by the
SmartCartridge™
.

o

When patient requires a refill, the
SmartCartridge™ is ejected from the system
and taken by a transporter back to the
pharmacy where it is refilled by a
pharmacist
.



User Approaches the
dispenser

User places finger on
finger print reader

Correct
nitinol

latch is
actuated and medicine
falls with the use of
gravity

Medicine cylinder rolls
down the dispensing
ramp

User takes medicine

Deposit empty medicine
cylinder into return slot
at the rear of the
dispenser


Figure 1A: Primary Patient Interaction






Multi
-
Disciplinary Senior Design Conference

Kate Gleason College of Engineering

Rochester Institute of Technology

Rochester,
New York 14623





Page
4

of
8


MECHANICAL DESIGN

Housing

Figure 2 below shows the final concept design for the
unit.


Figure
2
: Concept SmartCartridge
™ Design

It was decided that the housing would be fabricated
out of 6061 .09” Aluminum. The unit
has

collapsible
legs with 180° hinges for support and allow
s

the unit
to be condensed for ease of mobility. The unit will
contain a ramp with a stopping area at the e
nd which
will let the dropped medication roll to a stop when
dispensed.

The dispensing of a cylinder
i
s

shown

below

in Figure
s

3A and 3B.


Figure
3
A


Figure 3B

The housing
contains

a developed area for the return
of the empty cylinders

when the pills are taken.

This
area contains a latched lid for ease of access by the
person responsible for refilling and a slot for the
patient to insert the empty cylinders.

The ins
ide of the housi
ng

contain
s

the circuitry as
well as the boards holding the

cylinders and
Nitinol

latches. These boards
are

supported by rails attached
to the inside walls of the housing
.

A removable lid
encases the inside securely, and

fastened using
spanner screws
,
which require a special tool to be
able to unscrew, increasing security
.

Fabrication

The housing w
as

assembled using bends in the
aluminum and then

the removable pieces

fastened
together
using spanner screws
.

The remainder of the
housing
was

riveted toget
her.


The legs
are

attached with 180° hinges to allow the
legs to stop and support the weight of the device
.

They

collapse along with the ramp to allow for
increase
d

mobility
, this is shown in F
igure 4 below
.
The ramp
is also

attached via hi
nges to be collapsible
and
sit
s

at an angle to allow the cylinders to drop and
roll down to the bottom where a bend in the
aluminum will stop it
.






Multi
-
Disciplinary Senior Design Conference

Kate Gleason College of Engineering

Rochester Institute of Technology

Rochester,
New York 14623





Page
5

of
8



Figure
4
: Collapsed transport view

Nitinol

Latches

F
igure
5 below

shows a drawing o
f the
Nitinol

latches used for dispensing the cylinders when
triggered.


Figure
5
:
Nitinol

Latches

The cylinder
sit
s

on the
Nitinol

latches as shown

in
Figure 5

and when triggered by the
correct electrical
current
the Nitinol contracts a spring

and release
s

the
cylinder

which

will then fall via gravity down the
ramp.

SOFTWARE/FIRMWARE

UTILIZATION OF FPGA

Software
-
Hardware Interaction

Communication between the computer and the
SmartCartridg
e™ was imperative to this project. All
information pertaining to the use of this device had to
be stored on the EEPROM and feedback information
and history

lookup had to

be

communicated to the
computer. This offered a challenge not only in
selecting the device to be used but also
in proper
communication.

Development Board

Communication between the computer and the FPGA
was done through USB.
The USB
carries

information re
ga
rding usage to the FPGA which

write
s

it to the EEPROM, as well as

the dispensing

commands, and history checking. Programming a
standalone USB microcontroller would be time
-
consuming and expensive. The Opal Kelly
XEM3001 development board
, as shown
in F
ig
ure 6,

was selected for
this project because i
t provided

its
own USB microcontroller, an extensive API, fu
ll
VHDL support, and ease of programmability
.


Figure
6
: Top View of Opal Kelly XEM3001
Development Board

Cylinder

Cylinder






Multi
-
Disciplinary Senior Design Conference

Kate Gleason College of Engineering

Rochester Institute of Technology

Rochester,
New York 14623





Page
6

of
8


The XEM3001 also provided nearly 80 I/O pins, two
programmable clock pins, and multiple ground and
3.3V pins. The clock, ground, and power pins
were

useful for writing to the EEPROM.

EEPROM

The requirements for the 360º Security™ were that
all actions per
formed on the SmartCartridge™ had to
be recorded and stored on the SmartCartridge™
itself.
This meant

each cartridge
will

have a running
record of where it has been, what it has dispensed,
and who has interacted with it. This
required

a large
ca
pacity in

order to store all of the
information.
However, size alone could not determine which
product was to be picked. Any device on an
embedded system has to have a protocol built
-
in to
communicate

with the master; t
he two ways are serial
and parallel. Parall
el commu
nication would be
asynchronous
and each address bit would have its
own wire as well as each data bit. However, for large
EEPROMs, this would mean that the EEPROM
would take up many I/O pins on the FPGA. It was
determined that serial would be a be
tter solution. A
serial communication is clock based, with just a
single input for data in and address in, and a separate
signal for data out. Instead of a large footprint of

over

20 pins
, serial only needs a footprint of 8 pins.
The final decision to b
e made is what kind of serial
communication protocol that would be used. There
are two predominan
t ways that devices can

communicate

serially
, SPI and I
2
C. The differ
ence is

how an embedded slave device would be selected by
the master device. In I
2
C,
the device would be
selected by address while in SPI a wire would
connect the two and the signal, whether it was active
-
high or active
-
low, would select the device. I
2
C is
better for systems
that had multiple slave devices.
H
owever
,

for this
application

t
here was only one
device so SPI was selected. The Spansion 8Mb
(S25FL008A) EEPROM was selected to be used as
the main

record holder for the system.


FPGA EEPROM Implementation

Due to the volume of information that would be
transferred between the computer

and the EEPROM
over the FPGA, two FIFOs would be created using
CoreGen from Xilinx. One would be for computer
-
to
-
EEPROM communication and the other would be
for the opposite direction. Each FIFO would have
two clocks, one for reading and one for writing
. This
was because the communication between the
computer and the FPGA would be governed by the
USB clock which runs at 48MHz, and the clock for
the FPGA to EEPROM communication would run
slower, around 5Mhz.

Fingerprint Scanner

Due to the high
-
security m
easures necessary to
ensure proper medication dispense, a fingerprint
scanner was required by the customer to be used by
patients when it comes time for their dose of
medications.
Fingerprint scanners come in a wide
range of programmability, reliability, a
vailability and
price. For this application, a fingerprint scanner with
all the libraries for integration into a system was
necessary, and at a reasonable price. It must also be
commercially available,
have a reasonable false
-
positive reading, and be able
to distinguish up to five
different fingerprints.

The fingerprint scanner
selected was the Digital Persona U.are.U 4500
fingerprint reader.

User Interface

Since the interface between the computer and the
SmartCartridge™ would be functioning on a
Windows co
mputer, a clean and easy to use GUI had
to be developed. Due to restrictions on what
languages could be used, it was determined that C#
would be used as the language of choice. The APIs
provided by both Digital Persona and Opal Kelly
interfaced easily wi
th C# and communication
protocols were
determined
.






Multi
-
Disciplinary Senior Design Conference

Kate Gleason College of Engineering

Rochester Institute of Technology

Rochester,
New York 14623





Page
7

of
8


ELECTRICAL

Source and Sink Drivers

The existing schematic was
provided by PJSolutions
,
with
latched
-
input
bipolar
CMO
S high
-
current and
high
-
voltage
drivers. While MOSFETs would
provide more
heat
resistance,

they were difficult to
find to fit within the specific
ations needed, thus
making them un
feasible fo
r the time table of this
project
.

The existing drivers were chosen based on
their availability, price, and reliability.

To properly
dispense, the

Nitinol actuators required the drivers to
provide 7V at 700mA for a 1200 ms pulse
.

To provide

increased

functionality, the schematic was
separated into

four

parts


the
source board, source
component board,
sink

board, and
sink

component
board. The source board contained the traces for the
sourced current, as well as the zener diodes to
prevent crosstalk.
The source component board is
attached to the source board and the FPGA. It
contains the ROM, constant current controller, an
d
source drivers. The FPGA is used to select which row
to source current through. The sink board had the
sink traces that were attached to the Nit
i
nol latches,
and sunk 700mA of current. The sink component
board attached to the sink board and contained th
e
FPGA connection and sink drivers. The FPGA was
used to select which column to sink.
The connec
tion
grid is shown in Figure 7
. Improvements in
component selection were done by updating obsolete
components from the existing prototype.


Figure 7
:
Dispensing Array

The overall electrical flow is shown in Figure 8.


Figure 8: Electrical Flow

The current comes from a wall wart to supply p
ower
to the 7V
voltage regulator. The 7V
regulator
supplied the

constant current control
ler which powers
the
drivers for

t
he Nitinol array which is sunk

by the
column sinks.

The sinks are powered by 5V.

The FPGA, fingerprint scanner, and EEPROM are all
powered by the USB which is connected to a
computer.

Sensors

Sensors were proposed for this project and
inves
tigated. The OPB745 retroreflective was
decided to be optimal because of its reliability,
small
size, and simple concept. Physically
being
mount
ed

they took up too much space on the board, cause
d

concern in the traces laid

and resistors being laid
appropriately
. Thus they were not implemented in the
final design, but tested in prototyping.

TESTING

The software and programming will be tested by
installing it onto multiple computers to make sure it
runs properly with both
W
i
ndows XP and Vista. The





Multi
-
Disciplinary Senior Design Conference

Kate Gleason College of Engineering

Rochester Institute of Technology

Rochester,
New York 14623





Page
8

of
8


biometric and different user accesses will be tested
using multiple subjects. They will be asked to access
the medication to see if it properly dispenses or
rejects the dispensing if need be. Then
another

test to
make sure all us
ers have the correct access to their
respect
ive

levels

will be performed
.

The mechanical portion will be tested solely on a
pass/fail basis.
S
ize and weight requirements

will be
checked
.
The security will also be tested and ensure

that medication
cannot

be
access
ed

by force.

Lastly, the human factors and safety portions will be
tested.
Ease of use and safety for all ages groups will
be tested
.

CONCLUSION

Upon completion of testing it was concluded that the
circuitry worked as intended. However, the
resistance of the Nitinol latches is still unknown and
the assembly of the latches proved difficulty in
conductivity.

It is characterized around 5Ω, but there
is a wide tolerance.

There is a functional GUI which is very user friendly
and easy to use and a
ll firmware performs as
intended. Including the different levels of user access
and saving all data to the ROM.

The fingerprint scanner was successful in the sense
that it works upon startup and recognized ten
different users who set up as patients and ac
cessed
the system.

RECOMMENDATIONS

Given an extra quarter to work on the project, some
of the limitations in customer specifications would
have been resolved.

One of the changes would include further testing of
the Nitinol to learn more about their resista
nce and
the assembly problems they posed.

Another change would be to add the sensors which
appeared in the original concept design but had to be
cut due to time and space constraints. More time
would allow a redesign to accommodate these to
detect whether

or not a dispense occurred.

The use of

MOSFETSs over BJTs in the future

is
also recommended
. MOSFETs are heat independent,
more power efficient, and would overall improve the
reliability of the sources.

Lastly, interfacing the system with a network woul
d
be very helpful. This can be added to help tell
someone automatically if a failed dispense happened
or there was unauthorized access.

ACKNOWLEDGEMENTS

Special thanks and acknowledgements go out to
everyone who put time and effort towards making the
auto
mated medicine dispenser happen. In particular
we would like to thank Richard Bentley for all his
help with the PCB designs and layouts. Thanks to
TCS Industries Inc., for supplying us the aluminu
m
and cutting it for us at no charge
. Thanks to K
en
Snyde
r for assisting with

the soldering of electrical
components. And finally, the team would like to
thank all the professors at RIT who contrib
uted ideas
and helped our design: Dr. Phillips, Dr. Bowman,
Professor Hanzlik, and Professor Cliver.

REFERENCES

American Heart Association,
http://www.americanheart.org/presenter.jhtml?identif
ier=107

Horowitz, Paul & Hill, Winfield, “The Art of
Electronics” 1989 Cambridge University Press