You are on page 1of 101

POTENTIAL HYDROGEN ANALYSIS DEVICE

A Thesis Project Proposal Presented to

the Faculty of the College Sciences

Palawan State University

In Partial Fulfillment of the

Requirements in the course Thesis for the Degree of Bachelor of Science in

Computer Science

By:

Aborot, Michelle

Mae

Rosaceña,Reniel

Añonuevo,Paul

Kevin

September 2018
APPROVAL SHEET

This Project Proposal entitled “Potential Hydrogen Analysis Device” prepared and

submitted by Aborot, Michelle Mae, Rosaceña, Reniel and Añonuevo, Paul Kevin, has

been examined and is recommended for approval and acceptance.

MR. ADONIS C. AMPONGAN


Adviser

PANEL OF EXAMINERS

APPROVED by the Panel of Examiners with a grade of .

DR.FLOREDITH JEANNE G. ALCID


Chairman

MS. AILENE L. SIBAYAN MR. RHAY NIEL D. TACUD


Member Member

ACCEPTED and APPROVED in partial fulfillment of the requirements for the degree

Bachelor of Computer.

DR. CARMENCITA G. PALANCA


Dean, College of Sciences

ii
ACKNOWLEDGEMENT

The researchers would like to express their deepest gratitude to those people

who contributed to the success of this thesis.

To the researchers’ parents, for their support financially, spiritually and moral

support they gave.

To the researchers’ instructors from the SAD course during the proposal defense

of title, Mr. Bemsor Caabay and Ms. Divine Grace Caabay, to the Thesis 1 and 2

professor, Dr. Raymond P. Rey.

To the researchers’ adviser, Mr. Adonis C. Ampongan, for his advices, patience

and encouragements he gave to the researchers to make the study possible and be

approved.

To the researchers’ classmates and friends for sharing also their ideas and

knowledge.

And most of all, to our Almighty God for the knowledge, strength, patience, and

guidance He gave upon the researchers to complete this research.

- The Researchers

iii
DEDICATION

The researchers dedicate this thesis to their parents for their support in many

ways.

To their friends, who taught them to enjoy life despite of the trials, challenges,

and pressures they have encountered in their lives.

To all the staff, instructors and their adviser who extended their help to the

researchers to impart their knowledge, skills and ideas.

And to our Almighty God who gave life, blessings, and knowledge that made this

research successful and possible.

The Researchers

iv
ABSTRACT

The purpose of this study is to replace the potential hydrogen paper being used

by the Palawan State University to measure the potential hydrogen level of liquid

substances. The researcher’s gathered data that will help to solve the problems on the

existing system. The problems regarding the availability of the materials and how they

will measure the potential hydrogen level in an easy, fast and accurate way is tackled

in this study. The researchers also discovered that potential hydrogen paper is not

suitable for users with eye problems like color blindness because potential hydrogen

paper needs color comparison in getting results. That is some of the problems

encountered by our client. Out of 11 solution tested there is only a minimal difference

between the result of the pH meter in the pH Analysis Device.

In order to solve the problems, the researchers encountered a software

application with a device that can measure the potential hydrogen level of liquid

substances was utilized. This software comes with useful features. Compared to the

potential hydrogen paper the proposed study is much more reliable than the potential

hydrogen paper in terms of measuring the potential hydrogen level.

The researcher recommends making the device as a stand-alone. Also, it is better to

add multiple sensors in the device. Further improvement on the system may increase

accuracy of the device.

v
TABLE OF CONTENTS

POTENTIAL HYDROGEN ANALYSIS DEVICE ............................................................................................... 1

APPROVAL SHEET......................................................................................................................................... 2

ACKNOWLEDGEMENT .................................................................................................................................. 3

DEDICATION ................................................................................................................................................... 4

ABSTRACT ..................................................................................................................................................... 5

TABLE OF CONTENTS ................................................................................................................................... 6

LIST OF FIGURES ......................................................................................................................................... 10

LIST OF TABLES .......................................................................................................................................... 11

CHAPTER 1 INTRODUCTION ....................................................................................................................... 13

Background of Study .......................................................................................................................... 13

Objective of the Study........................................................................................................................... 2

Significance of the Study...................................................................................................................... 3

Chemistry Students .............................................................................................................................. 3

Chemistry Teachers .............................................................................................................................. 3

Palawan State University ...................................................................................................................... 4

Scope and Delimitation ......................................................................................................................... 4

Definition of Terms................................................................................................................................ 5

Conceptual Framework ......................................................................................................................... 6

CHAPTER II ..................................................................................................................................................... 7

REVIEW OF RELATED LITERATURE AND STUDY ....................................................................................... 7


vi
Foreign Literature.................................................................................................................................. 7

Local Literature ................................................................................................................................... 10

Local Studies ....................................................................................................................................... 11

Foreign Studies ................................................................................................................................... 12

CHAPTER III RESEARCH METHODOLOGY ................................................................................................ 15

Research Design ................................................................................................................................. 15

Research Locale.................................................................................................................................. 15

Population of Study ............................................................................................................................ 16

Research Instrumentation .................................................................................................................. 16

Data Gathering Procedure .................................................................................................................. 17

Software Requirements ...................................................................................................................... 17

Deployment Plan ................................................................................................................................. 21

User Manuals ....................................................................................................................................... 21

Implementation Plan ........................................................................................................................... 21

Use-Case Diagram............................................................................................................................... 22

System Maintenance Plan .................................................................................................................. 23

Research Procedure ........................................................................................................................... 24

Description of Existing System .......................................................................................................... 26

Description of Proposed System ....................................................................................................... 28

Actual Device .......................................................................................................................... 30

Entity Relationship Diagram .................................................................................................. 31

Data Dictionary ....................................................................................................................... 32

Graphical User Interface ........................................................................................................ 36


vii
Gantt Chart .............................................................................................................................. 39

Cost and Benefits Analysis ................................................................................................... 40

CHAPTER IV.................................................................................................................................................. 41

RESULTS, FINDINGS, AND ANALYSIS ....................................................................................................... 41

Findings ............................................................................................................................................... 41

Findings ............................................................................................................................................... 42

Summary.............................................................................................................................................. 44

CHAPTER V .................................................................................................................................................. 44

CONCLUSION AND RECOMMENDATIONS ................................................................................................. 44

Conclusions......................................................................................................................................... 44

Recommendations .............................................................................................................................. 44

viii
LIST OF FIGURES

Figure 1 Conceptual Framework ...................................................................................................................... 6

Figure 2 Palawan State University ................................................................................................................. 16

Figure 3 Use Case Diagram ............................................................................................................................ 22

Figure 4 Agile Method ..................................................................................................................................... 24

Figure 5 Existing System ................................................................................................................................ 27

Figure 6 Proposed System ............................................................................................................................. 28

Figure 7 Actual Device .................................................................................................................................... 30

Figure 8 Entity Relationship Diagram ............................................................................................................ 31

Figure 9 Data Flow Diagram ........................................................................................................................... 33

Figure 10 Context Diagram Level 0 ................................................................................................................ 34

Figure 11 Child Level Diagram ....................................................................................................................... 35

Figure 12 Log in Form ..................................................................................................................................... 36

Figure 13 Registration Form ........................................................................................................................... 37

Figure 14 Admin Form .................................................................................................................................... 38

Figure 15 Admin Panel .................................................................................................................................... 38

Figure 16 Gantt Chart ...................................................................................................................................... 39

x
LIST OF TABLES
Table 1 System Maintenance Plan ................................................................................................................. 23

Table 2 Admin .................................................................................................................................................. 32

Table 3 pH_User_Data..................................................................................................................................... 32

Table 4 User Data ............................................................................................................................................ 32

Table 5 Requirements ..................................................................................................................................... 40

Table 6 First Test Results ............................................................................................................................... 42

Table 7 Second Test Result w/ Adjustments ................................................................................................. 42

Table 8 Final Test Results............................................................................................................................... 43

xi
LIST OF APPENDICES

RO II Forms .......................................................................................................................................... 51

Grammarian certificate ....................................................................................................................... 54

Source code......................................................................................................................................... 56

Request letter for interview & surveys .............................................................................................. 86

xi
i
CHAPTER 1

INTRODUCTIO

Background of Study

PH or Potential Hydrogen is present in all water bodies from the water in the

faucet, beverages, and even in rain. Potential Hydrogen indicates the sample's acidity

but is actually a measurement of the potential activity of hydrogen ions (H+) in the

sample. Potential hydrogen measurements run on a scale from 0 to 14, with 7.0

considered neutral. Solutions with a pH below 7.0 are considered acids. Solutions with

a pH above 7.0, up to 14.0 are considered bases. All organisms are subject to the

amount of acidity of stream water and function best within a given range. The pH scale

is logarithmic, so every one-unit change in pH actually represents a ten-fold change in

acidity. In other words, pH 6.0 is ten times more acidic than pH 7.0; pH 5 is one hundred

times more acidic than pH 7.0. This study is made to give solution in lack of laboratory

equipment of CS-Laboratory and in knowing how the state of water bodies in Puerto

Princesa City was. PH is classified by levels the higher the level the safer the water.

The normal level of potential hydrogen in rainfall is 4.5 having lower than this can cause

a health problem to someone that is having directly contact in the rainfall. This study will

create a device that can measure the potential hydrogen of any liquid substance.

Therefore, the researchers created both device and system for this particular study.

Some establishments may use this device because sometimes they use water from the

rain to conserve water. By using this device, they will know if the water in the water
reservoir is safe to their guests or customers. This device can be used also in the lakes

or wells.

Some individuals use the PH paper to measure the PH level of water. The

problem of this system is that the availability and sometimes the results are not very

accurate. And it will be much hassle to test the liquid substance by paper every time

that it rains.

The College of Sciences is a college of Palawan State University that has

different courses like Marine Biology, Agriculture, Preparatory Medicine, Environmental

Science, Information Technology and Computer Science. The college laboratory uses

the traditional potential hydrogen paper to measure the potential hydrogen level. The

researchers chose this study because they want to solve the problem of the student and

teacher in “traditional way of measuring the potential hydrogen”. In addition, this would

help the school community specially the students.

Objective of the Study

The researchers aim is to create a device and a system entitled “Potential

Hydrogen Analysis Device” that can be used by faculty and students of Palawan State

University to measure potential hydrogen level of other solution substances in their

laboratory experiments.

1. To create a system with an Arduino device and potential hydrogen sensor

that will replace the potential hydrogen paper and compute the potential

hydrogen level of a liquid substance.

2
2. To create a system with an Arduino device and potential hydrogen sensor

that will display numerical representation as a result.

3. To create a data-based software application that can record students’

information and the data of the laboratory’s experiments of the students.

Significance of the Study

The research entitled “Potential Hydrogen Analysis Device”, provided with a

software application would be an asset to the Palawan State University community. The

research product can aide both faculties and students in determining the potential

hydrogen level present in other solutions during laboratory experiments. Specifically,

the proposed study will be beneficial to the following

Chemistry Students

They can easily conduct a measurement of potential hydrogen level in their

laboratory experiments. Moreover, the students can save their work data for future

purposes.

Chemistry Teachers

This device is time efficient and can easily provide a potential hydrogen level

result wherein data can be saved and printed.

3
Palawan State University

The University can participate in environmental activities/concerns involving

potential hydrogen.

Scope and Delimitation

This research entitled “Potential Hydrogen Analysis Device” is intended for the

Palawan State University specifically on the College of Sciences. This software

application with Arduino device can measure the potential hydrogen level of a liquid

substance. It can measure the acidity, neutrality and alkalinity of a liquid substance. The

software application records the student’s information and their laboratory experiments

through a database system. It has an admin panel that can modify data from the

software application into a pdf form.

The proposed system cannot tell if the water is clean or not due to several

considerations in water cleanliness. This system cannot measure the potential hydrogen

level if the amount of the liquid is below 50ml. And the device is not a stand- alone

device it needs to be plugged in into a computer installed with the software application.

4
Definition of Terms

The following terms are used throughout the study.

Arduino – is a chipset/device that is programmable.

Buffered Solution - is the liquid substance that has fixed ph level used to calibrate the

sensors.

Code – a written programming language that gives function to that software.

Connect- term used to connect the serial port of the arduino into the

software application.

Data – is raw facts, information that will be stored into the system

database. Database – intangible storage where all the data are stored.

Error – a message display when there is a malfunction on the device and the software.

Export – a process to which the users can transfer the data.

Lithium paper – is used to measure potential hydrogen level a liquid substance.

Main Menu – is a graphical user interface that is the center of the software application

where most of the features are located.

Potential hydrogen Strips – A paper use to measure the acidity of a

substance. Potential hydrogen – is the acidity level of a substance.

5
Refresh - a button that will update the software data.

Reboot – a button that you can press to restart the

device.

Sign up – the button where the students can register to the software application.

Troubleshoot – a diagnostic done in order to find the problem.

UI- stands for user interface it is the visual representation of the software.

Conceptual Framework

The figure below shows the basic flows of inputs and outputs of the current person in

charge to the system and the users of the system. It shows how the system would

function when implemented. The operator can compare his current test result to the

previous test.

INPUT PROCES OUTPUT

-Potential

Potential Level
Liquid

Analysis -Liquid Acidity

Figure 1 Conceptual Framework

The Figure 1 Conceptual Framework explains the process of the device. The liquid substance

to be test will serve as input, then the device shall process the Potential Hydrogen Analysis, and the

expected output from the device is the potential hydrogen level and the liquid acidity.
6
CHAPTER II

REVIEW OF RELATED LITERATURE AND STUDY

This chapter presents the brief information about the related studies and

literature of the research, and how are they similar and different to the researchers’

study. These studies will be a guide to avoid problems that their systems have

encountered.

Foreign Literature
“Study on using hydrogen and ammonia as fuels: Combustion

characteristics and NOx formation “

According to Jun Li, Hongyu Huang, Noriyuki Kobayashi, Zhaohong He, and

Yoshihiro Nagai from their study on January 4, 2014, their experiments showed that the

increase in acidity upon heating, observed by previous workers, is usually three to four

times the hydrogen-ion concentration of the cold paper-water mixtures. No advantage

of using hoi water for the extraction was observed. Experiments showed that the usual

fibrous papermaking materials have the property of raising the pH of an acidic solution

containing CO2 or aluminum sulfate, and that neutral papers gave essentially the same

pH, whether extracted with water of pH=6.7 or with some of the same water containing

CO2 and having a pH=5.9. Therefore, the requirements of present standard methods,

with respect to the pH of the distilled water used for extraction, appear to be

unnecessarily severe.
Synthesis

This study of National Bureau of Standards is similar to the researcher’s study

in term of measuring the pH level. However, they are using pH paper.

Strengths

Test with very small volumes it is possible to place just one drop onto the paper.

Reach difficult samples with a long reel you can tear off a long strip for reaching into the

bottom of long test tubes or flasks. Simple, specific tests generally very specific pH

change tests are available as pH papers, for example, Litmus paper has only one color

change blue in alkaline conditions, red in acidic conditions.

Disadvantages

Disadvantages of pH paper includes the indicator color change is usually not at

the same titer amount as the equivalent point. Sometimes the wind affects the result of

the measurement.

“Development of Water Electrolysis in the European Union”

According to the study of E4tech Sàrl with Element Energy Ltd

For the Fuel Cells and Hydrogen Joint Undertaking on February 2014, it discussed some

basic concepts of pH, pOH, pH glass electrodes, reference electrodes, standard buffers,

and pH meters.

The calibration of pH meters including the pH glass electrode, ISE electrodes,

buffers, and the general background for calibration are reviewed. Understanding of

8
basic concepts of pH, pOH, and electrode mechanism is emphasized. New concepts of

pH, pOH, as well as critical examination of activity, and activity coefficients are given.

The emergence of new solid-state pH electrodes and replacement of the salt bridge with

a conducting wire have opened up a new horizon for pH measurements. A pH buffer

solution with a conducting wire may be used as a stable reference electrode. The

misleading unlimited linear Nernstian slope should be discarded. Calibration curves with

3 nonlinear portions for the entire 0—14 pH range due to the isoelectric point change

effect are explained. The potential measurement with stirring or unsteering and effects

by double layer (DL) and triple layer (TL) will be discussed.

Synthesis

This study of K.L Cheng entitled“On Calibration of pH Meters” is similar to

the study in terms of getting the measurement of pH in a substance.

Strengths

One advantage of using a pH meter to measure the acidity of a solution is that

it is a lot simpler to use than using test strips or completing a titration experiment. Test

strips and titrations both use a color indicator; some people may perceive a different

color than the result. A meter will have a few buttons to operate the machine, and

gives a result immediately. The result can be given on a digital display, which will

provide a more precise result than a test strip.

9
Disadvantage

One downside to using a pH meter is that the cost of the meter is significantly

higher than using test strips. The pH meter is a long-term investment for gaining

accurate results. For those who are going to be taking an occasional reading, test strips

may be a better option. Another disadvantage in using a meter is that it needs to be

cleaned regularly to avoid contamination. Most probes have a glass tip that may break

or become damaged if exposed to corrosive chemicals. These are just a few

considerations to think about before making a substantial purchase of a pH meter. And

you have to calibrate it before using which takes time.

Local Literature

“Feasible metabolisms in high pH springs of the Philippines”

From this study of D Cardace on February 10, 2015, the researcher document changing

geochemical inventories in these springs between sampling years, and examine how

the environment supports or prevents the function of certain microbial metabolisms. In

all, this geochemistry-based assessment of feasible metabolisms indicates methane

cycling, hydrogen oxidation, some iron and sulfur metabolisms, and ammonia oxidation

are feasible reactions in this continental site of serpentinization.

Synthesis

This study is similar to the researcher’s study in terms of the importance of

knowing the pH in the environment.

10
Local Studies

EVALUATION OF WATER QUALITY OF MAJOR RIVERS IN PALAWAN,

PHILIPPINES USING PHYSICO-CHEMICAL PARAMETERS AND WATER

QUALITY INDEX

This research entitled Evaluation of Water Quality of Major Rivers in Palawan,

Philippines Using Physico-Chemical Parameters and Water Quality Index on November

8, 2016 states that it is necessary to determine the water quality, evaluate its impacts,

and provide measures to mitigate the problems (Mishra et al., 2009). Water quality

monitoring is essential to determine the physical, chemical and biological characteristics

of water. These characteristics provide basis as to how and for what water can be used

and the species and ecosystem processes it can support. Monitoring is also the

foundation on which water quality management is based. It provides the information that

permits the rational decision to be made on describing water resources, identifying

actual and emerging problems of water pollution, use and abstraction of water, and land

use; formulating plans; and in evaluating the effectiveness of management actions

(UNEP/WHO, 1996). At the same time, water quality monitoring data can be used to

track response to management regimes aimed at improving water quality.

Synthesis

This study entitled “EVALUATION OF WATER QUALITY OF MAJOR RIVERS

IN PALAWAN, PHILIPPINES USING PHYSICO-CHEMICAL PARAMETERS AND

WATER QUALITY INDEX” is similar to the proposed study in terms of monitoring the

pH of water in Palawan.

11
Water Quality in Pampanga River along Barangay Buas in Candaba, Pampanga

According to the study of C Arbotante on 2015, that aimed to initially identify the

physicochemical characteristics of the river using some parameters such as pH,

temperature, dissolved oxygen, ammonia, nitrates, and phosphates. Dissolved

oxygen, pH, and temperature were measured using DO meter, pH meter, and

thermometer. Chemical tests were done on site using test kits from Aquarium

Pharmaceuticals Incorporated (API). It was found that ammonia and phosphate

concentrations exceeded the maximum value required by the DAO 34 -Water Quality

Standard for Class C Water. The DO concentration was below the minimum

requirements for river water.

Synthesis

This study titled “Water Quality in Pampanga River Along Barangay Buas in

Candaba, Pampanga” is similar to the proposed study in terms of measuring the pH

level of water in Bulacan.

Foreign Studies

“Hydrogen potential of antibiotic solutions subjected to environmental

conditions: SSxa preliminary trial”

According to this study on 2014, “Potential benefits of pH 8.8 alkaline drinking

water as an adjunct in the treatment of reflux disease”.

At the cellular level, tissue-bound pepsin is fundamental to the pathophysiologic

mechanism of reflux disease, and although the thresholds for laryngeal damage in

laryngopharyngeal reflux and for esophageal damage in gastroesophageal reflux

12
disease differ, both forms of damage are due to pepsin, which requires acid for its

activation. In addition, human pepsin remains stable at pH 7.4 and may be reactivated

by hydrogen ions from any source. Thus, most tap and bottled waters (typically pH 6.7

to 7.4) would not be expected to affect pepsin stability. The purposes of these in vitro

studies were to investigate whether artesian well water containing natural bicarbonate

(pH 8.8) might irreversibly denature (inactivate) human pepsin, and to establish its

potential acid-buffering capacity.

“DEFINITION OF pH SCALES, STANDARD REFERENCE VALUES,

MEASUREMENT OF pH AND RELATED TERMINOLOGY”

This document released on 2015 deals with definitions, procedures and

terminology for the quantity potential hydrogen which is of wide interest for chemists,

biologists and engineers. It is the result of discussions since 1977 within JUPAC and

related discussions in other international bodies. It constitutes in the definition of pH

scales a compromise which recognizes the advantages of both the previously endorsed

multi-standard approach and that based on the definition of a single standard with

associated operational standards.

The present TUPAC recommendation is 5 primary reference standards based on

NBS values. A joint meeting of IUPAC Commissions 1.3 and V.5 first discussed pH

scale recommendations in Warsaw in 1977. A sub-committee consisting of R. C. Bates

(Florida), A. K. Covington (Newcastle) and R. A. Durst (Washington) was charged with

resorting back to a second joint meeting of the two Commissions in Davos in 1979 and

as a result a conference of pH experts was convened to discuss the matter. This meeting

took place as an IUPAC-sponsored conference on 'Harmonization of pH Scale

13
Recommendations' in Lisbon in June 1980.

The decision of the conference in support of the resolution that 'A single primary

standard pH scale should replace the existing IUPAC multiple primary scale' fell short

of a consensus of expert opinion and was reported to the joint commission meeting in

Leuven in August 1981, There a third joint meeting of Commissions 1,3 and V,5 voted

to adopt a compromise proposal which recognizes the validity of both NBS and British

Standard approaches, It is the purpose of this report to describe this proposal which is

intended to replace the existing IUPAC definition of the quantity ph.

Synthesis

This study of A. K. COVINGTON University of Newcastle upon Tyne, UK entitled

“DEFINITION OF pH SCALES, STANDARD REFERENCE VALUES,

MEASUREMENT OF pH AND RELATED TERMINOLOGY” is similar of our study in

terms of studying of Potential Hydrogen.

14
CHAPTER III

RESEARCH

METHODOLOGY

This chapter contains brief information on how the researchers will the

researchers gather useful and relevant data in able to solve the problems of their

proposed study. Included is the information on how the system and data will flow to

successfully obtain the researchers objective.

Research Design

The study proposal used qualitative method to gather important data in means of

individual interview. Qualitative Research is primarily exploratory research. It is used to

gain an understanding of underlying reasons, opinions, and motivations. It provides

insights into the problem or helps to develop ideas or hypotheses for potential

quantitative research. Qualitative Research is also used to uncover trends in thought

and opinions, and dive deeper into the problem. Qualitative data collection methods

vary using unstructured or semi-structured techniques. These include individual

interviews and participation/observations. The sample size is typically small, and

respondents are selected to fulfill a given quota.

Research Locale

The client area of this study will be the College of Sciences in Palawan State

University. This study focuses on creating device that can help the researcher’s fellow

students in Palawan State University. The target respondent will be the Chemistry

professors and students of Palawan State University.


Figure 2 Palawan State University

This Figure 2 Palawan State University above shows the area where the

researchers conducted their research. It is located in Palawan State University Main

Campus, specifically, in College of Sciences.

Population of Study

The respondents of this study were composed of 50 individuals of the College of

Sciences because most of the students are not familiar with Potential Hydrogen. The

approach of this research is to obtain the data from this respondent to describe their

preferences regarding the researcher’s proposition.

Research Instrumentation

A self- administered questionnaire was made by the researchers for the data

gathering process to qualitative method of gathering data. The primary aim of the

questionnaire is to determine how helpful it is to provide such device? And what would

16
be the features of this device? In doing the interview, we learned many things for the

researcher’s study, thanks to the generous respondents of our interview.

Data Gathering Procedure

The researcher’s groups were formed on July 15, 2017 the researchers took

almost a month and half thinking of their title and concept before the researcher’s came

up with this title and concept. August 06, 2017 the researcher started to gather data

through the library and internet and started making drafts about the concept and title the

researchers came up with. A week after the gathering of data the researcher’s started

making the sample questions that the researchers are going to use in the researcher’s

individual interview. Then the researchers created a letter for the Department of Science

and Technology to help the researcher’s further on the study by providing the interviewer

helpful data. They also give the researchers recommendation about the research. After

that, the researchers started creating the documentations for the research by the help

of data the researchers gather through research and internet. To finalize the

documentation the researchers done the individual interview on October 24, 2017.

Software Requirements

The table below shows the requirements in terms of software in order for the

research to become possible.

Software Description

17
MySQL Workbench It is used for device system database.

It is a unified visual tool for database

architects, developers, and DBAs.

Visual Studio 2017 It is an integrated development

environment (IDE) from Microsoft. It is

used to develop computer programs for

Microsoft Windows, as well as web sites,

web apps, web services and mobile apps.

Windows Operating System An operating system is computer software

that manages hardware and other

software.

ARDUINO 1.8.5 The open-source Arduino Software (IDE)

makes it easy to write code and upload it

to the board. It runs on Windows, Mac OS

X, and Linux. The environment is written in

Java and based on Processing and

other open-source software.

The table above shows the software needed for the device to become possible

and working. It includes the Arduino which is an open-source Arduino software,

18
computer software that manages hardware and other software which is the windows

operating system, MySQL Workbench which is used for device system, and Visual

Studion 2017 which is used to develop computer programs for the device to work.

Hardware Requirements
The table below shows the hardware and their description needed for the research.

Hardware Description

PH sensor Heating voltage: 5 ± 0.2V (AC · DC)


Working current: 5-10mA
Detectable concentration range: PH0-14

Detection Temperature range: 0-80 ℃


Response time: ≤5S
Settling Time: ≤60S
Component Power: ≤0.5W
Working temperature: -10 ~ 50 ℃
(nominal temperature 20 ℃)
Humidity:95%RH(nominal humidity 65%
RH) Module Size: 42mm × 32mm ×
20mm
Output: analog voltage
Signal output
With 4pcs M3 Mounting Holes

Arduino Uno Microcontroller: ATmega328P


Operating Voltage: 5V
Input Voltage (recommended): 7-12V

19
Input Voltage (limit): 6-20V
Digital I/O Pins: 14 (of which 6 provide
PWM output)

PWM Digital I/O Pins: 6


Analog Input Pins: 6
DC Current per I/O Pin: 20 mA
DC Current for 3.3V Pin: 50 mA
Flash Memory 32 KB (ATmega328P of
which 0.5 KB used by boot loader
SRAM: 2 KB (ATmega328P)
EEPROM: 1 KB (ATmega328P)
Clock Speed: 16 MHz
Computer Set Atleast 2 GB DDR3 ram
1TB Hard disk/rom
Atleast 2.0 Ghz CPU
Windows Operating System 7 up
With a good graphics quality
Usb Cable 3-5 meters

The table above shows and explains the different hardware used for the project.

It includes the PH sensor with its specifications. It is very much important because it is

the one that has the capability to make the device work in accordance to its purpose,

which is to sense. Then the Arduino Uno, that also helps the device work. The computer

set for the creation of programs, and the Usb cable for connecting two or more devices.

20
Deployment Plan

The device is not a stand-alone and need to be connected to pc or laptop that is

installed with the software application as long as the power source is connected the

device will work perfectly fine. However, the user needs to know the basics of the device,

which is instructed by the chemistry professor. You need to register first to get access

of the system and the device.

User Manuals

The researchers have provided a video presentation included to the software

application installer. New users may follow the video presentation as a guide to use the

Potential Analysis Device properly. Failure to follow instruction in the video presentation

may cause problem in the system or worst lost all your data saved into database. Users

must be responsible in using the system so that the device will last long.

Implementation Plan
This table describes the plan of the researchers to the project, including the

processes in implementation of the device.

Acceptance Checklist, Implementation Schedule, Training


IMPLEMENTATION PLANNING
Schedule, Re-estimate

FINALISE DOCUMENTATION Training Guides, User Manuals

Test Data Preparation, System Test: Functional &


CONDUCT SYSTEM TESTING
Performance, Test Conversion

CONDUCT ACCEPTANCE TESTING Acceptance Test

21
OPERATIONS HANDOVER Computer Documents, I/O Documents, Operating Guide

This explains the planning and strategies of the researchers in terms of

implementing the project. From the table above, it shows that they check first the

acceptance checklist, the schedule or the Gantt chart they are following with time-frame

in each activity. Then finalize the documents needed to this research in relation to their

project which is the training guides and user manuals. They also conducted the data

testing, and system testing that tests the functionality and performance of the device,

and finalize also the operations handover, from the computer documents, and operating

guides.

Use-Case Diagram

The figure below shows how the user will interact to the system. It will help the

end-user how the


system operates with the user.

Figure 3 Use Case Diagram

22
This Figure 3 Use Case Diagram explains the process on how the user shall interact

with the device. The user shall have an input through log in/put the liquid sample to the

pH Analysis Device, then after a moment of time, there will be have the sample result,

and it will serve as the output to the end-user, in that, the user could determine the pH

of the specific liquid sample.

System Maintenance Plan

The system needs to be maintaining according to its functionality to the whole

system to ensure the excellent quality of the product.

Table 1 System Maintenance Plan

Daily Weekly Monthly

PH Analysis Device

PH Analysis Program

Full system

System Database

The Table 1 Maintenance Schedule above explains the Maintenance Schedule

of the device. The PH Analysis device is being checked regularly/daily, while the

program

23
is being checked weekly, and the Full system and the database is maintained

monthly. This schedule helps the researcher to do their task for the improvement of

the device.

Research Procedure

The researchers used the agile method for the systems development life cycle.

System Design

Planning Implementatiom

Requirements Testing
Analysis

Maintenance

Figure 4 Agile Method

The phases of Agile Method are the following:

 Planning – it is the first thing that every researcher must do. Without the

presence of planning, the study will not be possible. In this study, the researchers

made a plan. From the goals and objectives of the project, the resources needed

including the constraints of software projects which are the time, cost, and quality.

The researchers also planned the project schedule together with the phases of

24
stages of the project, estimation of time that each task or activity will

take. The researchers also include in their planning the customer’s needs

through listing of project deliverables, determining milestones and activities to

produce deliverables. They also focused on the project team organization,

technical description of the system, project standards and procedures, quality

assurance plan, configuration management plan, documentation plan, data

management plan, resource management plan, test plan, training plan, security

plan, risk management plan, and maintenance plan.

Without planning, the researchers could not be able to achieve their goals.

That is how the important the planning is.

 Requirements Analysis- this is the next phase in agile method. Capturing the

requirements means the researchers focused on eliciting requirements from the

customers, modeling requirements, reviewing requirements to ensure their

quality and documenting requirements for use by the design and test teams.

Requirements focus on the customer’s needs and not on the solution or

implementation that the researchers’ desire. Requirements are important

because it sometimes became the cause of the failed project. That’s why the

researchers considered the things that must be included in the requirements

analysis.

Design- it refers to the creative process of figuring out how to implement all of

the customer’s requirements. In doing this phase, the researchers consider the

design patterns for the generic solutions for making lower-level design, design

convention or idiom such as the collection of design decisions and advice that

25
taken together, promotes certain design qualities. Innovative design that is

characterized by irregular bursts of progress that occur as the researchers have flashed

of insight and the design principles which refers to the descriptive characteristics of good

design.

 Coding – in this phase, the researchers began to write the program. Considering

the standards for programming, guidelines for reuse, using design to frame the

code and the internal and external documentation.

 Unit Testing- after coding, this is the next phase. In this stage, the researchers

were able to test the functions, performance, acceptance, software reliability,

availability and maintainability. They also include the installation testing, test

documentation and testing safety-critical systems.

Acceptance Testing- in this phase, the researchers considered the purpose

and roles. Acceptance testing enable the customers and users to determine if

the built system meets their needs and expectations, written, conducted and

evaluated by the customers.

Description of Existing System

The existing system needs to be calibrated first before you can use it. You have

to clean the electrode first to avoid inaccurate measurement. You will generally need

more than one buffer for calibrating a pH meter. The first will be a “neutral” buffer with a

pH of 7, and the second should be near the expected sample pH, either a pH of 4

or

9.21. Buffers with a higher pH (9.21) are best calibrated for measuring bases, whereas

buffers with a low pH (4) are best for measuring acidic samples. Once you have chosen

your buffers allow them to reach the same temperature, as pH readings are temperature
26
dependent. Pour your buffers into individual beakers for calibration. Then you can

proceed measuring the pH sensor.

However, in the pH paper it easy to use you can just dip the tip of the paper to

the substance you want to measure. Even a drop can put results.

START

LIQUID

WAIT 1 – 1O MINUTES

COLOR OF
THE RESULT

END

Figure 5 Existing System

The figure above is all about the flowchart of the existing system used by the

professors and the students. Liquid substance that served as input, then the users must

wait from 1-10 minutes, and output will be the color of the result. In that way, the users

determine the Ph analysis of a specific liquid substance.

27
Description of Proposed System

START

ALREADY NO
HAVE AN ATION
ACCOUNT

YES

LOG IN

Figure 6 Proposed System

28
A

MAIN USER EXPORT TO


MENU PDF

LIQUID
SUBSTA
NCE

MEASURE PH

NO SAVE YES END


B
DATA

Figure 6.1 Proposed System

The researchers proposed a system with device that will measure the pH level of

a liquid substance without calibrating which can save time for the end-user and provide

an accurate and very fast result. The device also would provide a system database for

the tested result for comparison purposes during his present and previous sample

substances.

29
Actual Device

Figure 7 Actual Device

From the schematic diagram on the previous page, and now to the picture

of actual device. It is the image of the device that is now properly functioned and

is interconnected.

30
Entity Relationship Diagram

The figure below shows the system data table, how are they connected and their

respective function in the proposed system.

Figure 8 Entity Relationship Diagram

The figure above explains and describes the events that happen in system. From

the admin, they must log in for username and password, then in the user data which the

information must directly come from the user, it includes the result of the pH, date, name

of data, username and the status, and another data table for the data of the user that

includes his first name, last name, username, password, course, year and semester.

31
Data Dictionary

The tables for data dictionary include the data type of the variables used, and

the name of the variable for the program.

Table 2 Admin

Variable Name Data Type Description

Id VARCHAR(45) Variable used as a primary


key
Admin_username VARCHAR(45) Variable used for admin
username
Admin_password VARCHAR(45) Variable used for admin
password

Table 3 pH_User_Data

Variable Name Data Type Description

Id VARCHAR(45) Variable used as a


foreign key
ph_result VARCHAR(45) Variable used for user
information
Date VARCHAR(45) Variable used for date
data_name STR Variable used for the
name of the data to save.

Table 4 User Data

Variable Name Data Type Description

Id VARCHAR(45) Used as a Foreign key

Firstname STR Variable that stores data of the


first name of the user
Lastname STR Variable that stores data of the
lastname of the user
Username STR Variable that stores username
data
Password VARCHAR(45) Variable that stores password
data

32
Course VARCHAR(45) Variable that stores course data
of the user
Year VARCHAR(45) Variable that stores year level
data
Semester VARCHAR(45) Variable that stores data of the
school year

Data Flow Diagram

The figure below shows the Context Data Flow Level 0 Diagram of the proposed

Figure 9 Data Flow Diagram


system. It represents how each program steps are connected to the database system.

Starting from the user and how it ends in the database tables.

This shows that the flow of the device, from the user that shall create an account

if the user has no account yet, then will input the account details and shall proceed to

the userdata table, wherein that user data table asks the first name, user name, last

name, password and other important details from the end-user. Otherwise, he shall

log
33
in if he already had an account and will enter his account details, in that, the details shall

be sent to test the substance, then will have the test result, and finally shall save the

experiment to the userdata table.

Admin

Figure 10 Context Diagram Level 0

This figure represents how the user, the proposed system and the database are

connected and interact according to the user’s inputs. From the figure above, the user

must log into account or create account if he don’t have any account yet. After that, the

user shall send also the sample solution to the device, and the device shall send back

the test result. On the other side, the interaction between the admin the pH analysis

device, the device shall validate the login came from the end user and shall save the

test result to the admin, and finally shall modify the login details to the admin made by

the user. While the admin’s task is to load the previous test result and shall display the

requested login details.

34
D1 userdata

D1 userdata

ph_user_data
D2

ph_user_data
D2

Figure 11 Child Level Diagram

This figure represents how the user input data are stored in each respective data

table.

35
Graphical User Interface

Figure 12 Log in Form

The researchers created a modernize user interface that is connected to the chemistry

laboratory for these system study. It has two textboxes that the users shall fill in the

user name and the password.

36
This figure shows the informations that must be filled in by the user. It includes

the username, password, re-enter the password for confirmation if the user’s password

is the same as what he has entered on the first trial, then the first name and last name

of the user, the course, year level and the semester. It also includes two buttons. It is

either the user shall click the register button to continue and proceed to the next level,

or shall click the cancel button if there are changes to be made by the user

Figure 13 Registration Form

37
Figure 14 Admin Form

This figure is the main menu form. It is now in the form of testing the pH level and

the status of the pH paper.

Figure 15 Admin Panel

Figure 19 Admin Panel is the interface in the admin form for the admin panel.

38
Gantt Chart

This chart below shows when the researchers accomplish steps in making a proposal.

June July August September October

Week 1st 2nd 3rd 4th 1st 2nd 3rd 4th 1st 2nd 3rd 4th 1st 2nd 3rd 4th 1st 2nd 3rd 4th

Title &
Concept

Data
Gathering
Planning
&
Designing
Chapter
1
Chapter 2
Chapter 3
Finalizing
Proposal
Figure 16 Gantt Chart

The table above is all about the schedule set by the researchers to finish their

task with the given time frame. From the proposal of the title of the research, the

documentation from chapter 1 to chapter 5, and the device’s process from the basic

phase up to the complicated phase and finalization of the manuals, documentation and

the device, and the final defense.

39
Cost and Benefits Analysis
The table shows the cost of the required software and hardware for the project.

Table 5 Requirements

Requirements Cost
Description

1 PC Set at least P 5,000.00 Will be used to operate


200GB ROM the Arduino device.

Arduino Uno Device P 500.00 Will be used as a


system device.
Accessory of Arduino
Potential hydrogen P 1,500.00 that can measure
Sensor potential hydrogen.

Wire DuPont Jumper P 300.00 Will connect the


accessory to the
Arduino.

Programmers fee P 5,000.00

TOTAL COST P 12,300.00

The table above simply shows the payables of the researchers in order for their

device be possible and work properly. Cost and descriptions of each requirements they

used.

40
CHAPTER IV
RESULTS, FINDINGS, AND ANALYSIS

This chapter describes the analysis of data followed by a discussion of the

research findings. The findings relate to the research questions that guided the study.

Data were analyzed to identify, describe and measure the potential hydrogen.

Following are the data that the researchers gathered in order to meet the three

objectives of the study.

In the first objective that aims to create a system with an Arduino device and

potential hydrogen sensor that will replace the potential hydrogen paper and

compute the potential hydrogen level of a liquid substance, from the figure below

that shows that the researchers conducted a thorough research to Prof. Parcon and Dr.

Japson. Wherein, the two experts in subject gave a lot of information and gave ideas to

the researchers that the pH sensor is really possible and could be used to replace to

the manual way of testing. This data is coming from the actual interview to Prof. Parcon

and Dr. Japson made by the researchers.

Findings

The researchers have successfully created a device that will replace the ph paper

to measure the ph level of a liquid substances. However, the device can only be use

one at a time by the students. Unlike ph paper the students can measure at the same

time.

41
Aims to create a system with an Arduino device and potential hydrogen sensor

that will display numerical representation as a result. And the data that was

considered by the researchers are also the data they gathered from the two

professors based from their actual interview.

Findings

The researcher’s finding on the 2nd objective is the results are much faster than

the ph paper. It provides a result in a matter of seconds and it is real-time. Therefore,

people that have an eye-problem can use this device easily.

Table 6 First Test Results


Buffered Solution PH4 PH7 PH10
PH ANALYSIS DEVICE 4 6.70 10.20

DOST 4 7 10

The table above shows that the first test with DOST doesn’t match. Some
adjustment with the system codes are made in order to fix the problem that the
researchers encountered.

Table 7 Second Test Result w/ Adjustments


Buffered Solution PH4 PH7 PH10
DOST 4 7 10
PH ANALYSIS DEVICE 4 7 10.50

The Table 7 Second Test Results with Adjustments the researchers put a
conditional statement in the program so that the device can adjust its own result.

42
Table 8 Final Test Results
Buffered PH4 PH7 PH10
Solution
DOST 4 7 10
PH ANALYSIS DEVICE 4 7 10

Table 9 Final Test Results shows the test result the researcher’s successful
utilization of the proposed device will match result with the DOST device. At the end,
the researchers got the result that the researchers want.

From the third objective of the study, to create data-based software

application that can record students’ information and the data of the laboratories

experiments of the students, the data that the researchers based on are the following

tables of data.

The software application design by the researchers will be a great help not only

on the professors but also on their student in way of recording their laboratory data’s.

However, students features are limited unlike the admin which is the professors have

the maximum control of the software from registration to the students data’s.

43
CHAPTER V
CONCLUSION AND RECOMMENDATIONS
Summa
ry

This solution to the problem improves the way to measure the level of PH on any

water substances. The university uses the traditional way of measuring water

substance. The device was made to replace the traditional way of measuring the

potential hydrogen with software application can record the data every time the device

used to measure the substance.

The study provides system functions with regards to the records of the data of

their laboratories experiments. The proposed software application would be a great help

in managing time and is easier in conducting measurements for laboratory experiments.

The university can benefit financially by implementing this device due to its low cost.

Instead of buying the potential hydrogen device that is in the market which costs P

200,000.00 they can implement this study in a cost efficient way.

Conclusions

After a thorough study of the problem, this proposed study, Potential Hydrogen

Analysis Device would be more productive than the traditional way of measuring the

potential hydrogen. The proponents took the study for improvement of the traditional

way.

Recommendations

Based on the researchers’ findings in the previous way of taking data, the

researchers propose to the client the implementation of the device called “Potential
Hydrogen Analysis device”. Based on the gathered data there are a lot that can be

improved in the said device that will help the client or the end user.

Potential Hydrogen Analysis Device researchers would recommend to the future

researchers to do the following:

 Improve the device by making the device work as a standalone device.

 Include additional facts and functions on the software application.

 To install comparative results generator to the software application so that the

administrator can derive conclusions based on the results given by the

students.

 Provide modifications on the application for compatibility on a network based

system so that the result could be transferred from one computer to another.

46
BIBLIOGRAPHY

C Arbotante(2015).Water Quality in Pampanga River along Barangay Buas in Candaba,

Pampanga

D Cardace(Feb 10, 2015). “Feasible metabolisms in high pH springs of the Philippines”

E4tech Sàrl with Element Energy Ltd. For the Fuel Cells and Hydrogen Joint

Undertaking(February 2014). “Development of Water Electrolysis in the European

Union”

Jun Li,Hongyu Huang,Noriyuki Kobayashi,Zhaohong He,Yoshihiro Nagai(4 January

2014). Study on using hydrogen and ammonia as fuels: Combustion characteristics

and NOx formation

(Nov 8, 2016).EVALUATION OF WATER QUALITY OF MAJOR RIVERS IN

PALAWAN, PHILIPPINES USING PHYSICO-CHEMICAL PARAMETERS AND

WATER QUALITY INDEX

(2014). “Hydrogen potential of antibiotic solutions subjected to

environmental conditions: SSxa preliminary trial”

(2015).“DEFINITION OF pH SCALES, STANDARD REFERENCE

VALUES, MEASUREMENT OF pH AND RELATED TERMINOLOGY”

905 WALNUT HILL DR #1 LONGVIEW, TX 75605


© 2018 ROBERT B. SHELTON, DDS MAGD. ALL RIGHTS RESERVED.

47
https://psa.gov.ph/.../evaluation-water-quality-major-rivers-palawan-philippines-

using... http://onlinelibrary.wiley.com/doi/10.1002/er.3141/abstract

https://www.ncbi.nlm.nih.gov › NCBI › Literature › PubMed Central (PMC)

http://repoa.info/ph-level-of-laundry-detergent/

https://www.sheltondentistry.com/patient-information/ph-values-common-

drinks/

48
APPENDICES

49
Appendix A

50
RO II Forms

51
R01 (5 copies)
Republic of the Philippines
PALAWAN STATE UNIVERSITY
Puerto Princesa City

College of Sciences

APPLICATION FOR DESIGNATION OF RESEARCH ADVISER

Name of Applicants Signature

1. Rosaceña , Reniel V.
2. Anoñuevo , Paul Kevin
3. Aborot, Michelle Mae D.

Department: COMPUTER SCIENCE

Degree: BACHELOR OF SCIENCE IN COMPUTER SCIENCE

Proposed Title of Research: Potential Hydrogen Analysis Device

Proposed Research Adviser: MR. ADONIS AMPONGAN

Date filed:

---------------------------------------------------------------------------------------------------------------------------
(To be filled out by the Faculty member/s concerned)

Noted by: MR. RODOLFO O. ABALUS JR.


CS Research Coordinator

MS. KRISTINE JOY V. MARTINEZ


Department Chairperson

DESIGNATING MR. ADONIS AMPONGAN AS RESEARCH ADVISER.

52
Form R02 II (8 copies)
Republic of the Philippines
PALAWAN STATE UNIVERSITY
Puerto Princesa City

College of Sciences

APPLICATION FOR DESIGNATION OF RESEARCH ADVISER

Name of Applicants Signature

1. Rosaceña , Reniel V.
2. Anoñuevo , Paul Kevin
3. Aborot, Michelle Mae D.
Department: COMPUTER SCIENCE

Degree: BACHELOR OF SCIENCE IN COMPUTER SCIENCE

Proposed Title of Research: Potential Hydrogen Analysis Device

Date filed:
---------------------------------------------------------------------------------------------------------------------------
(To be filled out by the Faculty member/s concerned)

Designating the following faculty as panel members


1. MR .RHAY NIEL D. TACUD
2. MS. AILENE L. SIBAYAN
3. DR. FLOREDITH JEANNE G. ALCID

Noted by:
MR. RODOLFO O. ABALUS JR.
CS Research Coordinator

MS. KRISTINE JOY V. MARTINEZ


Department Chairperson

DESIGNATING MR. ADONIS C. AMPONGAN AS RESEARCH ADVISER.

DR. CARMENCITA G. PALANCA


Dean

53
GRAMMARIAN CERTIFICATE

54
CERTIFICATION

This is to certify that the undersigned has reviewed and went through all the pages of the thesis /
research paper entitled “Potential Hydrogen Analysis Device” by Michelle Aborot, Reniel Rosaceña and
Paul Kevin Añonuevo, aligned with the set of structural rules that govern the composition of sentences,
phrases, and words in the English language.

Signed this 7th day of November in the year of our Lord, 2018 at the College of Arts and Humanities,
Palawan State University, Puerto Princesa City.

Signed:

RIZALDY S. BUSTAMANTE
Grammarian

55
SOURCE CODE

56
SOURCE CODE

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Configuration;

namespace PH
{

public partial class login_form : Form


{
SqlConnection connection;
string connectionstring;
public static string username = "";
public static int admin;

public login_form()
{
InitializeComponent();
connectionstring =
ConfigurationManager.ConnectionStrings["PH.Properties.Settings.databaseConnectionString"].ConnectionStrin
g;

//USED FOR MOVING THE LOGIN_FORM */START


int mouseX = 0, mouseY = 0;
bool mouseDOWN;

private void login_main_panel_MouseDown(object sender, MouseEventArgs e)


{
mouseDOWN = true;
}

private void login_main_panel_MouseMove(object sender, MouseEventArgs e)


{
57
if (mouseDOWN)
{
mouseX = MousePosition.X - 200;
mouseY = MousePosition.Y - 40;

this.SetDesktopLocation(mouseX, mouseY);
}
}

private void login_main_panel_MouseUp(object sender, MouseEventArgs e)


{
mouseDOWN = false;
}

private void button_register_Click(object sender, EventArgs e)


{
check_data();

private void login_form_Load(object sender, EventArgs e)


{
panel_register.Visible = false;
panel_login.BringToFront();
}

private void button_cancel_Click(object sender, EventArgs e)


{
//
panel_register.Visible = false;
panel_login.BringToFront();
}

private void button_submit_Click(object sender, EventArgs e)


{
//
validate_login();

private void btn_reg_Click(object sender, EventArgs e)


{

panel_register.Visible = true;
panel_register.BringToFront();
}

58
private void add_data()
{

string query = "INSERT INTO userdata VALUES


(@firstname,@lastname,@username,@password,@course,@year,@semester)";
using (connection = new SqlConnection(connectionstring))
using (SqlCommand command = new SqlCommand(query, connection))
{
connection.Open();

command.Parameters.AddWithValue("@firstname", textbox_firstname.Text);
command.Parameters.AddWithValue("@lastname", textbox_lastname.Text);
command.Parameters.AddWithValue("@username", textbox_username.Text);
command.Parameters.AddWithValue("@password", textbox_password.Text);
command.Parameters.AddWithValue("@course", combo_course.Text);
command.Parameters.AddWithValue("@year", combo_sem.Text);
command.Parameters.AddWithValue("@semester", combo_year.Text);
command.ExecuteNonQuery();
MessageBox.Show("Saved Successfully!");
connection.Close();
}
}//end of add_data
private void check_data()
{
error1.Visible = false;
error2.Visible = false;
error4.Visible = false;
error5.Visible = false;
error_course.Visible = false;
error_sem.Visible = false;
error_year.Visible = false;

if (textbox_firstname.Text == "")
{
error1.Visible = true;
MessageBox.Show("Firstname field is Empty!");
}
else if (textbox_lastname.Text == "")
{
error2.Visible = true;
MessageBox.Show("Lastname field is Empty!");
}
else if (textbox_username.Text == "")
{
error3.Visible = true;
MessageBox.Show("Username field is Empty!");
}
else if (textbox_password.Text == "")
{
59
error4.Visible = true;
MessageBox.Show("Password field is Empty!");
}
else if (textbox_password.Text.Length < 8)
{
error4.Visible = true;
MessageBox.Show("Password must be 8 characters and above!");
}
else if (combo_course.Text == "")
{
error_course.Visible = true;
MessageBox.Show("Course Field is empty!");
}
else if (combo_sem.Text == "")
{
error_sem.Visible = true;
MessageBox.Show("Semester Field is empty!");
}
else if (combo_year.Text == "")
{
error_year.Visible = true;
MessageBox.Show("Year Field is empty!");
}

else
{
if(textbox_password.Text == textbox_password2.Text)
{
SqlConnection connection = new SqlConnection(connectionstring);
SqlDataAdapter adapter = new SqlDataAdapter("select count(*) from userdata where username
='"+textbox_username.Text+"'", connection);
DataTable dt = new DataTable();
adapter.Fill(dt);

if (dt.Rows[0][0].ToString() == "1")
{
MessageBox.Show("Username already exist!");
textbox_username.Text = "";
error3.Visible = true;
}

else
{
error1.Visible = false;
error2.Visible = false;
error3.Visible = false;
error4.Visible = false;
error5.Visible = false;
error_course.Visible = false;

add_data();
textbox_firstname.Text = textbox_lastname.Text = textbox_username.Text =
60
textbox_password.Text = textbox_password2.Text = combo_course.Text = combo_sem.Text =
combo_year.Text = "";
panel_register.Visible = false;
panel_login.BringToFront();
}

}
else
{
MessageBox.Show("Password does not match!");
textbox_password2.Text = "";
error5.Visible = true;
}

private void button_admin_Click(object sender, EventArgs e)


{
admin_login();

private void validate_login()


{

SqlConnection connection = new SqlConnection(connectionstring);


SqlDataAdapter adapter = new SqlDataAdapter("select count(*) from userdata where username
='"+textbox_login_username.Text+"'and password = '"+textbox_login_password.Text+"'", connection);
DataTable dt = new DataTable();
adapter.Fill(dt);
61
if(textbox_login_username.Text == "" && textbox_login_password.Text == "")
{
MessageBox.Show("Field is Empty!", "INCORRECT", MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
else if (dt.Rows[0][0].ToString() == "1")
{
admin = 1;
username = textbox_login_username.Text;
textbox_login_username.Text = textbox_login_password.Text = "";
this.Hide();
MAIN_FORM main = new MAIN_FORM();
main.Show();

else
{
MessageBox.Show("Please Enter correct username and password", "INCORRECT",
MessageBoxButtons.OK, MessageBoxIcon.Error);
textbox_login_username.Text = textbox_login_password.Text = "";
}

}//end of validate_login

private void pictureBox1_Click(object sender, EventArgs e)


{

private void label5_Click(object sender, EventArgs e)


{

private void error_course_Click(object sender, EventArgs e)


{

private void panel_register_Paint(object sender, PaintEventArgs e)


{

private void admin_login()


{

SqlConnection connection = new SqlConnection(connectionstring);


SqlDataAdapter adapter = new SqlDataAdapter("select count(*) from admin where Admin_username
62
='"+textbox_login_username.Text+"'and Admin_password = '"+textbox_login_password.Text+"'",connection);
DataTable dt = new DataTable();
adapter.Fill(dt);

if (textbox_login_username.Text == "" && textbox_login_password.Text == "")


{
MessageBox.Show("Field is Empty!", "INCORRECT", MessageBoxButtons.OK,
MessageBoxIcon.Error);
}
else if (dt.Rows[0][0].ToString() == "1")
{
admin = 2;
username = textbox_login_username.Text;
textbox_login_username.Text = textbox_login_password.Text = "";
this.Hide();
MAIN_FORM main = new MAIN_FORM();
main.Show();

else
{

MessageBox.Show("ADMIN ACCOUNT NOT FOUND", "INCORRECT", MessageBoxButtons.OK,


MessageBoxIcon.Error);
textbox_login_username.Text = textbox_login_password.Text = "";
}

}//end of validate_login

}
}
SOURCE CODE MAIN_FORM

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.SqlClient;
using System.Configuration;
using iTextSharp.text.pdf;
using iTextSharp.text;
63
using System.IO;

namespace PH
{
public partial class MAIN_FORM : Form
{
SqlConnection connection;
string connectionstring;
bool test = false;
bool bool_delete = false;
bool bool_export = false;
DataTable user = new DataTable();
string ph_value;

public MAIN_FORM()
{
InitializeComponent();
connectionstring =
ConfigurationManager.ConnectionStrings["PH.Properties.Settings.databaseConnectionString"].ConnectionStrin
g;
admin_controls();
}

//USED FOR MOVING THE LOGIN_FORM */START


int mouseX = 0, mouseY = 0;
bool mouseDOWN;

void ExportDataTableToPdf(DataTable dtblTable, String strPdfPath, string strHeader)


{
System.IO.FileStream fs = new FileStream(strPdfPath, FileMode.Create, FileAccess.Write,
FileShare.None);
Document document = new Document();
document.SetPageSize(iTextSharp.text.PageSize.A2);
PdfWriter writer = PdfWriter.GetInstance(document, fs);
document.Open();

iTextSharp.text.Image PSU = iTextSharp.text.Image.GetInstance("D:\\PSU.jpg");


PSU.ScalePercent(45f);

64
PSU.SetAbsolutePosition(350f, 1565f);//1558
document.Add(PSU);

iTextSharp.text.Image CS = iTextSharp.text.Image.GetInstance("D:\\CS LOGO.jpg");


CS.ScalePercent(43f);
CS.SetAbsolutePosition(730f, 1565f);//1558

document.Add(CS);
//iTextSharp.text.Image CS = iTextSharp.text.Image.GetInstance();

//Report Header
BaseFont bfntHead = BaseFont.CreateFont(BaseFont.TIMES_ROMAN, BaseFont.CP1252,
BaseFont.NOT_EMBEDDED);
iTextSharp.text.Font fntHead = new iTextSharp.text.Font(bfntHead, 16, 1,
iTextSharp.text.Color.BLACK);
Paragraph prgHeading = new Paragraph();
prgHeading.Alignment = Element.ALIGN_CENTER;
prgHeading.Add(new Chunk(strHeader.ToUpper(), fntHead));
document.Add(prgHeading);

//Author
Paragraph prgAuthor = new Paragraph();
BaseFont btnAuthor = BaseFont.CreateFont(BaseFont.TIMES_ROMAN, BaseFont.CP1252,
BaseFont.NOT_EMBEDDED);
iTextSharp.text.Font fntAuthor = new iTextSharp.text.Font(btnAuthor, 13, 1,
iTextSharp.text.Color.BLACK);
prgAuthor.Alignment = Element.ALIGN_RIGHT;
// prgAuthor.Add(new Chunk("Admin : Admin", fntAuthor));
prgAuthor.Add(new Chunk("\nDate : " + DateTime.Now.ToShortDateString(), fntAuthor));
document.Add(prgAuthor);

//Add a line seperation


Paragraph p = new Paragraph(new Chunk(new iTextSharp.text.pdf.draw.LineSeparator(0.0F, 100.0F,
iTextSharp.text.Color.BLACK, Element.ALIGN_LEFT, 1)));
document.Add(p);

//Add line break


document.Add(new Chunk("\n", fntHead));

//Write the table


PdfPTable table = new PdfPTable(dtblTable.Columns.Count);

//Table header
BaseFont btnColumnHeader = BaseFont.CreateFont(BaseFont.TIMES_ROMAN, BaseFont.CP1252,
BaseFont.NOT_EMBEDDED);
iTextSharp.text.Font fntColumnHeader = new iTextSharp.text.Font(btnColumnHeader, 10, 1,
iTextSharp.text.Color.WHITE);
for (int i = 0; i < dtblTable.Columns.Count; i++)
{
PdfPCell cell = new PdfPCell();

65
cell.BackgroundColor = iTextSharp.text.Color.BLACK;
cell.AddElement(new Chunk(dtblTable.Columns[i].ColumnName.ToUpper(), fntColumnHeader));
table.AddCell(cell);
}
//table Data
for (int i = 0; i < dtblTable.Rows.Count; i++)
{
for (int j = 0; j < dtblTable.Columns.Count; j++)
{
table.AddCell(dtblTable.Rows[i][j].ToString());
}
}

document.Add(table);
document.Close();
writer.Close();
fs.Close();
}

private void admin_controls()


{
if (login_form.admin == 2)
{
button3.Visible = true;
button4.Visible = true;
pictureBox1.Visible = true;
button_delete.Visible = true;

button_sem.Visible = true;
button_year.Visible = true;
button_Course.Visible = true;

}
else
{
button_delete.Visible = false;
pictureBox1.Visible = false;
button3.Visible = false;
button4.Visible = false;
button_sem.Visible = false;
button_year.Visible = false;
button_Course.Visible = false;

66
}
}

private void button_logout_Click(object sender, EventArgs e)


{
DialogResult result = MessageBox.Show("ARE YOU SURE YOU WANT TO LOGOUT?", "LOGOUT",
MessageBoxButtons.YesNo, MessageBoxIcon.Warning);

if (result == DialogResult.Yes)
{
ph_timer.Enabled = false;
timer_time.Enabled = false;
this.Hide();
login_form main = new login_form();
main.Show();
ph_port.Close();
label_status.Text = ph_output.Text = textbox_data_name.Text = "";
}

private void MAIN_FORM_Load(object sender, EventArgs e)


{

get_ports();
//bool student = login_form.student;

label_greetings.Text = "Hi " + login_form.username + "!";


timer_time.Enabled = true;

admin_panel.Visible = false;
students_Panel.BringToFront();
get_ports();

private void get_ports()


{
foreach (string s in System.IO.Ports.SerialPort.GetPortNames())
{
combo_ports.Items.Add(s);
}

private void ph_timer_Tick(object sender, EventArgs e)


67
{

ph_output.Text = ph_port.ReadLine().ToString();

//pase
// Double test = Convert.ToDouble(ph_port.ReadLine());
// float output = ph_port.ReadLine().floa();

private void button_test_Click(object sender, EventArgs e)


{
if (test == true)
{

if(ph_port.IsOpen == true)
{
MessageBox.Show("DEVICE STATUS:CONNECTED", "STATUS", MessageBoxButtons.OK,
MessageBoxIcon.Information);
}
else
{
ph_port.Open();
ph_timer.Enabled = true;
}
}
else
{
MessageBox.Show("PLEASE CHOOSE A
PORT!","ERROR",MessageBoxButtons.OK,MessageBoxIcon.Information);
}

private void button_save_Click(object sender, EventArgs e)


{

68
float test = float.Parse(ph_output.Text);
//MessageBox.Show(test.ToString());

if (test > 7.00)


{
label_status.Text = "Base";
}
else if( test == 7.00)
{
label_status.Text = "Neutral";
}
else
{
label_status.Text = "Acid";
}
// label_timer.Text = x.ToString();

if (ph_port.IsOpen == true)
{
if (textbox_data_name.Text == "")
{
MessageBox.Show("Enter data name first!", "ERROR", MessageBoxButtons.OK,
MessageBoxIcon.Information);
}
else
{
ph_timer.Enabled = false;
ph_port.Close();
save_experiment();
}

}
else
{
MessageBox.Show("CLICK TEST FIRST!", "ERROR", MessageBoxButtons.OK,
69
MessageBoxIcon.Information);
}

private void save_experiment()


{

string query = "INSERT INTO ph_user_data VALUES


(@ph_result,@date,@dataname,@username,@status)";
using (connection = new SqlConnection(connectionstring))
using (SqlCommand command = new SqlCommand(query, connection))
{
connection.Open();

command.Parameters.AddWithValue("@ph_result", ph_output.Text);
command.Parameters.AddWithValue("@date", DateTime.Now.ToString("MM/dd/yyyy H:mm"));
command.Parameters.AddWithValue("@dataname", textbox_data_name.Text);
command.Parameters.AddWithValue("@username", login_form.username);

command.Parameters.AddWithValue("@status", label_status.Text);

command.ExecuteNonQuery();
MessageBox.Show("Saved Successfully!");
connection.Close();

private void delete()


{
if(bool_delete == true)
{
70
DialogResult result = MessageBox.Show("ARE YOU SURE YOU WANT TO DELETE THIS DATA?
NOTE: ALL OF THE EXPERIMENT OF THIS USER WILL BE LOST!", "DELETE", MessageBoxButtons.YesNo,
MessageBoxIcon.Warning);

if (result == DialogResult.Yes)
{
int index = dataGrid_students.CurrentRow.Index;

SqlConnection connection = new SqlConnection(connectionstring);


SqlDataAdapter adapter = new SqlDataAdapter("select username from userdata where ID = '" +
user.Rows[index][0].ToString() + "'", connection);
DataTable dt = new DataTable();
adapter.Fill(dt);
if(dt.Rows.Count == 0)
{
MessageBox.Show("NO DATA AVAILABLE!");
}
else
{
{

using (connection = new SqlConnection(connectionstring))


using (SqlCommand command = new SqlCommand("DELETE userdata where username ='"
+ dt.Rows[0][0].ToString() + "'", connection))
{
connection.Open();
command.ExecuteNonQuery();
MessageBox.Show("Deleted Successfully!");
connection.Close();
show_admin();

SqlDataAdapter adapter4 = new SqlDataAdapter("select username from ph_user_data where


ID = '" + dt.Rows[0][0].ToString() + "'", connection);
DataTable dt4 = new DataTable();
adapter.Fill(dt4);
if (dt4.Rows.Count == 0)
{
MessageBox.Show("NO DATA AVAILABLE!");
}
else
{
using (SqlCommand command2 = new SqlCommand("DELETE ph_user_data where
username ='" + dt.Rows[0][0].ToString() + "'", connection))
{
connection.Open();
command2.ExecuteNonQuery();
MessageBox.Show("Deleted Successfully!");
connection.Close();
show_admin();

71
}

}
}

}
else
{
MessageBox.Show("UPDATE YOUR DATA FIRST", "UPDATE", MessageBoxButtons.OK,
MessageBoxIcon.Warning);
}
}
}

private void button1_Click(object sender, EventArgs e)


{

if (login_form.admin == 2)
{
show_admin();

}
else
{
show_student();
}

private void timer_time_Tick(object sender, EventArgs e)


{
label_date.Text = DateTime.Now.ToLongDateString();
label_time.Text = DateTime.Now.ToLongTimeString();

private void button_view_Click(object sender, EventArgs e)


{
/*
if (login_form.admin == 2)
{
// students_Panel.Visible = false;
admin_panel.BringToFront();
admin_panel.Visible = true;
MessageBox.Show("ADMIN!!");

72
}
else
{
admin_panel.Visible = false;
students_Panel.BringToFront();

MessageBox.Show("students!");

}
*/
admin_panel.BringToFront();
admin_panel.Visible = true;

private void show_student()


{

SqlConnection connection = new SqlConnection(connectionstring);


SqlDataAdapter adapter = new SqlDataAdapter("select firstname AS FIRSTNAME,lastname AS
LASTNAME,course AS COURSE from userdata where username = '"+login_form.username+"'", connection);
DataTable user = new DataTable();
adapter.Fill(user);
dataGrid_students.DataSource = user;

SqlDataAdapter adapter2 = new SqlDataAdapter("select p.username AS USERNAME ,p.data_name AS


DATA, p.ph_result AS RESULT,p.status AS STATUS , p.date AS DATE from ph_user_data p ,userdata u
where u.username = p.username and p.username ='" + login_form.username + "'ORDER BY DATE DESC",
connection);

DataTable dt2 = new DataTable();


adapter2.Fill(dt2);
dataGrid_results.DataSource = dt2;
}

private void show_admin()


{

SqlConnection connection = new SqlConnection(connectionstring);

SqlDataAdapter adapter = new SqlDataAdapter("select Id, firstname AS FIRSTNAME , lastname AS


LASTNAME , course AS COURSE , username AS USERNAME , password AS PASSWORD from userdata",
connection);
DataTable userdata = new DataTable();
adapter.Fill(userdata);
adapter.Fill(user);
dataGrid_students.DataSource = userdata;

73
if (user.Rows.Count == 0)
{
MessageBox.Show("NO DATA AVAILABLE!","DATA NOT
FOUND",MessageBoxButtons.OK,MessageBoxIcon.Information);
bool_delete = false;
bool_export = false;
}
else
{
bool_delete = true;
bool_export = true;
}

private void dataGrid_students_CellContentClick(object sender, DataGridViewCellEventArgs e)


{

}
private void datalink()
{

int index = dataGrid_students.CurrentRow.Index ;


//MessageBox.Show(index.ToString());
SqlConnection connection = new SqlConnection(connectionstring);
SqlDataAdapter adapter = new SqlDataAdapter("select username from userdata where Id
='"+user.Rows[index][0].ToString()+"'",connection);

DataTable dt = new DataTable();


// MessageBox.Show(dt.Rows[index][0].ToString());
adapter.Fill(dt);

if (dt.Rows.Count == 0)
{

}
else
{

SqlDataAdapter adapter2 = new SqlDataAdapter("select p.username AS USERNAME ,p.data_name


AS DATA , p.ph_result AS RESULTS , p.date AS DATE from ph_user_data p where p.username
='"+dt.Rows[0][0].ToString()+"'ORDER BY DATE DESC", connection);
DataTable dt2 = new DataTable();
adapter2.Fill(dt2);
74
dataGrid_results.DataSource = dt2;
if(dt2.Rows.Count == 0)
{
MessageBox.Show("NO DATA AVAILABLE!");
}

private void button_testph_Click(object sender, EventArgs e)


{

admin_panel.Visible = false;
students_Panel.BringToFront();
}

private void button_refresh_Click(object sender, EventArgs e)


{
get_ports();
}

private void label_timer_Click(object sender, EventArgs e)


{

private void button_connect_Click(object sender, EventArgs e)


{
if (combo_ports.Text == "")
{

MessageBox.Show("Please choose a port ", "PORT NOT FOUND!", MessageBoxButtons.OK,


MessageBoxIcon.Error);
label_stats.Text = "Not Connected";

test = false;

}
else
{

ph_port.PortName = combo_ports.Text;
75
label_stats.Text = "Connected";
test = true;

private void button2_Click(object sender, EventArgs e)


{
label_status.Text = ph_output.Text = textbox_data_name.Text = "";
MessageBox.Show("DONT FORGET TO CLEAN THE SENSOR", "CLEAN", MessageBoxButtons.OK,
MessageBoxIcon.Warning);
ph_timer.Enabled = false;
timer_time.Enabled = false;
ph_port.Close();
this.Hide();
MAIN_FORM main = new MAIN_FORM();
main.Show();
}

private void button_delete_Click(object sender, EventArgs e)


{
delete();

private void export_to_pdf()


{
DialogResult result = MessageBox.Show("ARE YOU SURE YOU WANT TO EXPORT THE DATA?
NOTE: This might take a while", "EXPORT", MessageBoxButtons.YesNo, MessageBoxIcon.Information);

if (result == DialogResult.Yes)
{
if (bool_export == true)
{
SqlConnection connection = new SqlConnection(connectionstring);
// SqlDataAdapter adapter3 = new SqlDataAdapter("select u.firstname AS FIRSTNAME ,
u.lastname AS LASTNAME , u.course , u.year , u.semester , p.data_name , p.ph_result, p.status , p.date from
userdata u , ph_user_data p where u.username = p.username", connection);
SqlDataAdapter adapter3 = new SqlDataAdapter("select u.firstname AS FIRSTNAME , u.lastname
76
AS LASTNAME , p.data_name AS EXPERIMENT , p.ph_result AS PH, p.status AS STATUS , p.date AS DATE
from userdata u , ph_user_data p where u.username = p.username", connection);
DataTable dt3 = new DataTable();
adapter3.Fill(dt3);
data_export.DataSource = dt3;

ExportDataTableToPdf(dt3, @"D:\test.pdf", "Palawan State University\nPH ANALYSIS DEVICE


RESULTS\nPuerto Princesa City");
}

else
{
bool_export = false;
MessageBox.Show("NO DATA AVAILABLE!");
}

private void export_to_Excel()


{
DialogResult result = MessageBox.Show("ARE YOU SURE YOU WANT TO EXPORT THE DATA?
NOTE: This might take a while", "EXPORT", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
if(result == DialogResult.Yes)
{
if (bool_export == true)
{

SqlConnection connection = new SqlConnection(connectionstring);


SqlDataAdapter adapter3 = new SqlDataAdapter("select u.firstname AS FIRSTNAME , u.lastname
AS LASTNAME , u.course AS COURSE , u.year AS YEAR , u.semester AS SEMESTER, p.data_name AS
DATA , p.ph_result AS RESULT, p.status AS STATUS , p.date AS DATE from userdata u , ph_user_data p
where u.username = p.username", connection);
77
DataTable dt3 = new DataTable();
adapter3.Fill(dt3);
data_export.DataSource = dt3;

Microsoft.Office.Interop.Excel._Application app = new Microsoft.Office.Interop.Excel.Application();


Microsoft.Office.Interop.Excel._Workbook workbook = app.Workbooks.Add(Type.Missing);
Microsoft.Office.Interop.Excel._Worksheet worksheet = null;
worksheet = workbook.Sheets["Sheet1"];
worksheet = workbook.ActiveSheet;
worksheet.Name = "PH_OUTPUT";

for (int x = 1; x < data_export.Columns.Count + 1; x++)


{
worksheet.Cells[1, x] = data_export.Columns[x - 1].HeaderText;
}
for (int i = 0; i < data_export.Rows.Count - 1; i++)

{
for (int j = 0; j < data_export.Columns.Count; j++)

worksheet.Cells[i + 2, j + 1] = data_export.Rows[i].Cells[j].Value.ToString();

var saveFileDialogue = new SaveFileDialog();


saveFileDialogue.InitialDirectory = @"C:\";
saveFileDialogue.Title = "Browse Text Files";
saveFileDialogue.FileName = "Output";
saveFileDialogue.CheckFileExists = true;
saveFileDialogue.DefaultExt = ".pdf";
MessageBox.Show(saveFileDialogue.ToString());

if (saveFileDialog1.ShowDialog() == DialogResult.OK)
{

workbook.SaveAs(saveFileDialogue.FileName, Type.Missing, Type.Missing, Type.Missing,


Type.Missing, Type.Missing, Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlExclusive, Type.Missing,
Type.Missing, Type.Missing, Type.Missing, Type.Missing);

}
app.Quit();
78
}
else
{
bool_export = false;
MessageBox.Show("NO DATA AVAILABLE!");
}

private void button3_Click(object sender, EventArgs e)


{
export_to_pdf();
// export_to_Excel();
}

private void panel1_MouseDown(object sender, MouseEventArgs e)


{
mouseDOWN = true;
}

private void panel1_MouseMove(object sender, MouseEventArgs e)


{
if (mouseDOWN)
{
mouseX = MousePosition.X - 200;
mouseY = MousePosition.Y - 40;

this.SetDesktopLocation(mouseX, mouseY);
}
}

private void panel1_MouseUp(object sender, MouseEventArgs e)


{
mouseDOWN = false;
}

private void dataGrid_students_Click(object sender, EventArgs e)


{
if (login_form.admin == 2)
{
datalink();
}
}
79
private void combo_ports_SelectedIndexChanged(object sender, EventArgs e)
{

private void data_export_CellContentClick(object sender, DataGridViewCellEventArgs e)


{

private void label10_Click(object sender, EventArgs e)


{

private void button_sem_Click(object sender, EventArgs e)


{

SqlConnection connection = new SqlConnection(connectionstring);

SqlDataAdapter adapter = new SqlDataAdapter("select semester AS SEMESTER,firstname AS


FIRSTNAME,lastname AS LASTNAME from userdata ORDER by semester ", connection);
DataTable userdata = new DataTable();
adapter.Fill(userdata);
adapter.Fill(user);
dataGrid_students.DataSource = userdata;
}

private void button_year_Click(object sender, EventArgs e)


{
SqlConnection connection = new SqlConnection(connectionstring);

SqlDataAdapter adapter = new SqlDataAdapter("select year AS YEAR,firstname AS


FIRSTNAME,lastname AS LASTNAME from userdata ORDER by year ", connection);
DataTable userdata = new DataTable();
adapter.Fill(userdata);
adapter.Fill(user);
dataGrid_students.DataSource = userdata;
}

private void button_Course_Click(object sender, EventArgs e)


{
SqlConnection connection = new SqlConnection(connectionstring);

SqlDataAdapter adapter = new SqlDataAdapter("select course AS COURSE,firstname AS


FIRSTNAME,lastname AS LASTNAME from userdata ORDER by course ", connection);
DataTable userdata = new DataTable();
adapter.Fill(userdata);
adapter.Fill(user);
dataGrid_students.DataSource = userdata;
}
80
private void button4_Click(object sender, EventArgs e)
{
export_to_Excel();
}

private void label_date_Click(object sender, EventArgs e)


{

}
}
}

81
This shows the process in the existing system which is the manual testing

of the pH. Including the cost and benefit from the tables 7 and 8 below that

shows the computation per month and per year.

Course Quantity

Environmental Science 72

Young Biologist Association 50

Young Farmers Organization 30

Total number of students 152

Students Lab = 4 times per month


Class = 12 times per semester

School Year = 8 months equivalent to 1 school year


(4 months, holidays, school events, semestral break,
local and national holidays)

Strips P 5.00 Per strips

Usage of 152
students for 3 P 2,280 Per course
courses

Total P 11,400

Strips P 14,592 Strips used

82
Usage of 152 P 72,960
students for 3
courses

Total P 72,960

Computation
1 student: 3 strips per laboratory class
14,592 strips used per year
3 strips x 152 students P 2,280
456 strips per laboratory class

456 x 4 laboratory class


1,824 strips per month P 9,120

1,824 x 8 month
14,592 strips used per year P 72,960

Total Cost P 72,960

Benefits
Cost of Device - 12,300
Maintenance Yearly – 15,000

P 27,300

Existing Cost - 72,960 per year


New Cost - 27,300 per year

P 45,660 per year

Return of Investment

ROI = Benefits or Return


Cost of Investment

= answer x 100
= % (This is the percentage save by the Collage of Sciences in
PH Testing Laboratory)

ROI= Net Profit / Total Investment


ROI= 45,660 / 72,960 * 100
ROI= .62 * 100

83
ROI= 62%

84
Appendix B

85
Request Letter for Interview & Surveys

86
DR. CARMENCITA G.PALANCA

Dean

College of Sciences

Palawan State University - Main

Campus Ma'am;

We, students of Palawan State University taking up Bachelor of Science in Computer

Science are currently conducting a research entitled "Potential Hydrogen Analysis

Device" as a requirement for our Thesis. We are writing to ask permission to conduct a

research in your college, do interviews using guide questions with your students and

faculty as well as distribute instruments which will be needed for the success of this

research.

Your complete cooperation will be helpful. Rest assured that the data we are collecting

will be treat as confidential information.

Thank you and God bless your office!

Respectfully;

Paul Kevin

Añonuevo

Researcher

RenielRosaceña

Researcher

Michelle Mae

Aborot Researcher

87
Appendix C

88
Republic of the Philippines

Palawan State University

Puerto Princesa City, Palawan

Name: Paul Kevin Añonuevo


Address: Kalikasan Mutual homes,
Puerto Princesa City, Palawan
Date of Birth: January 16, 1995
Place of Birth: San Vicente, Palawan
Parents:
Father: Mr. Eduardo Relado

Mother: Mrs. Emily Santos

EDUCATIONAL ATTAINMENT:

Elementary: New Guinlo Elementary School


Taytay, Palawan
2001-2006
Secondary: San Miguel National High School
Brgy. San Miguel, Puerto Princesa City
2007-2011
Tertiary: Bachelor of Science in Computer Science
Palawan State University
Tiniguiban Heights, Puerto Princesa City
2015-Present

89
Republic of the Philippines
Palawan State University
Puerto Princesa City, Palawan

Name: Reniel Rosaceña


Address: Barangay San Jose,
Puerto Princesa City, Palawan
Date of Birth: May 17, 1998
Place of Birth: Puerto Princesa City
Parents:
Father: Mr. Rene V. Rosaceña
Mother: Mrs.Meriam V. Rosaceña
EDUCATIONAL ATTAINMENT:
Elementary: Palawan State University –LES
Tiniguiban Heights, Puerto Princesa City
2004-2010
Secondary: PSU-LHS
Tiniguiban Heights, Puerto Princesa City
2010-2014
Tertiary: Bachelor of Science in Computer Science
Palawan State University
Tiniguiban Heights, Puerto Princesa City
2015-Present

90
Republic of the Philippines
Palawan State University
Puerto Princesa City, Palawan

Name: Michelle Mae D. Aborot


Address: Barangay Santa Monica,
Puerto Princesa City, Palawan
Date of Birth: August 10, 1987
Place of Birth: Brgy. Manggahan, Puerto Princesa City
Parents: Mr. Bernie Del Rosario Aborot
Mrs. Gloria Duran Aborot
EDUCATIONAL ATTAINMENT:
Elementary: East Central School
Puerto Princesa City
1999-2000
Secondary: Palawan National School
Puerto Princesa City
2003-2004
Tertiary: Bachelor of Science in Computer Science
Palawan State University
Tiniguiban Heights, Puerto Princesa City
2015-Present

91

You might also like