Senior Design 2 Documentation
Total Page:16
File Type:pdf, Size:1020Kb
UCF Senior Design II The Medspencer A Smart Medicine Dispenser that Dispenses Medicine on Fixed-Schedule or As-Needed Basis, for Individual or Family use Department of Electrical Engineering and Computer Science University of Central Florida Dr. Samuel Richie and Dr. Lei Wei Summer 2018 Senior Design 2 Document Group 6 Ivan Alvarez Computer & Electrical [email protected] Matthew Hoover Computer Engineer [email protected] Sakeenah Khan Electrical Engineer [email protected] Gustavo Morales Electrical Engineer [email protected] ii Table of Contents List of Figures .................................................................................................................... vi List of Tables ..................................................................................................................... ix 1.0 Executive Summary ...................................................................................................... 1 2.0 Project Description........................................................................................................ 2 2.1 Motivations and Goals .............................................................................................. 2 2.2 Objectives ................................................................................................................. 3 2.3 Requirements Specification ...................................................................................... 4 2.4 House of Quality ....................................................................................................... 5 3.0 Related Standards and Constraints................................................................................ 6 3.1 Project Related Stands .............................................................................................. 6 3.1.1 IEEE Standards .................................................................................................. 6 3.1.2 FDA Standards ................................................................................................... 7 3.1.3 Soldering Standards and Safety ......................................................................... 9 3.2 Design Constraints .................................................................................................. 11 3.2.1 Economic Constraints ...................................................................................... 11 3.2.2 Time Constraints .............................................................................................. 12 3.2.3 Manufacturability and Sustainability Constraints ............................................ 13 3.2.4 Parts, Component, and Testing Constraints ..................................................... 14 3.2.5 Environmental Constraints............................................................................... 16 3.2.6 Health and Safety Constraints .......................................................................... 17 3.2.7 Ethical and Legal Constraints .......................................................................... 19 3.2.8 Social and Cultural Constraints ....................................................................... 21 3.2.9 Political Constraints or FDA Standards ........................................................... 22 3.2.10 Security Constraints ....................................................................................... 25 i 3.2.11 Performance, Functionality, Usability, Reliability and Availability ............. 27 4.0 Research and Background Information ...................................................................... 28 4.1 Market Research ..................................................................................................... 28 4.1.1 Existing Products ............................................................................................. 28 4.1.2 Input from Medical Professionals .................................................................... 30 4.2 Microcontroller ....................................................................................................... 32 4.2.1 Research ........................................................................................................... 33 4.2.2 Microchip PIC32MZ DA ................................................................................. 34 4.2.3 Microchip PIC32MZ DA Starter Kit ............................................................... 36 4.2.4 MPLAB Harmony ............................................................................................ 37 4.2.5 ATMEGA328P Microcontroller ...................................................................... 40 4.2.6 Raspberry Pi Compute Module 3 Lite ............................................................. 40 4.3 Display .................................................................................................................... 40 4.3.1 Technical Background ..................................................................................... 41 4.3.2 Frame Buffer Space Saving Techniques .......................................................... 41 4.3.3 Innolux AT070TN90 ....................................................................................... 43 4.3.4 Resistive Touch Screen .................................................................................... 44 4.3.5 Resistive Touch Screen Controller .................................................................. 46 4.4 Wi-Fi connection .................................................................................................... 47 4.5 Fingerprint Scanner ................................................................................................. 48 4.6 Motors ..................................................................................................................... 49 4.7 Speaker .................................................................................................................... 50 4.8 Power ...................................................................................................................... 51 4.8.1 Power Supply ................................................................................................... 51 4.8.2 Power Regulation and Filtering ....................................................................... 52 ii 4.9 Communication Protocols ....................................................................................... 52 5.0 Project Hardware and Software Design Details.......................................................... 56 5.1 Hardware Design .................................................................................................... 56 5.1.1 Hardware Block Diagram ................................................................................ 56 5.1.2 Hardware Design Overview ............................................................................. 58 5.1.3 Microcontroller Design .................................................................................... 60 5.1.4 Wi-Fi Module................................................................................................... 64 5.1.5 Display Design ................................................................................................. 65 5.1.6 Fingerprint Scanner .......................................................................................... 68 5.1.7 Dispensing Mechanism .................................................................................... 69 5.1.8 Speaker ............................................................................................................. 71 5.1.9 Power Supply ................................................................................................... 72 5.1.10 Power Regulation and Filtering ..................................................................... 73 5.2 Software Design ...................................................................................................... 79 5.2.1 ATMega328P Software ................................................................................... 80 5.2.2 User Interface ................................................................................................... 81 5.2.3 SQLite .............................................................................................................. 82 5.2.4 Wi-Fi Communication ..................................................................................... 82 5.2.5 Fingerprint Scanner .......................................................................................... 83 5.2.6 Patient Identification & Adding/Removing a Patient ...................................... 88 5.2.7 Prescription Parameters and Schedules ........................................................... 89 5.2.8 As-needed Medication Requests ...................................................................... 90 5.2.9 Fixed-schedule Medicine Notifications and Requests ..................................... 90 5.2.10 Rescheduling Doses ....................................................................................... 90 5.2.11 Recording events in Schedule & Summary Reports ...................................... 91 iii 5.2.12 Python Structure............................................................................................. 91 6.0 Prototype Construction ............................................................................................... 95 6.1 Parts Acquisition and Bill of Materials