Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

Arduino UNO Based IoT Indoor Air Quality Monitor with WiFi Connectivity

View and Edit Project In Cirkit DesignerImage of Arduino UNO Based IoT Indoor Air Quality Monitor with WiFi Connectivity

Circuit Documentation

Summary

The circuit in question is an Integrated Humidity, Infrared, and Particulates System (IHIP) designed for Internet of Things (IoT)-based indoor air quality monitoring and control. It utilizes an Arduino UNO as the main microcontroller to interface with a DHT11 humidity and temperature sensor, an IR sensor, a PM2.5 air quality sensor, and an ESP8266 WiFi module for IoT connectivity. The data collected from the sensors is displayed on an Adafruit Standard LCD 16x2 and transmitted over WiFi for remote monitoring.

Component List

Arduino UNO

DHT11 Humidity and Temperature Sensor

PM2.5 Air Quality Sensor and Breadboard Adapter Kit - PMS5003

IR Sensor

ESP8266 ESP-201 WiFi Module

Adafruit Standard LCD 16x2 white on blue

Wiring Details

Arduino UNO

DHT11 Humidity and Temperature Sensor

PM2.5 Air Quality Sensor and Breadboard Adapter Kit - PMS5003

IR Sensor

ESP8266 ESP-201 WiFi Module

Adafruit Standard LCD 16x2 white on blue

Documented Code

/*
 * IHIP (Integrated Humidity, Infrared, and Particulates System)
 * Internet of Things (IoT) - based Indoor Air Quality Monitoring and Controlling
 *
 * This Arduino sketch reads data from a DHT11 sensor, an IR sensor, and a PM2.5
 * air quality sensor. It displays the data on an LCD and sends it to an ESP8266
 * WiFi module for IoT-based monitoring.
 */

#include <DHT.h>
#include <LiquidCrystal.h>

// Pin definitions
#define DHTPIN 13
#define DHTTYPE DHT11
#define IRPIN 11
#define LCD_RS 12
#define LCD_E 11
#define LCD_D4 5
#define LCD_D5 4
#define LCD_D6 3
#define LCD_D7 2

// Initialize DHT sensor
DHT dht(DHTPIN, DHTTYPE);

// Initialize LCD
LiquidCrystal lcd(LCD_RS, LCD_E, LCD_D4, LCD_D5, LCD_D6, LCD_D7);

void setup() {
  // Start serial communication
  Serial.begin(9600);

  // Initialize DHT sensor
  dht.begin();

  // Initialize LCD
  lcd.begin(16, 2);
  lcd.print("IHIP System");

  // Initialize IR sensor pin
  pinMode(IRPIN, INPUT);
}

void loop() {
  // Read humidity and temperature from DHT11
  float humidity = dht.readHumidity();
  float temperature = dht.readTemperature();

  // Read IR sensor value
  int irValue = digitalRead(IRPIN);

  // Display data on LCD
  lcd.setCursor(0, 1);
  lcd.print("H:");
  lcd.print(humidity);
  lcd.print("% T:");
  lcd.print(temperature);
  lcd.print("C");

  // Send data to ESP8266
  Serial.print("Humidity: ");
  Serial.print(humidity);
  Serial.print("% Temperature: ");
  Serial.print(temperature);
  Serial.print("C IR: ");
  Serial.println(irValue);

  // Wait for 2 seconds before next loop
  delay(2000);
}

This code is designed to be uploaded to the Arduino UNO microcontroller. It initializes the connected sensors and LCD, reads sensor data, displays it on the LCD, and sends it over serial to the ESP8266 for remote monitoring.