Cirkit Designer Logo
Cirkit Designer
Your all-in-one circuit design IDE
Home / 
Project Documentation

Arduino UNO Based Multi-Gas Detector

Image of Arduino UNO Based Multi-Gas Detector

Circuit Documentation

Summary

This circuit is designed to monitor air quality by measuring the concentration of various gases. It includes three gas sensors: the MQ-7 for carbon monoxide (CO) detection, the MQ-131 for ozone (O3) detection, and the MKE-S09 MQ-135 for general air quality assessment. These sensors are interfaced with an Arduino UNO microcontroller, which reads the analog sensor outputs and transmits the data serially for monitoring purposes.

Component List

MQ-7 Breakout

  • Description: Carbon monoxide (CO) gas sensor module.
  • Pins: VCC, GND, DO (Digital Output), AO (Analog Output).

Arduino UNO

  • Description: Microcontroller board based on the ATmega328P.
  • Pins: Digital I/O, Analog Inputs, Power, Ground, and other control pins.

MQ131

  • Description: Ozone (O3) gas sensor module.
  • Pins: VCC, GND, AOUT (Analog Output), DOUT (Digital Output).

MKE-S09 MQ-135 Air Quality Sensor

  • Description: Air quality sensor module for detecting a wide range of gases, including NH3, NOx, alcohol, benzene, smoke, and CO2.
  • Pins: GND, 5V, SIG (Signal Output).

Wiring Details

MQ-7 Breakout

  • VCC: Connected to the 5V output on the Arduino UNO.
  • GND: Connected to a ground pin on the Arduino UNO.
  • AO: Connected to the A2 analog input on the Arduino UNO.

Arduino UNO

  • 5V: Provides power to the MQ-7, MQ-131, and MQ-135 sensors.
  • GND: Common ground for all sensors.
  • A0: Receives the analog output from the MQ-131 sensor.
  • A1: Receives the signal output from the MQ-135 sensor.
  • A2: Receives the analog output from the MQ-7 sensor.

MQ131

  • VCC: Connected to the 5V output on the Arduino UNO.
  • GND: Connected to a ground pin on the Arduino UNO.
  • AOUT: Connected to the A0 analog input on the Arduino UNO.

MKE-S09 MQ-135 Air Quality Sensor

  • 5V: Connected to the 5V output on the Arduino UNO.
  • GND: Connected to a ground pin on the Arduino UNO.
  • SIG: Connected to the A1 analog input on the Arduino UNO.

Documented Code

// Code for reading sensor data from the MQ-7, MQ-131, and MQ-135 sensors
// and outputting the data to the serial monitor.

int mq131Pin = A0;  // MQ131 connected to A0
int mq135Pin = A1;  // MQ135 connected to A1
int mq7Pin = A2;    // MQ7 connected to A2

void setup() {
  Serial.begin(9600);  // Initialize serial communication at 9600 baud rate
}

void loop() {
  int mq131Value = analogRead(mq131Pin);  // Read value from MQ131
  int mq135Value = analogRead(mq135Pin);  // Read value from MQ135
  int mq7Value = analogRead(mq7Pin);      // Read value from MQ7

  // Print the sensor values to the serial monitor
  Serial.print("MQ131 (Ozone): ");
  Serial.println(mq131Value);
  Serial.print("MQ135 (Air Quality): ");
  Serial.println(mq135Value);
  Serial.print("MQ7 (CO): ");
  Serial.println(mq7Value);

  delay(1000);  // Delay for readability
}

This code is designed to be uploaded to the Arduino UNO microcontroller. It initializes the serial communication, reads the analog values from the connected sensors, and prints the readings to the serial monitor every second. Each sensor's reading is labeled with the corresponding gas it detects for easy identification.