Kate Gleason College of Engineering
Rochester Institute of Technology
Rochester, New York 14623
Project Number: P09321
AUTOMATED MEDICINE DISPENSER
Page 1 of 7
/ Multi-Disciplinary Senior Design ConferenceKate Gleason College of Engineering
Rochester Institute of Technology
Rochester, New York 14623
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 is to design a secure, automated pill-dispensing system utilizing previously existing technology developed by PJSolutions, Inc. This project will supply two individuals with a 7-day supply of six medications taken twice a day. The project aims 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 integrates a laptop and 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 will fall down a ramp and will stop at the bottom to allow easy retrieval. The housing also includes a place to return empty cylinders. In this paper, the design, fabrication, control, and testing processes and results will be described in detail.
Matthew Jones (ME)/Team Member
Felix Feliz (ME)/Team Member
Shuaib Mansoori (EE)/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.
SmartCartridge™ - The housing unit
ADC - Analog to Digital Converter
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
I2C - Inter-Integrated Circuit
I/O - Input/Output
Mb - Megabit
PCB - Printed Circuit Board
SPI - Serial Peripheral Interface
VHDL - VHSIC Hardware Description Language
VHSIC - Very High Speed Integrated Circuits
INTRODUCTION
A significant problem in treating illness today is patients' failure to take prescription medications correctly, regardless of patient age. Ten percent of all hospital and twenty-three percent of all nursing home admissions 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 distributing system is ineffectively designed, if one exists at all. For home systems it is completely reliant on the patient to take their own medication. The systems they can use are the 7-day pill sorters or the pill bottles themselves, but the timing is completely up to the patient, or a caregiver, to remember. Along with this is a complete lack of security, unless the storage areas are locked the medication is accessible by anyone.
Automated sorters and dispenser exist out there for the home but are unreliable, bulky, expensive, or a combination of each.
The existing systems in hospitals and nursing homes are very unsecure. They consist of cabinets of medication and rely on an honor system for retrieving the medication for a patient. The nurse takes medication and put a note inside listing what and how much they took. This system has no security or reliability, and it is up to the nurse or caregiver to have knowledge of medication, assume the system is organized and labeled correctly, and remember when to give which patients the correct medications and dosage.
Our automated medication dispenser is 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 after biometric access is granted by the user scanning their fingerprint. The system is filled by pharmacists so the correct medication and dosage are in correct locations determined by a computer program. Along with a reminder system, the correct medication is dispensed at the correct times.
NEEDS
The goal of this redesign is to provide a proof of concept for a new medical dispensing system at PJSolution’s requests. These requests centered on improving methods used to keep medicine secure and make sure it is dispensed in a timely manner as per a patient’s prescription.
The product will incorporate 360° Security™ and a SmartCartridge™. It will contain a laptop, interfaced with a USB, and be user-friendly. It will properly dispense medication, have biometric access, and be mobile.
SPECIFICATIONS
The original prototype provided was designed to dispense tool bits in a machine shop. Some specifications were to make this more secure, more mobile, and easier to use. A design requirement was to use Nitinol fiber latches to dispense based on their weight, strength, and compact design. The design is to have a GUI for easy use, and incorporate reliable biometric access through a USB connection to the laptop. The design is also required to be safe to use and ergonomically sound.
The current design offered no security; with the improved user design it incorporates security so that the only access to the pill was through the biometric scanner within the correct window of the prescription. The circuitry is to be within the SmartCartridge™ and on the same board as the nitinol latches. It is also required to incorporate different user access levels 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 weight. Lastly the device was required to be affordable for use in the home environment.
The patient interaction process is shown in Figure 1.
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 will have collapsible legs with 180° hinges for support and allow the unit to be condensed for ease of mobility. The unit will contain a ramp with a stopping area at the end which will let the dropped medication roll to a stop when dispensed.
The housing will contain a developed area for the return of the empty cylinders when the user is finished. 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 inside of the housing will contain the circuitry as well as the boards holding the cylinders and nitinol latches. These boards will be supported by rails attached to the inside walls of the housing and will sit on top of rubber bushings to limit vibrations and impacts to the board due to travel and falls. A removable lid encases the inside securely, and only a specified person will be allowed access for maintenance purposes.
Fabrication
The housing will be assembled using bends in the aluminum and then the removable pieces fastened together using spanner screws, which require a special tool to be able to unscrew, increasing security. The remainder of the housing will be riveted together.
The legs will be attached with 180° hinges to allow the legs to stop and support the weight of the device. They will collapse along with the ramp to allow for increase mobility. The ramp will also be attached via hinges to be collapsible and will sit at an angle to allow the cylinders to drop and roll down to the bottom where a bend in the aluminum will stop it.
Nitinol Latches
Figure 3 shows a drawing of the Nitinol latches used for dispensing the cylinders when triggered.
Figure 3: Nitinol Latches
The cylinder will sit on the Nitinol latches as shown and when triggered by the correct electrical current will flip open and drop the cylinder. The cylinder will then fall via gravity down the ramp.
SOFTWARE/FIRMWARE
UTILIZATION OF FPGA
Software-Hardware Interaction
Communication between the computer and the SmartCartridge™ 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 will be done through USB. The USB carries information regarding usage to the FPGA which writes 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 was selected for this project because it provides its own USB microcontroller, an extensive API, full VHDL support, and ease of programmability.
Figure 4: Top View of Opal Kelly XEM3001 Development Board
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 would be useful for writing to the EEPROM.
EEPROM
The requirements for the 360º Security™ were that all actions performed on the SmartCartridge™ had to be recorded and stored on the SmartCartridge™ itself. Meaning each cartridge will have a running record of where it has been, what it has dispensed, and who has interacted with it. This requires a large capacity 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. The two ways are serial and parallel. Parallel communication 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 better 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 20 pins, serial only needs a footprint of 8 pins. The final decision to be made is what kind of serial communication protocol that would be used. There are two predominant ways that devices can serially communicate, SPI and I2C. The difference is how an embedded slave device would be selected by the master device. In I2C, 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. I2C is better for systems that had multiple slave devices, however for this application, there 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 measures 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, availability 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. It must 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.
Figure 5: 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 computer, 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 with C# and communication protocols were achieved.
ELECTRICAL
Source and Sink Drivers
The existing schematic was provided by PJSolutions, with latched-input bipolar CMOS high-current and high-voltage drivers. While MOSFETs would provide more heat resistance, they were difficult to find to fit within the specifications needed, thus making them not feasible for the time table of this project. The existing drivers were chosen based on their availability, price, and reliability. To properly dispense the Nitinol, the drivers required 7V at 700mA for a ___ 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, and 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 Nitnol latches, and sunk 700mA of current. The sink component board attached to the sink board and contained the FPGA connection and sink drivers. The FPGA was used to select which column to sink. The connection grid is shown in Figure 6.
Figure 6: Dispensing Array
The source board schematic is shown in Figure 7, and the sink component board is shown in Figure 7a. The bill of materials is shown in Table 1. Improvements in component selection was done by updating components obsolete components from the existing prototype.
Figure 7: Source Component Board
Figure 7a: Sink Component Board
Components / QuantityLM2596S-5.0-ND / 1
LM2596S-ADJ / 1
LM2941CS / 1
A6800SLTR-T / 4
A2982SLWTR-T / 2
MAX4373TESA+ / 1
Rect. Schottky 30V 2A / 2
Diode Schottky 40V 1A / 33
Fuse Resettable 15V 2A / 1
3.9nF / 1
1µF / 1
22µF / 3
68µF / 1
270µF / 1
0.1Ω / 1
1kΩ / 1
4.7kΩ / 1
10kΩ / 1
15kΩ / 1
33µH / 2
Table 1: Electrical Bill of Materials
Sensors
Sensors were proposed for this project and investigated. The OPB745 retroreflective was decided to be optimal because of its reliability, small size, and the simple concept. Physically being mounting they took up too much space on the board, cause 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 windows XP and Vista. The 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 we will test to make sure all users have the correct access to their respected levels.
The mechanical portion will be tested solely on a pass/fail basis. We will be checking to see if it meets size and weight requirements. We will also test to make sure it is secure and you cannot access the medication by force.
Lastly, the human factors and safety portions will be tested. We will check to make sure it is easy to use by anyone and that it is safe for all ages to move the unit around.
Page 1 of 7