Tekko BDSimSimulatorProjects

সিও ভেন্টিলেটর — MQ-7 সেন্সরে এক্সহস্ট ফ্যান ঘোরেCO Ventilator with an MQ-7

কার্বন মনোক্সাইডের গন্ধ নেই — MQ-7 ঠিক এটাই ধরে। ৪০০ ppm পার হলে রিলে দিয়ে এক্সহস্ট ফ্যান চালু হয়, ৩০০ এর নিচে নামলে বন্ধ; OLED তে পাঠ লাইভ দেখা যায়।

Carbon monoxide has no smell — the MQ-7 is tuned for exactly it. Above 400 ppm the exhaust fan kicks in through a relay, below 300 it stops; the OLED shows the reading live.

▶ ফ্রি চালিয়ে দেখো / Run it free Parts অর্ডার করো (WhatsApp)

সার্কিট ডায়াগ্রাম · Circuit diagram

CO Ventilator with an MQ-7 circuit diagram — Arduino Uno R3, Carbon monoxide sensor (MQ-7), OLED display 0.96" (SSD1306), Relay module (5V, 1 channel), Cooling fan (12 V), Resistor 330Ω, LED (red), Jumper wires

যা যা লাগবে · Parts you need

তার লাগানো · Wiring

Carbon monoxide sensor (MQ-7) VCC→Arduino Uno R3 5V
Carbon monoxide sensor (MQ-7) GND→Arduino Uno R3 GND
Carbon monoxide sensor (MQ-7) AO→Arduino Uno R3 A0
OLED display 0.96" (SSD1306) VCC→Arduino Uno R3 5V
OLED display 0.96" (SSD1306) GND→Arduino Uno R3 GND
OLED display 0.96" (SSD1306) SDA→Arduino Uno R3 A4
OLED display 0.96" (SSD1306) SCL→Arduino Uno R3 A5
Relay module (5V, 1 channel) VCC→Arduino Uno R3 5V
Relay module (5V, 1 channel) GND→Arduino Uno R3 GND
Relay module (5V, 1 channel) IN→Arduino Uno R3 D7
Relay module (5V, 1 channel) COM→Arduino Uno R3 5V
Relay module (5V, 1 channel) NO→Cooling fan (12 V) +
Cooling fan (12 V) -→Arduino Uno R3 GND.3
Arduino Uno R3 D13→Resistor a
Resistor b→LED A
LED K→Arduino Uno R3 GND.3

Code (Arduino C++)

#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
// CO ventilator: carbon monoxide is the silent killer — no smell, no warning.
// The MQ-7 is tuned for exactly it. Above 400 ppm the exhaust fan kicks in
// through the relay; below 300 it stops. Two thresholds again — a fan that
// flaps on and off around one line wears itself out in a month.
Adafruit_SSD1306 display(128, 32, &Wire, -1);
bool venting = false;

void setup() {
  Serial.begin(9600);
  pinMode(7, OUTPUT); pinMode(13, OUTPUT);
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);
  display.setTextSize(1);
  display.setTextColor(SSD1306_WHITE);
}

void loop() {
  int ppm = map(analogRead(A0), 0, 1023, 0, 1000);
  if (!venting && ppm > 400) venting = true;
  if (venting && ppm < 300) venting = false;
  digitalWrite(7, venting ? HIGH : LOW);
  digitalWrite(13, venting ? HIGH : LOW);
  display.clearDisplay();
  display.setCursor(0, 0);  display.print("CO: "); display.print(ppm); display.print(" ppm");
  display.setCursor(0, 16); display.print(venting ? "FAN ON" : "Air clean");
  display.display();
  Serial.print("CO: "); Serial.print(ppm);
  Serial.print(" ppm | Fan: "); Serial.println(venting ? "ON" : "OFF");
  delay(400);
}

আরো project · More projects