0% found this document useful (0 votes)
36 views17 pages

MC Iot Report

Uploaded by

Prasad Dhumale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views17 pages

MC Iot Report

Uploaded by

Prasad Dhumale
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

SCHOOL OF COMPUTER SCIENCE AND ENGINEERING

A MINI PROJECT REPORT


on

Air Quality Monitoring System for Indoor Environments using IoT


Submitted in partial fulfilment of the requirements for the

Microcontroller and IOT Lab (B22EF0406)

Submitted by

D.DHINESH KUMAAR REDDY(R22EF047)


DHUMALE PRASAD(R22EF059)
B.YAGHNA KESAVA(R22EF036)
C.JAGADEESWAR REDDY(R22EF045)

2024
REVA University
Rukmini Knowledge Park, Kattigenahalli, Yelahanka, Bengaluru-560064
www.reva.edu.in

1
CONTENTS
1. Abstract

2. Introduction

3. Problem statement

4. Project Scope

5. Methodology

6. Conclusions

7. Project Limitations and Future Enhancements

8. References

2
1. Abstract:-

This project involves the development of an air quality monitoring system utilizing an
Arduino Uno, DHT11 sensor, MQ135 gas sensor, MQ7 gas sensor, ESP8266 WiFi module,
and a communication interface for data transmission to ThingSpeak, an IoT analytics
platform. The system is designed to measure and report real-time air quality parameters
including temperature, humidity, carbon monoxide (CO), and carbon dioxide (CO2)
concentrations.

The DHT11 sensor measures ambient temperature and humidity, while the MQ135 and MQ7
sensors detect concentrations of CO2 and CO, respectively. Data from these sensors are
processed by the Arduino Uno and transmitted to the ESP8266 module via a SoftwareSerial
interface. The ESP8266 module connects to a WiFi network and uploads the sensor data to
the ThingSpeak platform at regular intervals.

The project aims to provide a low-cost, efficient solution for continuous air quality
monitoring. The real-time data transmission to ThingSpeak enables remote monitoring and
analysis, facilitating timely interventions to maintain healthy air quality levels. This system
can be utilized in various environments including homes, offices, and industrial areas to
safeguard public health and ensure compliance with air quality standards.

Through the integration of various sensors and IoT technologies, this air quality monitoring
system exemplifies a practical application of embedded systems and wireless communication
in environmental monitoring.

2. Introduction:

Air quality is a critical aspect of environmental health, affecting the well-being of individuals
and ecosystems alike. Poor air quality can lead to various health issues, including respiratory
problems, cardiovascular diseases, and adverse effects on overall human health. In urban
areas, industrial regions, and even indoor environments, monitoring air quality is essential to
ensure a safe and healthy atmosphere.

This project aims to develop a comprehensive air quality monitoring system using an
Arduino Uno microcontroller, DHT11 temperature and humidity sensor, MQ135 gas sensor,
MQ7 gas sensor, and an ESP8266 WiFi module. The system is designed to measure key
environmental parameters—temperature, humidity, carbon dioxide (CO2), and carbon
monoxide (CO)—and transmit this data wirelessly to the ThingSpeak IoT platform for real-
time monitoring and analysis.

The Arduino Uno acts as the primary controller, interfacing with the sensors to collect data.
The DHT11 sensor provides measurements of ambient temperature and humidity, which are
crucial for understanding the overall environmental conditions. The MQ135 sensor detects
CO2 levels, while the MQ7 sensor measures CO concentration, both of which are significant

3
indicators of air quality. The ESP8266 WiFi module enables the system to connect to a WiFi
network and send the collected data to ThingSpeak, where it is stored and visualized.

By utilizing ThingSpeak, the system offers a user-friendly interface for remote monitoring of
air quality data. Users can view graphical representations of the sensor values, facilitating
easy analysis and timely intervention to improve air quality. This feature is particularly
beneficial for applications in homes, offices, schools, and industrial settings where
maintaining good air quality is paramount.

The development of this air quality monitoring system showcases the practical application of
embedded systems and IoT technologies in addressing environmental challenges. It provides
a cost-effective, scalable, and efficient solution for continuous air quality monitoring,
contributing to healthier living and working conditions.

In summary, this project not only highlights the importance of monitoring air quality but also
demonstrates how modern technology can be leveraged to create effective and accessible
solutions for environmental health management.

SENSORS AND MODULES USED:

1. DHT11 Sensor:
o Purpose: Measures ambient temperature and humidity.
o Specifications:
 Temperature range: 0-50°C with ±2°C accuracy.
 Humidity range: 20-80% RH with ±5% accuracy.
o Connection: Digital pin for data output.

2. MQ135 Gas Sensor:


o Purpose: Detects various gases including carbon dioxide (CO2), ammonia
(NH3), benzene, alcohol, smoke, and other harmful gases.
o Specifications:
 Sensitivity to CO2: 200-10000 ppm.
 Analog output.
o Connection: Analog output connected to an analog pin on the Arduino.

4
3. MQ7 Gas Sensor:
o Purpose: Specifically detects carbon monoxide (CO).
o Specifications:
 Sensitivity to CO: 10-10000 ppm.
 Analog output.
o Connection: Analog output connected to an analog pin on the Arduino.

4. ESP8266 WiFi Module:


o Purpose: Provides WiFi connectivity for the Arduino, enabling data
transmission to a remote server (ThingSpeak).
o Specifications:
 Supports 802.11 b/g/n.
 Can operate in STA (station), AP (access point), or both modes.
o Connection:
 VCC: 3.3V.
 GND: Ground.
 TX: Connect to RX on Arduino (through a voltage divider if
necessary).
 RX: Connect to TX on Arduino.

5
5. Arduino Uno:
o Purpose: Acts as the main controller, processing sensor data and interfacing
with the ESP8266 for data transmission.
o Specifications:
 ATmega328P microcontroller.
 14 digital I/O pins (6 PWM outputs).
 6 analog inputs.
 Operating voltage: 5V.

6. SoftwareSerial Library:
o Purpose: Enables serial communication on other digital pins of the Arduino
Uno.
o Usage: Facilitates communication between the Arduino and the ESP8266
module.

Additional Components

1. Connecting Wires:
o Used to connect various sensors and modules to the Arduino.
2. Breadboard (Optional for prototyping):
o Provides a convenient platform for assembling the circuit during the
development phase.
3. Resistors and Capacitors (As needed for sensors):
o Used for ensuring proper sensor operation and signal conditioning.

These components collectively form an air quality monitoring system capable of measuring
temperature, humidity, CO, and CO2 levels, and transmitting the data wirelessly to a cloud
platform for real-time monitoring and analysis.

6
3. Problem Statement:

Air pollution is a significant environmental issue with far-reaching implications for public
health and well-being. Despite efforts to mitigate pollution levels, monitoring air quality
remains a challenge, particularly in urban and industrial areas where pollution sources are
diverse and dynamic. The lack of real-time data on air quality hinders effective decision-
making and interventions to address pollution-related health risks.

The problem statement revolves around the need for a cost-effective and efficient air quality
monitoring system capable of:

1. Continuous Monitoring: Providing real-time measurements of key air quality parameters,


including temperature, humidity, carbon dioxide (CO2), and carbon monoxide (CO).

2. Wireless Connectivity: Enabling wireless data transmission to a central server for remote
monitoring and analysis, ensuring timely access to air quality information.

3. Data Visualization: Presenting air quality data in a user-friendly and informative manner,
facilitating easy interpretation and decision-making by stakeholders.

4. Scalability and Accessibility: Allowing for the scalability and accessibility of the
monitoring system, making it suitable for deployment in diverse environments and
applications.

5. Contribution to Environmental Health: Supporting efforts to mitigate air pollution and


protect public health by providing actionable insights into air quality trends and pollution
sources.

By addressing these requirements, the proposed air quality monitoring system aims to
empower stakeholders with the information needed to make informed decisions, implement
targeted interventions, and ultimately improve air quality for the benefit of communities and
ecosystems.

7
Code for ESP8266 WiFi Module:

#include <ESP8266WiFi.h>

#include <ThingSpeak.h>

#include <SoftwareSerial.h>

// WiFi credentials

const char* ssid = "PRASAD 0795";

const char* password = "8074456420";

// ThingSpeak credentials

unsigned long channelID = 2564733;

const char* writeAPIKey = "XKJT109IF8VG2X6S";

WiFiClient client;

SoftwareSerial mySerial(3, 2); // RX, TX for software serial (invert pins for ESP-01)

void setup() {

Serial.begin(9600);

mySerial.begin(9600);

// Connect to WiFi network

WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {

delay(1000);

Serial.println("Connecting to WiFi...");

8
}

Serial.println("Connected to WiFi");

// Initialize ThingSpeak library

ThingSpeak.begin(client);

void loop() {

// Check if data is available from Arduino Uno

if (mySerial.available() > 0) {

// Read sensor data from Arduino Uno

String data = mySerial.readStringUntil('\n');

Serial.print("Received data: ");

Serial.println(data);

// Parse data

float co_ppm, co_percentage, co2_ppm, co2_percentage, temperature, humidity;

sscanf(data.c_str(), "CO,%f,%f,CO2,%f,%f,Temp,%f,Humidity,%f", &co_ppm,


&co_percentage, &co2_ppm, &co2_percentage, &temperature, &humidity);

// Send sensor data to ThingSpeak

ThingSpeak.setField(1, co_ppm);

ThingSpeak.setField(2, co_percentage);

ThingSpeak.setField(3, co2_ppm);

ThingSpeak.setField(4, co2_percentage);

ThingSpeak.setField(5, temperature);

9
ThingSpeak.setField(6, humidity);

int result = ThingSpeak.writeFields(channelID, writeAPIKey);

// Print to serial monitor for debugging

if (result == 200) {

Serial.println("Data sent to ThingSpeak successfully");

} else {

Serial.println("Failed to send data to ThingSpeak. HTTP error code: " + String(result));

delay(1000); // Adjust delay as needed

Code for Arduino UNO:

#include <DHT.h>

// Define pin numbers

#define DHTPIN 2

#define MQ135Pin A0

#define MQ7Pin A1

// Define DHT type

#define DHTTYPE DHT11

10
DHT dht(DHTPIN, DHTTYPE);

// Setup software serial for communication with ESP8266

#include <SoftwareSerial.h>

SoftwareSerial mySerial(3, 2); // RX, TX

void setup() {

Serial.begin(9600);

mySerial.begin(9600);

dht.begin();

void loop() {

// Read sensors data

float humidity = dht.readHumidity();

float temperature = dht.readTemperature();

int mq135Value = analogRead(MQ135Pin);

int mq7Value = analogRead(MQ7Pin);

// Convert raw sensor values to ppm (for simplicity, we assume a linear relationship)

float co_ppm = mq7Value * (5.0 / 1023.0); // Example conversion factor

float co2_ppm = mq135Value * (5.0 / 1023.0); // Example conversion factor

// Convert to percentage (example calculation, adjust as needed)

float co_percentage = (co_ppm / 1000.0) * 100;

float co2_percentage = (co2_ppm / 1000.0) * 100;

// Send data to ESP8266

11
mySerial.print("CO,");

mySerial.print(co_ppm);

mySerial.print(",");

mySerial.print(co_percentage);

mySerial.print(",CO2,");

mySerial.print(co2_ppm);

mySerial.print(",");

mySerial.print(co2_percentage);

mySerial.print(",Temp,");

mySerial.print(temperature);

mySerial.print(",Humidity,");

mySerial.println(humidity);

delay(2000); // Adjust delay as needed

12
4. Project Scope:

The scope of the air quality monitoring system project encompasses the following key
aspects:

1. Hardware Development:
o Design and implementation of the hardware components, including the
Arduino Uno microcontroller, DHT11 temperature and humidity sensor,
MQ135 gas sensor, MQ7 gas sensor, and ESP8266 WiFi module.
o Circuit design, assembly, and testing to ensure proper functionality and
compatibility of the hardware components.
2. Software Development:
o Development of the software interface to facilitate communication between
the hardware components, including sensor data acquisition, processing, and
transmission to the ThingSpeak IoT platform.
o Implementation of data visualization tools to display air quality parameters in
a user-friendly graphical format on the ThingSpeak platform.
3. Integration and Testing:
o Integration of hardware and software components to create a fully functional
air quality monitoring system.
o Testing of the integrated system to verify accuracy, reliability, and
performance under various environmental conditions.
4. Wireless Connectivity:
o Configuration of the ESP8266 WiFi module to establish a wireless connection
to the designated WiFi network.
o Implementation of protocols for secure and reliable data transmission from the
Arduino Uno to the ThingSpeak platform via WiFi.
5. Remote Monitoring and Analysis:
o Deployment of the air quality monitoring system in the target environment(s)
for continuous remote monitoring of air quality parameters.
o Analysis of collected data on the ThingSpeak platform to identify trends,
patterns, and potential pollution sources.
6. Documentation and Reporting:
o Documentation of the project, including hardware and software specifications,
circuit diagrams, code documentation, and user manuals.
o Preparation of reports detailing the project's objectives, methodology,
findings, and recommendations for future enhancements or applications.
7. Stakeholder Engagement:
o Engagement with stakeholders, including environmental agencies,
policymakers, and community members, to raise awareness about air quality
issues and the capabilities of the monitoring system.
o Collaboration with stakeholders to gather feedback, address concerns, and
tailor the system to meet specific needs and requirements.
8. Scalability and Future Enhancements:
o Consideration of scalability and potential future enhancements to the
monitoring system, such as the integration of additional sensors or expansion
of monitoring coverage.

13
o Exploration of opportunities to leverage emerging technologies and
methodologies to further improve the system's capabilities and effectiveness.

By defining the project scope, stakeholders can establish clear objectives, allocate resources
effectively, and ensure that the air quality monitoring system meets the desired goals and
requirements.

5. Methodology:

The development of the air quality monitoring system involves a systematic approach
encompassing several key methodologies:

1. Requirement Analysis:
o Conduct a comprehensive analysis of stakeholder requirements, environmental
conditions, and regulatory standards governing air quality monitoring.
o Identify key parameters to be measured, including temperature, humidity,
CO2, and CO, based on their significance to air quality assessment.
2. Component Selection and Procurement:
o Research and select suitable hardware components, including the Arduino Uno
microcontroller, DHT11 sensor, MQ135 sensor, MQ7 sensor, and ESP8266
WiFi module, based on performance, reliability, and cost-effectiveness.
o Procure necessary components from reputable suppliers to ensure quality and
availability.
3. System Design and Architecture:
o Design the hardware and software architecture of the air quality monitoring
system, outlining the interactions between various components, data flow, and
communication protocols.
o Define interfaces and protocols for sensor data acquisition, processing, and
transmission to the ThingSpeak IoT platform.
4. Hardware Implementation:
o Assemble the hardware components according to the defined circuit diagrams
and connection specifications.
o Test the hardware setup to verify functionality, sensor readings, and
compatibility between components.
5. Software Development:
o Develop the software interface for the Arduino Uno microcontroller to interact
with the sensors, collect data, and communicate with the ESP8266 WiFi
module.
o Implement code for sensor calibration, data processing, and formatting before
transmission to ThingSpeak.
o Configure the ESP8266 module for WiFi connectivity and data transmission to
the ThingSpeak platform.
6. Integration and Testing:
o Integrate the hardware and software components to create a fully functional air
quality monitoring system.

14
oConduct rigorous testing to evaluate system performance, reliability, and
accuracy under various environmental conditions and stress scenarios.
o Debug and troubleshoot any issues encountered during testing to ensure the
system operates as intended.
7. Deployment and Validation:
o Deploy the air quality monitoring system in the target environment(s), such as
indoor spaces, outdoor areas, or industrial facilities.
o Validate system functionality and performance through continuous monitoring
of air quality parameters and comparison with established benchmarks or
standards.

6. CONCLUSIONS:

The development of the air quality monitoring system using Arduino Uno, DHT11, MQ135,
MQ7 sensors, and ESP8266 module offers a cost-effective and efficient solution for
continuous environmental monitoring. Throughout this project, several key insights and
outcomes have been achieved:

1. Effective Sensor Integration: The system successfully integrates multiple sensors to


measure critical air quality parameters, including temperature, humidity, carbon
dioxide (CO2), and carbon monoxide (CO). This comprehensive approach enables a
holistic understanding of the environmental conditions.
2. Wireless Data Transmission: Leveraging the ESP8266 WiFi module, the system
achieves seamless wireless data transmission to the ThingSpeak IoT platform. This
capability enables remote monitoring and real-time analysis of air quality data,
enhancing accessibility and usability.
3. User-Friendly Interface: ThingSpeak provides a user-friendly interface for
visualizing sensor data in graphical form. This feature allows users to monitor air
quality trends, identify patterns, and make informed decisions to improve
environmental conditions.
4. Practical Application: The air quality monitoring system has practical applications in
various settings, including homes, offices, schools, and industrial facilities. By
continuously monitoring air quality, the system contributes to creating healthier and
safer living and working environments.
5. Scalability and Flexibility: The modular design of the system allows for scalability
and flexibility in sensor configurations and deployment. Additional sensors can be
easily integrated to monitor additional air quality parameters or expand monitoring
coverage as needed.
6. Contributions to Environmental Health: By providing timely and accurate air
quality data, the system supports efforts to mitigate air pollution, protect public
health, and promote environmental sustainability. It serves as a valuable tool for
policymakers, environmental agencies, and individuals striving to address air quality
challenges.

In conclusion, the air quality monitoring system represents a significant step towards
leveraging IoT technologies for environmental monitoring and management. Its
implementation offers a practical and accessible solution for addressing air quality concerns,
ultimately contributing to the well-being of individuals and the sustainability of ecosystems.

15
Through continuous improvement and innovation, such systems have the potential to play a
crucial role in building cleaner, healthier, and more resilient communities.

7. Project Limitations and Future Enhancements:

Project Limitations

1. Sensor Accuracy: The accuracy of the sensors used in the air quality monitoring
system may vary, leading to potential inaccuracies in the measured data. Calibration
and periodic maintenance may be required to mitigate this limitation.
2. Environmental Factors: External factors such as temperature fluctuations, humidity
levels, and sensor drift may affect the performance of the monitoring system,
particularly in harsh environmental conditions.
3. WiFi Connectivity: Reliance on WiFi connectivity for data transmission may pose
limitations in areas with poor network coverage or interference, potentially affecting
the real-time monitoring capabilities of the system.
4. Power Consumption: Continuous operation of the monitoring system may lead to
high power consumption, especially when using wireless communication modules
such as the ESP8266. Battery-powered or energy-efficient solutions may be required
for extended deployment in remote or off-grid locations.
5. Data Security: The security of data transmitted over the WiFi network and stored on
the ThingSpeak platform may be a concern, particularly in sensitive or regulated
environments. Implementing robust encryption and authentication mechanisms is
essential to mitigate security risks.

Future Enhancements

1. Integration of Additional Sensors: Incorporating additional sensors to measure


pollutants such as particulate matter (PM), volatile organic compounds (VOCs), and
nitrogen oxides (NOx) can enhance the system's capability to monitor a wider range
of air quality parameters.
2. Machine Learning Algorithms: Implementing machine learning algorithms for data
analysis can enable predictive modeling, anomaly detection, and identification of
pollution trends, thereby providing more actionable insights for environmental
management.
3. Mobile Application: Developing a mobile application for remote monitoring and
control of the air quality monitoring system can enhance user accessibility and
convenience, allowing stakeholders to receive real-time alerts, view historical data,
and adjust system settings from their smartphones.
4. Geospatial Analysis: Integrating geospatial analysis techniques can enable spatial
mapping of air quality data, helping to identify pollution hotspots, assess exposure
risks, and prioritize intervention strategies for targeted environmental improvement.
5. Community Engagement: Engaging with local communities, citizen scientists, and
environmental advocacy groups can foster collaboration and data sharing,

16
empowering individuals to contribute to air quality monitoring efforts and raise
awareness about environmental health issues.
6. Scalability and Modular Design: Designing the monitoring system with scalability
and modularity in mind allows for easy expansion and customization to accommodate
evolving monitoring needs, technological advancements, and regulatory requirements.
7. Integration with Smart City Initiatives: Integrating the air quality monitoring
system with broader smart city initiatives, such as traffic management, urban
planning, and public health programs, can leverage synergies and maximize the
impact of environmental monitoring efforts on overall urban sustainability.

8. REFERNCES:

1. M. Weiser, Scientific American 265, 94–105 (1991).

2. B. Ndibanje, H.-J. Lee, and S.-G. Lee, Sensors 14, 14786–14805 (2014).

3. A. S. Whittemore, Annual Review of Public Health 2, 397–429 (1981).

4. A. Seaton, D. Godden, W. MacNee, and K. Donaldson, The Lancet 345, 176–178 (1995).

5. M. Kampa and E. Castanas, Environmental Pollution 151, 362–367 (2008).

6. M. Blaschke et al., IEEE Sensors Journal 6, 1298–1308 (2006).

7. E. Mehdizadeh et al., IEEE Sensors Journal 17, 2329–2337 (2017).

8. R. Kiruthika and A. Umamakeswari, 2017 International Conference on Energy,


Communication, Data Analytics and Soft Computing (ICECDS), pp. 2319–2326.

9. Y. Lu et al., IEEE Trans. Nanobiosci 14, 811–817 (2015).

10. C. S. Prajapati et al., Journal of Microelectromechanical Systems 26, 433–439 (2017).

11. H. Li et al., IEEE Transactions on Biomedical Circuits and Systems 10, 817–827 (2016).

12. A. Boubrima et al., IEEE Transactions on Wireless Communications 16, 2723–2735


(2017).

17

You might also like