CO Detection with MQ-9 Sensor

Introduction

This experiment demonstrates how to detect carbon monoxide (CO) levels using an MQ-9 sensor with Arduino.

CO Sensor

Components Needed

Circuit Setup

  1. Connect the MQ-9 sensor's analog output pin to an analog input pin on the Arduino (e.g., A0).
  2. Connect the VCC and GND pins of the sensor to 5V and GND on the Arduino.

The MQ-9 sensor detects carbon monoxide levels and sends analog data to the Arduino for analysis.

CO Detection Circuit Setup

Code for CO Detection

Upload the following code to your Arduino to detect CO levels:


const int coPin = A0;
int coLevel;

void setup() {
  Serial.begin(9600);
}

void loop() {
  coLevel = analogRead(coPin);
  Serial.print("CO Level: ");
  Serial.println(coLevel);
  delay(1000);
}
            

Explanation

The MQ-9 sensor detects the concentration of CO in the air. The analog signal from the sensor is read by the Arduino and displayed on the Serial Monitor.

Troubleshooting