You are on page 1of 5

Arduino Gas sensor MQ-2 / MQ-5

Hello guys, today I will show you how to create a circuit with Arduino to control the escape of
gas with the lighting of a led or the
excitation of a relay.

The MQ - 2 is suitable for detecting LPG, i-butane, propane, methane, hydrogen and even
smoke.

The MQ - 5 detects LPG, natural gas and city gas.

At the bottom of the page you will find the sketch compiled to insert in the IDE of Arduino.
Let's start by listing the components necessary for carrying out the project:

COMPONENTS:

Arduino ONE
MQ-2 sensor
Red LED
220 Ohm resistance
Connecting cables
Breadboard
This is the circuit diagram.

Note:
The sensor MQ-05 has six pins,
It must be connected as shown.
SIMULATION:
Simulation link: https://www.tinkercad.com/things/ajrjG8ZMJJg

Here's the sketch:


Thanks to this sketch exceeded the gas threshold the LED lights up and on the serial monitor we
will read the sensor detection.
Download file

You might also like