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

Arduino UNO Based Environmental Monitoring System with Gas, Flame, and Humidity Sensors

View and Edit Project In Cirkit DesignerImage of Arduino UNO Based Environmental Monitoring System with Gas, Flame, and Humidity Sensors

Circuit Documentation

Summary

This circuit is designed to monitor environmental parameters such as gas presence, temperature, humidity, and the presence of a flame. It utilizes an Arduino UNO as the central microcontroller to process inputs from an MQ-5 gas sensor, a flame sensor, and a DHT11 temperature and humidity sensor. The circuit also includes three LEDs (red, green, and yellow) that act as indicators for the sensor readings. The Arduino UNO is programmed to read the sensor data and turn on the corresponding LED based on predefined threshold values.

Component List

Arduino UNO

MQ-5 Gas Sensor

Flame Sensor

DHT11

LED: Two Pin (red)

LED: Two Pin (green)

LED: Two Pin (yellow)

Wiring Details

Arduino UNO

MQ-5 Gas Sensor

Flame Sensor

DHT11

LED: Two Pin (red)

LED: Two Pin (green)

LED: Two Pin (yellow)

Documented Code

#define led1 3  
#define led2 4
#define led3 5
#define gas A1
#define fire 6
#define dh A0

void setup() {
  pinMode(led1, OUTPUT);
  pinMode(led2, OUTPUT);
  pinMode(led3, OUTPUT);
  pinMode(gas, INPUT);
  pinMode(fire, INPUT);
  pinMode(dh, INPUT);
  
  Serial.begin(9600);  
}

void loop() {
  int gas_s = analogRead(gas);
  int dh_s = analogRead(dh);
  int fir = digitalRead(fire);

  Serial.print("gas= ");
  Serial.print(gas_s);

  Serial.print(" dh= ");
  Serial.println(dh_s);

  if (gas_s >= 250) {
    digitalWrite(led1, HIGH);
  } else {
    digitalWrite(led1, LOW);
  }
  
  if (dh_s >= 500) {
    digitalWrite(led2, HIGH);
  } else {
    digitalWrite(led2, LOW);
  }

  if (fir == 1) {
    digitalWrite(led3, HIGH);
  } else {
    digitalWrite(led3, LOW);
  }
}

This code is designed to read sensor data from the MQ-5 gas sensor, DHT11 sensor, and flame sensor. It then outputs the sensor readings to the serial monitor and controls the state of three LEDs based on the sensor values. The LEDs act as visual indicators for the presence of gas, high temperature/humidity, and flame.