table of contents - cs-csifcsiflabs.cs.ucdavis.edu/~cs193/user's...

17

Upload: vuongnga

Post on 17-Mar-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Table of Contents - CS-CSIFcsiflabs.cs.ucdavis.edu/~cs193/User's Guide/PocketLab_User_Guide.… · in a lab setting, or anyone who needs to collect multiple kinds of data in one place
Page 2: Table of Contents - CS-CSIFcsiflabs.cs.ucdavis.edu/~cs193/User's Guide/PocketLab_User_Guide.… · in a lab setting, or anyone who needs to collect multiple kinds of data in one place

Table of Contents

I. Preface II. Overview of PocketLab

III. Installation and Distribution IV. Functionalities V. Troubleshooting

VI. Frequently Asked Questions VII. Contact Information

VIII. Appendix IX. Illustrations

Page 3: Table of Contents - CS-CSIFcsiflabs.cs.ucdavis.edu/~cs193/User's Guide/PocketLab_User_Guide.… · in a lab setting, or anyone who needs to collect multiple kinds of data in one place

I. Preface (Read Me, Audience, Vocabularies, Navigation)

Read Me This document is focused on serving all new PocketLab (PL) mobile application users, with the goal of assisting users in the efficient use of the app.

Audience/Targeted Users

From simple sensors such as the TMP37 temperature sensor to the TMP421, PocketLab serves a wide variety of users, from the inexperienced to the proficient. Our target users include students, teachers, gardeners, agricultural enthusiasts, data miners, farmers, harvesters, environmentalists, scientists, engineers, and our local Davis PostHarvest scientists. This app can help anyone who relies on taking data from multiple sensors in a lab setting, or anyone who needs to collect multiple kinds of data in one place. The benefit of using the IOIO board is that the users are free to move around and collect data, so this works well in any setting that relies on experiments spread out over an area where moving around a computer or other machines would be inconvenient.

Glossary - GitHub - Web application that assists with managing a project's workflow and

documents - Graphical User Interface (GUI) - Interface between user and electronics - Cloud System - Allows for the outsourcing of computer resources (storage,

servers, etc.) - Google Drive - Cloud storage application - IOIO-OTG - development board with bluetooth capabilities; features a PIC

microcontroller which acts like a bridge that connects an app on a PC or Android device to low-level peripherals like GPIO, PWM, ADC, I2C, SPI, and UART (full description can be found at: https://www.sparkfun.com/products/12633)

- I2C - A protocol intended to allow multiple “slave” digital integrated circuits (“chips”) to communicate with one or more “master” chips. Like the Serial Peripheral Interface (SPI), it is only intended for short distance communications within a single device. Like Asynchronous Serial Interfaces (such as RS-232 or UARTs), it only requires two signal wires to exchange information.

Page 4: Table of Contents - CS-CSIFcsiflabs.cs.ucdavis.edu/~cs193/User's Guide/PocketLab_User_Guide.… · in a lab setting, or anyone who needs to collect multiple kinds of data in one place

Navigation Opening the application and logging in:

Creating a new experiment:

Page 5: Table of Contents - CS-CSIFcsiflabs.cs.ucdavis.edu/~cs193/User's Guide/PocketLab_User_Guide.… · in a lab setting, or anyone who needs to collect multiple kinds of data in one place

Selecting an existing saved session:

Color Sensor:

Page 6: Table of Contents - CS-CSIFcsiflabs.cs.ucdavis.edu/~cs193/User's Guide/PocketLab_User_Guide.… · in a lab setting, or anyone who needs to collect multiple kinds of data in one place
Page 7: Table of Contents - CS-CSIFcsiflabs.cs.ucdavis.edu/~cs193/User's Guide/PocketLab_User_Guide.… · in a lab setting, or anyone who needs to collect multiple kinds of data in one place

Temperature Sensor:

Ambient Light Sensor:

Page 8: Table of Contents - CS-CSIFcsiflabs.cs.ucdavis.edu/~cs193/User's Guide/PocketLab_User_Guide.… · in a lab setting, or anyone who needs to collect multiple kinds of data in one place

View Saved Data: Save To CSV:

The CSV file can be viewed from the phone’s local PocketLab application folder:

Page 9: Table of Contents - CS-CSIFcsiflabs.cs.ucdavis.edu/~cs193/User's Guide/PocketLab_User_Guide.… · in a lab setting, or anyone who needs to collect multiple kinds of data in one place

II. Overview of PocketLab

PocketLab is an Android application that will allow technologists to use an Android phone as a universal laboratory instrument.The application will utilize available on-phone sensors, as well as a Bluetooth connected interface board (IOIO-OTG), to utilize readily-available low-cost analog and digital sensors that can determine a wide range of quality and environmental parameters.

The primary target audience is postharvest technologists, but PocketLab will be useful to a much wider audience, since the interface board can monitor almost any digital or analog signal. PocketLab will use the phone’s display to provide instantaneous readings from on-phone and connected sensors. It will also provide the capability of monitoring readings of selected sensors, providing on-phone graphical output, as well as writing the values to a .csv file that can be downloaded for further analysis on a computer.

The IOIO-OTG board is an input/output device, and can be used to control sensors and other devices. The PocketLab application will also include a control module to provide the opportunity for the user to switch relays connected to the interface board, so that the user can move around sensors as desired.

The current version of PocketLab allows the user to make an account, requiring a username and password. This data is stored in a database so that the user can switch devices and still access their stored data. Then, the user can make a new session/experiment, and collect data points to save within that session. They can view the existing data points at any time, and save the session to a csv to graph it. Later, the users can access the previous lab sessions and add to them, or make new sessions.

Page 10: Table of Contents - CS-CSIFcsiflabs.cs.ucdavis.edu/~cs193/User's Guide/PocketLab_User_Guide.… · in a lab setting, or anyone who needs to collect multiple kinds of data in one place

III. Installation and Distribution

In order to install the PL mobile app, you will need the following software and hardware:

1. Android phone or tablet 2. Windows/Mac PC 3. Micro USB to USB2.0 cable 4. Android Studio

Procedure:

1. Open Android Studio 2. Go to File > New > Project From Version Control> Git 3. Paste the link “https://github.com/mdregalia/PocketLab.git” for “Git Repository URL”

Page 11: Table of Contents - CS-CSIFcsiflabs.cs.ucdavis.edu/~cs193/User's Guide/PocketLab_User_Guide.… · in a lab setting, or anyone who needs to collect multiple kinds of data in one place

IV. Functionalities (Basics, Referring to Req. Doc) Some of the basic functionalities include the following:

- Reading and displaying from digital or analog sensors connected to the IOIO board - Saving reports in a csv format - Storing user data in a database, with SHA-256 encryption, and use of randomly

generated “salts” for extra security against alphabet attacks - Using the phone camera to take pictures and determine color from a user-determined

segment of the photo

V. Troubleshooting / Common Issues The app isn’t connecting to the board

- This could be due to several things. If it occurs when the user is connecting to a new IOIO board, or the user has never used the app before, it is likely that the Bluetooth on the phone is not recognizing the IOIO board. The user needs to go to Bluetooth settings on the phone, and then connect to the IOIO board using the password “4545”. If this occurs in the middle of use, it is likely that the battery is dying, and the bluetooth dongle on the IOIO board is not getting enough power.

A sensor stops responding after repeated use

- Repeated use can burn out or overheat the sensor. Disconnect the battery from the IOIO board, remove the sensor, and let it sit for a few hours. It is possible that the sensor can break this way, but most sensors are fairly cheap.

It is taking a long time to login

- Verify that your phone is connected to the internet and has a strong connection. It could be that the wifi signal is cutting out or is too weak in order to properly connect to the database.

Page 12: Table of Contents - CS-CSIFcsiflabs.cs.ucdavis.edu/~cs193/User's Guide/PocketLab_User_Guide.… · in a lab setting, or anyone who needs to collect multiple kinds of data in one place

VI. Frequently Asked Questions

● Where does PocketLab save csv files?

Answer: It saves it in the app’s Documents folder. Usually somewhere such as “Local/android/data/data/com.akanksha.pocketlab”

● How do we secure sensitive user account information such as passwords?

Answer: It is encrypted with a random string (called a “salt”) in SHA-256 encryption. Only the encrypted version is stored in the database, so the user’s actual password is never sent over the internet and never stored. The salt prevents “alphabet attacks” where if the database is hacked, if the users have common words as their passwords, such as “dog”, “green”, or “password”, the salt makes the string random enough that the hackers will not be likely to guess the password from the encryption, even if they try hundreds of words.

● What are the supported sensors?

Answer: PocketLab currently supports color, temperature, and ambient light sensors, however, a user can add any additional analog sensors to suit the requirements of their experiment.

● Can PocketLab be used in varying environments?

Answer: Yes. PocketLab is designed to be used in different environments that range from indoors to outdoors. The purpose of this app is to allow the user to take measurements of various data in the environment they wish to study. As long as the user has access to internet or data on their phone, PocketLab will successfully work in most environments.

● Can I login to my same account from a different phone?

Answer: Yes. PocketLab stores all the user’s data online in a database, so it can be accessed from any device with PocketLab installed.

Page 13: Table of Contents - CS-CSIFcsiflabs.cs.ucdavis.edu/~cs193/User's Guide/PocketLab_User_Guide.… · in a lab setting, or anyone who needs to collect multiple kinds of data in one place

VII. Contact Information Project Client

Michael Reid Emeritus Professor and Extension Specialist

Horticulture Innovation Lab

Department of Plant Sciences

UC Davis

[email protected]

(530)-867-3684

Team Contact

Pedro Gonzalez Computer Science and Engineering Major

[email protected]

(707) 342-9439

Melissa Regalia Computer Science and Engineering Major

[email protected]

Akanksha Trivedi Computer Science and Engineering Major

[email protected]

Ananya Singh Computer Science and Engineering Major

[email protected]

Page 14: Table of Contents - CS-CSIFcsiflabs.cs.ucdavis.edu/~cs193/User's Guide/PocketLab_User_Guide.… · in a lab setting, or anyone who needs to collect multiple kinds of data in one place

VIII. Appendix

A. Revision History

5/29/16

- User guide created - Requirements page updated - Glossary updated

3/12/16

- Glossary update

3/4/16

- File conversion to .docx - Table of Contents added - Glossary updated

2/6/16

- Dates added to user cases - Glossary updated - Appendices updated - Software Architecture GitHub Project Link - App Architecture Document Attachment

B. Team Info I. Project Title

PocketLab

II. Document Authors

Melissa Regalia

Akanksha Trivedi

Ananya Singh

Pedro Gonzalez

Page 15: Table of Contents - CS-CSIFcsiflabs.cs.ucdavis.edu/~cs193/User's Guide/PocketLab_User_Guide.… · in a lab setting, or anyone who needs to collect multiple kinds of data in one place

III. Team Members

Prof. Michael Reid

Melissa Regalia

Akanksha Trivedi

Ananya Singh

Pedro Gonzalez

C. System of Architecture (Overview) Hardware: IOIO-OTG Development Board, Color, vibration, temperature, humidity,

wind-speed, and CO2 sensors. Please see attached document.

Software: PocketLab Mobile Application, Desktop GUI (to access measurements from

database).

GitHub Project Link: https://github.com/mdregalia/PocketLab

D. Requirements (functional and nonfunctional)

User Cases

● As a user, I can create a username and password to log into the application. ● As a user, I can take measurements using various sensors. ● As a user, I can see measurements in real time on my phone screen. ● As a user, I can decide whether to take measurements from my own phone or from the compatible external Bluetooth board. ● As a user, I can make graphs from the measurements I have taken. ● As a user, I can make reports on the obtained data. ● As a user, I can export my measurements to a file. ● As a user, I can upload my measurements to a database so that I can retrieve them later from another device.

Page 16: Table of Contents - CS-CSIFcsiflabs.cs.ucdavis.edu/~cs193/User's Guide/PocketLab_User_Guide.… · in a lab setting, or anyone who needs to collect multiple kinds of data in one place

IX. Illustrations A. Early system of architecture model of mobile application.

Page 17: Table of Contents - CS-CSIFcsiflabs.cs.ucdavis.edu/~cs193/User's Guide/PocketLab_User_Guide.… · in a lab setting, or anyone who needs to collect multiple kinds of data in one place

B. Early model of hardware and software communication.