5
@ IJTSRD | Available Online @ www ISSN No: 245 Inte R Microcontroller-Based Lect University ABSTRACT Increase in temperature may also lead in the number of ions in solution dissociation of molecules. As pH is a m hydrogen ion concentration, a cha temperature of a solution will be re subsequent changein pH. In addition temperature will also have an influ measure in sensor used. The temperatu pH probe are used in conjuncti o microcontroller circuit to measure vari and temperature ranges. The Liqid C (LCD) module is interfaced to display results. Several different testing method for measuring temperature values. For of the temperature values, it is crucial right DS18B20 Digital Temperature S meter measures the potential differe between the electrodes and converts it t pH. Keywords: PIC16F887microcontroller temperature sensor, The Liqid Cristal D module. 1. INTRODUCTION Water quality testing is an impor environmental monitoring. Accurate pH is required by adjusting the pH before se community sewer system. (“Definition Testing Tools,” n.d.). Almost all processes containing water h pH measurement. Most living things proper pH level to sustain life. This val between 5 and 9 pH, but can vary from w.ijtsrd.com | Volume – 2 | Issue – 5 | Jul-Aug 56 - 6470 | www.ijtsrd.com | Volum ernational Journal of Trend in Sc Research and Development (IJT International Open Access Journ d Temperature and pH Measu Cho Cho Myint turer, Department of Natural Science of Computer Studies, Mandalay, Myanmar to an increase n due to the measure of the hange in the eflected by a n, changes in uence on the ure sensor and on with the ious pH levels Cristal Display the measured ds are available r measurement to choose the Sensor. A pH ence (in mV) to a display of r, pH sensor, Display (LCD) rtant part of H measurement ending it to the of pH and pH have a need for depend on a lue is typically m area to area. The photograph of the KAD Model - MT8060, is shown in Figure: 1 KADY pH met 2. The Block Diagram of th The block diagram of the cons in Figure 2. It consists of fiv sensor, temperature sensor, The Liqid Cristal Display- LC supply circuit. The pH sensor level of a liquid and produce voltage is amplified and sent circuit. The temperature senso temperature of a liquid. Meas microcontroller circuit. The processes on measured data a Liqid Cristal Display-LCD mo circuit is used to supply nece sections. 2018 Page: 694 me - 2 | Issue 5 cientific TSRD) nal uring System DY pH tester / meter, Figure1. ter, Model - MT80 he Whole System structed system is shown ve main blocks. The pH microcontroller circuit, CD module and power r (probe) detects the pH es a small voltage. The t to the microcontroller or is used to measure the sured data is sent to the microcontroller circuit and then sent to the The odule. The power supply essary voltages to other

Microcontroller-Based Temperature and pH Measuring System

  • Upload
    ijtsrd

  • View
    7

  • Download
    0

Embed Size (px)

DESCRIPTION

Increase in temperature may also lead to an increase in the number of ions in solution due to the dissociation of molecules. As pH is a measure of the hydrogen ion concentration, a change in the temperature of a solution will be reflected by a subsequent changein pH. In addition, changes in temperature will also have an influence on the measure in sensor used. The temperature sensor and pH probe are used in conjunction with the microcontroller circuit to measure various pH levels and temperature ranges. The Liqid Cristal Display LCD module is interfaced to display the measured results. Several different testing methods are available for measuring temperature values. For measurement of the temperature values, it is crucial to choose the right DS18B20 Digital Temperature Sensor. A pH meter measures the potential difference in mV between the electrodes and converts it to a display of pH. Cho Cho Myint "Microcontroller-Based Temperature and pH Measuring System" Published in International Journal of Trend in Scientific Research and Development (ijtsrd), ISSN: 2456-6470, Volume-2 | Issue-5 , August 2018, URL: https://www.ijtsrd.com/papers/ijtsrd15926.pdf Paper URL: http://www.ijtsrd.com/physics/other/15926/microcontroller-based-temperature-and-ph-measuring-system/cho-cho-myint

Citation preview

Page 1: Microcontroller-Based Temperature and pH Measuring System

@ IJTSRD | Available Online @ www.ijtsrd.com

ISSN No: 2456

InternationalResearch

Microcontroller-Based

LecturerUniversity of Computer Studies, Mandalay, Myanmar

ABSTRACT Increase in temperature may also lead to an increase in the number of ions in solution due to the dissociation of molecules. As pH is a measure of the hydrogen ion concentration, a change in the temperature of a solution will be reflected by a subsequent changein pH. In addition, changes in temperature will also have an influence on the measure in sensor used. The temperature sensor and pH probe are used in conjunction with the microcontroller circuit to measure various pH levels and temperature ranges. The Liqid Cristal Display (LCD) module is interfaced to display the measured results. Several different testing methods are available for measuring temperature values. For measurement of the temperature values, it is crucial to choose the right DS18B20 Digital Temperature Sensor.meter measures the potential difference (in mV) between the electrodes and converts it to a display of pH. Keywords: PIC16F887microcontroller, pH sensor, temperature sensor, The Liqid Cristal Display (LCD) module. 1. INTRODUCTION Water quality testing is an important part of environmental monitoring. Accurate pH measurement is required by adjusting the pH before sending it to the community sewer system. (“Definition of pH and pH Testing Tools,” n.d.). Almost all processes containing water have a need for pH measurement. Most living things depend on a proper pH level to sustain life. This value is typically between 5 and 9 pH, but can vary from area to area.

@ IJTSRD | Available Online @ www.ijtsrd.com | Volume – 2 | Issue – 5 | Jul-Aug 2018

ISSN No: 2456 - 6470 | www.ijtsrd.com | Volume

International Journal of Trend in Scientific Research and Development (IJTSRD)

International Open Access Journal

Based Temperature and pH MeasuringCho Cho Myint

Lecturer, Department of Natural Science University of Computer Studies, Mandalay, Myanmar

Increase in temperature may also lead to an increase in the number of ions in solution due to the dissociation of molecules. As pH is a measure of the

concentration, a change in the temperature of a solution will be reflected by a subsequent changein pH. In addition, changes in

have an influence on the measure in sensor used. The temperature sensor and

on with the microcontroller circuit to measure various pH levels and temperature ranges. The Liqid Cristal Display (LCD) module is interfaced to display the measured

Several different testing methods are available For measurement

values, it is crucial to choose the right DS18B20 Digital Temperature Sensor. A pH meter measures the potential difference (in mV) between the electrodes and converts it to a display of

oller, pH sensor, The Liqid Cristal Display (LCD)

Water quality testing is an important part of environmental monitoring. Accurate pH measurement is required by adjusting the pH before sending it to the

(“Definition of pH and pH

Almost all processes containing water have a need for pH measurement. Most living things depend on a

s value is typically between 5 and 9 pH, but can vary from area to area.

The photograph of the KADY Model - MT8060, is shown in Figure1.

Figure: 1 KADY pH meter, Model 2. The Block Diagram of the Whole SystemThe block diagram of the constructed system is shown in Figure 2. It consists of five main blocks. The pH sensor, temperature sensor, microcontroller circuit, The Liqid Cristal Display-LCD module and power supply circuit. The pH sensor (probe) detects the pH level of a liquid and produces a small voltage. The voltage is amplified and sent to the microcontroller circuit. The temperature sensor is used to measure the temperature of a liquid. Measured data is sent to the microcontroller circuit. The microcontroller circuit processes on measured data and then sent to the Liqid Cristal Display-LCD module. The power supply circuit is used to supply necessary voltages to other sections.

Aug 2018 Page: 694

6470 | www.ijtsrd.com | Volume - 2 | Issue – 5

Scientific (IJTSRD)

International Open Access Journal

Measuring System

KADY pH tester / meter, is shown in Figure1.

KADY pH meter, Model - MT80

The Block Diagram of the Whole System The block diagram of the constructed system is shown in Figure 2. It consists of five main blocks. The pH sensor, temperature sensor, microcontroller circuit,

LCD module and power supply circuit. The pH sensor (probe) detects the pH level of a liquid and produces a small voltage. The voltage is amplified and sent to the microcontroller circuit. The temperature sensor is used to measure the

d. Measured data is sent to the microcontroller circuit. The microcontroller circuit processes on measured data and then sent to the The

LCD module. The power supply circuit is used to supply necessary voltages to other

Page 2: Microcontroller-Based Temperature and pH Measuring System

International Journal of Trend in Scientific Research and Development (IJTSRD) ISSN: 2456-6470

@ IJTSRD | Available Online @ www.ijtsrd.com | Volume – 2 | Issue – 5 | Jul-Aug 2018 Page: 695

Figure: 2 the block diagram of the whole system

3. DS18B20 Digital Temperature Sensor The DS18B20 digital provides 9-bit to 12-bit Celsius temperature measurements. The DS18B20 communicates over a 1-Wire bus that by definition requires only one data line (and ground) for communication with a central microprocessor. Each DS18B20 has a unique 64-bit serial code, which allows multiple DS18B20s to function on the same 1-Wire bus. Thus, it is simple to use one microprocessor to control many DS18B20s distributed over a large area. The DS18B20 output temperature data is calibrated in degrees Celsius; for Fahrenheit applications, a lookup table or conversion routine must be used. The temperature data is stored as a 16-bit sign-extended two’s complement number in the temperature register. The sign bits (S) indicate if the temperature is positive or negative: The DS18B20 can be powered by an external supply on the VDD pin, or it can operate in “parasite power” mode, which allows the DS18B20 to function without a local external supply. Parasite power is very useful for applications that require remote temperature sensing or that is very space constrained. The photograph of the DS18B20 digital temperature sensor is shown in Figure 3.

Figure:3 DS18B20 Digital Temperature Sensor

4. The pH Probe The pH probe is an essential component in the measurement of the pH level (“PH Electrode Probe BNC Connector for Aquarium PH Control Meter Sensor,” 2016). For optimal pH measurement it is crucial to choose the right pH probe for each application. The most important sample criteria are: chemical composition, homogeneity, temperature, process pressure, pH range and container size. The pH probe (Riddle, 2013) used in this research work is shown in Figure 4. The ideal pH probe output at different temperatures is shown in figure 5.

Figure: 4 The pH electrode probe with BNC connector

Figure: 5 the ideal pH probe output at different

temperatures 5. PIC16F887 Hardware The microcontroller is simply a computer on a chip. It is one of the most important developments in electronics since the invention of the microprocessor itself. It is essential for the operation of devices such as mobile phones, DVD players, video cameras, and most self-contained electronic systems. The small Liquid Crystal Display screen is a good clue to the presence of an MCU (Microcontroller unit) it needs a programmed device to control it. Working sometimes with other chips, but often on its own, the MCU provides the key element in the vast range of small, programmed devices of which are now common place.

Page 3: Microcontroller-Based Temperature and pH Measuring System

International Journal of Trend in Scientific Research and Development (IJTSRD) ISSN: 2456-6470

@ IJTSRD | Available Online @ www.ijtsrd.com | Volume – 2 | Issue – 5 | Jul-Aug 2018 Page: 696

6. PIC16F887 Architecture Microcontrollers contain all the components required for a processor system in one chip: a CPU, memory and input, output. A complete system can therefore be build using one MCU chip and a few input, output devise such as a keypad, display and other interfacing circuits (Bates, 2013). 7. PIC16F887 Pin Out PICF16887 chip can be obtained in different packages, such as convention 40-pin DIP (Dual In-

Line Package), square surface mount or socket format. The PIC16F887 is the 14-bit instruction word mid-range microcontroller from the Microchip Technology. The PIC microcontroller architecture is based on RISC (Reduced Instruction Set Computer) instruction set (Ibrahim, 2006). The PIC16F887 is a 40-pin device and is one of the popular microcontrollers used in complex applications. The pin configuration of the PIC16F887 microcontroller(Ibrahim, 2008) is shown in Figure 6.

Figure: 6 the pin configuration of the PIC16F887 microcontroller

8. System Software In this project two types of softwares are used. Software for micro c programming LABVIEW 9. Liquid Crystal Display (LCD) LCDs are alphanumeric displays which are frequently used in microcontroller-based applications. Some of the advantages of LCDs are their low cost and low power consumption. LCDs are ideal in low-power, battery- operated portable applications. There are basically two types of LCDs as far as the interface technique is concerned: parallel LCDs and serial LCDs. Parallel LCDs are connected to the microcontroller I/O ports using 4 or 8 data wires and data is transferred from the microcontroller to the LCD in parallel form.

These modules has built-in controller, driver, character generator RAM/ROM. It is capable of displaying two lines of 16 characters. The LCD module provides 4-bit or 8-bit parallel interfaces and writes data directly. The LCD module conforms to standard eight-data lines, three control lines and five power lines. The connections are laid out a single row of 16 pins. Pin 1 and Pin 2 are the power supply lines, V

SS and

VDD

. The VDD

pin is connected to the positive supply

and VSS

to the 0V supply or ground. VEE

or V0 used to

alter the contrast of the display. Ideally this pin connected to a variable resistor. The pin description of the 16 x 2 line LCD module is shown in Figure 7.

Page 4: Microcontroller-Based Temperature and pH Measuring System

International Journal of Trend in Scientific Research and Development (IJTSRD) ISSN: 2456

@ IJTSRD | Available Online @ www.ijtsrd.com

Figure: 7 the pin description 10. Design and Construction Temperature monitoring system is designed and constructed using a pH probe, amplifier circuit, DS18B20 one wire temperature sensor, PIC 16F887 microcontroller circuit, 16 x 2 line LCD module and power supply circuit. The pH probe detects the pH level of the liquids. The probe acts as a small voltage cell and produces small voltage at the BNC cable output. The output signal from the probe is too small to directly interface with the ADC circuit of the microcontroller. Therefore small signal amplifier circuit is used to amplify the signal from the probe. The amplifier circuit is shown in Figure 9. The IC1 and IC2 used in this circuit are two of the operational amplifiers. The IC in the circuit is connected as inverting buffer circuit. The output from the pH prois connected with the inverting terminal of the IC1. Non inverting input is directly connected with the

+

-

2

311

4P1 J1

BNC

IC1

EPOXY pH PROBE

Figure: 8 The amplifier

International Journal of Trend in Scientific Research and Development (IJTSRD) ISSN: 2456

@ IJTSRD | Available Online @ www.ijtsrd.com | Volume – 2 | Issue – 5 | Jul-Aug 2018

pin description of the 16 x 2 line Liquid Crystal Display (LCD) module

Temperature monitoring system is designed and constructed using a pH probe, amplifier circuit, DS18B20 one wire temperature sensor, PIC 16F887 microcontroller circuit, 16 x 2 line LCD module and power supply circuit. The pH probe detects the pH

e liquids. The probe acts as a small voltage cell and produces small voltage at the BNC cable output. The output signal from the probe is too small to directly interface with the ADC circuit of the microcontroller. Therefore small signal amplifier

is used to amplify the signal from the probe. The amplifier circuit is shown in Figure 9. The IC1 and IC2 used in this circuit are two of the operational amplifiers. The IC in the circuit is connected as inverting buffer circuit. The output from the pH probe is connected with the inverting terminal of the IC1. Non inverting input is directly connected with the

output. IC 2 is the non-inverting amplifier circuit. The resistors at pin 6 input pin and between pin 6 and pin 7 determine the gain of the amplipreset reset resistor adjusts the signal level. The 5 K preset resistor at the output of the amplifier is used to adjust the amplitude of the output signal. The output signal from the amplifier circuit is sent to the ADC input (RA0) of the PIC 16F887 microcontroller circuit. The complete circuit diagram of the constructed system is shown in Figure 8. The output of the DS1820 temperature sensor is connected with the RE2 pin of the microcontroller. The port B pins (RB0 – RB5) of the microcontare connected with the RS, E, D4, D5, D6 and D7 pins of the 16 x 2 line LCD module, respectively. Measured values are displayed on the LCD module.

+

-1

11

4

+9V

9V

IC2

470K

10K

33K

33K

3.9K

100K

LCD1

6

5

7

5k

33k

To microcontroller circuit

Figure: 8 The amplifier circuit for the pH probe.

International Journal of Trend in Scientific Research and Development (IJTSRD) ISSN: 2456-6470

Aug 2018 Page: 697

LCD) module

inverting amplifier circuit. The resistors at pin 6 input pin and between pin 6 and pin 7 determine the gain of the amplifier. The 100 K preset reset resistor adjusts the signal level. The 5 K preset resistor at the output of the amplifier is used to adjust the amplitude of the output signal. The output signal from the amplifier circuit is sent to the ADC

PIC 16F887 microcontroller circuit. The complete circuit diagram of the constructed system is shown in Figure 8.

The output of the DS1820 temperature sensor is connected with the RE2 pin of the microcontroller.

RB5) of the microcontroller are connected with the RS, E, D4, D5, D6 and D7 pins of the 16 x 2 line LCD module, respectively. Measured values are displayed on the LCD module.

To microcontroller circuit

Page 5: Microcontroller-Based Temperature and pH Measuring System

International Journal of Trend in Scientific Research and Development (IJTSRD) ISSN: 2456-6470

@ IJTSRD | Available Online @ www.ijtsrd.com | Volume – 2 | Issue – 5 | Jul-Aug 2018 Page: 698

Figure: 9 the photograph showing the temperature

measuring circuit and various sample liquids 11. Results and Discussion Microcontroller based pH level and temperature monitoring system is designed and constructed using a pH probe, amplifier circuit, DS18B20 one wire temperature sensor, PIC 16F887 microcontroller circuit, 16 x 2 line The Liqid Cristal Display (LCD) module and power supply circuit. The pH probe detects the pH level of the liquids. The probe acts as a small voltage cell and produces small voltage at the BNC cable output. The output signal from the probe is too small to directly interface with the ADC circuit of the microcontroller. Therefore small signal amplifier circuit is used to amplify the signal from the probe. In pure water, pH reading is in the range of 5.5-6.9 and voltage signal is 700-720mV. In coca, pH reading is 2-3 and voltage signal is 620 – 640 mV. In salt water, pH reading is 9-10 and voltage signal is 780-800 mV. 12. Conclusion Temperature sensor circuit and the pH sensor circuit can be assembled together with constructed microcontroller circuit. The PC interface circuit can

also be constructed to monitor the measured quantities of the liquid in graphical form. Moreover the other quantities of liquid such as conductivity, salinity can be attempted to measure by using Lab make sensors. REFERENCES 1. Bates, M. P. (2013). Interfacing PIC

Microcontrollers: Embedded Design by Interactive Simulation (2nd Edition). Newnes. Retrieved from https:// books.google.com/ books? isbn=0080993729, on March 17 2018.

2. Definition of pH and pH Testing Tools. (n.d.). Retrieved from http://www.benmeadows.com, on April 5 2018.

3. Ibrahim, D. (2006). PIC BASIC PROJECTS: 30 Project Using PIC BASIC and PIC BASIC PRO. UK: Elsevier’s Science &Technology.

4. Ibrahim, D. (2008). Advanced PIC Microcontroller Project in C (First Edition).

5. Riddle, P. (2013). pH meter and their electrodes :calibration, maintenance and use, 202–205.

6. Wilde, F. D., & Gibs, J. (n.d.). Turbidity. In U.S. Geological Survey TWRI Book. CRC Press Taylor and Franics Group. Retrieved from https:// water.usgs.gov/ owq/ FieldManual/ Chapter6/Archive/6.7/Section6.7.pdf, on March 17 2018

7. www.maximintegrated.com, DS18B20, Programmable Resolution 1-Wire Digital Thermometer, 2015 Maxim Integrated Products, Inc.