Professional Documents
Culture Documents
تقرير
تقرير
تقرير
Mechatronic Design
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
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
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.
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
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.
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.
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.
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.
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.
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.
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
long sample=0;
float val=0;
long count=0;
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.
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.
[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