Same-day dispatch before 2 PM · Free delivery over ₹999 · GST invoices Get the appPrices incl. GST
Geekobot
Snap & SendNEWGeeko AIWhere's myOrder
Log in
Products
  • Projects
    • Component guidesHow parts work, with code you can run
    • Learning pathsFrom your first LED to your first robot
    • Workshops & eventsOnline sessions for makers and classes
    • ElectrolarkFree guided builds, simulator and certificates
    • Students & teachersStudent discount and classroom help
    • CommunityShare builds and ask other makers
    • CalculatorsOhm's law, LED resistor, 555 and 100+ more
    • Circuit builderWire parts and run the circuit, powered by Electrolark
    • Geeko AIAsk what to buy or how to wire it
    • Snap & SendPhotograph a part or list, we find it
    • Part finderAnswer a few questions, get the right part
    • Compatibility checkWill these two parts work together?
    • Compare partsSpecs side by side
    • Business & bulk ordersGST invoices, credit and volume prices
    • Request a quotationSend your list, get a quote
    • Classroom kitsPer-student kits and lab bundles
    • Gift cardsFor students, teams and events
  • Atal Tinkering Lab
BOM to cart
Geekobot

Components, kits and know-how for makers, students, engineers, labs and businesses across India.

Ask Geeko AIOrders, parts and projects, any timeEmail supportReply within 1 working dayGet the Geekobot appAdd it to your home screen, free

Follow us

Shop

  • Boards & SBCs
  • Sensors & Modules
  • IoT & Wireless
  • Drone & FPV
  • 3D Printing
  • Filaments & Resins
  • Motors & Drivers
  • Power & Batteries
  • Semiconductors
  • Passive
  • Displays & LEDs
  • Switches & Relays
  • Wires & Cables
  • Prototyping
  • Tools & Test
  • Robotics
  • STEM Kits
  • Atal Tinkering Lab
  • Mechanical Parts
  • Audio

Orders

  • Track your order
  • Help & support
  • Shipping and delivery
  • Refunds and cancellation
  • Contact us

Learn

  • Projects
  • Geeko AI project assistant
  • Learning paths
  • Guides
  • Calculators
  • Electrolark: free guided builds

Part tools

  • Part finder
  • Compare parts
  • Will it work with my board?

Institutions

  • Classroom kits
  • Atal Tinkering Lab
  • Students & teachers
  • Workshops & Events

Business

  • Business & education
  • Request a quotation
  • BOM bulk upload
  • Quick order by SKU

Company

  • About Geekobot
  • Community
  • Gift cards
  • Terms & conditions
  • Privacy policy
  • Product directory
  • Sitemap

© 2026 Geekobot, a trade name of OLatus Systems Private Limited. All rights reserved.

20, 1st Floor, Neeladri Complex, 10th Cross, Sampige Rd, 2nd Main, Malleshwaram, Bengaluru, Karnataka 560003 · GSTIN 29AACCO0462F1ZM

+91 91810 15607 · connect@geekobot.in · Monday to Saturday, 10 AM to 2 PM IST

UPI · CARDS · NETBANKING · GST INVOICES

ShopProjectsGeeko AIGuides
Compare 0 parts →
Log in

Shop by category

Shop all components
  • Boards & SBCs1,910 products
    • Alternative Single Board Computers
    • Arduino Ecosystem
    • FPGA & Logic Boards
    • Microcontroller & Wireless Boards
    View all
  • Sensors & Modules4,701 products
    • Biomedical & Heart Rate
    • Current, Voltage & Power
    • Force, Weight & Pressure
    • Gas, Weather & Environmental
    View all
  • IoT & Wireless2,314 products
    • RF Modules
    • RFID & NFC
    • Antennas & RF Accessories
    • Cameras & Smart Vision
    View all
  • Drone & FPV3,558 products
    • Flight Control & Navigation
    • FPV Video & Optics
    • Frames & Structural Parts
    • Motors & Propulsion
    View all
  • 3D Printing2,204 products
    • 3D Printers
    • 3D Scanners & Digitizers
    • Laser Engravers & Cutters
    • Material Management & Upgrades
    View all
  • Filaments & Resins1,472 products
    • Filaments
    • Photopolymer Resins
    View all
  • Motors & Drivers463 products
    • BLDC Motor Drivers
    • DC & Geared Motors
    • DC Motor Drivers
    • Linear Actuators & Solenoids
    View all
  • Power & Batteries557 products
    • Battery Holders & Connectors
    • Breadboard Power
    • Chargers & BMS
    • DC-DC Converters
    View all
  • Semiconductors295 products
    • Diodes & Rectifiers
    • Interface & RF Encoder ICs
    • Logic ICs (74xx)
    • Logic ICs (CD4000)
    View all
  • Passive67 products
    • Capacitors
    • Circuit Protection
    • Crystals & Oscillators
    • Inductors
    View all
  • Displays & LEDs572 products
    • 7-Segment & Dot Matrix
    • Addressable LEDs
    • Character LCDs
    • Graphic LCDs
    View all
  • Switches & Relays184 products
    • Keypads & Touch
    • Push Buttons & Tactile
    • Relay Modules
    • Relays
    View all
  • Wires & Cables233 products
    • Board-to-Wire Connectors
    • Crimp & Splice
    • Headers & Dupont
    • Heat Shrink & Sleeving
    View all
  • Prototyping101 products
    • Breadboards
    • Interface Modules
    • PCBs & Perfboards
    View all
  • Tools & Test717 products
    • Bench Power Supplies
    • Hand Tools
    • Measuring Tools
    • Meters & Testers
    View all
  • Robotics180 products
    • Humanoid & Legged Robots
    • Robot Chassis & Platforms
    • Robotic Arms & Grippers
    • Wheels & Casters
    View all
  • STEM Kits268 products
    • Arduino Learning Kits
    • Coding & IoT Kits
    • Early Coding (Ages 3-8)
    • Invention Kits
    View all
  • Atal Tinkering Lab196 products
    • Package 1: Electronics, Robotics, IoT and Sensors
    • Package 2: Rapid Prototyping Tools
    • Package 3: Mechanical, Electrical and Measurement Tools
    • Package 4: Power Supply, Accessories and Safety Equipment
    View all
  • Mechanical Parts212 products
    • Bearings
    • Brackets & Mounts
    • Couplers
    • Fasteners & Standoffs
    View all
  • Audio109 products
    • Amplifier Modules
    • Buzzers & Sirens
    • Speakers
    View all
  1. Home
  2. ›Guides
  3. ›Sensors
  4. ›MQ-6 LPG / Propane / Butane and MQ-8 Hydrogen Gas Sensor Modules

Component guide · Beginner · 3 min read

MQ-6 LPG / Propane / Butane and MQ-8 Hydrogen Gas Sensor Modules

with Mikroe Hydrogen Click)

By Geekobot Learning Team · Updated 29 Oct 2026

I'm using
Wiring, code and the Run it panels follow your board.
On this page
Short answerWhat the MQ-6 LPG and MQ-8 hydrogen sensors isMQ-6 LPG and MQ-8 hydrogen sensors pinoutWiring the MQ-6 LPG and MQ-8 hydrogen sensorsExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Short answer

The MQ-6 detects LPG, propane and butane (about 200 to 10,000 ppm) and is the usual choice for kitchen cylinder leak alarms. The MQ-8 detects hydrogen (about 100 to 1000 ppm) for battery rooms and electrolysis projects. Both are tin-oxide sensors with a 5 V heater, an analog output and, on modules, a digital alarm output with a trimmer.

Key specs at a glance

Heater
5 V, about 150 mA
MQ-6
LPG, propane, butane, about 200 to 10,000 ppm
MQ-8
Hydrogen, about 100 to 1000 ppm
Output
Analog and digital threshold
Warm-up
About 2 minutes; 24 hours burn-in
Supply
5 V

Models in this guide

These are alternatives. Pick the one that fits your project; you only need one.

  • Option 1MQ-6 Propane Isobutane LPG Gas Sensor Module₹86
  • Option 2MQ-8 Hydrogen H2 Gas Sensor Alarm Detection Module₹97
  • Option 3Winsen MQ-8 Hydrogen Gas Sensor Module – 5V DC, 100-1000ppm₹129
  • Option 4Mikroe HYDROGEN Click (Mikroe‑1629) – MQ‑8 Hydrogen Gas Sensor Board, Analog, mikroBUS₹1,129
01

What the MQ-6 LPG and MQ-8 hydrogen sensors is

The MQ6 (LPG and butane) and MQ8 (hydrogen) are metal-oxide gas sensors used in gas leak alarms, kitchen monitors and hydrogen experiments.

LPG is heavier than air, so mount an MQ-6 about 30 cm above the floor. Hydrogen is lighter than air, so mount an MQ-8 near the ceiling.

The MQ-6 is more selective for LPG than the MQ-2, which also reacts strongly to smoke and alcohol.

02

MQ-6 LPG and MQ-8 hydrogen sensors pinout

The pins on the MQ-6 LPG and MQ-8 hydrogen sensors and what each one does.

PinFunction
VCC5 V
GNDGround
AOAnalog output
DOAlarm output (set with trimmer)
PinFunction
VCC
5 V
GND
Ground
AO
Analog output
DO
Alarm output (set with trimmer)
03

Wiring the MQ-6 LPG and MQ-8 hydrogen sensors

Connect the MQ-6 LPG and MQ-8 hydrogen sensors like this.

MQ-6 LPG and MQ-8 hydrogen sensors pinArduino UnoESP32
VCC5 V5 V (VIN)
GNDGNDGND
AOA0GPIO 34 via divider
DOD2GPIO 27
VCC
Arduino Uno:
5 V
ESP32:
5 V (VIN)
GND
Arduino Uno:
GND
ESP32:
GND
AO
Arduino Uno:
A0
ESP32:
GPIO 34 via divider
DO
Arduino Uno:
D2
ESP32:
GPIO 27
04

Example code

A minimal sketch to check the part works.

Leak alarm with buzzer · Arduino C++Verify & upload in Electrolark
const int BUZZ = 8;
const int LIMIT = 400;   // set after watching clean-air readings

void setup() { Serial.begin(115200); pinMode(BUZZ, OUTPUT); delay(120000); }

void loop() {
  int v = analogRead(A0);
  Serial.println(v);
  digitalWrite(BUZZ, v > LIMIT ? HIGH : LOW);
  delay(500);
}
05

Setup and tuning

Heater

feed 5 V at about 150 mA from the supply rail.

Output

use AO for a gas level and DO with the trimmer for a simple alarm.

Warm-up

burn in for 24 hours first, then a few minutes each start.

Placement

LPG sinks, so mount the MQ6 near the floor; hydrogen rises, so mount the MQ8 high.

Calibration

set thresholds from readings in clean air and with a safe test gas.

06

What you need

Shop this list7 of 8 found in our store · ₹1,930

  • MQ-6 Propane Isobutane LPG Gas Sensor Module: the part this guide coversMQ-6 Propane Isobutane LPG Gas Sensor Module₹86
  • MQ-8 Hydrogen H2 Gas Sensor Alarm Detection Module: another version this guide coversMQ-8 Hydrogen H2 Gas Sensor Alarm Detection Module₹97
  • Winsen MQ-8 Hydrogen Gas Sensor Module – 5V DC, 100-1000ppm: another version this guide coversWinsen MQ-8 Hydrogen Gas Sensor Module – 5V DC, 100-1000ppm₹129
  • Mikroe HYDROGEN Click (Mikroe‑1629) – MQ‑8 Hydrogen Gas Sensor Board, Analog, mikroBUS: another version this guide coversMikroe HYDROGEN Click (Mikroe‑1629) – MQ‑8 Hydrogen Gas Sensor Board, Analog, mikroBUS₹1,129
  • Uno R3 development board: the controller used in the wiring tableFind this part
  • ESP32-WROOM-32 38-pin development board: for Wi-Fi logging and dashboardsESP32-WROOM-32 38-Pin Development Board₹389
  • Buzzer module 3.3-5 V: for an audible alarmBuzzer Module 3.3–5V₹27
  • 5 V relay module with optocoupler: to switch a fan or alarm5V Relay Module with Optocoupler₹74
07

Alternatives and when to choose them

  • ✓MQ-5 LPG sensor: similar target gases.
  • ✓MQ-2 sensor: smoke and LPG.
  • ✓Gas leak detectors and alarms: ready-made alarms.
08

Common mistakes to avoid

  • !Mounting the LPG sensor high on the wall.
  • !Testing with an open flame.
  • !Trusting readings during warm-up.
  • !Relying on it as the only safety device.
09

Frequently asked questions

Which sensor is best for an LPG leak alarm?

The MQ6 is tuned for LPG and butane, with the MQ5 as an alternative.

Where should I place an LPG sensor?

Near the floor, about 30 cm up, because LPG is heavier than air.

Can the MQ8 detect other gases?

It reacts mainly to hydrogen but has some sensitivity to alcohol and LPG.

How do I test the sensor safely?

Release a tiny amount of gas from an unlit lighter nearby; never use a flame.

Can I use it as a certified gas alarm?

No. Use it for learning and add a certified alarm for safety.

Parts for this guide

  • MQ-6 Propane Isobutane LPG Gas Sensor Module
    ₹86View
  • MQ-8 Hydrogen H2 Gas Sensor Alarm Detection Module
    ₹97View
  • Winsen MQ-8 Hydrogen Gas Sensor Module – 5V DC, 100-1000ppm
    ₹129View
  • Mikroe HYDROGEN Click (Mikroe‑1629) – MQ‑8 Hydrogen Gas Sensor Board, Analog, mikroBUS
    ₹1,129View
  • Uno R3 Development Board (No Cable)
    ₹359View
  • ESP32-WROOM-32 38-Pin Development Board
    ₹389View
  • Buzzer Module 3.3–5V
    ₹27View
  • 5V Relay Module with Optocoupler
    ₹74View
Shop Gas, Air Quality & CO2 Sensors

Keep learning

Component guideBeginnerMQ-5 LPG and Natural Gas SensorThe MQ-5 is a heated metal-oxide gas sensor tuned for LPG and natural gas.3 min read · SensorsComponent guideBeginnerMQ-2 gas sensorThe MQ-2 module detects smoke and flammable gases such as LPG, propane, methane and hydrogen.3 min read · SensorsComponent guideIntermediateMQ Gas SensorsMQ sensors are cheap metal-oxide gas sensors: a heated tin-dioxide surface changes resistance when gas is present.3 min read · SensorsComponent guideBeginnerGas Leak Detectors and AlarmsGas leak detector guide: CO alarm with LCD, Tuya Wi-Fi natural gas sensor, Mastech MS6310 portable leak finder and Renke multi-gas detector, uses and checks.3 min read · Tools & Workshop Skills

Sources

  • Winsen MQ-6 and MQ-8 datasheets

Written by the Geekobot team from manufacturer datasheets. Always check the datasheet for the exact part and variant you buy.

On this page
Short answerWhat the MQ-6 LPG and MQ-8 hydrogen sensors isMQ-6 LPG and MQ-8 hydrogen sensors pinoutWiring the MQ-6 LPG and MQ-8 hydrogen sensorsExample codeSetup and tuningWhat you needAlternatives and when to choose themCommon mistakesFAQsParts and next steps
Need a hand?Ask Geeko AI which part fits your project, or talk to the Geekobot team.Ask Geeko AIHelp & support

Parts for this guide (Arduino Uno)7 items · ₹1,745

MQ-6 Propane Isobutane LPG Gas Sensor Module · MQ-8 Hydrogen H2 Gas Sensor Alarm Detection Module · Winsen MQ-8 Hydrogen Gas Sensor Module – 5V DC, 100-1000ppm · Mikroe HYDROGEN Click (Mikroe‑1629) – MQ‑8 Hydrogen Gas Sensor Board, Analog, mikroBUS · Buzzer Module 3.3–5V · 5V Relay Module with Optocoupler · Uno R3 CH340G ATmega328p Compatible Development Board

Run itChange the inputs and watch the output

Raw reading after a 2 minute warm-up. Above 400 the buzzer sounds.

Buzzer OFF
Serial monitor115200 baud
138

A simulation of the sketch above, so you know what to expect. Real readings vary with your parts and wiring.

Ask the Community

Ask a question