Table 1 provides the revision history to the SRS document ...



User/System Manual Version 1.3Hardware and Database TeamNolan PeruginiLucas StricklandTyler WhittakerJustin ZaccairoCSC 355Dr. TanTABLE OF CONTENTS TOC \h \u \z REVISION HISTORY………………………………………………………………………………………………………………………………….iiiACRONYMS & EXTRAPOLATIONS……………………………………………………………………………………………………………..v1.0 INTRODUCTION………………………………………………………………………………………............................................1 1.1 Word of Caution.………………………………………………………………………………………………………………………..1 1.2 Initial Setup……….……………………………………………………………………………………………………………………………1 1.3 Raspbian Operating System……………………………………………………………………………………………………………12.0 HARDWARE LIST………………………………………………………………………………….…… ………………………………………23.0 HARDWARE OVERVIEW……………………………………………………………………………………………………………………..63.1 MCKU Life…………………………………………………………………………………………..………………………………………….63.2 MCKU Box………………………………………………………………………………………………………………………………………64.0 INSTALL RASBIAN LIBRARIES………………………………………………………………………………………………………………75.0 LOADING CODE TO THE HARDWARE..………………………………………………………………………………………………..96.0 CONNECTING THE COOLING FAN AND HR SENSOR TO THE RASPBERRY PI……………………………………….107.0 GPIO LAYOUT FOR THE RASPBERRY PI……………………………………………………………………………………………..118.0 HEART RATE SENSOR WIRING……………………………………………………………………….…………………………………129.0 ANALOG TO DIGITAL CONVERTER…………………………………………………………………………………………………….139.1 Soldering the pins……………………………………………………………………………………………………………………….139.2 Wiring the Converter to the RaspberryPi HYPERLINK "" \l "heading=h.4k668n3" \h ……………………………………………………..…………………………..…1310.0 USING THE HARDWARE………………………………………………………………………………………………………………….1610.1MCKU-Life………………………………………………………………………………………………………………………………….1610.2 MCKU-Box…………………………………………………………………………………………………………………………………1711.0 KUTZTOWN UNIVERSITY HARDWARE LIST……………………………………………………………………………………..1811.1 Hardware on loan from Kutztown University…………………………………………………………………………….1811.2 Hardware purchased by the grant…………………………………………………………………………………………….1811.3 Hardware purchased by the department………………………………………………………………………………….1811.4 Missing hardware needed for future setups……………………………………………………………………………..1811.5 Hardware that we are no longer using………………………………………………………………………………………1912.0 DATABASE…………………………………………………………….………………………………………………………………………20 12.1 Go to ….……………………………………..……………………………………..…………………………………20 12.2 Add a New Project………………………………………..……………………………………..…………………………………….21 12.3 Create the Database………………………………………..……………………………………..………………………………….22 12.4 Create or Alter the Database Schema………………………………………..……………………………………………….23 12.4 Get the Database Link………………………………………..……………………………………..……………………………….2413.0 REPORT GENERATION…………………………………………….…………………………………………………………25REVISION HISTORYTable 1 provides the revision history to the SRS document. As changes are made, the table will reflect the version, date, description, and editor(s).VersionDateDescriptionEditor1.02/3/19Added to sections:1.0 INTRODUCTION1.1 Word of Caution1.2 Initial Setup1.3 Raspbian Operating System2.0 Hardware List3.0 Hardware Assembly4.0 Rasbian Software SetupTyler Whittaker1.13/23/19Added to sections:2.0 Hardware List3.0 Hardware Assembly4.0 Rasbian Software Setup5.0 Loading Code to the Hardware6.0 Connecting the Cooling Fan and HR Sensor to the Raspberry Pi7.0 GPIO Layout for the Raspberry Pi8.0 Heart Rate Sensor Wiring9.0 Analog to Digital Converter9.1 Soldering the pins9.2 Wiring the Converter to the Raspberry Pi10.0 Using the Hardware10.1 MCKU-Life10.2 MCKU-BoxTyler Whittaker1.23/25/19Added to sections:11.1 Hardware on loan from Kutztown University11.2 Hardware purchased by the grant11.3 Hardware purchased by the department11.4 Missing hardware needed for future setups11.5 Hardware that we are no longer usingTyler Whittaker1.34/2/19Added to sections:12.0 DATABASE13.0 REPORT GENERATIONJustin Zaccairo1.44/4/19Added to sections:2.0 Hardware ListTyler WhittakerAdded to sections:12.0 DATABASE12.1 Go to Firebase. com12.2 Add a New Project12.3 Create the Database12.4 Create or alter the Database SchemaLucas StricklandAdded to sections:13.0 REPORT GENERATIONJustin ZaccairoTable SEQ Table \* ARABIC 1: Revision HistoryACRONYMS & EXTRAPOLATIONSListed below in Table 2 are all of the acronyms used in the Hardware User Manual. All acronyms and definitions may be used interchangeably throughout the document.AcronymDefinitionAppApplicationCPUCentral Processing UnitGPIOGeneral Purpose Input OutputHDMIHigh-Definition Multimedia InterfaceIDIdentificationI2CSerial CommunicationKUKutztown University of PennsylvaniaLTC-TMSLong-Term Care Task Management SystemMCKU-BoxSends MCKU-Life data to the databaseMCKU-LifeWearable deviceMCUMing Chuan UniversityPDFPortable Document FormatSD CardSecure Digital CardURLUniform Resource LocatorUSBUniversal Serial BusGBGigabyteTable 2: Acronyms & Extrapolations1.0 Introduction This document will provide information on how to assemble and use the hardware for LTC-TMS. THe information included will provide the user with knowledge of the different types of hardware the system is using. 1.1 Word of CautionPutting pressure on one of the small components can cause serious damage, while even a small amount of static electricity can completely destroy a circuit board. When working with any hardware especially raw circuit board is crucial to make sure that you are not statically charged. To discharge yourself touch a piece of metal for two seconds before handling the circuit to discharge any residual electricity stored in your body.1.2 Initial SetupThe raspberry pi comes with Noobs Software preloaded on the SD card. Therefore, to load Raspbian the operating system on the pi. Just boot the pi up and it will verify time and date settings and then ask what operating system to install, choose Raspbian.1.3 Raspbian Operating SystemThe raspberry pi will be configured with raspbian and once loaded the desktop should look similar to figure 1.2.0 Hardware List The materials not supplied and will be needed are listed below:MouseKeyboardMonitorThe supplied hardware/materials used in the LTC-TMS are listed below: Raspberry Pi 3 B and power cordiUniker Dual Fan Cooling System Module with HeatsinkSlave Microbit (sending)Master Microbit (receiving) Heart Rate Sensor (must be genuine)Adafruit ADS1015 digital to analog converter (12bit I2C ADC + PGA)Seven Breadboard Jumper cables, female to female2 AAA batteries and holder2 USB A-Male to Micro B Cable HDMI cable16 GB SD Card 3.0 Hardware OverviewThe hardware setup is composed of two subgroups the MCKU-Life and the MCKU Box.MCKU-Life is to be worn by the patient, it will send data that is collects from the patient to the MCKU-Box and then to the database.3.1 MCKU-LifeMCKU-Life is composed of one slave micro:bit and a battery pack. The MCKU-Life is collecting step counts and is able to detect if a patient falls. The MCKU-Life will send data to the MCKU-Box master micro:bit every few minutes over radio frequency. The MCKU-Life has an adjustable wristband, allowing the patient to wear it comfortably. 3.2 MCKU-BoxThe MCKU-Box is composed of a raspberry pi 3b, analog to digital converter, master microbit, and a heart rate sensor. The MCKU-Box is responsible for running the python code to receive the data from the MCKU-Life and send it to Firebase via Ethernet connection. The MCKU-Box is powered via a wall outlet and is stationary. The MCKU-Box also has a heart rate sensor that the patient is able to wear and send the vitals to the database. 4.0 Install Rasbian Libraries To run the python code on the raspberry pi you will need to install the imported libraries that the code is referencing. Otherwise, the python code will not execute and will throw a error. Load up Rasbian on the raspberry piPlug in a Ethernet cable into the pi or log in to wifi at the top right Then enter the terminalEnter the following command to install the on-screen keyboard:sudo apt-get install matchbox-keyboardEnter the following commands to update the Rasbian operating system:sudo apt-get updatesudo apt-get dist-upgradeEnter the following commands to install python 3:Pip3 install python3Enter the following commands to install the Adafruit_DHT library:sudo python3 -m pip install --upgrade pip setuptools wheelsudo pip3 install Adafruit_DHTEnter the following command to install the Firebase library:sudo pip install python-firebaseEnter the following commands to install the Adafruit library DHT: python3 -m pip install --upgrade pip setuptools wheelsudo pip3 install Adafruit_DHT (If it does not work go directly to next command)sudo python3 setup.py installEnter the following commands to install the Adafruit ADS1x15 Python library: clone Adafruit_Python_ADS1x15sudo python setup.py installIf this fails go to step 11 otherwise skip step 11Enter the following commands to install the Adafruit ADS1x15 Python library:sudo apt-get install build-essential python-dev python-smbus python-pipsudo pip install adafruit-ads1x15Enable I2C:Run sudo raspi-config and from the Advance Options enable I2C and reboot. This can also be done in the settings window.5.0 Loading Code to the HardwareThe raspberry pi is going to be using python 3 to code the project. The micro:bits are going to be using javascript and blocks which is then converted to hexadecimal using the MakeCode text editor provided by Microsoft. The python files will be placed on the raspberry pi SD card. The microbits will only take one hexadecimal file, if you load more than one file it will overwrite the first file and keep the last one transfered. The micro:bit will not show the documents placed on the microbit because everytime a new file is uploaded it will overwrite any previous file loaded.6.0 Connecting the Cooling Fan and HR Sensor to the Raspberry PiThe dual cooling fans go overtop of the CPU but should not touch and of the circuits on the board this will destroy the pi. THe fans are held in place with thermal tape and another heat sink is placed on the ram of the pi. MCU was not using any of the supplied aluminum heat sinks to dissipate the heat and had overheating issues. With the dual cooling fans we have not issues with overheating.The fans will have a red and black wire that needs to be plugged in to the GPIO. Red is positive and black is ground and can plug into the corresponding pins on the pi.4000504000507.0 GPIO Layout for the Raspberry PiBelow is a diagram of the GPIO pin layout based on the orientation of the raspberry pi.8.0 Heart Rate Sensor WiringThe wiring of the heart rate sensor is shown below and must be plugged into 3 of the breadboard jumper cables. Then the signal wire is plugged into A0 on the Adafruit ADS1015 analog to digital converter chip. The ground wire is plugged pin 14 raspberry Pi GPIO. The 3.3 volt power wire is plugged into pin 17 on the raspberry Pi GPIO.9.0 Analog to Digital Converter The Adafruit ADS1015 analog to digital converter chip will be converting the analog signal from the heart rate sensor to digital signal that the raspberry pi can read.11664951515249.1 Soldering the pinsFirst you need to solder the pins into the circuit board. The board is very small, and the soldering is not for a beginner or someone who does not know how to solder. Use flux and a small amount of solder for best results. If any of the pins touch or are accidentally soldered together, solder 2 or more pins together you will have to clean and start over. Kutztown University has a person on campus who is experienced and did the soldering for us.9.2 Wiring the Converter to the Raspberry PiThe Adafruit ADS1015 analog to digital converter chip has 10 pins and we will be using 5. The A0 (analog zero), UDD, GND (ground), SCL, and SDA. Connect using the breadboard jumper wires A0 to the heart rate sensor signal wire if not already done. Then connect the SDA pin to pin 3 on the raspberry pi. Connect the SCL pin to pin 5 on the raspberry pi. Then connect the ground pin to pin 9. Lastly, plug the power pin (VDD) on the converter to pin 1 on the raspberry pi. Refer to section 10.0 for the diagram.10.0 Using the HardwareThe hardware is broken down into two categories the MCKU-Life and the MCKU-Box. The MCKU-Life is the wearable device that the patient will be using. The MCKU-Life consists of a BBC Microbit and a AAA battery pack. The MCKU-Box is a bed side box that contains the raspberry pi, heart rate sensor, analog to digital converter, and the master microbit for receiving data from the MCKU-Life microbit.10.1 MCKU-LifeThe MCKU-Life is powered by a battery pack that takes 2 AAA batteries. Battery pack must be turned on by locating the on/off switch on the side of the power pack. The MCKU-Life will read the patients step count and fall status 3 times in a row and then it will pause for a few minutes before it loops 3 times. The MCKU-Life will scroll the data that it is sending to firebase on the led display. Once you are done using the MCKU-Life it is necessary to turn it off to save battery.10.2 MCKU-BoxThe MCKU-Box is powered by a wall outlet and will remain text to the patient's bed. The pulse sensor is used by hold the sensor on your fingertip. If you grip the sensor too hard, you will squeeze all the blood out of your fingertip and there will be no signal. If you hold it too lightly, you will invite noise from movement and ambient light and get a inaccurate reading. A monitor, keyboard and mouse must be plugged into the pi using the appropriate ports. A ethernet cable muse be plugged in unless you are using Wifi. (At KU we can only use ethernet because our school has special login procedure that the pi is unable to perform.) Then plug in the master microbit into the pi using a usb cable.Once the power cord is plugged in this will automatically start the raspberry pi and display the home screen with our logo. Then the you must enter the terminal and using unix commands CD to the desktop where the python files are located. Then you enter “python3 <filename.py>“ and hit enter. One file is for the heart rate sensor and the other is for the wearable. To stop the python program from running in the terminal enter “Ctrl + C”.11.0 Kutztown University Hardware ListKutztown University’s CSC 355 class applied for a grant in the spring of 2018 to cover all of the hardware submitted with the grant. Since then we have made changes to the hardware during implementation and did not have time to wait for a grant we required aid from the department. ALso, some the the hardware is on loan from the department and will be returned to the department at the end of the spring 2019 semester.11.1 Hardware on loan from Kutztown University3 Raspberry Pi 3 B KitsSD cardHDMIPower cordMicro USB cord150 Mbps wireless 802.11b/n nano USB adapterPi cases11.2 Hardware purchased by the grant2 power banks2 temperature and humidity sensors2 Sharp GP2Y1014AU0F air quality sensors2 Grove Shield for Micro-Bit 4 BBC micro:bit2 Heart Rate Sensors (grove)2 Rechargeable Batteries AAA (4 pack with charger)2 T-GPIO expansion board with 40 pin connector2 Seed Studio Grove Shield for Micro:bit1 Microchip MCP3008-I/P MCP3008 8-Channel 10-Bit A/D Converters (4 pack)11.3 Hardware purchased by the department1 power bank3 heart rate sensors ()1 heart rate sensor (grove)2 BBC Micro:bit2 Seed Studio Grove Shield for Micro:bit3 Dual Cooling fans for Raspberry Pi3D printer filament (For ResNet’s 3D printer)1/4’’ Braided Sleeving (cover wires)Breadboard jumper wires (female to female)1 Adafruit ADS1015 12-Bit Analog to Digital Converter11.4 Missing hardware needed for future setupsProfessor Tan wanted to have 3 separate setups. At this time we were only able to get enough hardware to complete one full setup. Below is the missing hardware that would need to be purchased to complete the other two setups.2 Adafruit ADS1015 12-Bit Analog to Digital Converter11.5 Hardware that we are no longer using3 power banks3 heart rate sensors (grove)1 150 Mbps wireless 802.11b/n nano USB adapter2 temperature and humidity sensors2 Sharp GP2Y1014AU0F air quality sensors2 T-GPIO expansion board with 40 pin connector4 Seed Studio Grove Shield for Micro:bit1 Microchip MCP3008-I/P MCP3008 8-Channel 10-Bit A/D Converters (4 pack)12.0 DATABASEThe database is the backbone of the entire LTC-TMS project. This permits the other major components to send, receive, and utilize data. The major components that communicate with the database include the browser, app (Android and iOS), and hardware.12.1 Go to To start off using firebase you must go to and click on GO TO CONSOLE in the top right corner of page next to your google account logo. Take not you must be signed into your google account to use firebase.12.2 Add A New ProjectThis leads to the projects page where all of your firebase projects will be displayed. If you don’t have any firebase projects yet there will only be an Add Project section. To make a new project select Add Project.From here the menu to add a project will appear. Give your project an appropriate name which will generate an ID for the project. Finally accept the terms and conditions and click on Create Project followed by Continue once it’s done making the project. 12.3 Create the DatabaseAfter creating a project you will be taken to the Project Overview screen. The menu bar on the left side of the screen will hold most of the develop options and pages you will use to navigate firebase. In this case you must create the database you will be using for your project so select Database. Once at the Database page scroll down and select the Create database button under Realtime Database. From here we will select the option to start in test mode in the Security rules for Realtime Database. This will allow other group members to read and alter the database at will. Click the Enable button to continue. 12.4 Create or alter the Database SchemaAfter creating a the database you will then be sent to the main database page. If you’re building from scratch you can simply add the parent-key values in the field and select add to add them. This is the base of how to add or change anything in the database. However, if you already have an export of your database from a previous project or from another resource you can add it by selecting the ellipsis in the right corner of the database box and select import. From here you can drag and drop your export into the database and select the Import button.12.4 Get the Database LinkTo get the link for your new database go back to the Project Overview page by selecting it in the menu on the left side of the screen. From here there will be an </> symbol in the middle of the screen you will select to display the page below. This is the link you will use in the browser to link it to your database. 13.0 REPORT GENERATIONReports is a functionality that is available on the browser of the LTC-TMS system (CNO and Director). Generating reports permit the CNO/Director to enter a short series of information including patient ID, start date, and end date (date range for report data). Once the information has been entered, click on the “Generate Report” button to run the report. Once the report is completed, a new browser tab will open with the report. Here, the CNO/Director will be able to use their browser’s built-in tools to download (as PDF) or print. To email the report or print at a later time, the downloaded PDF may be opened in the prefered PDF reader (most likely Adobe Acrobat Reader).(NOTE: Once the browser tab with the generated report has been closed, it will no longer be available unless it was downloaded)center184213500On the report generation page, there is a short series of fields for the CNO/Director to enter. This includes the date range “Start Date” and “End Date”, where they will have a calendar pop-up to easily enter their dates manually. If desired and applicable, they may utilize one of the fast report options instead: “Day Report”, “Week Report”, and “Month Report”. This refers to, for example, the day and time the report is being generated back to the previous day, week, or month, respectively. This allows the CNO/Director to click one of these buttons to have that date range auto-populated in the date fields, rather than entering them manually. The final field is to select the proper patient for the report. Here, the CNO/Director is able to see all of the patients in a drop-down (pulled from Firebase) and select the patient. Once this is completed, the next field, “Patient ID”, will auto-populate based on the patient’s name, which is what is used in the back-end for generating the report after clicking “Generate Report.Once the report has successfully generated, you will see a link below the “Generate Report” button. This is the URL where the report is being stored/hosted. By clicking on that link, you will be brought to a new tab with the report. Here, you may utilize the browser’s built-in functionality to download as a PDF, print, or email (only supported on Mac). If you would like to email on a Windows machine, simply download the report and print through your preferred PDF reader (e.g. Adobe Acrobat Reader, PDF Viewer, etc.).476250123825 ................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download