تقرير

You might also like

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

‫جامعة األزهــــر – غـــــــــزة‬

Al Azhar University - Gaza

FACULTY OF ENGINEERING AND


INFORMATION TECHNOLOGY

Mechatronic Design

gas Cylinder issues (Load cell and gas sensor)

Emad Asad Zourob 20190859


Hashem Mostafa Alghool 20192908
Ahmed Ibrahim Saleh 20182749
Mohammed Ziad AlGharib 20190657

SUPERVISED BY
Dr. Alaa Abuzaiter

Dec 2022
SEMESTER I 2022/2023
Acknowledgement

To Allah, we firstly admit all our praise and thanks for his gracing and
giving which enabled us to finish this work as perfect as it is. We also send our
pleasing and peace upon his prophet Mohammed the mercy and teacher for the
mankind.

Our thanks continued to our parents for their effort and care, to our
lecturers for their support and instructions, to friends and all those who helped us
to end this work. we wish to express our deepest appreciation to our college,
thanks to all our doctors and teachers, special thanks for Dr. Alaa Abu zuaiter

1
Abstract

We have seen weighing machine at many shops, where machine displays


the weight just by placing any item on the WEIGHING platform. The building of
the weighing machine can be done by 7 segment LCD display using required
DRIVER ICs, MICROCONTROLLER or by USING ARDUINO Our project is to
design weighing machine using ARDUINO & LOAD CELL, having capacity of
measuring up to 40kgs.This limit can be further increased by using the load cell of
higher capacity. And the sub problem we need to solve it, when there is a gas
leakage in the houses.
All of us know that, Safety plays a major role in today’s world and it is
necessary that good safety systems are to be implemented in places of education
and work. This work modifies the existing safety model installed in homes and this
system also be used in industries and offices.
The main objective of the work is designing microcontroller based toxic
gas detecting and alerting system. And because we use LCD in our project We
can use this LCD to send a notification if there is any gas leakage, the advantage
of this automated detection and alerting system over the manual method is that it
offers quick response time and accurate detection of an emergency and in turn
leading faster diffusion of the critical situation.

Keywords: Load cell, Arduino, Gas tube, Strain Gauge

2
TABLE OF CONTENTS

Contents
Chapter 1 Introduction............................................................................................2
1.1 Introduction................................................................................................2
1.2 Objective....................................................................................................3
Chapter 2 LITERATURE REVIEW.........................................................................8
3.1 Instruments..............................................................................................8
3.1.1 Arduino Uno..........................................................................................8
3.1.1.1 WHY ARDUINO..................................................................................8
3.1.1.2 ADVANTAGES OF ARDUINO UNO..................................................9
3.2 LCD [5]......................................................................................................9
3.3 HX711 converter [6]...............................................................................10
3.4 Load Cell / Weight Sensor [7]...............................................................11
3.5 Buzzer.....................................................................................................11
3.6 MQ-5 Gas Sensor...................................................................................12
3.7 Power Supply.........................................................................................12
Chapter 3 Mathematical Model.............................................................................14
4 Explained...................................................................................................14
Chapter 4 Conclusion and Future Work CONCLUSION AND.............................20
5.1 Conclusion...............................................................................................20
5.2 Further Work............................................................................................20

3
LIST OF FIGURES
Figures.No Name Of The Figures Page.No

FIG 3.1 Arduino Uno…………………...... 8

FIG 3.2 LCD 16x2……………………...... 9

FIG 3.3 HX711…………………………… 10

FIG 3.4 Load Cell………………………… 11

FIG 3.5 Buzzer……………………………..11

FIG 3.6 Gas Sensor MQ5……………….. 12

FIG 3.7 Power Supply Adapter…………. 12

FIG 4.1 block diagram…………………… 14

FIG 4.2 simulation on proteus………...... 15

4
Chapter 1:
Introduction and LITERATURE
REVIEW

5
Chapter 1 Introduction
1.1 Introduction
Natural gas is of great importance due to its daily and routine use all over the
world, as it is the main engine for carrying out all vital activities, as it is used daily
in homes, as it is involved in the process of cooking, heating, and power
generation to produce electricity, and it consumes about 24% of natural gas in
electricity production, according to a 2013 statistic in the United States of
America.
It is also used in the industrial sector, transportation sector and many other
sectors. With the increase in the development of technology and the human race,
we have failed to take care of the surrounding environment in which we live and
preserve it from pollutants. Perhaps the strongest effects in the surrounding
environment are air pollution and the accompanying damages that affect nature
and humanity as a whole.
Today, we present a solution to a problem that has a great impact on man and the
environment around him, which is measuring the percentage of gas in the tube,
because it has a large share among our problems in daily life.
Therefore, we found an appropriate solution to help us overcome this problem, by
using integrated systems that provide great reliability and elimination of the
problem.
We also discussed in our problem a big and dangerous problem and the
possibility of its occurrence is great, which is the problem of gas leakage, a
problem that has severe damage to humanity, because many of us do not feel
gas leakage due to the low percentage of propane in the gas, which in turn
provides the smell through which we distinguish the smell of gas leakage

6
1.2 Objective
1- To develop a protocol for regularly monitoring the weight of the gas jar and
detecting gas leaks to ensure the safety of the environment and personnel.

2- To optimize the sensitivity and accuracy of the gas leak detection system,
such as by calibrating the gas detector or choosing the most suitable
detection method.

3- To determine the weight of the gas jar at different levels of fill in order to
accurately track the consumption of gas and identify any leaks.

4- To evaluate the safety of a gas jar by regularly checking for gas leaks and
ensuring that it is not overweight, as an overweight gas jar may pose a risk
of explosion.

5- To develop a method for accurately measuring the weight of a gas jar and
the amount of gas it contains, and to validate the accuracy of this method
through repeated measurements.

6- To determine the weight of a gas jar accurately and consistently using a


balance or other weighing device.

7- Implement a system for alerting the user if a gas leak is detected, such as
by sending an alert to a smartphone or activating an alarm.

7
Chapter 2
Review of the Literature

8
f Related Works
2.1 Review of the Literature
There are several methods that can be used to measure the weight of a gas jar.
Some of these methods include:
a) Balance scale: This method involves using a balance scale to measure the
weight of the gas jar. This method is simple and accurate, but it requires
the gas jar to be removed from the system in order to be weighed.
 advantages
1. accurate
2. Easy to use Needs to remove the gas jar from the system
 disadvantages
1. You need to remove the gas jar from the system
2. You need to make an effort to measure the percentage of gas
inside the jar

b) Pressure gauge: A pressure gauge can be used to measure the pressure


inside the gas jar. By comparing the measured pressure to the known
pressure of the gas at a given temperature, the weight of the gas can be
calculated. This method does not require the gas jar to be removed from
the system.
 advantages
1. it does not require the gas jar to be removed from the system
2. Accurate and real time design
 disadvantages
1. Difficult to use because many people cannot uses pressure
readings
2. You need mathematical equations to know the weight of the gas
jar
c) load cell: we can use a load cell or force sensor to measure the weight of
the gas jar. These devices work by measuring the force applied to them,
which can be used to calculate the weight of the gas jar.
 Advantages
1. Easy to use and accurate
 Disadvantages
1. Difficult in design and manufacturing process because it
requires special software

9
There are many applications for detection and monitoring of the leakage of gas,
but still the researchers will make the efforts in making the advanced application
where the cost of the application will be lesser.

a) Authors of [1] proposed system defines that detection and monitoring of the
LPG gas is sensed using MQ – 5 sensors. In the system, when the leakage
of gas is detected, the buzzer will be on, along with that the alert message
will be displayed in the LCD. And while monitoring of gas based on the
cylinder weight, which is measured using the load sensor, it will send the
message to the owner of the application or system.

b) Authors of [2] proposed system, the authors used the push bullet for the
rapid transfer of the data of the message using the Wi-Fi module which
functions when there is leakage of gas which is connected to the Arduino
UNO.

c) Authors of [3] proposed system, the sensor which is used to detect LPG
gas is MQ – 6, for methane gas, the sensor used is MQ – 4, and benzene
is detected using the sensor using MQ –135 respectively. The output of the
sensors will be given in form of PPM. Further, ESP32 is used for the
sending and receiving of the messages.

d) Authors of [4] proposed system, the application is for the monitoring of the
gas where it sends the message. Node MCU’s is powered as the sensors
where the load sensors always monitor the cylinder.

10
Chapter 3
Instruments and components

11
Chapter 2 LITERATURE REVIEW
3.1 Instruments
The instruments that are used in this project are:
3.1.1 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 (CSTCE16M0V53-R0), 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... You can tinker with your Uno without worrying too much about doing
something wrong, worst case scenario you can replace the chip for a few dollars
and start over again.

Figure 3.1: Arduino Uno.

3.1.1.1 WHY ARDUINO


Thanks to its simple and accessible user experience, Arduino has been used in
thousands of different projects and applications. The Arduino software is easy-to-
use for beginners, yet flexible enough for advanced users. It runs on Mac,
Windows, and Linux.
Teachers and students use it to build low cost scientific instruments, to prove
chemistry and physics principles, or to get started with programming and robotics.
Designers and architects build interactive prototypes. Arduino is a key tool to learn
new things. Anyone - children, hobbyists, artists, programmers - can start
tinkering just following the step by step instructions of a kit, or sharing ideas online
with other members of the Arduino community.

12
3.1.1.2 ADVANTAGES OF ARDUINO UNO
- Inexpensive - Arduino boards are relatively inexpensive compared to
other microcontroller platforms. The least expensive version of the
Arduino module can be assembled by hand.
- Cross-platform - The Arduino Software (IDE) runs on Windows,
Macintosh OSX, and Linux operating systems. Most microcontroller
systems are limited to Windows.
- Simple, clear programming environment - The Arduino Software (IDE)
is easy-to-use for beginners, yet flexible enough for advanced users to
take advantage of as well. For teachers, it's conveniently based on the
Processing programming environment, so students learning to program
in that environment will be familiar with how the Arduino IDE works.
- Open source and extensible software - The Arduino software is
published as open source tools, available for extension by experienced
programmers. The language can be expanded through C++libraries,
and people wanting to understand the technical details can make the
leap from Arduino to the AVR C programming language on which it's
based. Similarly, you can add AVR-C code directly into your Arduino
programs if you want to.

3.2 LCD [5]


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 2 such lines. In this LCD each character is
displayed in 5x7 pixel matrix. The 16 x 2 intelligent alphanumeric dot matrix
display is capable of displaying 224 different characters and symbols. This LCD
has two registers, namely, Command and Data.

Figure 3.2: LCD 16x2.

13
3.3 HX711 converter [6]
HX711 is an electronic scale module, whose working principle is to convert the
measured changes in resistance value changes, through the conversion circuit
into electrical output.
The HX711 is a precision 24-bit analog-to-digital converter (ADC) that is designed
for weighing scales and industrial control applications to interface directly with a
bridge sensor.
It is specially made for amplifying signals from cells and reporting them to another
microcontroller.
Our Grove – ADC for Load Cell (HX711) is a 24-bit A/D converter designed
specifically for the load cell. It contains an on-chip low noise programmable
amplifier with an optional gain of 32, 64 and 128.
The HX711 chip integrates a regulated power supply, an on-chip clock oscillator,
and other peripheral circuits, which have the advantages of high integration, fast
response, and strong anti-interference.
With the Grove I2C connector and 4-pin screw terminal, it becomes quite easy to
connect the load cell and microcontroller, no soldering required. You can build
your own Arduino weigh sensor system in just a few simple steps.

Figure 3.3: HX711.

14
3.4 Load Cell / Weight Sensor [7]
A load cell is an instrument that helps to determine the size of a load (either a
force or weight) and converts the force into measurable electrical output.
They have many purposes including being able to tell the weight of something,
weight change over time and also capable of measuring strain and load on a
surface
A load cell consists of a metal core and a set of electrical resistances that
transform when a force is applied to it. But after the force is removed, it returns to
its original state. The reversibility of this material determines the quality and
accuracy of the load cell.

Figure 3.4: load cell.

3.5 Buzzer
A piezo buzzer is an electric device used to produce a tone. These lightweight
and simply-constructed buzzers are inexpensive yet reliable and come in a range
of sizes and frequencies to meet the needs of nearly any application.

Figure 3.5: Buzzer.

15
3.6 MQ-5 Gas Sensor
Sensitive for LPG, natural gas, coal gas.
Output voltage boosts along with the concentration of the measured gases
increases. Fast response and recovery, Adjustable sensitivity, Signal output
indicator.

Figure 3.6: MQ-5 gas sensor.

3.7 Power Supply adapters


A power supply for electronic devices. Also called an "AC adapter" or "charger,"
power adapters plug into a wall outlet and convert AC to a single DC voltage.
Computers use multiple DC voltages, and the power adapter is the external part
of the power supply for a laptop. The additional DC voltages are created by
internal circuits. Desktop computer power supplies are in one internal unit, which
converts AC to all DC voltages.

Figure 3.7: power Supply adapter.

16
Chapter 4
Experiment

17
Chapter 3 Mathematical Model
3
4 Explained
In this project we will be “interfacing HX711 Load cell amplifier and gas sensor
with Arduino” and 16*2 LCD for designing Weighing Machine using Arduino Load
Cell & HX711 Module. This is a simple “Arduino Weight Measurement and gas
Leak Sensor project”.
The electronic weighing machine uses a load cell to measure the weight produced
by the load, here most load cells are following the method of a strain gauge, which
converts the pressure (force) into an electrical signal, these load cells have four
strain gauges that are hooked up in a Wheatstone bridge formation. If you want to
measure the higher weights of more than 10KG, you can check our 40Kg
Weighing Scale. You can also make your own IoT Weighing Scale using
ESP8266 WiFi Module.
The Load Cell Amplifier is a small breakout board for the HX711 IC that allows
you to easily read load cells to measure weight. By connecting the amplifier to
your microcontroller, you will be able to read the changes in the resistance of the
load cell, and with some calibration, you’ll be able to get very accurate weight
measurements.
MQ2 It is a versatile sensor that can detect LPG, smoke, alcohol, propane,
hydrogen, methane, and carbon monoxide concentrations in the air. This makes
the MQ2 Gas Sensor Module an excellent choice for building an indoor air quality
monitoring system, a breathalyzer, or an early fire detection system.
The MQ2 sensor is one of the most widely used in the MQ sensor series. It is a
MOS (Metal Oxide Semiconductor) sensor. Metal oxide sensors are also known
as Chemoreceptors’ because sensing is based on the change in resistance of the
sensing material when exposed to gasses.

18
4.1 Schematic

Figure4.2: Interfacing HX711 Load Cell and gas sensor with Arduino.

19
4.2 Code
#include <LiquidCrystal.h> // library for lcd
LiquidCrystal lcd(7, 6, 5, 4, 3, 2);
// pin 2 on Arduino uno connect with D4 on LCD
// pin 3 on Arduino uno connect with D5 on LCD
// pin 4 on Arduino uno connect with D6 on LCD
// pin 5 on Arduino uno connect with D7 on LCD
// pin 6 on Arduino uno connect with Enable on LCD
// pin 7 on Arduino uno connect with register selsct on LCD

#define DT A0 // data line for load cell


#define SCK A1 //clock line for load cell
#define sw 9
#define MQPin A2 //analog pin for gas sensor
#define buzzer 1 // digital pin for buzzer

long sample=0;
float val=0;
long count=0;

unsigned long readCount(void)


{
unsigned long Count;
unsigned char i;
pinMode(DT, OUTPUT);
digitalWrite(DT,HIGH);
digitalWrite(SCK,LOW);
Count=0;
pinMode(DT, INPUT);
while(digitalRead(DT));
for (i=0;i<24;i++)
{
digitalWrite(SCK,HIGH);
Count=Count<<1;
digitalWrite(SCK,LOW);
if(digitalRead(DT))
Count++;
}
digitalWrite(SCK,HIGH);

20
Count=Count^0x800000;
digitalWrite(SCK,LOW);
return(Count);
}

void setup()
{
pinMode(SCK, OUTPUT);
pinMode(sw, INPUT_PULLUP);
pinMode(MQPin, INPUT_PULLUP);
pinMode(buzzer, OUTPUT);

lcd.begin(16, 2);
lcd.print(" Weight ");
lcd.setCursor(0,1);
lcd.print(" Measurement ");
delay(1000);
lcd.clear();
calibrate();
}

void loop()
{
int gas_value = digitalRead(MQPin);
if(gas_value==HIGH)
{
digitalWrite(buzzer, HIGH);
delay(100);
}
else
{
digitalWrite(buzzer, LOW);
}
count= readCount();
int w=(((count-sample)/val)-2*((count-sample)/val))/100;
lcd.setCursor(0,0);
lcd.print("Percentag Of Gas:");
lcd.setCursor(0,1);
lcd.print(w);
lcd.print(" % ");

if(digitalRead(sw)==0)
{
val=0;
sample=0;
w=0;
count=0;

21
calibrate();
}

void calibrate()
{
lcd.clear();
lcd.print("Calibrating...");
lcd.setCursor(0,1);
lcd.print("Please Wait...");
for(int i=0;i<100;i++)
{
count=readCount();
sample+=count;
}
sample/=100;
lcd.clear();
lcd.print("Put 100g & wait");
count=0;
while(count<1000)
{
count=readCount();
count=sample-count;
}
lcd.clear();
lcd.print("Please Wait....");
delay(2000);
for(int i=0;i<100;i++)
{
count=readCount();
val+=sample-count;
}
val=val/100.0;
val=val/100.0; // put here your calibrating weight
lcd.clear();
}

22
Chapter 5
Conclusion and Future
Work

23
Chapter 4 Conclusion and Future Work CONCLUSION AND
5
3
4
5
5.1 Conclusion.
The problem that we are trying to solve during our presentation is a problem that
lies in the expiration of gas inside the tube at times that we do not know, so there
must be an appropriate solution that suits the size of the problem, so we relied on
measuring the weight of the tube through a microcontroller with the help of the
load seal sensor There is a sub-problem of our main problem that must be solved,
which is gas leakage from the tube, and we were able to find a solution to it
through the use of a gas leakage sensor and the use of a sound alarm when gas
leakage.

In conclusion, we hope to God that we have succeeded in finding a solution to the


problem at hand, and we have striven to be the best solution.

5.2 Further Work


In future we can be developed on the project using IoT where the ratio of gas is
calculated Sensing a gas leak and transmitting data wirelessly using Mode with
NodeMCU ESP8266 12E Board

24
Appendix A
Appendix Table A : Some of the equations used in the report:

Equations

25
BIBLIOGRAPHY
______________________________________
[1] Suma V, Ramya R Shekar, Akshay Kumar A, “Gas Leakage Detection Based on IOT,”
Proceedings of the Third International Conference on Electronics Communication and Aerospace
Technology [ICECA 2019]IEEE Conference Record # 45616; pp.no 1312 – 1315.

[2] M Athish Subramanian, Naveen Selvam, Rajkumar S, R Mahalakshmi, J Ramprabhakar , “Gas


Leakage Detection System using IoT with integrated notifications using Push bullet-A Review”,
Proceedings of the Fourth International Conference on Inventive Systems and Control (ICISC
2020) IEEE Xplore Part Number: CFP20J06-ARTI; pp.no 359– 363.

[3] Ravi Kishore Kodali, Greeshma, R.N.V, Kusuma Priya Nimmanapalli, Yatish Krishna Yogi
Borra, “IOT Based Industrial Plant Safety Gas Leakage Detection System”, International
Conference on Computing Communication and Automation (ICCCA), pp.no, 1-5, published in
2018.

[4] Nagib Mahfuz, Shawan Karmokar, Md. Ismail Hossain Rana, “A Smart Approach of LPG
Monitoring and Detection System Using IoT”, 11th International Conference on Computing
Communication and Networking Technologies(ICCCNT), published in 2020

[5] https://www.thingbits.in/products/standard-lcd-16x2-display

[6 ] https://www.seeedstudio.com/blog/2019/11/26/10-things-you-can-do-with-your-hx711-and-
load-cell/

[7 ] https://www.seeedstudio.com/blog/2019/11/26/10-things-you-can-do-with-your-hx711-and-
load-cell/

26

You might also like