STEP 1 / 6ARDUINO

IoT based Air Pollution Monitoring System using Arduino

This project involves the development of an Internet of Things (IoT) based service that monitors air pollution over the Internet through a web server, and it will sound a warning if suffi…

Circuit Atlas themed schematic for IoT based Air Pollution Monitoring System using Arduino
PROJECT#365
TRACKArduino
PARTS03
STAGES06
STEP 1 / 6 · Overview

Know the mission before touching a wire.

Understand what you are making, prepare the right tools, and make the workbench safe.

01

Project details

IoT based Air Pollution Monitoring System using Arduino is a arduino project. This project involves the development of an Internet of Things (IoT) based service that monitors air pollution over the Internet through a web server, and it will sound a warning if suffi…

Source pages
761-764
Named parts
3
Build goal
Working, tested prototype
02

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.

03

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.
Ready to continue?
STEP 2 / 6 · Parts library

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.

NAMED PROJECT INVENTORY3 PART LINES
PARTTYPEQTYREADY
MMQ135 Gas sensorMODULE1
What's this?Image, role, pros, cons, handling & specifications
MQ-135 air-quality moduleMODULE LEARNING VIEW

MQ135 Gas sensor

A sensor converts a physical condition into an electrical signal the circuit can measure.

What it does here

It 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 sensor; similar-looking parts are not always interchangeable.
  • Confirm supply range, output type, measurement range, accuracy, response time, and pin order.
MArduino UnoMODULE1
What's this?Image, role, pros, cons, handling & specifications
Circuit Atlas themed schematic for IoT based Air Pollution Monitoring System using ArduinoMODULE LEARNING VIEW

Arduino Uno

A programmable controller that reads inputs, makes decisions, and drives the project's outputs.

What it does here

It 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 Arduino Uno; similar-looking parts are not always interchangeable.
  • Confirm operating voltage, logic level, pinout, memory, USB interface, and maximum GPIO current.
MWi-Fi module ESP8266MODULE1
What's this?Image, role, pros, cons, handling & specifications
Circuit Atlas themed schematic for IoT based Air Pollution Monitoring System using ArduinoMODULE LEARNING VIEW

Wi-Fi module ESP8266

A programmable controller that reads inputs, makes decisions, and drives the project's outputs.

What it does here

It 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 Wi-Fi module ESP8266; similar-looking parts are not always interchangeable.
  • Confirm operating voltage, logic level, pinout, memory, USB interface, and maximum GPIO current.
Ready to continue?
STEP 4 / 6 · Source code

Confirm the hardware-only control path.

This project does not include firmware in the source. The circuit itself provides the required behaviour.

01

How to connect

  1. Match every controller label to the circuit view and source pin map.
  2. Join grounds before signal wires when separate low-voltage supplies are used.
  3. 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.

02

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.

03

How to upload code

The original design is implemented entirely in hardware, so proceed after verifying the circuit and supply.

Ready to continue?
STEP 5 / 6 · Build

Assemble, deploy, test, and troubleshoot.

Use the complete source notes in build order, then pass the final checks before calling the project finished.

ASSEMBLY

Build in functional stages

  • Power and regulation
  • Controller or processing stage
  • Inputs and sensors
  • Outputs and loads
  • Enclosure and strain relief
TEST

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
TROUBLESHOOT

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
PROJECT-SPECIFIC BUILD NOTES

Follow the documented instructions.

These notes come from this project's source and remain in their original order.

01

Project overview

Project build note

This project involves the development of an Internet of Things (IoT) based service that monitors air pollution over the Internet through a web server, and it will sound a warning if sufficient amounts of hazardous gasses like

carbon dioxide, smoke, alcohol, benzene and NH3 enter the air at a certain level. On the LCD and on the webpage, we will be able to read the air quality in PPM, so we can easily monitor it. This time the air quality sensor was the MQ135 sensor instead of the MQ6 sensor, which we used previously for making LPG detectors. The MQ135 sensor can detect most harmful gases without affecting their amount. You can monitor pollution levels in this IOT project using your computer or mobile device no matter where you are. In addition to installing this system anywhere, we can also set up some device that will turn on the exhaust fan or send SMS/email notifications to the user when pollution reaches some level.

02

Required Components

Project build note

MQ135 Gas sensor Arduino Uno Wi-Fi module ESP8266

03

16X2 LCD

Project build note

Breadboard 10K potentiometer 1K ohm resistors 220-ohm resistor Buzzer In order to use ESP8266, we need to first connect it to the Arduino. You can't use Arduino to power an ESP8266 as it runs on 3.3V, but if you give it 5V, then it won't function properly and might even be damaged. 3.3V should be connected to VCC and CH_PD on Arduino. When connected directly to the Arduino, the RX pin of the ESP8266 works with 3.3V voltage and thus cannot communicate with the Arduino. Thus, we will need to create a

voltage divider so that the 5V can be converted into 3.3V. You can do this by increasing the resistance of three resistors as we did in the circuit. By connecting the ESP8266's TX pin to Arduino pin 10, and its RX pin to Arduino pin 9, you can make the ESP8266 transmit data. Your projects can connect to the internet and Wi-Fi using an ESP8266 Wi-Fi module. You can create very powerful projects with this inexpensive device. ESP8266 is a leading IOT device, capable of communicating with any microcontroller. Discover more about using ESP8266 with Arduino here. Our next step will be to connect the MQ135 sensor to the Arduino. The sensor's VCC and ground pins should be connected to the Arduino's 5V and ground, while the sensor's Analog pin should be connected to the Arduino's A0. In addition, we'd like to connect the LCD to the Arduino through pin 8, which is responsible for beeping when the condition occurs.

04

Working Explanation

Project build note

A gas sensor can detect NH3, NOx, alcohol, benzene, smoke, CO2, and a few other gases, so the MQ135 sensor is ideal for our Air Quality Monitoring Project. With Arduino we can detect the pollutants, and we will get their concentration in parts per million. Gas sensors such as MQ135 provide output based on voltage levels that must be converted into PPM. Therefore, I have used a library for MQ135 to convert the output in PPM, and you can find the details below in the "Code Explanation" section. Despite being within a safe limit of air quality (350 PPM), the sensor gave us a value of 90 when no gas was close by. It causes headaches, sleepiness, stagnant, stale air, and increased heart rate when it exceeds 1000 PPM and changes can be seen in other conditions when it exceeds 2000 PPM.

The LCD and webpage will display "Fresh Air" when the value is less than 1000 PPM. A buzzer will start beeping every time the value reaches 1000 PPM, displaying "Poor Air, Open Windows" on the LCD and webpage. In the event that it reaches 2000, the buzzer will continue to beep and the LCD and webpage will indicate "Stay away from fresh air".

Ready to continue?
PROJECT ACHIEVED

You built IoT based Air Pollution Monitoring System using Arduino.

You followed the full workflow from understanding the mission to testing the finished project. That is a real engineering achievement - well done.

IOT Based Dumpster Monitoring using Arduino & ESP8266 project thumbnail featuring Arduino Uno (you can use any other), ESP8266 Wi-Fi module, HC-SR04 Ultrasonic sensor
NEXT ARDUINO ADVENTURE

IOT Based Dumpster Monitoring using Arduino & ESP8266

Ready to reuse what you learned in another project from the same track?

Start this project
Browse all 500 projects