0% found this document useful (0 votes)
18 views4 pages

Aditi Iot 5

The document outlines an experiment to design a weather station using the MQ-135 air quality sensor to monitor harmful gas concentrations. It includes the aim, objectives, required hardware, theory, procedure, circuit connections, code, and conclusions regarding air quality assessment. The MQ-135 sensor is highlighted as a versatile tool for detecting various gases, aiding in environmental safety monitoring.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views4 pages

Aditi Iot 5

The document outlines an experiment to design a weather station using the MQ-135 air quality sensor to monitor harmful gas concentrations. It includes the aim, objectives, required hardware, theory, procedure, circuit connections, code, and conclusions regarding air quality assessment. The MQ-135 sensor is highlighted as a versatile tool for detecting various gases, aiding in environmental safety monitoring.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

DEPARTMENT OF

COMPUTER SCIENCE & ENGINEERING

Experiment 5
Student Name: Aditi Mourya UID:22BCS11624
Branch: BE-CSE Section/Group: 22BCS_IOT_641(A)
Semester: 5th Date of Performance: 09-09-24
Subject Name: IOT LAB Subject Code: 22CSP-329

1. Aim:
To Design a weather station by checking Air quality of an environment with the help of IoT.

2. Objective:
The objective of this experiment is to use the MQ-135 sensor to detect and monitor the
concentration of harmful gases in the air. By analyzing the sensor's analog output, the
experiment aims to assess air quality and identify potential contamination.
This helps in determining environmental safety and necessary precautions
3. Hardware Required:
1. Arduino Uno R3
2. MQ 135 Air Quality Sensor Module
3. Male to Female Jumper Wire
4.Software: Arduino IDE
4. Theory:
About Air Quality Sensor:
MQ-135 sensor belongs to the MQ series that are used to detect different gasses present in the
air. The MQ-135 sensor is used to detect gases such as NH3, NOx, alcohol, Benzene, smoke,
CO2 , etc. steel exoskeleton houses a sensing device within the gas sensor module.
This sensor has 4 pins:
 5V: Module power supply – 5 V
 GND: Ground

1
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING

 DOUT: Digital output


 AOUT: Analog output

1. Procedure:
 Connect MQ-135 VCC to Arduino 5V.
 Connect MQ-135 GND to Arduino GND.
 Connect MQ-135 AOUT to Arduino analog pin (e.g., A0).
 Connect MQ-135 DOUT to Arduino digital pin.
 Upload code to Arduino and monitor sensor data via Serial Monitor.

2. Circuit diagram:

3. Connections:

o VCC to 5V: Connect the MQ-135 VCC pin to the Arduino 5V pin to power the
sensor.
o GND to GND: Connect the MQ-135 GND pin to the Arduino GND pin for a common
ground.

2
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING
o AO to A0: Connect the MQ-135 AO (Analog Output) pin to the Arduino analog
pin A0 to read analog sensor values.
o DO to Pin 2: Connect the MQ-135 DO (Digital Output) pin to Arduino digital pin 2 to
use the digital output if needed.
o Common Ground: Ensure that both the MQ-135 sensor and Arduino share a
common ground connection.
4. CODE:
int sensorValue;
int digitalValue;
void setup()
{
Serial.begin(9600);
pinMode(13, OUTPUT);
pinMode(2, INPUT);
}
void loop()
{
sensorValue = analogRead(0);
digitalValue = digitalRead(2);
if (sensorValue > 400)
{
digitalWrite(13, HIGH);
}
else
{
digitalWrite(13, LOW);
}
Serial.println(sensorValue, DEC);
Serial.println(digitalValue, DEC);
delay(5000); // wait 5000ms for next
reading
}

3
DEPARTMENT OF
COMPUTER SCIENCE & ENGINEERING

5. RESULT:

6. Conclusion:
The MQ-135 air quality sensor is a versatile device used for detecting a range of gases in the
environment, including ammonia (NH3), nitrogen oxides (NOx), alcohol, benzene, smoke,
and carbon dioxide (CO2). The sensor provides an analog output that corresponds to the
concentration of these gases in the air. This output can be read by a microcontroller, like an
Arduino, to assess air quality.

If the sensor readings stay within the normal range, the air quality can be considered safe.
However, if the readings rise significantly, it suggests the presence of potentially harmful
substances, and appropriate actions should be taken to ensure safety. This makes the MQ-
135sensor a useful tool for monitoring air quality in various settings.

You might also like