CO Gas Leak Detector with Arduino in Proteus

CO Gas Hardware Arduino

[otw_is sidebar=otw-sidebar-1]CO Gas Hardware Arduino ,CO Gas Hardware in proteus, CO Gas Hardware

In this article we will learn how to make CO Gas Leak detector Using Arduino, Relay and LCD display in proteus.
In the last post we will learn how to make Line Tracking Robot Using Arduino in Proteus. You can visit our website,
I hope you appreciate my work, let’s discuss about today’s project.

 

[otw_is sidebar=otw-sidebar-2]

Components:

  1. Arduino nano
  2. Gas sensor
  3. LCD display
  4. Buzzer
  5. Relay (12v)
  6. Diod (4007)
  7. Transistor (BC547)
  8. Resistor (10k)
  9. Jumper wires

Circuit Diagram…

CO Gas Leak Detector with Arduino circuit Diagram
CO Gas Leak Detector with Arduino circuit Diagram

Construction…

  • Connect OUT pin of Gas sensor with A0 pin of Arduino
  • Connect VCC pin of Sensor with +ve
  • Connect GND pin of Sensor with GND
  • Connect D2 pin of Arduino with pin D7 of LCD display
  • Connect D3 pin of Arduino with pin D6 of LCD display
  • Connect D4 pin of Arduino with pin D5 of LCD display
  • Connect D5 pin of Arduino with pin D4 of LCD display
  • Connect D6 pin of Arduino with pin E of LCD display
  • Connect D7 pin of Arduino with pin RS of LCD display
  • Connect RW, VEE, & VSS pins of LCD display with each other and then connect them with GND
  • Connect VDD pin of LCD display with +ve
  • Connect D8 pin of Arduino with one side of resistor 10k
  • Connect 2nd side of resistor with signal pin of transistor
  • Connect ammeter pin of transistor with GND
  • Connect Collector pin of Transistor with 1st terminal of Relay through +ve side of Diod
  • Connect 2nd terminal of Relay with –ve side of Diod and then connect them with +ve
  • Connect 3rd and 5th terminal with each other and then connect 3rd terminal with +ve
  • Now connect 5th Terminal with one side of Buzzer
  • Connect 2nd side of Buzzer with GND

Hardware Image…

CO Gas Leak Detector with Arduino Hardware,arduino proteus
CO Gas Leak Detector with Arduino Hardware Image

Working…

A carbon monoxide (CO) gas leak detector using Arduino, a relay, and an LCD display can help you monitor the presence of this potentially dangerous gas in your surroundings.

Applications…

  1. Home Safety
  2. Industrial Facilities
  3. Commercial Buildings
  4. Garages and Workshops
  5. Hospitals

Advantages…

  1. Cost-Effective Solution
  2. Customization
  3. Real-Time Monitoring
  4. Audible and Visual Alerts
  5. Educational Tool

Code Images…

CO Gas Leak Detector with Arduino Program Code
CO Gas Leak Detector with Arduino Program Code
CO Gas Leak Detector with Arduino Program Code
CO Gas Leak Detector with Arduino Program Code
CO Gas Leak Detector with Arduino Program Code
CO Gas Leak Detector with Arduino Program Code
CO Gas Leak Detector with Arduino Program Code
CO Gas Leak Detector with Arduino Program Code

[otw_is sidebar=otw-sidebar-2]

CO Gas Leak Detector with Arduino in Proteus

Program code…

[dt_code]

#include <LiquidCrystal.h>

 

// Gas Sensor Pin Configuration

const int MQ7SensorPin = A0;

 

// Relay Module Pin Configuration

const int RelayPin = 8;  // You can use any digital pin

 

// LCD Configuration

LiquidCrystal lcd(7, 6, 5, 4, 3, 2);  // Adjust the pin numbers as needed

 

void setup() {

pinMode(RelayPin, OUTPUT);

Serial.begin(9600);

lcd.begin(16, 2);  // Initialize the LCD with its dimensions

lcd.clear();       // Clear the display

}
[otw_is sidebar=otw-sidebar-3]
void loop() {

int sensorValue = analogRead(MQ7SensorPin);

 

// Convert the analog value to voltage (0-5V)

float voltage = (sensorValue / 1023.0) * 5.0;

 

// Define a threshold level for CO gas detection

float threshold = 3.0;  // You may need to adjust this value

 

lcd.setCursor(0, 0);

lcd.print(“CO Gas Detector”);

 

 

if (voltage > threshold) {

lcd.setCursor(0, 1);

lcd.print(“Danger:Gas!”);

Serial.println(“Danger: High CO gas detected!”);

digitalWrite(RelayPin,HIGH);  // Turn on the relay

} else {

lcd.setCursor(0, 0);

lcd.print(“CO levels normal”);

Serial.println(“CO gas levels normal.”);

digitalWrite(RelayPin, LOW);   // Turn off the relay

}

 

delay(500);  // Delay between readings (adjust as needed)

}
[otw_is sidebar=otw-sidebar-1]

 

[/dt_code]