Smoke Detection Using MQ-2 Gas Sensor - Arduino Project Hub
Smoke Detection Using MQ-2 Gas Sensor - Arduino Project Hub
Sign In (https://www.hackster.io/users/auth/arduino?
current_site=arduino&setup=true&redirect_to=%2Fprojecthub%2FAritro%2Fsmoke-
detection-using-mq-2-gas-sensor-79c54a)
Arduino Project Hub
ARDUINO CREATE IS
N O W A (https://create.arduino.cc/projecthub)
VAILABLE ON
CHROME OS!
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO-
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE)
DOWNLOAD THE APP
Device Manager
(https://create.arduino.cc/devices)
Digital
Store
(https://store.arduino.cc/digital/)
monitoring (/projecthub/projects/tags/monitoring)
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 1/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
ARDUINO CREATE IS
Arduino Project Hub
N O W A (https://create.arduino.cc/projecthub)
VAILABLE ON
CHROME OS!
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE)
DOWNLOAD THE APP
Arduino UNO & Genuino
UNO
× 1
(/projecthub/products/buy/
( (/proj (/projecthub/product
41? Device Manager
/ ecthu s/buy/41?
s=BAhJIhIxOTc4MSxQcm9qZ
(https://create.arduino.cc/devices) p b/pro s=BAhJIhIxOTc4MSxQ
(/projecthub/pro WN0BjoGRUY%3D%0A)
r ducts cm9qZWN0BjoGRUY%
ducts/buy/41?
o /buy/ 3D%0A)
s=BAhJIhIxOTc4
j 41?
MSxQcm9qZWN
e s=BA
0BjoGRUY%3D%
c hJIhIx
0A)
t OTc4
h MSxQ
Digital u cm9q
Store
b ZWN
(https://store.arduino.cc/digital/) / 0Bjo
p GRUY
r %3D
Arduino Web Editor
o %0A)
(https://create.arduino.cc/editor) d
u
c
t
Arduino IoT Cloud
s
(https://create.arduino.cc/iot) /
b
(https://www.hackster.io/users/auth/arduino?
u
current_site=arduino&setup=true&redirect_to=%2Fprojecthub%2FAritro%2Fsm
Getting Startedy
detection-using-mq-2-gas-sensor-79c54a)
/
(https://create.arduino.cc/getting-started)
NOW CHROME 4
OS READY! 1
?
s
=
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 2/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
B
A
h
Arduino Project Hub
ARDUINO CREATE IS
N O W A (https://create.arduino.cc/projecthub)
VAILABLE ON JI
CHROME OS! h
I
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO-
x
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE)
O
DOWNLOAD THE APP
T
c
4
Device ManagerM
S
(https://create.arduino.cc/devices)
x
Q
c
m
9
q
Z
W
Digital
N
Store
0
(https://store.arduino.cc/digital/) B
j
o
Arduino Web Editor
G
(https://create.arduino.cc/editor) R
U
Y
%
Arduino IoT Cloud
3
(https://create.arduino.cc/iot) D
(https://www.hackster.io/users/auth/arduino?
%
current_site=arduino&setup=true&redirect_to=%2Fprojecthub%2FAritro%2Fsm
0
detection-using-mq-2-gas-sensor-79c54a)
Getting StartedA
)
(https://create.arduino.cc/getting-started)
NOW CHROME
OS READY!
×
(
/
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 3/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
/
Breadboard (generic) p
(/projecthub/products/buy/ r
A R D U I N O C R E A T E42749?
IS Arduino Project Hub
o 1
N O W A (https://create.arduino.cc/projecthub)
VAILABLE ON j (/proj (/projecthub/product
CHROME OS! s=BAhJIhIxOTc4MSxQcm9qZ
WN0BjoGRUY%3D%0A) e ecthu s/buy/42749?
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO-
(/projecthub/pro c b/pro s=BAhJIhIxOTc4MSxQ
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE)
ducts/buy/42749 t ducts cm9qZWN0BjoGRUY%
DOWNLOAD THE APP
? h /buy/ 3D%0A)
s=BAhJIhIxOTc4 u 4274
MSxQcm9qZWN b 9?
0BjoGRUY%3D% / s=BA
Device Managerp hJIhIx
0A)
(https://create.arduino.cc/devices) r OTc4
o MSxQ
d cm9q
u ZWN
c 0Bjo
t GRUY
s %3D
/ %0A)
Digital b
Store u
(https://store.arduino.cc/digital/) y
/
4
2
Arduino Web Editor
7
(https://create.arduino.cc/editor)
4
9
?
s
Arduino IoT Cloud
=
(https://create.arduino.cc/iot)
B
(https://www.hackster.io/users/auth/arduino?
A
current_site=arduino&setup=true&redirect_to=%2Fprojecthub%2FAritro%2Fsm
h
Getting Started
detection-using-mq-2-gas-sensor-79c54a)
JI
(https://create.arduino.cc/getting-started)
h
NOW CHROME
I
OS READY! x
O
T
c
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 4/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
c
4
M
ARDUINO CREATE IS
Arduino Project Hub
S
N O W A (https://create.arduino.cc/projecthub)
VAILABLE ON
x
CHROME OS!
Q
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO- c
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE) m
DOWNLOAD THE APP 9
q
Z
W
Device ManagerN
(https://create.arduino.cc/devices) 0
B
j
o
G
R
U
Y
Digital %
Store 3
(https://store.arduino.cc/digital/) D
%
0
Arduino Web EditorA
(https://create.arduino.cc/editor) )
m
9
q
Arduino Project Hub
ARDUINO CREATE IS
N O W A (https://create.arduino.cc/projecthub)
VAILABLE ON Z
CHROME OS! W
N
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO-
0
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE)
B
DOWNLOAD THE APP
j
o
G
Device Manager
R
U
(https://create.arduino.cc/devices)
Y
%
3
D
%
0
A
)
Digital
5 mm LED: Red Store
(/projecthub/products/buy/
(https://store.arduino.cc/digital/)
× 1
56525?
( (/proj (/projecthub/product
s=BAhJIhIxOTc4MSxQcm9qZ
/ ecthu s/buy/56525?
WN0BjoGRUY%3D%0A)
Arduino Web Editor
p b/pro s=BAhJIhIxOTc4MSxQ
(/projecthub/pro
(https://create.arduino.cc/editor) r ducts cm9qZWN0BjoGRUY%
ducts/buy/56525
o /buy/ 3D%0A)
?
s=BAhJIhIxOTc4 j 5652
e 5?
MSxQcm9qZWN Arduino IoT Cloud
c s=BA
0BjoGRUY%3D%
(https://create.arduino.cc/iot) t hJIhIx
0A) (https://www.hackster.io/users/auth/arduino?
h OTc4
current_site=arduino&setup=true&redirect_to=%2Fprojecthub%2FAritro%2Fsm
u MSxQ
Getting Started
detection-using-mq-2-gas-sensor-79c54a)
b cm9q
(https://create.arduino.cc/getting-started)
/ ZWN
NOW CHROME p 0Bjo
OS READY! r GRUY
o %3D
d %0A)
u
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 7/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
u
c
t
ARDUINO CREATE IS
Arduino Project Hub
s
N O W A (https://create.arduino.cc/projecthub)
VAILABLE ON /
CHROME OS!
b
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO- u
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE) y
DOWNLOAD THE APP /
5
6
5
Device Manager2
(https://create.arduino.cc/devices) 5
?
s
=
B
A
h
JI
Digital h
Store I
x
(https://store.arduino.cc/digital/)
O
T
c
Arduino Web Editor
4
(https://create.arduino.cc/editor)
M
S
x
Q
Arduino IoT Cloud
c
(https://create.arduino.cc/iot)
m
(https://www.hackster.io/users/auth/arduino?
9
current_site=arduino&setup=true&redirect_to=%2Fprojecthub%2FAritro%2Fsm
q
detection-using-mq-2-gas-sensor-79c54a)
Getting Started
Z
(https://create.arduino.cc/getting-started)
W
NOW CHROME N
OS READY! 0
B
j
o
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 8/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
o
G
R
ARDUINO CREATE IS
Arduino Project Hub
U
N O W A (https://create.arduino.cc/projecthub)
VAILABLE ON Y
CHROME OS!
%
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO- 3
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE) D
DOWNLOAD THE APP %
0
A
)
Device Manager
5 mm LED: Green
(https://create.arduino.cc/devices)
(/projecthub/products/buy/
× 1
56524?
( (/proj (/projecthub/product
s=BAhJIhIxOTc4MSxQcm9qZ
/ ecthu s/buy/56524?
WN0BjoGRUY%3D%0A)
(/projecthub/pro p b/pro s=BAhJIhIxOTc4MSxQ
ducts/buy/56524 r ducts cm9qZWN0BjoGRUY%
o /buy/ 3D%0A)
?
j 5652
s=BAhJIhIxOTc4 Digital
MSxQcm9qZWN e 4?
Store
0BjoGRUY%3D% c s=BA
(https://store.arduino.cc/digital/) t hJIhIx
0A)
h OTc4
u MSxQ
Arduino Web Editor
b cm9q
(https://create.arduino.cc/editor) / ZWN
p 0Bjo
r GRUY
o %3D
Arduino IoT Cloud
d %0A)
(https://create.arduino.cc/iot) u
c
(https://www.hackster.io/users/auth/arduino?
t
current_site=arduino&setup=true&redirect_to=%2Fprojecthub%2FAritro%2Fsm
Getting Starteds
detection-using-mq-2-gas-sensor-79c54a)
/
(https://create.arduino.cc/getting-started)
NOW CHROME b
OS READY! u
y
/
5
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 9/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
6
5
2
Arduino Project Hub
ARDUINO CREATE IS
N O W A (https://create.arduino.cc/projecthub)
VAILABLE ON 4
CHROME OS! ?
s
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO-
=
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE)
B
DOWNLOAD THE APP
A
h
JI
Device Managerh
I
(https://create.arduino.cc/devices)
x
O
T
c
4
M
S
x
Digital
Q
Store
c
(https://store.arduino.cc/digital/) m
9
q
Arduino Web Editor
Z
(https://create.arduino.cc/editor) W
N
0
B
Arduino IoT Cloud
j
(https://create.arduino.cc/iot) o
(https://www.hackster.io/users/auth/arduino?
G
current_site=arduino&setup=true&redirect_to=%2Fprojecthub%2FAritro%2Fsm
R
detection-using-mq-2-gas-sensor-79c54a)
Getting StartedU
Y
(https://create.arduino.cc/getting-started)
NOW CHROME %
OS READY! 3
D
%
0
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 10/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
A
)
ARDUINO CREATE IS Arduino Project Hub
Buzzer
N O W A (https://create.arduino.cc/projecthub)
VAILABLE ON
CHROME OS! (/projecthub/products/buy/
× 1
42750?
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO-( (/proj (/projecthub/product
s=BAhJIhIxOTc4MSxQcm9qZ
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE) / ecthu s/buy/42750?
WN0BjoGRUY%3D%0A)
DOWNLOAD THE APP p b/pro s=BAhJIhIxOTc4MSxQ
(/projecthub/pro
r ducts cm9qZWN0BjoGRUY%
ducts/buy/42750
? o /buy/ 3D%0A)
s=BAhJIhIxOTc4 j 4275
Device Managere 0?
MSxQcm9qZWN
(https://create.arduino.cc/devices) c s=BA
0BjoGRUY%3D%
0A) t hJIhIx
h OTc4
u MSxQ
b cm9q
/ ZWN
p 0Bjo
r GRUY
Digital o %3D
Store d %0A)
(https://store.arduino.cc/digital/) u
c
t
s
Arduino Web Editor
/
(https://create.arduino.cc/editor)
b
u
y
/
Arduino IoT Cloud
4
(https://create.arduino.cc/iot)
2
(https://www.hackster.io/users/auth/arduino?
7
current_site=arduino&setup=true&redirect_to=%2Fprojecthub%2FAritro%2Fsm
5
Getting Started
detection-using-mq-2-gas-sensor-79c54a)
0
(https://create.arduino.cc/getting-started)
?
NOW CHROME
s
OS READY!
=
B
A
h
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 11/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
h
JI
h
ARDUINO CREATE IS Arduino Project Hub
I
N O W A (https://create.arduino.cc/projecthub)
VAILABLE ON
x
CHROME OS!
O
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO- T
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE) c
DOWNLOAD THE APP 4
M
S
x
Device ManagerQ
(https://create.arduino.cc/devices) c
m
9
q
Z
W
N
0
Digital B
Store j
(https://store.arduino.cc/digital/) o
G
R
Arduino Web EditorU
(https://create.arduino.cc/editor) Y
%
3
D
Arduino IoT Cloud%
(https://create.arduino.cc/iot) 0
A
(https://www.hackster.io/users/auth/arduino?
)
current_site=arduino&setup=true&redirect_to=%2Fprojecthub%2FAritro%2Fsm
Getting Started
detection-using-mq-2-gas-sensor-79c54a)
Resistor 221 ohm
(https://create.arduino.cc/getting-started)
(/projecthub/products/buy/
NOW CHROME 37914?
×
OS READY! s=BAhJIhIxOTc4MSxQcm9qZ (
/
WN0BjoGRUY%3D%0A)
p
r
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 12/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
o
j
e
Arduino Project Hub 3
ARDUINO CREATE IS
N O W A (https://create.arduino.cc/projecthub)
VAILABLE ON c (/proj (/projecthub/product
CHROME OS! t ecthu s/buy/37914?
h b/pro s=BAhJIhIxOTc4MSxQ
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO-
(/projecthub/pro
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE)
u ducts cm9qZWN0BjoGRUY%
ducts/buy/37914 b /buy/ 3D%0A)
DOWNLOAD THE APP
? / 37914
s=BAhJIhIxOTc4 p ?
MSxQcm9qZWN r s=BA
0BjoGRUY%3D%
Device Managero hJIhIx
0A) d OTc4
(https://create.arduino.cc/devices)
u MSxQ
c cm9q
t ZWN
s 0Bjo
/ GRUY
b %3D
u %0A)
y
Digital
/
Store
3
(https://store.arduino.cc/digital/) 7
9
1
Arduino Web Editor
4
(https://create.arduino.cc/editor) ?
s
=
B
Arduino IoT Cloud
A
(https://create.arduino.cc/iot) h
(https://www.hackster.io/users/auth/arduino?
JI
current_site=arduino&setup=true&redirect_to=%2Fprojecthub%2FAritro%2Fsm
h
Getting StartedI
detection-using-mq-2-gas-sensor-79c54a)
x
(https://create.arduino.cc/getting-started)
NOW CHROME O
OS READY! T
c
4
M
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 13/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
S
x
ARDUINO CREATE IS Q
Arduino Project Hub
N O W A (https://create.arduino.cc/projecthub)
VAILABLE ON c
CHROME OS! m
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO- 9
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE) q
DOWNLOAD THE APP Z
W
N
0
Device ManagerB
j
(https://create.arduino.cc/devices)
o
G
R
U
Y
%
3
Digital D
Store %
0
(https://store.arduino.cc/digital/)
A
)
Arduino Web Editor
(https://create.arduino.cc/editor)
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 14/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
AABOUT
R D U I N OTHIS
C R E APROJECT
TE IS Arduino Project Hub
N O W A (https://create.arduino.cc/projecthub)
VAILABLE ON
CHROME OS!
In this example, you will read the sensor analog output voltage and when the smoke
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO-
reaches a certain level, it will make sound a buzzer and a red LED will turn on.
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE)
When
D O W Nthe
L O Aoutput
D T H Evoltage
A P P is below that level, a green LED will be on.
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 15/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
ARDUINO CREATE IS
Arduino Project Hub
N O W A (https://create.arduino.cc/projecthub)
VAILABLE ON
CHROME OS!
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO-
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE)
DOWNLOAD THE APP
Device Manager
(https://create.arduino.cc/devices)
In other words, the relationship between voltage and gas concentration is the
following:
Arduino Web Editor
The greaterthe gas concentration,the greaterthe output voltage
(https://create.arduino.cc/editor)
The lowerthe gas concentration,the lowerthe output voltage
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 16/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
ARDUINO CREATE IS
Arduino Project Hub
N O W A (https://create.arduino.cc/projecthub)
VAILABLE ON
CHROME OS!
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO-
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE)
DOWNLOAD THE APP
The output can be an analog signal (A0) that can be read with an analog input of the
Arduino or a digital output (D0) that can be read with a digital input of the Arduino.
Device Manager
Pin Wiring
(https://create.arduino.cc/devices)
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 17/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO-
Kindly refer to the connection schematic attached below. After you've wired all the
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE)
components
D O W N L O A D properly,
T H E A P Pit's time to upload the necessary code.
Device Manager
CODE
(https://create.arduino.cc/devices)
After setting up the hardware components properly, flash this code into your Arduino.
Feel free to adjust the variable " sensorThres " with a different threshold value.
Digital
Store
(https://store.arduino.cc/digital/)
C DOWNLOAD (HTTPS://HALCKEMY.S3.AMAZONAWS.COM/UPLOADS/IMAGE_FILE/FILE/149152/CIRCUIT-1.
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 18/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
o
n
n
ARDUINO CREATE IS Arduino Project Hub
e
N O W A (https://create.arduino.cc/projecthub)
VAILABLE ON
C
c H R O M E OS!
t
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO-
i
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE)
o
DOWNLOAD THE APP
n
s
c
h Device Manager
e
(https://create.arduino.cc/devices)
m
a
t
i
c
d
i
a Digital
g Store
r
(https://store.arduino.cc/digital/)
a
m
Arduino Web Editor
(https://create.arduino.cc/editor)
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 19/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO-
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE)
DOWNLOAD THE APP
Device Manager
(https://create.arduino.cc/devices)
Digital
Store
(https://store.arduino.cc/digital/)
COMMENTS
https://thingspeak.com/channels/423780
(https://thingspeak.com/channels/423780)
A R D U IThis
NO C isRthe
E A Tchannel
E IS Arduino Project Hub
by the way.
N O W A (https://create.arduino.cc/projecthub)
VAILABLE ON
CHROM Thanks
E O S ! and keep it up the good work.
-Alex.
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO-
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE)
DOWNLOAD THE APP
dezo (/projecthub/dezo)
3 years ago
(/pr Device Manager
Hello
oject i dont have 221 ohm resistor right now so can i use 220 ohm? and thanks for all
of your (https://create.arduino.cc/devices)
hub/ answers
dezo
)
Thot
hLok
i) Ashu41 (/projecthub/Ashu41)
ARDUINO CREATE IS Arduino Project Hub
3 years ago
N O W A(/pr
V A I L A BLE ON
(https://create.arduino.cc/projecthub)
CHROM E
Iam O S !
ojectdoing this with mq135 sensor..can it work? Or I have to chnge anything for
hub/ that like code..connections? Can anyone pls help me???? Thnx in advanc
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO-
Ashu
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE)
D O W N41)
LOAD THE APP
Ashu41 (/projecthub/Ashu41)
3 years ago
(/pr
Iam Device Manager
ojectdoing this with mq135 sensor..can it work? Or I have to chnge anything for
that like code..connections? Can anyone pls help me???? Thnx in advanc
(https://create.arduino.cc/devices)
hub/
Ashu
1 thank
41)
Ashu41 (/projecthub/Ashu41)
3 years ago
(/pr
Hi everyone. Iam doing this with mq135 Digital
oject sensor..can it work? Or I have to chnge
anything
hub/ for that like code..connections?Store
Can anyone pls help me???? Thnx in advance
Ashu (https://store.arduino.cc/digital/)
41)
ThothLoki (/projecthub/ThothLoki)
Arduino Web Editor
3 years ago
(https://create.arduino.cc/editor)
(/pr
Ioject
do not see why not. Check this out
https://hackaday.io/project/3475-sniffing-trinket/log/12363-mq135-arduino-
hub/
library
Thot (https://hackaday.io/project/3475-sniffing-trinket/log/12363-mq135-
arduino-library) Arduino IoT Cloud
hLok
i)(https://create.arduino.cc/iot)
(https://www.hackster.io/users/auth/arduino?
current_site=arduino&setup=true&redirect_to=%2Fprojecthub%2FAritro%2Fsm
Getting Started
detection-using-mq-2-gas-sensor-79c54a)
Ashu41 (/projecthub/Ashu41)
3 years ago
(https://create.arduino.cc/getting-started)
NOW(/pr
CHROME
Pls send me the connections to arduino uno ...and relevant code.pls help us....
oject
OS READY!
hub/
Ashu
41)
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 23/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
ThothLoki (/projecthub/ThothLoki)
3 years ago
(/pr
A R D U IHonestly,
N O C R E A IThave Arduino
E I S never worked with Project Hub
these modules or this library. If you have a
oject
N O W AgasV A sensor
I L A B L Ethat
O N is on a board with the pins available, usually you will have 3
(https://create.arduino.cc/projecthub)
hub/
CHROME OS!
(Vcc,
Thot Gnd, Sig)
Just
hLokconnect your analog pin to Sig, 5v to Vcc and Gnd to Gnd
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO-
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE)
i)
DOWNLOAD THE APP
-
baw
anka KoKo Yangonite (/projecthub/koko-yangonite)
Arduino Project Hub
A R D U I2Nyears
O C Rago
EATE IS
r)
N O W A (https://create.arduino.cc/projecthub)
(/pr VAILABLE ON
C
ItHhelpedE me
R O M O S !a lot ! Thank you v v much ! I made it with MQ-135. I set ( int sensorThres
oject
= 200; )for smoke. I made it for fire alarm with siren circuit.
hub/
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO-
koko
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE)
-D O W N L O A D T H E A P P
yang
onit divyangk23 (/projecthub/divyangk23)
e) 2 years ago
(/pr
If i am not wrong analog input don'tDevice
oject have aManager
pinMode function.
so
hub/why (https://create.arduino.cc/devices)
you add in line 19?
divy
angk
23)
Ardit1995 (/projecthub/Ardit1995)
2 years ago
(/pr
Is there any problem if instead I use 1k ohm ?
oject
hub/ Digital
Ardit Store
1995
(https://store.arduino.cc/digital/)
) bob1609 (/projecthub/bob1609)
2 years ago
(/pr
Hello!
oject Arduino Web Editor
hub/
I am new to Arduino and this Project blew my mind.
(https://create.arduino.cc/editor)
bob1
One thing I don't understand, what are the numbers displayed in the serial monitor?
609)
What do those numbers represent?
Thank you Arduino IoT Cloud
Bob (https://create.arduino.cc/iot)
(https://www.hackster.io/users/auth/arduino?
current_site=arduino&setup=true&redirect_to=%2Fprojecthub%2FAritro%2Fsm
Getting Started
detection-using-mq-2-gas-sensor-79c54a)
Emon49 (/projecthub/Emon49)
(https://create.arduino.cc/getting-started)
NOW
(/pr
CHROME
2 years ago
OS
How READY!
oject can i connect the battery in this project ?? please give the diagram. Will i have to
change
hub/ the code?? please response..
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 25/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
Emo
n49) Sakib_021 (/projecthub/Sakib_021)
A R D U I2Nyears
O C Rago
EATE IS Arduino Project Hub
(/pr
N O W A (https://create.arduino.cc/projecthub)
VAILABLE ON
Everything
C H R O M E Ois
oject S !ok , but my buzzer isn't making any sound! 😦 plz help !
hub/
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO-
Saki
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE)
b_0
DOWNLOAD THE APP
21) miss_anku (/projecthub/miss_anku)
2 years ago
(/pr
Hey
ojectthe video is not available . Can you please upload the video which has the working
of MQ 2 gas sensor with the arduinoDevice
hub/ ?? Manager
miss (https://create.arduino.cc/devices)
_an
ku)
Rax1 (/projecthub/Rax1)
2 years ago
(/pr
Please
oject why was the 400 set as threshold for the sensor? any particular reason? Any
formula
hub/ for arriving at that?
Rax1
) Digital
Store
(https://store.arduino.cc/digital/)
Eunate Mayor - SIGFOX Universities Program Manager
(/projecthub/eunatemayor)
(/pr a year ago
ojec Arduino Web Editor
Hi,
thuI'm organising a student challenge for projects in IoT that can help save the planet
on (https://create.arduino.cc/editor)
b/ethe occasion of Earth's Day, using SIGFOX technology.
Iunat
really like your project, do you want to participate?
ema
Eunate - SIGFOX Universities Program Manager
yor)
Arduino IoT Cloud
https://www.sigfox.com/en/news/sensing-earth-sigfoxs-2018-universities-challenge
(https://www.sigfox.com/en/news/sensing-earth-sigfoxs-2018-universities-
(https://create.arduino.cc/iot)
challenge)
(https://www.hackster.io/users/auth/arduino?
https://www.hackster.io/contests/sigfoxuniversities
current_site=arduino&setup=true&redirect_to=%2Fprojecthub%2FAritro%2Fsm
(https://www.hackster.io/contests/sigfoxuniversities)
detection-using-mq-2-gas-sensor-79c54a)
Getting Started
(https://create.arduino.cc/getting-started)
NOW CHROME
OS READY!
jeevitha1 (/projecthub/jeevitha1)
a year ago
(/pr
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 26/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
oject will u share a video regarding connections of this project as i ve' tried alot bt
PLease
stil nt able to crack send me link its a humble request
hub/
jeevi Arduino Project Hub
ARDUINO CREATE IS
tha1)
NOW AVAILABLE ON
(https://create.arduino.cc/projecthub)
CHROME OS!
vaner (/projecthub/vaner)
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO-
a year ago
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE)
(/pr
D
CanOWNLOAD THE APP
ojectit work with the MQ-4?
hub/
vane
r)
Device Manager
shihabulparvez (/projecthub/shihabulparvez)
a (https://create.arduino.cc/devices)
year ago
(/pr
Nice
oject job!!!
How
hub/ can i add time for code see on serial monitor.like...
4.20
shih pm co value: 400
4.21
abul pm co value: 413
4.22
parv pm co value: 413
4.23
ez) pm co value: 417
Plse help me...for code Digital
Store
(https://store.arduino.cc/digital/)
Gunotham (/projecthub/gunotham)
a year ago Arduino Web Editor
(/pr
Can
ojecti use REES52 5 3.3-5V Passive Buzzer Alarm Module as buzzer?? or should i have
(https://create.arduino.cc/editor)
to buy a normal buzzer?
hub/
gun
otha
m) Arduino IoT Cloud
Marite (/projecthub/Marite)
(https://create.arduino.cc/iot)
a (https://www.hackster.io/users/auth/arduino?
year ago
(/pr current_site=arduino&setup=true&redirect_to=%2Fprojecthub%2FAritro%2Fsm
Tengo
oject esta progamación de la detección de gas en niveles ppm pero a mi me gustaría
Getting Started
detection-using-mq-2-gas-sensor-79c54a)
detectarlos
hub/ en niveles más sensibles en ppb, qué le tendría que modificar para que me
arroje (https://create.arduino.cc/getting-started)
Mari los resultados que busco.
NOW
Muchas
te)
CHROME
gracias,
OS READY!dejo la programación que use
A continuación
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 27/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
val = val/RAL;
return val;
} Arduino Project Hub
ARDUINO CREATE IS
N O W lecturaMQ(int
float A (https://create.arduino.cc/projecthub)
V A I L A B L E O mq_pin){
N
CHROME OS!
int i;
float rs=0;
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO-
for (i=0;i<5;i++) {
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE)
rsO+=
D WN calc_res(analogRead(mq_pin));
LOAD THE APP
delay(50);
}
rs = rs/5;
return rs; Device Manager
}
(https://create.arduino.cc/devices)
int porcentaje_gas(float rs_ro_ratio, int gas_id){
if ( gas_id == GAS_LP ) {
return porcentaje_gas(rs_ro_ratio,LPCurve);
}
return 0;
}
int porcentaje_gas(float rs_ro_ratio, float *pcurve){
return (pow(10, (((log(rs_ro_ratio)-pcurve[1])/pcurve[2])
Digital + pcurve[0])));
} Store
1 thank (https://store.arduino.cc/digital/)
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 29/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
Chanatip17 (/projecthub/Chanatip17)
10 months ago
(/pr Device Manager
how
ojectmany voltage using for this?
(https://create.arduino.cc/devices)
hub/
Cha
nati
p17) nabeelshah (/projecthub/nabeelshah)
9 months ago
(/pr
5 volt for the sensor from the arduino.
oject
hub/
nabe Digital
elsh Store
ah)
Tatenda (/projecthub/Tatenda)
(https://store.arduino.cc/digital/)
10 months ago
(/pr
hie please help on how to connect the components
oject
Arduino Web Editor
hub/
Tate (https://create.arduino.cc/editor)
nda)
Rentaircat Com (/projecthub/rtrisk)
10 months ago
(/pr Arduino IoT Cloud
Great!
oject Is(https://create.arduino.cc/iot)
there a method to include GPS lat long inside the SMS when triggered? Like a
drone
hub/ hosted MQ2 sensor? This would be helpful to record any location that detects
(https://www.hackster.io/users/auth/arduino?
gas.
rtris Thank you and great job!
current_site=arduino&setup=true&redirect_to=%2Fprojecthub%2FAritro%2Fsm
k) detection-using-mq-2-gas-sensor-79c54a)
Getting Started
(https://create.arduino.cc/getting-started)
NOW CHROME
Hificoolguy (/projecthub/Hificoolguy)
OS READY!
10 months ago
(/pr
oject
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 30/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
ihub/
made the circuit and i also programmed it with the code provided but for some
reason the buzzer keeps buzzing and the leds wont turn on however the power led on
Hific
the MQ-2 was on
oolg Arduino Project Hub
ARDUINO CREATE IS
uy)
NOW AVAILABLE ON
(https://create.arduino.cc/projecthub)
CHROME OS!
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO-
nabeelshah (/projecthub/nabeelshah)
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE)
D O W N9Lmonths
O A D T Hago
E APP
(/pr
hi i want to build the gas sensor for my home, is it good for practical use, if yes than
oject
in that case i want the sensor to detect the domestic gas in case of leakage in my
hub/
house.
nabe The code above works and i have a reading, now can anyone help me what is
the Device Manager
elshreading in case of leakage and again can it be used for practical use other than on
aah)
college project.
(https://create.arduino.cc/devices)
aang (/projecthub/aang)
8 months ago
(/pr
Can
ojectsomebody help me, to share MQ-2 part.
Fritzing
hub/ doesnt have MQ-2.
Digital
aang
Store
)
(https://store.arduino.cc/digital/)
LIM254018 (/projecthub/LIM254018)
8 months ago
(/pr
Ioject
have successful made it although im first time touch with mq2, really thx for ur
tutoraial,
hub/ i give u 5 star.
LIM2
5401
8) Arduino IoT Cloud
nagesh_madakasira (/projecthub/nagesh_madakasira)
(https://create.arduino.cc/iot)
7 months ago
(/pr (https://www.hackster.io/users/auth/arduino?
Hi Guyscurrent_site=arduino&setup=true&redirect_to=%2Fprojecthub%2FAritro%2Fsm
oject
Where
hub/ can I buy this MQ -2 gas sensor.
detection-using-mq-2-gas-sensor-79c54a)
Regards
nage
NOW
Nagesh.
sh_ CHROME
mad READY!
OS
akasi
ra)
kepinalek (/projecthub/kepinalek)
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 31/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
5 months ago
Can
(/pr I don't use the resistors, and use jumper wires instead ? What'll happen if I do that
?oject
A RDUINO CREATE IS
NOW AVAILABLE ON
hub/
CHROME OS!
kepi
(HTTPS://CHROME.GOOGLE.COM/WEBSTORE/DETAIL/ARDUINO-
nale
CREATE/DCGICPIHGKMCCJIGALCCIPMJLNJOPDFE)
k) RoseC (/projecthub/RoseC)
D O W N5Lmonths
OAD TH E APP
ago
(/pr
Should
oject I use active buzzer or a passive buzzer?
hub/
Rose
C)
muhdshaqilaqim (/projecthub/muhdshaqilaqim)
4 months ago
(/pr
can
ojectthis mq2 gas sensor detect cat litter ?
hub/
muh
dsha
qilaq srmounika (/projecthub/srmounika)
im) 23 days ago
(/pr
sir,advantage
oject ,disadvantages&applications
are
hub/not there
srm
ouni
ka)
sivabalaji (/projecthub/sivabalaji)
23 days ago
(/pr
hello!i
oject want to insert LCD display with this so please send me the code for that
hub/
siva
balaj
i)
AUTHOR
(/projecthub/Aritro)
Aritro Mukherjee (/projecthub/Aritro)
6 PROJECTS 211 FOLLOWERS
FOLLOW (/PROJECTHUB/USERS/SIGN_UP?ID=15798&M=USER&REASON=FOLLOW&RE
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 32/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
PUBLISHED ON
May 6, 2016
WRITE A COMMENT
Share
(/projecthub/raviprasad1234456789) (/projecthub/rajibghoshkolkata123456)
(/projecthub/abhishekkundu123456789) (/projecthub/sayanpatra123456)
(/projecthub/user530780225)
and 179 others
(/projecthub/Aritro/security-access-using-rfid-reader-f7c746?
ref=similar&ref_id=19781&offset=0)
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 33/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
(/projecthub/jissanto/smoke-sensor-97e48b?ref=similar&ref_id=19781&offset=1)
(/projecthub/aaronkow/iot-home-security-model-71e48e?
ref=similar&ref_id=19781&offset=2)
(/projecthub/nekhbet/using-the-yl-39-yl-69-soil-humidity-sensor-with-arduino-
968268?ref=similar&ref_id=19781&offset=3)
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 35/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
(/projecthub/Isaac100/getting-started-with-the-hc-sr04-ultrasonic-sensor-036380?
ref=similar&ref_id=19781&offset=4)
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 36/37
10/17/2019 Smoke Detection using MQ-2 Gas Sensor - Arduino Project Hub
(/projecthub/MichDragstar/ultrasonic-sensor-with-alarm-lcd-and-temperature-
a5dbab?ref=similar&ref_id=19781&offset=5)
(https://www.arduino.cc)
Powered by
(https://www.hackster.io)
https://create.arduino.cc/projecthub/Aritro/smoke-detection-using-mq-2-gas-sensor-79c54a 37/37