Msi Project Report Initial

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 15

COMSATS UNIVERSITY ISLAMABAD

LAHORE-CAMPUS

Report Project Title:

To make automatic home water geyser


SUBMITTED BY
Sohaib Shaz (fa20-bee-049)
Muhammad Umar Sandhu (fa20-bee-125)

SUBMITTED TO:

Sir Faisal Tariq

1
Table of contents

Introduction: ...............................................................................................................................................3

Motivation of the project: ..........................................................................................................................3

Aim and Objectives of the project:............................................................................................................4

Report organization:...................................................................................................................................5

Chapter One:...........................................................................................................................................5

Chapter Two: ..........................................................................................................................................5

Chapter Three:........................................................................................................................................5

Chapter Four:..........................................................................................................................................5

Chapter Five:...........................................................................................................................................5

Chapter Six:.............................................................................................................................................5

Project Implementation: ............................................................................................................................6

Methodology ............................................................................................................................................6

Block diagram .........................................................................................................................................7

Circuit Diagram ......................................................................................................................................8

Flow Charts.............................................................................................................................................9

Components Details..............................................................................................................................10

Arduino………………………………….............................................................................................10

Flame sensor…………….....................................................................................................................11

INTRODUCTION:

2
Science and technology have advanced our life in many ways. It facilitates the process
of industrialization as well as modernization of the world. It has blessed us with many
sophisticated devices by facilitating our life. One of the main things which is used in almost
every house is water heater. different types water heaters are available in the market for
example instant water heater which heat the water on instant whenever we open the tap it
starts heating the water but instant geyser do not have hot water storage tanks, which is the
drawback if we are living in the place like hostel. Another type of heater is fully electric
heater which is much more reliable than instant geyser but it consumes a lot of electricity
and we know there are energy crisis specially in our country. Another type of geyser is GAS
GEYSER which basically operates on gas and have large tank to store and heat the water but
major problem with this geyser is that it operates manually.

Nowadays where everything is partially or fully automatic, using that type of geyser
gives very cheap experience and that’s why mostly people prefer buying other two type of
water heaters.
We are going to try to overcome the drawbacks which are present in above discussed
geysers. We have tried to convert GAS GEYSER to automatic. Whenever gas turns on it
automatically detects gas and turn the burner on and heat the water and due to it’s large
water tank it turns more reliable than other heaters.

Motivation of the project:

Hot water is used widely in homes and it become much difficult in winters. In early times
water was heated by different methods as time passes people become modern they’ve found
new ways and eventually geyser invented.
We have make some changes to the GAS GEYSER to make it automatic it use it much
easier than before.

3
Aims and objectives of the project:

Aims:

Our project aim is to automatic the gas geyser which automatically detects the gas and turns
the burner on. Main aims of the project are discussed below

1. To detect the gas using gas sensor mq-2 interfaced with Arduino uno

2. To turn the lighter on, which lights up from sparker (start after gas detection)

3. after lighter turns on flame sensor sense the flame and rotate the stepper motor to turn
the gas valve on

Objective:

to turn the gas geyser to automatic on, using gas sensor ,flame sensor ,stepper motor and
connecting wires , breadboard etc. Main objective of the project is :

 To code on microcontroller to get the desired output on the other hardware


components
 To interface the hardware on the breadboard
 To provide the desired voltages to hardware component from voltages and Ground
pins of the microcontroller
 To interface the Arduino uno Microcontroller with our PC

4
Report organization:
This project report is organized in the following order:

Chapter One:
Chapter one is introduction to the project. This chapter is all about the problems which
the project intends to solve and the means through which it can be solved. The motivation of
the project, the objectives of the project included.

Chapter Two:
Explanation and discussion about the methodology that have been used to complete
this project. There are two parts in this chapter which are the software development (code)
and hardware implementation.

Chapter Three:
This chapter is all about the project’s practical applications, in this project we used all
that equipment after reading the contextual knowledge that will not lead to any type of
misuse or any act of shame in future.

Chapter Four:
This chapter is all about Project Analysis with reference to environment and
sustainability. Which covers that the benefits of the project on the society and environment

Chapter Five:

This chapter is about conclusion.

5
Project Implementation:

Methodology

 The system is fully automatic. First assemble the sensors and wires on the breadboard.
Properly give the vcc and ground, so that no wire is short and circuit is safe.

 Now to look at the working of the project we first attached our Arduino uno with our PC
that has Arduino ide software in it with help of USB wire. Right after we connected it to
our PC our LCD turns on. The code in the software is written in such a way that it can be
modified.

 We then open our Arduino ide software that has a code in it to run the project, compile
and upload it in our microcontroller. We then saw that our LCD is displaying GAS: on it.
We then give gas sensor some value by turning on the gas

 If the gas sensor indicates by turning on it’s led, a message will appear on the lcd

 if there is no led indication on the gas sensor then simple GAS: is displayed on the screen

 after successfully turning on the gas sensor our system burns the lighter using spark and
circuit moves to the flame sensor.

 flame sensor sense the flame from the lighter and turns the stepper motor on. Stepper
motor than turns the gas valve on to turn the burner on

 After then we used a software named as Serial Port Monitor to cross check our code
whether it’s running correctly or it need some changes.

Block diagram:

6
Circuit diagram:

1.

2.

7
Component details:

Our project “To make automatic home water geyser ” comprises of hardware
components such as Microcontroller Arduino , 16x2 LCD display and i2c module, Jumper
wires, breadboard, flame sensor, gas sensor, stepper motor, stepper motor driver, relay 12
volts, sparker/stunner
The main objectives of our project are as follows

 Microcontroller (Arduino uno ):

Arduino UNO is a microcontroller board based on the ATmega328P. It has 14 digital input/output
pins (of which 6 can be used as PWM outputs), 6 analog inputs, a 16 MHz ceramic resonator, a USB
connection, a power jack, an ICSP header and a reset button. It contains everything needed to support the
microcontroller; simply connect it to a computer with a USB cable or power it with a AC-to-DC adapter or
battery to get started. The Arduino language is a subset of C/C++, where you can also use assembly for
ultra-low-level code.

8
 Arduino uno pinout:

 16x2 LCD Display:

An LCD (Liquid Crystal Display) screen is an electronic display module and has a wide
range of applications. A 16x2 LCD display is very basic module and is very commonly used in
various devices and circuits. A 16x2 LCD means it can display 16 characters per line and there are

9
2 such lines. In this LCD each character is displayed in 5x7 pixel matrix. The 16 x 2 intelligent
alphanumeric dot matrix display can display 224 different characters and symbols. This LCD has
two registers, namely, Command and Data

 Gas sensor (mq-2)

The MQ-2 is a smoke and combustible gas sensor from Winsen. It can detect flammable gas in a
range of 300 - 10000ppm. It's most common use is domestic gas leakage alarms and detectors with a high
sensitivity to propane and smoke.

10
 IR Flame sensor:

A flame detector is a type of sensor that can detect and respond to the presence of a flame. These
detectors can identify smokeless liquid and smoke that can create open fire. For example, in boiler furnaces
flame detectors are widely used, as a flame detector can detect heat, smoke, and fire.

 Stepper motor and driver (uln 2003)

stepper drives work by sending current through various phases in pulses to the
stepper motor. There are four types: wave drives (also called one-phase-on drives),
two-phase on, one-two phase-on drives and microstepping drives. Wave or one-
phase-on drives work with only one phase turned on at a time

11
 Code :

#include <MQ2.h>
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <Stepper.h>
//I2C pins declaration
LiquidCrystal_I2C lcd(0x27, 16, 2);
int Analog_Input = A0;
int lpg, smoke;

//spark plug intilizing


int outPin = 13;

MQ2 mq2(Analog_Input);

int flame_sensor_pin = 2 ; // initializing pin 12 as the sensor output pin


int flame_pin = HIGH ; // state of sensor

// stepper motor
const int stepsPerRevolution = 1024;
Stepper myStepper = Stepper(stepsPerRevolution, 8, 10, 9, 11);

void setup(){
Serial.begin(9600);

12
lcd.begin();//Defining 16 columns and 2 rows c of lcd display
lcd.backlight();
mq2.begin();
pinMode ( flame_sensor_pin , INPUT ); // declaring sensor pin as input pin for
Arduino
pinMode(outPin, OUTPUT); // relay pin as output
Serial.begin ( 9600 ); // setting baud rate at 9600

}
void loop(){
float* values= mq2.read(true); //set it false if you don't want to print the
values in the Serial
lpg = values[0];
lpg = mq2.readLPG();

smoke = values[2];
smoke = mq2.readSmoke();
lcd.setCursor(0,0);
lcd.print("gas:");
lcd.print(lpg);
// spark
if(mq2.readLPG()==0){

digitalWrite(outPin, HIGH);

else
{

digitalWrite(outPin, LOW);

//lcd.setCursor(7,0);
// lcd.print("SMOKE:");
// lcd.print((smoke*100)/1000000);
//lcd.print("%");

13
//Flame
flame_pin = digitalRead ( flame_sensor_pin ) ; // reading from the sensor
if (flame_pin == LOW ) // applying condition
{
Serial.println ( " FLAME ON " ) ;
lcd.setCursor(0,1);
lcd.print("flame on");

// stepper on
// Rotate CW slowly at 5 RPM

myStepper.setSpeed(5);
myStepper.step(stepsPerRevolution);

delay(2000);
}
}

else
{

Serial.println ( " no flame " ) ;


lcd.setCursor(0,1);
lcd.print("no flame");

//stepper
//Rotate CCW quickly at 10 RPM
myStepper.setSpeed(20);
myStepper.step(-stepsPerRevolution);

delay(2000);

}
delay(500);
}

14
 Project pictures:

 Conclusion:

15

You might also like