Gas Level Monitoring Using ESP8266 & Gas Sensor Over the Internet
Internet In this project, we'll learn how to monitor gas levels over the Internet using ESP8266 and the MQ135 gas sensor module. The amount of gas will be measured in percentages and sent…

Know the mission before touching a wire.
Understand what you are making, prepare the right tools, and make the workbench safe.
Project details
Gas Level Monitoring Using ESP8266 & Gas Sensor Over the Internet is a iot project. Internet In this project, we'll learn how to monitor gas levels over the Internet using ESP8266 and the MQ135 gas sensor module. The amount of gas will be measured in percentages and sent…
- Source pages
- 1258-1264
- Named parts
- 5
- Build goal
- Working, tested prototype
Tools you need
- Digital multimeter
- Wire stripper and side cutters
- Soldering iron with a fine tip
- Current-limited bench supply
- Computer with a data-capable USB cable
Use eye protection, good lighting, and a clean insulated surface throughout the build.
Safety precautions
- Disconnect every power source before changing a connection.
- Check component polarity, pinout, and supply voltage twice.
- Use a current limit for the first power-up.
- Keep liquids, loose metal, and uninsulated wires away from the bench.
Gather, identify, and understand every part.
Use the standardized inventory, then open What's this? to learn each part's role, advantages, limitations, handling, and specifications.
What's this?Image, role, pros, cons, handling & specifications
MODULE LEARNING VIEWNodeMCU - ESP8266
A programmable controller that reads inputs, makes decisions, and drives the project's outputs.
What it does hereIt is the control centre and must use the documented board, pin map, supply, and logic level.
Buy / compare this part ↗Advantages
- Reprogrammable and reusable
- Large learning ecosystem
- Complex behaviour remains changeable
Limitations
- GPIO voltage and current are limited
- Some pins affect boot or communication
- Loads normally need a driver
Handling
- Disconnect power before rewiring
- Avoid static discharge
- Never power motors, relays, or pumps directly from GPIO
Specifications to verify
- Use the exact model, value, package, and rating listed for NodeMCU - ESP8266; similar-looking parts are not always interchangeable.
- Confirm operating voltage, logic level, pinout, memory, USB interface, and maximum GPIO current.
What's this?Image, role, pros, cons, handling & specifications
MODULE LEARNING VIEWAir Quality Sensor - MQ135 Air Quality Sensor
A sensor converts a physical condition into an electrical signal the circuit can measure.
What it does hereIt provides project input as an analogue, digital, resistive, frequency, or calibrated signal.
Buy / compare this part ↗Advantages
- Adds real-world awareness
- Can usually be tested independently
- Often supports calibration
Limitations
- Readings can drift
- Placement affects results
- Some sensors need warm-up or calibration
Handling
- Protect the sensing surface
- Observe supply voltage and polarity
- Keep signal leads away from noisy power wiring
Specifications to verify
- Use the exact model, value, package, and rating listed for Air Quality Sensor - MQ135 Air Quality Sensor; similar-looking parts are not always interchangeable.
- Confirm supply range, output type, measurement range, accuracy, response time, and pin order.
What's this?Image, role, pros, cons, handling & specifications
MODULE LEARNING VIEWMQ135 Gas/Smoke Sensor
A sensor converts a physical condition into an electrical signal the circuit can measure.
What it does hereIt provides project input as an analogue, digital, resistive, frequency, or calibrated signal.
Buy / compare this part ↗Advantages
- Adds real-world awareness
- Can usually be tested independently
- Often supports calibration
Limitations
- Readings can drift
- Placement affects results
- Some sensors need warm-up or calibration
Handling
- Protect the sensing surface
- Observe supply voltage and polarity
- Keep signal leads away from noisy power wiring
Specifications to verify
- Use the exact model, value, package, and rating listed for MQ135 Gas/Smoke Sensor; similar-looking parts are not always interchangeable.
- Confirm supply range, output type, measurement range, accuracy, response time, and pin order.
What's this?Image, role, pros, cons, handling & specifications

alcohols, aromatic compounds, sulfide, and smoke. As a gas sensing
A named project component whose exact role is defined by the source circuit and build guide.
What it does hereIt performs a documented electrical, control, interface, or construction function in this project.
Buy / compare this part ↗Advantages
- Selected for this project
- Can be checked independently
- Supports modular troubleshooting
Limitations
- Substitutes may differ
- Generic names can hide variants
- Pinouts and ratings vary
Handling
- Compare the received part with the source
- Keep it labelled
- Do not force connectors or adjusters
Specifications to verify
- Use the exact model, value, package, and rating listed for alcohols, aromatic compounds, sulfide, and smoke. As a gas sensing; similar-looking parts are not always interchangeable.
- Confirm dimensions, ratings, connection method, polarity, and environmental limits.
What's this?Image, role, pros, cons, handling & specifications

ESP8266-12E - controller board / IC
A programmable controller that reads inputs, makes decisions, and drives the project's outputs.
What it does hereIt is the control centre and must use the documented board, pin map, supply, and logic level.
Buy / compare this part ↗Advantages
- Reprogrammable and reusable
- Large learning ecosystem
- Complex behaviour remains changeable
Limitations
- GPIO voltage and current are limited
- Some pins affect boot or communication
- Loads normally need a driver
Handling
- Disconnect power before rewiring
- Avoid static discharge
- Never power motors, relays, or pumps directly from GPIO
Specifications to verify
- Use the exact model, value, package, and rating listed for ESP8266-12E - controller board / IC; similar-looking parts are not always interchangeable.
- Confirm operating voltage, logic level, pinout, memory, USB interface, and maximum GPIO current.
Connect one verified path at a time.
Explore the named components and standardized signal flow, then use Source Check to verify exact physical pins, values, and topology before applying power.
Trace this circuit.
Gas Level Monitoring Using ESP8266 & Gas Sensor Over the Internet: interactive parts, standardized terminals, responsive anchored wires, student explanations, and the original circuit reference in one shared system.
Trace before wiring
Follow power, ground, inputs, processing, and outputs in that order. Never guess a pin from package shape alone.
Connect with power off
Make short, labelled connections and share a common ground only where the schematic requires it.
Inspect every joint
Check continuity, polarity, adjacent shorts, and loose connections before the first power-up.
Open all source diagrams and build views 5 visuals





Confirm the hardware-only control path.
This project does not include firmware in the source. The circuit itself provides the required behaviour.
How to connect
- Match every controller label to the circuit view and source pin map.
- Join grounds before signal wires when separate low-voltage supplies are used.
- Keep motors, relays, pumps, and other loads on a suitable driver and external supply.
Common mistakes
Reversed VCC/GND, board-label versus GPIO-number confusion, missing common ground, and charge-only USB cables.
Troubleshoot
Disconnect loads, continuity-test one path at a time, then test with a current limit.
Software preparation
No IDE, board package, library, or firmware upload is required for this project.
If you add a programmable controller as an extension, document its pin map separately.
How to upload code
The original design is implemented entirely in hardware, so proceed after verifying the circuit and supply.
Assemble, deploy, test, and troubleshoot.
Use the complete source notes in build order, then pass the final checks before calling the project finished.
Build in functional stages
- Power and regulation
- Controller or processing stage
- Inputs and sensors
- Outputs and loads
- Enclosure and strain relief
Power up safely
- Inspect unpowered continuity first
- Apply the lowest safe current limit
- Measure supply rails before signals
- Add one load at a time
- Record expected and actual results
Work from simple to complex
- Confirm power, ground, polarity, and orientation
- Compare each pin with the source
- Test inputs separately from outputs
- Replace only one variable at a time
- Power off before every correction
Follow the documented instructions.
These notes come from this project's source and remain in their original order.
Project overview
Project build noteInternet
In this project, we'll learn how to monitor gas levels over the Internet using ESP8266 and the MQ135 gas sensor module. The amount of gas will be measured in percentages and sent over the internet using the thingspeak server. With this system, you can keep an eye on the data from anywhere in the world. We just need a gas/smoke/LPG sensor like MQ2/MQ3/MQ5/MQ7/MQ135 that is directly connected to Nodemcu ESP8266-12E Module. ThingSpeak is an open-source application and application programming interface (API) for the Internet of Things (IoT). It can store and retrieve data from things using the HTTP protocol over the Internet or a Local Area Network.
Component Required
Project build noteNodeMCU - ESP8266 Air Quality Sensor - MQ135 Air Quality Sensor Connecting Wires
Breadboard MQ135 Gas/Smoke Sensor The MQ-135 gas sensor can detect gases like ammonia, nitrogen, oxygen, alcohols, aromatic compounds, sulfide, and smoke. As a gas sensing material, the MQ-3 gas sensor has a lower conductivity to clean the air. There are polluting gases in the air, but the conductivity of the gas sensor goes up as the amount of polluting gas goes up. With the MQ-135 gas sensor, you can find smoke, benzene, steam, and other dangerous gases. It might be able to find different dangerous gases. It doesn't cost much and works well for applications that monitor air quality. The MQ135 sensor is an instruction for sending a signal. It has two outputs: one is analog and the other is TTL. The Microcontroller's IO ports can be used to access the TTL output, which is a low signal light. The analog output is a concentration, which means that as the voltage goes up, so does the concentration. This sensor lasts for a long time and stays stable.
Features
Project build noteHigh Sensitivity High sensitivity to Ammonia, Sulfide, and Benze Stable and Long Life Detection Range: 10 – 300 ppm NH3, 10 – 1000 ppm Benzene, 10 – 300 Alcohol Heater Voltage: 5.0V Dimensions: 18mm Diameter, 17mm High excluding pins, Pins – 6mm High Long life and low cost Circuit Diagram & Connections
Connect the parts as shown in the diagram below. Connect the VCC pin of the MQ135 to the Vin pin of the NodeMCU and the GND pin to the GND pin of the NodeMCU. Connect the MQ135's analog pin A0 to the NodeMCU's analog pin A0.
Setting Thingspeak & Getting API Key
Project build noteGo to https://thingspeak.com/ if you don't already have an account. Sign in to your account. By clicking on the button, you can make a new channel. Type in the basics about the channel. Then Save the channel by scrolling down. You can use the video below as a guide. Then, go to API keys and copy and paste this key into a separate notepad file. You'll need it when you're programming later.
The code should be uploaded after the circuit is put together on a breadboard.
Figure: Prototype of Gas Level Monitor on Internet Using ESP8266 & Gas Sensor
Project build noteOnce the code is uploaded, open the serial monitor to check if the Wi-Fi is connected. Be sure that the baud rate is 115200. If Wi-Fi is connected, the gas level will be shown as a percentage, and information will be sent to thingspeak.
Now, you can add gas, smoke, or perfume to the MQ135 and watch the changes as the percentage value of gas level goes up.
Open the thingspeak channel and choose public/private view. Here, you can see the data that was uploaded after a 15-second break.
You built Gas Level Monitoring Using ESP8266 & Gas Sensor Over the Internet.
You followed the full workflow from understanding the mission to testing the finished project. That is a real engineering achievement - well done.
Browse all 500 projects