You are on page 1of 47

ABSTRACT

ABSTRACT
Liquefied petroleum gas (LPG) has become a very common source of cooking fuel

at home. However, LPG leakage poses a serious threat to the user and others. To

avert the danger associated with the use of LPG at home, this system was

developed so that gas leakage can be quickly detected and notification of the user

is immediately carried out. A GSM module is used to send SMS to the user if gas

leakage is detected and the status is displayed on an LCD. The PIC18F2520

microcontroller carries out all the processing of the signal received from the MQ6

gas sensor and activate the GSM module and LCD to inform the user. To make the

system very efficient it was configured to detect gas leakage at 250ppm which is

far less than the standard 1000ppm and it was designed to be powered by the mains

and from rechargeable battery. Test result carried out on the system were

satisfactory indicating that it can be successfully deployed for domestic use.


INTRODUCTION

INTRODUCTION
1.1 Background of Project

Gas sensors are employed in a wide range of applications in the fields of safety,
health, and instrumentation. Common examples are domestic or commercial
alarms for explosive and toxic gases or in automotive application as gas leakage
detectors for LPG powered cars and exhausts detectors inside any fuel powered
truck or car. Such sensors, nowadays, are found also in applications involving air
quality control systems and pollution monitoring.

Today sensors have featuring a high sensitivity to a wide gases variety, are
very compact in size and have significantly reduced their power consumption to
better adapt to portable solutions. Building a system with a gas sensor is not as
easy as it could appear. Despite the sensor could be treated, basically, as a variable
resistor which value depends on gas concentration in air the practical
implementation in a project should be done considering some design rules,
especially if the final circuit is a device to be used in a field where reliability is
strongly required.

As an example the internal elements of a sensor such as heater and gas


sensitive resistors have to be constantly kept under control to avoid failures leading
to a wrong alarm indication. Furthermore, if the application needs to achieve good
measurement accuracy, factors like environment temperature, sensor life have to
be taken into account. Flammable gas detectors can make a valuable contribution
to the safety of these processes.

The detector can be used to trigger alarms if a specified concentration of the


gas or vapour is exceeded. This can provide an early warning of a problem and
help to ensure people‟s safety. However, a detector does not prevent leaks
occurring or indicate what action should be taken. It is not a substitute for safe
working practices and maintenance.

The application of microcontroller in such an instrument will reduce cost.


Primarily, the microcontroller is capable of storing and a programming. The
microcontroller contains a CPU (central processing unit), RAM (random-access
memory), ROM (read only memory), IO (input/output), serial and parallel ports,
timers, and sometimes other built-in peripherals such as A/D (analog-to-digital)
and D/A (digital-to-analog) converters. There is a large variety of microcontroller
on the market today. We will focus on a few versatile microcontroller chips called
programmable interface controller PIC chips from Microchip Technology.

Microchip uses PIC to describe its series of PIC micro controllers. In this
project the programs are written in an assembly and basic languages respectively.
Basic is a user-friendly language, it is easier to learn and master than either
assembly language or C language. The multiple-detector-system was developed
using components such as gas sensor (TGS2611), PIC16F876A and LCD
alphanumeric display.

1.2 Objectives of Project

Objective of this project is design the circuit that can detect leaking gas of
natural gas and toxic gas. Circuit will have display to show the concentration of
gas and alarm as a warning system if the concentration exceeds safe concentration.

1.3 Scopes of Project


1. The circuit is basically on the gas sensor and the PIC. The sensor could be
treated, basically as a variable resistor which value depends on gas concentration in
air and high sensitivity.

2. PIC16F876A has chosen to makes the detector much simpler. The programming
also controls the concentration of gas and the air humidity.

3. This project also applied the wireless concept for transfer the data from sensor to
PIC. Wireless gas detection is designed for continuous monitoring of toxic and
combustible gases in air. No complicated system configuration is needed. Simply
assign a unique address to the remote sensor and you are done. The gas monitor
will collect all the necessary data information from the sensor including the target
gas type. 2 main devices in wireless system are transmitter and receiver.

4. The output of this project is buzzer and a LCD display. The buzzer acted as
alarm if gas concentration exceeds the safe concentration of that gas. The LCD
display should display the gas concentration and the air humidity.

5. All simulations are constructing and performed using Protues 7.1, PICC and
MPLAB.

1.4 Outline of the Project

This project consists of five chapters. The first chapter discuss about background,
objective and scope of this project. Chapter two discuss more on theory and
include literature reviews that have been done. It also will discuss on components
of the hardware and software used in this project. Chapter three discuss on the
methodology hardware and software development of this project. Chapter four will
discuss about project‟s testing and results. Finally in chapter four will discuss
about project‟s testing and results. Finally in chapter five it will discuss about
conclusion and future work proposal for the project.
CHAPTER II

LITERATURE REVIEW

2.1 Introduction
LPG gas is the main gas fuel used for cooking and other heating appliances.
This is because it is a stable, high energy content, relatively low Sulphur, clean
burning fuel which can be transported economically as a liquid[1].It is a by-
product of crude oil and Natural Gas processing[2]. LPG is primarily composed of
propane, butane, isobutane or a mixtures of these gases[2]. It is stored in gas
cylinders as liquid under relatively low pressure. It has low boiling point and it will
vaporize immediately it is released into the air. It is relatively heavier compared to
air. When it leaks, it will tend to flow close to the ground and settle in low lying
places in the premises if there is no adequate air ventilation. LPG gas is highly
flammable gas with Lower Explosive Limits of about 1.4% that is about
14,000PPM[3].

This is the property of LPG that makes us worried when using the gas[2]. No
matter the safety standards that are put in place in usage of the gas to ensure there
is no gas leakage, there is always the danger of a gas leakage. Human being are
prone to error. LPG gas is odorless and colorless and it would be impossible to
detect the presence of a gas leakage. An odourant is normally added to the gas to
help detect the gas in case of a leakage[2] but this is not enough as it would require
person to be physically present to detect the gas leakage and by the time the gas
has built up enough to be detected by smell it will have reached dangerous
concentration level. Therefore, it is a great risk to relay on our sense of smell to
determine whether there is a gas leakage or not. This has been a great concern for
people over time and people have come up with gas leakage detector to solve this
problem.

The gas leakage detectors that have been developed have been built around
already existing different gas technology[4]. The different type of sensor are listed
below[5].
 Electrochemical sensors-mostly used for toxic gases such carbon monoxide
 Metal Oxide Semiconductor sensors- used for both toxic and combustible
 Catalytic sensor-used for combustible gases such hydrocarbon gases
 Infrared Sensors- used for combustible gases

The choice of the sensor depends on the type of gas that is to be detected among
other factors such as the stability, sensitivity, selectivity, price and durability of the
sensor. For hydrocarbon gases such as LPG gas, metal oxide semiconductor
sensors are preferred over the rest of sensor because they are relatively cheap and
last for a long time being stable, sensitive to low gas concentrations (300PPM) and
detect a wide range of gas concentration (300-10000) PPM and resistant to
poisoning[4].

However, its performance is affected by exposure to high corrosive gases (such


as hydrogen chloride), organic silicon steam, halogen pollution and water [6].
Metal oxide semiconductor detect gases by means of their surface interaction with
the target gas which alters the conductivity of the semiconductor. The output
voltage signal is converted into gas concentration. Tin oxide and Tungsten Oxide
are kind of metal oxide used as the sensing material in metal oxide semiconductor
sensor[4]. TGS sensor by Figaro[7] and MQ-6 sensor[6] are metal oxide
semiconductor based sensors that can be used for detecting LPG gas. The MQ-6
sensor offers a [6]

 High Sensitivity to LPG gas


 A Detection Range: 300 - 10,000 PPM
 Fast Response Time
 Simple drive circuit
 Heater Voltage: 5.0V
 Long lifespan
 Low cost

A gas leakage detection system capable of raising an alarm has been developed
using the sensor and a comparator. The sensor output voltage is compared with a
reference voltage from a potentiometer and if the voltage signal is higher the
reference voltage the comparator output a signal which can be used to drive a
circuit setting off an alarm and lit a number of LEDs. The potentiometer is used to
set the trigger level for the alarm.

There are some commercial LPG gas detector in the market that detect gas
leakage and raise a warning in form of an alarm and LED indicators. However,
these commercialized gas detector come at a high price and a not readily available
on Kenya market [9], [10]. Therefore, there is a need for designing a gas leakage
detector that can be readily available in the local market at an affordable price. The
detector is based on a microcontroller with a high resolution Analog to Digital
Converter (10 bits) [11].

The detector in additional to raising an alarm and having LED indicators for
status of the gas leakage it is capable of accurately displaying the concentration of
the gas on a LCD display. It also incorporate a button that can be used for
acknowledging the alarm. The microcontroller is programmed with an algorithm
for converting the voltage signal from the sensor to the respective gas
concentration according to the sensor datasheet. The datasheet outline the
relationship between the sensor voltage and the gas concentration. Thus, gas
concentration can be displayed with high accuracy. The microcontroller runs at
high frequency, thus the detector has a faster response time to changes in
concentration of the gas.

The specific sensor to be used for this detector is MQ-6 sensor which uses Tin
Oxide as the sensing material. The microcontroller being used is PIC16F690
microcontroller by Microchip. The LCD being used is Hitachi HD44780 LCD. The
detector will use a Buzzer as the alarm. All this components are powered using a
5V supply. The 5V is supplied using available 5V voltage regulators ICs and a 9V
battery.

Figure 2.1 MQ-6 Gas Sensor

Operating Principle of MQ-6 Sensor

The Figure 2.1 shows a photo of MQ-6 sensor. In clean air, the sensor has a
high resistance and in presence of a gas the sensor conductivity increases. The
sensor has a simple drive circuit shown in Figure 2.2.The sensor is driven from a
5V supply. A voltage (heating voltage) is applied between Pin 2 and 5 with a
resistance of 26 ± 3Ω to heat the sensor to the working temperature[6].When Tin
Oxide is pre-heat in presence of oxygen, oxygen is adsorbed on the crystal surface
with negative charges. The donor electrons on the crystal are transferred to the
adsorbed oxygen thus leaving positive charges in a space charge layer. This create
a surface potential which acts as potential barrier against electrons flow hence the
high resistance of the sensor in clean air[7].In presence of reducing gas such as
LPG, the gas molecules are adsorbed on the material surface reducing the surface
density of the negatively charged Oxygen ions thus increasing concentrations of
electrons and the conductivity of the sensor[7].[4].

Figure 2.2 MQ6 Sensor Driver Circuit

Therefore, as the gas concentration increase the conductivity of the sensor will
increase and so does the sensor output voltage. However, this relationship is not
linear and Figure 2.3 describe this relationship [6]. This sensor resistance is
between pins 6&4 and 1&3 and a loop voltage is applied between the series of the
sensor resistance and the load resistance. The sensor output voltage is the voltage
across the load resistance. The load resistance is used to change the sensitivity of
the sensor. A very high resistance, reduce the sensor sensitivity and small changes
in the concentration of the gas would not be noticed. MQ-6 sensor has a load
resistance of 4.7K.
Figure 2.3 MQ6 Sensor Sensitivity Curve

The sensor detect the gas concentration from a range of 300-10,000PPM. The
sensitivity curve of the sensor form the basis for setting the alarm trigger level and
the amount of gas concentration for a given voltage. From the curve, the sensor has
an output voltage of 2.0V at 300 PPM and thus the trigger level is 2.0V. When the
input voltage to the MCU is equal to or more than 2.0V, the MCU starts the
audiovisual alarm. Although the relation between gas concentration and sensor
voltage is not linear, there are ranges of sensor output voltage with constant
gradient i.e. between 2.0V and 2.5V, for every increase of 20 PPM in gas
concentration there is an increase of 0.1V. Thus gas concentration for any other
voltage is through extrapolation from the known values of sensor voltage and gas
concentration from Figure 2.3. NB: MQ-6 sensor technical specifications are
outline.
2.2 Literature Review Overview

This chapter discuss about reviews of existing project created to get an idea
about the project design, conception and any information that related to improve
the project. With different concept and design, there are other creations and
innovations of projects done by other people. Researches related to this project also
covered in this chapter.

2.3 The PIC16F690 Microcontroller

A microcontroller (MCU) is a microprocessor with memory, input and


output (I/O) pins and other additional peripheral features such as Timers/Counters
on one chip [12] depending on the type of the microcontroller. The PIC16F690
MCU is mid-range microcontroller of the PIC family of microcontrollers produced
by Microchip Technology Incorporation. It is a 8-bit, flash memory based, 20 pins
CMOS MCU with nanoWatt technology [11].

It has a RISC CPU with 35 instructions [11]. The additional peripherals on


the PIC16F690 MCU, include; ADC Module, Analog Comparator Module,
Timers/Counters, In-circuit Serial Programming, Enhanced Capture, Compare,
PWM+ module and Synchronous Serial Port (SSP). It has Low power features and
other special features such as; Precision Internal Oscillator (with a maximum speed
of 8MHz), Power Saving Sleep mode, Wide Range of Operating Voltage (2.5V-
5.5V), Power On Reset, Flash memory with 100,000 writes among other
features[11]

2.2 General Information on Natural Gases

Natural gas is obtained principally from conventional crude oil and non
associated gas reservoirs and secondarily from coal beds, tight sandstones and
Devonian shale. Some is also produced from minor sources such as landfills. In the
future, it may also be obtained from natural gas hydrate deposits located beneath
the sea floor in deep water on the continental shelves or associated with thick
subsurface permafrost zones in the Arctic.

Natural gas is a mixture of low molecular-weight aliphatic (straight chain)


hydrocarbon compounds that are gases at surface pressure and temperature
conditions. At the pressure and temperature conditions of the source reservoir, it
may occur as free gas (bubbles) or be dissolved in either crude oil or brine. While
the primary constituent of natural gas is methane ( CH4 ), it may contain smaller
amounts of other hydrocarbons, such as ethane ( HC 62 ) and various 4 2 6 isomers
of propane ( C3H8 ), butane ( C4H10 ), and the pentanes ( C5H12 ), as well as trace
amounts of heavier 3 8 4 10 5 12 hydrocarbons.

The MCU uses Harvard Architecture, data and program are accessed via separate
data bus. The internal hardware of the MCU is shown in Figure B.1 in Appendix
B. The MCU can be divided into two parts; the program execution section and the
register processing section [12]. The program execution section consists of the
program memory, instruction register and the control logic. PIC16F690 has a 13
bits program counter thus 8K * 14 of program memory but only the first 4K of
memory is implemented [12]. PIC16F690 uses 14 bits instruction. Thus the code
written should not exceed 4K.

The register processing section consists of the static RAM and the
Arithmetic and Logic Unit (ALU). The ALU uses a register called the Working
Register which is used to temporary store data during execution [13]. All other
register used by the CPU are stored in the RAM which is arranged in 4 Banks each
of 128 register each 8 bits. There two type of registers; Special Function Register
(SFR) and General Purpose Register (GPR). The SFR are used for controlling
processor operations and showing the status of the processor. These SFR are
mapped in the first 32 locations of each banks. Such SFR are STATUS, INTCON,
OPTION_REG, TRIS and the PORT registers. The GPR space holds the user
defined variable. [12].

2.3 Potential Health Effects

Methane is not toxic below the lower explosive limit of 5% (50000 ppm).
However, when methane is present at high concentrations, it acts as an asphyxiant.
Asphyxiants displace oxygen in the air and can cause symptoms of oxygen
deprivation (asphyxiation). The available oxygen should be a minimum of 18% or
harmful effects will result.(3,11) Methane displaces oxygen to 18% in air when
present at 14% (140000 ppm).

Effects of oxygen deficiency at 12-16% is breathing and pulse rate are


increased, with slight muscular incoordination at 10-14% is emotional upsets,
abnormal fatigue from exertion, disturbed respiration at 6-10% is nausea and
vomiting, inability to move freely, collapse, possible lack of consciousness and
below 6% is convulsive movements, gasping, possible respiratory collapse and
death.

Methane gas is not a skin irritant. Contact with the refrigerated liquefied gas
or compressed gas escaping from its cylinder may cause cold burns or frostbite.
Symptoms of mild frostbite include numbness, prickling and itching in the affected
area. Symptoms of more severe frostbite include a burning sensation and stiffness
of the affected area. The skin may become waxy white or yellow. Blistering, tissue
death and gangrene may also develop in severe cases. Methane gas does not irritate
the eyes. Contact with the refrigerated liquefied gas or compressed gas escaping
from its cylinder may cause cold burns or freezing of the eye. Permanent eye
damage or blindness could result.

2.4 Natural Gas Leak Detection Techniques Table

2.1 Comparison of Different Natural Gas Leak Detection Techniques


The PIC16F690 Microcontroller

Introduction

A microcontroller (MCU) is a microprocessor with memory, input and


output (I/O) pins and other additional peripheral features such as Timers/Counters
on one chip[12] depending on the type of the microcontroller. The PIC16F690
MCU is mid-range microcontroller of the PIC family of microcontrollers produced
by Microchip Technology Incorporation. It is a 8-bit, flash memory based, 20 pins
CMOS MCU with nanoWatt technology[11]. It has a RISC CPU with 35
instructions[11].

The additional peripherals on the PIC16F690 MCU, include; ADC Module,


Analog Comparator Module, Timers/Counters, In-circuit Serial Programming,
Enhanced Capture, Compare, PWM+ module and Synchronous Serial Port (SSP).
It has Low power features and other special features such as; Precision Internal
Oscillator (with a maximum speed of 8MHz), Power Saving Sleep mode, Wide
Range of Operating Voltage (2.5V-5.5V), Power- On Reset, Flash memory with
100,000 writes among other features[11].The full description of the features of
PIC16F690 is shown in Section B.1 in Appendix B

The PIC16F690 MCU Architecture

The MCU uses Harvard Architecture, data and program are accessed via
separate data bus. The internal hardware of the MCU is shown in Figure B.1 in
Appendix B. The MCU can be divided into two part; the program execution
section and the register processing section[12]. The program execution section
consists of the program memory, instruction register and the control logic.
PIC16F690 has a 13 bits program counter thus 8K * 14 of program memory but
only the first 4K of memory is implemented [12]. PIC16F690 uses 14 bits
instruction. Thus the code written should not exceed 4K.

The register processing section consists of the static RAM and the
Arithmetic and Logic Unit (ALU). The ALU uses a register called the Working
Register which is used to temporary store data during execution [13]. All other
register used by the CPU are stored in the RAM which is arranged in 4 Banks each
of 128 register each 8 bits. There two type of registers; Special Function Register
(SFR) and General Purpose Register (GPR). The SFR are used for controlling
processor operations and showing the status of the processor. These SFR are
mapped in the first 32 locations of each banks. Such SFR are STATUS, INTCON,
OPTION_REG, TRIS and the PORT registers. The GPR space holds the user
defined variable. [12].

Figure 2.4: PIC16F690 Pin Diagram

The PIC uses the port registers (PORTA, PORTB and PORTC) to get data
from the peripherals attached to it and to output data to the peripherals attached to
it [12]. The PIC has 18 general purpose I/O pins but one pin is an input pin only.
The pin out of PIC16F690 is shown in Figure 2.4 [11]
The pin functionality as a General purpose I/O depends on whether a
peripheral feature on that pin has been enabled[11]. A pin configured as input for
the comparator module cannot be used a digital input pin. The complete
description of the functionalities of each pin is in Table B.1 [11].

Hitachi’s HD44780 LCD Display

Figure 2.5 Hitachi's HD44780 LCD pin out

The Hitachi HD44780 controlled 16*2 LCD will be used for display of the
gas concentration. This LCD displays alphanumeric characters (letters, numbers
and symbols) which can be used to convey adequate information concerning the
gas concentration status. The fact that it is built around the Hitachi HD44780
controller makes the LCD a smart device[14].The LCD has controls lines and data
lines which makes it possible to send information for displaying on the LCD by
putting the controls lines and data lines high or low[15]. Therefore, the LCD can
be interfaced to the microcontroller pins and information be sent to the LCD by
controlling the microcontroller. Figure 2.5 shoes the LCD pin out and table 2.1 the
description of the function of each pin.

Table 2.1 QAPASS HD44780 LCD Pin out Description

Pin No Name Description


1 VSS
Power Supply(GND)
2 VDD
Power Supply
3 VEE
Contrast adjust
4 RS
0 = Instruction input
1 = Data input
5 R/W
0 = Write to LCD module 1 =
Read from LCD module

6 EN
Enable signal

7 D0
Data bus line 0 (LSB)

8 D1
Data bus line 1

9 D2
Data bus line 2

10 D3
Data bus line 3
11 D4
Data bus line 4

12 D5
Data bus line 5

13 D6
Data bus line 6

14 D7
Data bus line 7(MSB)

15 LED +
LCD Backlight (Anode)

16 LED -
LCD Backlight (Cathode)

The control lines are RS, R/W and EN and data lines (D0-D7) whose functions are
described in Table 2.1

The 16*2 display means that only 2 lines of 16 characters can fit on the LCD
display screen[16]. The Hitachi’s HD44780 LCD has an integrated 80 characters
display data buffer (DDRAM- Data Display RAM) and an integrated character
generator (CGROM-Character Generator ROM). It has also CGRAM- Character
Generator RAM for user defined characters. The LCD is
accessed through the instruction register or the data register. When sending commands such
turning the display off, the command is sent to the instruction register through the data lines while
when sending data, the data is passed to the data register through the data lines. The two are
differentiated with the RS control line. When RS=0 and R/W=0, the controller sees the data
placed on the data lines as a command and when RS=1 as the data to be displayed on the LCD.
When data or command value is placed on the data lines it sent to the LCD when an Enable pulse
signal is sent the LCD. An Enable pulse signal is sent when EN pin is pulled HIGH and then
LOW with a small delay of about 500ns between. However, a microcontroller running at an
instruction cycle of 1MHz will provide the necessary delay between putting EN HIGH and LOW
[15].

The characters are displayed by sending their ASCII’s value to a DDRAM address location
through the data register and the CGROM generates the specified character to be displayed at that
location [15].

The LCD is used in 8 bit mode and all the 8 data lines (D0-D7) are connected to PORTC pins.
The LCD can be used in 4 bit mode where only D4-D7 pins are used to transfer data and
commands. Although this safes the MCU pins for other peripherals, data can only be sent in
nibbles thus requiring more lines of code and takes more time to executes compared to the 8 bit
mode where data is sent in bytes [15].

Buzzer

The buzzer used is Piezoelectric Active Buzzer. It uses the inverse relationship of piezoelectricity.
When an alternating current is applied to piezoelectric material such as Piezoceramic, they stretch
and compress depending on the frequency of the signal producing a sound. The active Buzzer has
a built in oscillator circuit and when applied with DC voltage will produce a consistent sound
[17].

Power Supply Unit


The sensor, Buzzer and the MCU are require a 5V D.C voltage for powering up. Such a power
supply is design using a 5V voltage regulator. The 5V power supply can be achieved using the
circuit shown in Figure 2.6

U2
7805
1 3
VI VO 5V

GND
B1
C1

2
12V C2
1uF
1uF

Figure 2.6 5V Power Supply using 7805 Voltage Regulator

The circuit uses a 7805 voltage regulator which output 5V. Capacitor C1 filters out the
noise from source voltage which is 9V battery by shorting the AC signal in the source voltage into
the ground and allowing the DC signal only to pass. Capacitor C2 is used to filters out any AC
signal in the output DC voltage [18].
CHAPTER III

DESIGN METHODOLOGY
Hardware Design

The specifications of the cooking gas leakage detector are being to detect a LPG gas leakage and
give an audiovisual warning. The detection system also has an alarm acknowledgement button.
The device is powered from a 5V supply from a 9V battery. Therefore, the following
components are required to make the gas detector; MQ-6 Sensor, PIC16F690 MCU, LCD
Display, Buzzer, RED LED, GREEN LED,BLUE LED, a Button and current limiting resistors.

The block diagram in Figure 3.1 show the interconnection of the components to make the
Device.

LCD Display

Sensor BUZZER
PIC16F690 MCU

BUTTON LEDs

Figure 3.1. The gas leakage detector Block Diagram.

DESCRIPTION OF THE BLOCK DIAGRAM

MQ-6 GasSensor
The sensor is used to detect when there is a gas leakage and the amount of the gas concentration
by giving out a voltage output depending on the gas leakage concentration
Interfacing the sensor to the MCU

The sensor gives an analog voltage input to the MCU. The sensor is connected to analog channel
1 of the ADC on pin RA0 as shown in the Figure 3.2. A potentiometer is used to simulate the
analog voltage from the sensor. The analog signal is converted to a gas concentration value with
reference to the curve in Figure 2.3

RV3
U2
19 16
50%

RA0/AN0/C1IN+/ICSPDAT/ULPWU RC0/AN4/C2IN+
18 RA1/AN1/C12IN0-/VREF/ICSPCLK RC1/AN5/C12IN1- 15
RA2/AN2/T0CKI/INT/C1OUT RC2/AN6/C12IN2-/P1D
RA3/MCLR/VPP RC3/AN7/C12IN3-/P1C
1k 17 14
RA4/AN3/T1G/OSC2/CLKOUT RC4/C2OUT/P1B
RA5/T1CKI/OSC1/CLKIN RC5/CCP1/P1A
4 7
RC6/AN8/SS
13
RB4/AN10/SDI/SDA RC7/AN9/SDO
3 6
RB5/AN11/RX/DT
12
RB6/SCK/SCL
2 RB7/TX/CK 5
11
PIC16F690 8
Figure
10 3.2 Sensor connection to the MCU
9

PIC16F690 MCU
The microcontroller is the control unit. All the peripherals, Sensor, alarm, LEDs, LCD and
button are connected to it through the interfacing pins. It monitors the input signal from the
sensor. When the signal get above the trigger level, theMCU set off the alarm, blinks a red LED
and display the concentration of the gas leakage on the LCD. When the signal is below the
trigger level, a green LED is lit. When the device is powered up the MCU light a blue LED to
show Power ON status.
PIC16F690 Pin Allocations

The various peripherals are interfaced to the microcontroller through the following pins as
described in Table 3.1
Table 3.1 Microcontroller Pins Allocation to the Peripherals

Component I/O Functionality


Sensor RA0 Analog Input
Button RA5 Digital Input
Buzzer RA1 Digital Output
Red LED RA2 Digital Output
Green LED RA4 Digital Output
Blue LED RB7 Digital Output
LCD (D0-D7)
Data Lines RC0-RC7 Digital Output
LCD RS pin RB4 Digital Output
LCD EN pin RB6 Digital Output

Figure 3.3 shows the interface of the various components to the PIC16F690 microcontroller on a
breadboard and Figure 3.4 shows fabricated circuit.

MQ-6 Sensor Buzzer Leakage Indicator LED PIC16F690 HD44780 LCD

Buzzer

Figure 3.3Connection of various components to the PIC16F690 microcontroller.

Button NO Leakage LED Power LED Resistor


Figure 3.4 Gas leakage detector

LCD Display
The LCD shows the numerical value of the gas concentration in Parts per Million. The LCD is
interfaced to the microcontroller as shown in Figure 3.5

RV3
LCD2
40%

LM016L
VDD
VSS

VEE

RW
RS

D0
D1
D2
D3
D4
D5
D6
D7
E

1k
11
10

12

13

14
1

2
4
3
5
7
6
8

U2
19 16
RA0/AN0/C1IN+/ICSPDAT/ULPWU RC0/AN4/C2IN+
18 RA1/AN1/C12IN0-/VREF/ICSPCLK RC1/AN5/C12IN1- 15
RA2/AN2/T0CKI/INT/C1OUT
RA3/MCLR/VPP RC2/AN6/C12IN2-/P1D
17 RA4/AN3/T1G/OSC2/CLKOUT 14
RA5/T1CKI/OSC1/CLKIN
13
4 7
RB4/AN10/SDI/SDA RC3/AN7/C12IN3-/P1C
RB5/AN11/RX/DT
12 RB6/SCK/SCL 6
3 RC4/C2OUT/P1B
RB7/TX/CK
11 5
2 RC5/CCP1/P1A
PIC16F690
10 8
RC6/AN8/SS
Figure 3.5 LCD Connection to the MCU
9
RC7/AN9/SDO
The RW pin is permanently grounded because we will be only sending data and command to the
LCD. The data lines D0-D7 are connected to PORTC while the control lines RS and EN to RB4
and RB6 respectively.
Buzzer
It gives an audio alarm when there is gas leakage. The buzzer is interfaced to the MCU through
pin RA1 as shown in Figure 3.5

BUZ2

BUZZER

U2
19 16
RA0/AN0/C1IN+/ICSPDAT/ULPWU RC0/AN4/C2IN+
18 RA1/AN1/C12IN0-/VREF/ICSPCLK RC1/AN5/C12IN1- 15
RA2/AN2/T0CKI/INT/C1OUT RC2/AN6/C12IN2-/P1D
RA3/MCLR/VPP RC3/AN7/C12IN3-/P1C
17 RA4/AN3/T1G/OSC2/CLKOUT RC4/C2OUT/P1B 14
RA5/T1CKI/OSC1/CLKIN RC5/CCP1/P1A
4 RC6/AN8/SS 7
13
RB4/AN10/SDI/SDA RC7/AN9/SDO
3 RB5/AN11/RX/DT 6
12 RB6/SCK/SCL
RB7/TX/CK
2
11 5
PIC16F690
10 8
Figure 3.6 Interfacing of the Buzzer to the MCU
9

LEDs
Gives a visual alarm when there is gas leakage. Blinking of a red LED show there is a gas
leakage and the absence of the gas leakage is shown by lighting of a green LED. The blue LED
shown Power ON status of the device.
The LED are interfaced to the microcontroller through a current limiting resistor.

Button
It used to acknowledge the alarm and it is connected to the microcontroller through pin RA4.

Power Supply.
The power supply used for powering the detector is shown in Figure 2.6
Schematic Diagram for the Detector
Figure 3.8 shows the simulation of the gas leakage detector using Proteus Simulation Software.

BUZ1 LCD1

RV2 LM016L

BUZZER
RV1
59%

VDD
VSS

VEE

RW
RS
21%

D0

D1

D2

D3
1k

6E

11
1

10
1k

D2
U1
LED-RED 19 16
RA0/AN0/C1IN+/ICSPDAT/ULPWU RC0/AN4/C2IN+
18 RA1/AN1/C12IN0-/VREF/ICSPCLK RC1/AN5/C12IN1- 15
RA3/MCLR/VPP RC3/AN7/C12IN3-/P1C
RA2/AN2/T0CKI/INT/C1OUT RC2/AN6/C12IN2-/P1D
RA4/AN3/T1G/OSC2/CLKOUT RC4/C2OUT/P1B
17 RA5/T1CKI/OSC1/CLKIN RC5/CCP1/P1A 14
RC6/AN8/SS
13
RB4/AN10/SDI/SDA RC7/AN9/SDO
R1 R5 R4 4 RB5/AN11/RX/DT 7
330 12 RB6/SCK/SCL
RB7/TX/CK
330 3 6
330
R2 11
PIC16F690
2 5
330 10
8
D3 D1
LED-GREEN LED-BLUE 9

Figure 3.8Schematic Diagram for Gas leakage Detector


Software Design

Flowchart Diagram

Figure 3.9 Flowchart for the program


Programming the PIC16F690
The PIC16F690 is programmed in Assembly language. The PIC16F690 is RISC chip with 35
instruction only. The instructions are 14 bits and consist of the opcode (operation code part) and
operand (the data being operated on which can be a literal or a register with address of the data).
The assembly code consists of Labels, mnemonic (instruction symbol) and the data being
operated on. The instruction set is divided into 3 categories
 Byte-oriented operation
 Bit-oriented operation
 Literal and control operation
The complete set of instruction set for PIC is shown in Table D.1 in Appendix D.
The program code is written using an MPLAB IDE which include a Code Editor, Simulator,
Debugger and an Assembler.

Steps in Programming the PIC.

Including header files

A header file is included that defines the PIC16F690 processor specific variables
#include<p16f690.inc>

Set the configuration word bits which enable or disable certain special features of the processor.
The configuration Word was configured such that, the internal oscillator – Enabled, Watch Dog
Timer - Disabled, Brown Out Reset – ON and Power Up Timer
config 0x32C4

CONFIG _FOSC_INTRCIO & _WDTE_OFF & _PWRTE_ON & _MCLRE_OFF & _CP_OFF &

_CPD_OFF & _BOREN_NSLEEP & _IESO_OFF & _FCMEN_OFF

Define the variables

Define the variable that will be used in the program.

The org directive

The ORG directive is used to tell the processor to start from a certain memory location
ORG 0x00
GOTO starts
ORG 0x04
;interrupt service routine
RETFIE
The processor start the program execution from the 1st memory location. When an interrupt
occurs the processor start the program execution from 0x04. PIC16F690 has a number of
interrupt such a Timers Overflows, IOC, ADC Conversion Completion. When an interrupt
occurs in PIC16F690, the processor start the program from 0x04 so if you are using interrupt in
the program, the ISR should be written from this location. RETFIE directive is used to return
from a interrupt

Initializing the oscillator

The main code start from starts Label. The main code starts by configuring the oscillator and the
internal oscillator is selected as the clock source at a frequency of 4MHz.

Initializing the ports

The ports pins are initialized as input or output pins and as analog or digital pinsusing the TRISx
and ANSEL and ANSELH registers
To configure a pin as an input pin the corresponding bit of TRISx is set and to configure the pin
as an output pin the corresponding bit of TRISx is cleared. i.e. RA0 is the sensor input and RA1
is the output to the alarm. These are configured as follows
BANKSEL TRISA
BSF TRISA,RA0
BCF TRISA, RA1
The BANKSEL directive is used to select a bank in the RAM memory. PIC16F690 RAM
memory is divided into 4 banks each with 128 8-bits registers. The SFR registers are in the first
32 locations of each bank. When using a certain register in PIC16F690, you must be certain you
are in the bank where that register is contained in the RAM memory. The banks are selected
using the RP1 and RP0 bits of the STATUS register or using the BANKSEL directive.
TheANSEL and ANSELH registers are used to configure analog capable pins as analog or digital
pins. When the corresponding bit of ANSEL or ANSELH is SET, the pin is an analog pin and
when cleared the pin is a digital pin. PIC16F690 has a 12 ADC channels. AN0 channel is used
for the sensor input which is on pin RA0 and this is the only pin configured as an analog pin.This
is configured as follows
BANKSEL ANSEL
MOVLW b'00000001' ;RA0 is an analog pin for the sensor
MOVWF ANSEL
BANKSEL ANSELH
CLRF ANSELH ; all other pins are digital I/O pins

Initializing the LCD display.

For the HD44780 LCD to display character, it is required to be initialized in a specific way by
sending a series of commands. The LCD can be initializedfor 8-bits interface or 4-bits interface
mode.The LCD has been initialized for 8 bits interface. This has been done by sending a
‘function set’ command for 8-bits interface mode for a number of times and a ‘real function set’
command for 8-bits interface, 2 display lines and 5*7 dots. Send the ‘display off and cursor off’
command, ‘clear the display’ command and the ‘entry mode’ command. The ‘entry mode’
command set the cursor position to auto increment with display of each character and the
character not to shift with the cursor position. Send the ‘display on’ command such that the
character can be displayed on the LCD.

Initialize the ADC

PIC16F690 has a 10 bits ADC module with 12 channels. The ADC module has two ADC control
registers; ADCON0 and ADCON1 that are used to: select the channel, the voltage reference, the
format of the result and the ADC conversion clock source. The ADCON1 is specifically used to
select the ADC conversion clock source using the ADCS bits. The ADCS bits <2:0> =b’100’
select the ADC conversion clock source to be Fosc/4. Fosc is the internal clock frequency of
4MHz.
The ADCON0 is set such as to select channel AN0, as the ADC reference voltage and left
justification of the result. The 10-bits (ADRES<9:0>) ADC result is stored into two 8 bit
registers, ADRESH and ADRESL. Left justify means, the 8 most significant bits ADRES<9:2>
are stored in the higher byte ADRESH and the 2 least significant bits ADRES<1:0> are stored in
bit7 and bit6 of the lower byte ADRESL.

Sample Acquisition and Conversion

BSF ADCON0,ADON ; put the ADC ON


CALL sample_time ; a delay of 7.67us for sample acquisition
BSF ADCON0,1 ; start the conversion

BTFSC ADCON0,1 ; Is conversion done?


GOTO $-1
After initializing the ADC, the ADC is put ON and wait the required sample acquisition period
of 7.67us. The ADC module use successive approximation. The Go/DONE bit is set to start the
conversion. When the conversion is complete, GO/DONE is cleared. The completion of the ADC
conversion is checked by polling the GO/DONE bit. When the conversion is completed,
GO/DONE=1, the ADRESH and ADRESL register are updated with the result of the conversion.

NB:Therefore, whether there is a gas leakage or not and the amount of the gas concentration, is
determined by reading the ADRESH andADRESL registers.

The leakage_status subroutine

This subroutine decides whether there is gas leakage or not and the amount of the gas
concentration. The ADC conversion results are moved to the registers RESULTHI and
RESULTLO; RESULTHI = ADRESH and RESULTLO = ADRESL. A gas leakage is when the
input signal is ≥ 2.0V. If 10-bits ADC result is ≥ 2.0V the alarm systems should be put ON. The
10-bits ADC has2 = 1024representation levels.0V correspond to 0 and 5V correspond to 1023.
The ADC module has a resolution of
5
= 4.89 10
1023
Each voltage level is converted to its digital value in binary form using the following formula
1023
=
5
i.e. 5.0V = b’1111111111’ = d’1023’ and 2.0V= b’0110011001’ = d’409’. Thus, with the format
of the result being left justified ADRESH (=RESULTHI) = b’1111 1111’ =d’255’ and
RESULTLO = B’1100 0000’=d’192’ for 5.0V and RESULTHI = 0110 0110’=d’102’ and
RESULTLO=b’0100 0000’=d’64’ for 2.0V. For analysis purpose the result on RESULTLO has
been ignored, the 2 least significant bit read as Zeros. This introduce a maximum probable error
of (2 = 2 − 1 = 3) 5 = 1.5 10 ≈ 0 in the read voltage level. If RESULTHI value of 102 is
considered to represent 2.0V and ignore RESULTLO result, the error introduced on the read
voltage level is 5 = 4.9 10 ≈ 0.
RESULTHI values ranges from 0 at 0V to 255 at 5V. To decide whether to put
ON the alarm systems, the RESULTHI register is checked if it above a value
d’101’ using the following code.
BANKSEL
RESULTHI
MOVF
RESULTHI,
W
SUBLW d'101' ;K-W, sensor voltage >=2.0V. At 2.0V
RESULTHI=102 BANKSEL STATUS
BTFSC STATUS,C ;check status of C flag, C=0(W>K)
and C=1(W<=K) GOTO ALARMOFF ;if C is set, input
voltage<2.0V, goto ALARM OFF GOTO ALARMON ;if C is
clear, voltage>=2.0V goto ALARMON
If RESULTHI value is more than 101, branch to ALARMON and turn on the
alarm and the red LED else branch to ALARMOFF and turn on the green LED
as detailed on the following code
GOTO ALARMOFF ; if C is set, input voltage<2.0V, goto ALARM OFF
GOTO ALARMON ; if C is clear, voltage>=2.0V
goto ALARMON ALARMON
BTFSS PORTA, RA5 ; check status of button.
GOTO loop2 ; if button is not pressed
(RA5=low), goto loop2 BTFSC PORTA, RA5
BCF ack, 0 ; if the button is pressed (RA5=HIGH), clear ack
loop2
BTFSS ack, 0 ; check status of button press variable
(ack) GOTO alarm_ack ; if ack=clear (ALARM OFF) else
ALARM ON
NOT_ACK
BANKSEL PORTA
BCF PORTA, RA1 ; ALARM ON BSF PORTA, RA2 ; RED LED ON
BCF PORTA, RA4 ; GREEN LED OFF
BSF leakage, 0 ; leakage bit0 is set
when there is leakage RETURN
alarm_ack
BANKSEL PORTA
BSF PORTA, RA1 ;
ALARM OFF BSF PORTA,
RA2 ;
RED LED ON BCF PORTA,
RA4 ;
GREEN LED OFF
BSF leakage, 0 ; leakage bit0 is set
when there is leakage RETURN
ALARMOFF
BANKSEL PORTA
BCF PORTA, RA5 ; RESET the button PIN (RA5)
to no press status BSF ack, 0 ; RESET the alarm ack
variable
BANKSEL PORTA
BSF PORTA, RA4 ;
GREEN LED ON BSF
PORTA, RA1 ;
ALARM OFF BCF PORTA,
RA2 ;
RED LED OFF
BCF leakage, 0 ; leakage bit0 is cleared when there is No leakage
RETURN
Gas Conc PPM subroutine
This subroutine determine how much is the gas concentration in PPM. The relation
between voltage and gas concentration is not linear. From figure 2.3 (MQ-6
Sensitivity Curve) there are intervals of voltages where there is linear relationship
between voltage and gas concentration, a constant gradient.In Figure 2.3, within
intervals of 0.5V, there is a constant gradient and given a voltage, the gas
concentration can be interpolated. Table 3.2 shows these intervals,

Table 3.2 voltage gas concentration relationship

Sensor ADC Binary Equi Binary Equi of Decimal Decimal Gas Conc
output RESULT of ADC ADC Equi of Equi of (PPM) from
voltage 10-bits ADRESH ADRESL ADRESH ADRESL Figure A.3
0-5V 0-1023

0 0 0000 0000 0000 0000 0 0 SAFE

0.5 102 0001 1001 1000 0000 25 128 SAFE

1.0 204 0011 0011 0000 0000 51 0 SAFE

1.5 306 0100 1100 1000 0000 76 128 SAFE

2.0 409 0110 0110 0100 0000 102 64 300

2.5 511 0111 1111 1100 0000 127 192 400

3.0 613 1001 1001 0100 0000 153 64 1400


3.5 716 1011 0011 0000 0000 179 0 2500

4.0 818 1100 1100 1000 0000 204 128 4160

4.5 920 1110 0110 0000 0000 230 0 7400

5 1023 1111 1111 1100 0000 255 192 10 000

Table 3.3 shows the multiplying factor for each range

Range 0-2.0V 2.0-2.5V 2.5-3.0V 3.0-3.5V 3.5-4.0V 4.0-4.5V 4.5-5.0V


Multiply Factor 0 4 38 42 66 125 104

CHAPTER IV

RESULT
Proteus Simulated Results and Practical Results

Procedures: Simulated results

Simulation results were obtained using the simulated circuit using proteus by
running the simulation. The potentiometer simulating the sensor was adjusted from
0% to 100%. At 100% the potentiometer output voltage is 5V. The potentiometer
is connected to 5V. The response of the alarm and the LEDs was noted. The value
of the gas concentration was read on the LCD and recorded in Table 4.1.

Observation

When the program is ran, the Power ON LED and the Green LED lit. The red LED
and the alarm are off.As the potentiometer is increased, at 40% (0.4*5V=2V) the
green LED turns off and the red LED starts to blink and the alarm goes off. When
the button was pressed, the alarm turns off but the red LED keeps blinking.

Table 4.1 shows the concentration level of the gas in PPM at various voltages
level.

Procedures: Practical result

Practical results were obtained using the breadboard implemented gas leakage
detector. The circuit was powered on and LPG gas from a lighter released. The
response of the alarm and the LEDs was observed. The value of the gas
concentration was read on the LCD and recorded in Table 4.1

Observation

When the detector was powered on the Power ON LED is lit and the green LED is
also lit. When the gas is released, the green LED goes off and the red LED blinks
and the alarm goes off when
the sensor output voltage is more than or equal to 2.0V. Below 2.0V, the alarm is
off and the green LED is lit while the red LED is off. The sensor output voltage is
monitored using a DDM or by displaying the value of ADRESH on the LCD.
When the button is pressed while the alarm is ON the alarm turns OFF.

The value of the gas concentration was read and recorded in Table 4.

Table 4.1 the simulated results using Proteus simulation software and the Practical results using MQ-6 sensor

Sensor ADC Binary Binary Decimal Decimal Expecte


output RESUL Equi of Equi of Equi of Equi of d Gas Simulate
voltage T ADC ADC ADRES Conc d Practical
0-5V 10-bits ADRES L (PPM) Results Results
0-1023 ADRESH ADRESL H PPM
0 0 0000 0000 0000 0000 0 0 SAFE SAFE

0.5 102 0001 1001 1000 0000 25 128 SAFE SAFE

1.0 204 0011 0011 0000 0000 51 0 SAFE SAFE FE

1.5 306 0100 1100 1000 0000 76 128 SAFE SAFE SAFE

2.0 409 0110 0110 0100 0000 102 64 300 300 300
2.3 470 0111 0101 1000 0000 117 128 360 360 360
2.4 491 0111 1010 1100 0000 122 192 380 380 380
2.5 511 0111 1111 1100 0000 127 192 400 400 400
2.65 535 1000 0111 1000 0000 135 128 700 704 704
2.9 593 1001 0100 0100 0000 148 64 1200 1198 1198
3.0 613 1001 1001 0100 0000 153 64 1400 1400 1400
3.05 624 1001 1100 0000 0000 156 0 1510 1526 1526
3.35 685 1010 1011 0100 0000 171 64 2170 2156 2156
3.5 716 1011 0011 0000 0000 179 0 2500 2500 2500
3.75 767 1011 1111 1100 0000 191 192 3330 3292 3292
3.9 797 1100 0011 0100 0000 199 64 3828 3820 3820
4.0 818 1100 1100 1000 0000 204 128 4160 4160 4160
4.15 849 1101 0100 0100 0000 212 64 5132 5160
4.45 910 1110 0011 1000 0000 227 128 7076 7035
4.5 920 1110 0110 0000 0000 230 0 7400 7400

4.55 930 1110 1000 1000 0000 232 128 7660 7608
4.65 951 1110 1101 1100 0000 237 192 8180 8128

5 1023 1111 1111 1100 0000 255 192 10 000 10 000

Discussion

The objective of the project was to design and implement a microcontroller based
cooking gas leakage detector capable of detecting gas leakage and giving an
audiovisual warning. The detector has been designed around PIC16F690
microcontroller and MQ-6 sensor and the implemented design is shown in Figure
3.3 and 3.4. According to the design, the detector is supposed to show there is gas
leakage when the sensor voltage is >=2.0V. This is with respect to Figure 2.3
which shows the relationship between the sensor voltage and the gas concentration.

When the simulated circuit for the detector is ran, with the potentiometer being 0%
(0V) the green LED lit showing there is no gas leakage. This is the same case when
the practical circuit is powered ON and no gas is released. The LCD display the
message ‘SAFE’ as shown in figure 3.11. In absence of the gas, the sensor
resistance is high such that the output voltage is almost zero. The microcontroller is
programmed such that as long as the voltage from the sensor is below 2.0V it show
display the ‘SAFE’ message and lit the green LED to show that there is no gas
leakage.
CHAPTER V
CONCLUSION
Conclusion

The objective of the project was to design and implement a cooking gas detector
capable of giving an audiovisual warning when there is a gas leakage. The detector
has been designed that uses a PIC16F690 microcontroller and a MQ-6 gas sensor.
The detector shows a green LED to show that there is no gas leakage. When there
is a gas leakage the detector flashes a red and sound an alarm. The detector has an
alarm acknowledgement button that can be used to put off the alarm when
necessary. The detector used a LCD to show the concentration of the gas leakage.
The sensor is capable of showing a gas concentration from 300ppm to 10,000ppm.

The use of a microcontroller makes the detector to have high accuracy in


displaying the gas concentration according to the relationship that exist between
the sensor voltage and gas concentration.

The detector is low cost. The components that goes into making the detector does
not exceed 1600KShs. If this is done with mass production then the detector can go
for a price of 1500ksh which would very easily affordable and competitive in the
market. The objective of designing a highly accurate low cost a microcontroller
based cooking gas leakage detector has been well achieved.
REFERENCES

[1] E. T. Goerge, Fuels and Lubricants handbook: technology, properties,


performance and testing, 2nd Edition. West Conshohocken, Pa : ASTM
International, 2003.

[2] E. Hahn, “LPG Gas Blog,” LPG Gas Blog, 2016. .

[3] “Lower-(LEL)-&-Upper-(UEL)-Explosive-Limits-.pdf.” .

[4] X. Liu, S. Cheng, H. Liu, S. Hu, D. Zhang, and H. Ning, “A Survey on Gas
Sensing Technology,” Sensors, vol. 12, no. 12, pp. 9635–9665, Jul. 2012.

[5] Great Britain and Health and Safety Commission, Dangerous substances and
explosive atmospheres: Dangerous Substances and Explosive Atmospheres
Regulations 2002. Sudbury Suffolk [England]: HSE Books, 2003.

[6] Zhengzhou Winsen Electronics Technology Co., Ltd “Flammable Gas Sensor
(MQ-6 MODEL) MANUAL,” no. VERSION 1.3, p. 7, May 2014.

[7] C. Sansone, S. Manfredi, E. Di Tucci, S. De Vito, G. Fattoruso, and F.


Tortorella, “A novel approach for detecting alerts in urban pollution
monitoring with low cost sensors,” in Measurements and Networking
Proceedings (M&N), 2013 IEEE International Workshop on, 2013, pp. 89–
93.

[8] U. B. REDDY, “DETECTION OF LPG GAS LEAKAGE SENSOR AND


ALERT SYSTEM.”

[9] “Zenith systems limited.” .

[10] “Droplex Industrial System Ltd.”


.

[11] Microchip Inc.,


“PIC16F631/677/685/687/689/690 Data Sheet,” no. DS41262C, p. 294, 2006.

[12] M. Bates and M. Bates, PIC microcontrollers: an introduction to


microelectronics, 3rd ed. Amsterdam ; Boston: Elsevier, Newnes, 2011.
[13] Michael A. Covington, PIC Assembly Language for the Complete Beginner.
The University of Georgia Athens, Georgia 30602-7415: Gernsback
Publications, Inc., 1999.

[14] “How to Use Character LCD Module,” 01-Dec-2010. .

[15] Risckey’s World, “LCD Interfacing Tutorial:,” 2014. .

[16] Electronics Engineering Herald, “LCD interface to a microcontroller covering


basics,”

LCD interface to a microcontroller covering basics, 2006. .

[17] Arpit Jain, “Insight - How Piezo Buzzer works,” 2012. .

[18] Learning about Electronics, “How to Connect a Voltage Regulator in the


circuit,” How to Connect a Voltage Regulator in the circuit. .

You might also like