སྒྱུ་རྩལ
མཛེས་སྡུག་དང་བདེ་ཐང
བཟོ་རིག
རིག་གནས་དང་ལོ་རྒྱུས
དགའ་སྟོན
ཁོར་ཡུག
ཟས་དང་བཏུང་རྫས
ལྗང་མ་འཇོར་ལུགས
ཕྱིར་འཕྲུལ་རིག
ཚན་རིག
རྩེད་འགྲན
རིག་རྩལ
གྱོན་རུང
Building a Carbon Monoxide Detector
Ed

བཟོས་མཁན

Ed

13. སྤྱི་ཟླ་བདུན་པ 2026FI

Building a Carbon Monoxide Detector

Build a circuit that senses carbon monoxide (CO) — the invisible, odourless gas from any incomplete combustion — and raises an alarm when it rises. An MQ-7 sensor gives the Arduino a reading that climbs with CO; the code compares it to a clean-air baseline and triggers a buzzer and red LED. A great way to learn gas sensing — but read the safety note: this is a demonstration, NOT a certified life-safety CO alarm.

བར་མ
1-2 hours

ལམ་སྟོན

1

Wire the sensor, buzzer and LED

On the breadboard: MQ-7 VCC to Arduino 5V, GND to GND, and its analog output (AOUT) to Arduino A0. Active buzzer + to pin 8, - to GND. Red LED anode to pin 7 through a 330 Ω resistor, cathode to GND.

གོམ་པ་འདིའི་རྫས་རིགས:

Arduino Uno R3Arduino Uno R31 piece
Carbon Monoxide Sensor - MQ-7Carbon Monoxide Sensor - MQ-71 piece
Active Buzzer Module (5V, 5-Pack)Active Buzzer Module (5V, 5-Pack)1 piece
LED - Basic 5mmLED - Basic 5mm1 piece
Resistor 330 Ohm 1/6 Watt PTH - 20 packResistor 330 Ohm 1/6 Watt PTH - 20 pack1 piece
BreadboardBreadboard1 piece
Jumper Wires (Male-to-Male)Jumper Wires (Male-to-Male)1 pack
2

Connect and open the IDE

Plug the Arduino into your computer with the USB cable, open the Arduino IDE, and select Arduino Uno and its serial port.

གོམ་པ་འདིའི་རྫས་རིགས:

USB-B CableUSB-B Cable1 piece

ལག་ཆས་དགོས་མཁོ:

Computer with Arduino IDEComputer with Arduino IDE
3

Upload the detector sketch

Paste this sketch and upload. It warms the sensor for two minutes, records a clean-air baseline, then sounds the buzzer and lights the LED whenever the reading climbs above that baseline.

co_detector.inoarduino
// Carbon monoxide INDICATOR using an MQ-7 sensor.
// NOT a certified life-safety alarm - see the blueprint's safety note.
// MQ-7 analog output on A0; buzzer on pin 8; red warning LED on pin 7.

const int MQ7_PIN = A0;
const int BUZZER_PIN = 8;
const int LED_PIN = 7;

int cleanAirValue = 0;          // baseline, measured at startup
const int ALARM_MARGIN = 150;   // how far above baseline triggers the alarm

void setup() {
  pinMode(BUZZER_PIN, OUTPUT);
  pinMode(LED_PIN, OUTPUT);
  Serial.begin(9600);

  Serial.println("Warming up the MQ-7 (2 min) in clean air...");
  delay(120000);                // 2-minute warm-up
  cleanAirValue = analogRead(MQ7_PIN);
  Serial.print("Clean-air baseline: ");
  Serial.println(cleanAirValue);
}

void loop() {
  int reading = analogRead(MQ7_PIN);
  Serial.println(reading);

  if (reading > cleanAirValue + ALARM_MARGIN) {
    digitalWrite(LED_PIN, HIGH);      // CO above baseline -> alarm
    digitalWrite(BUZZER_PIN, HIGH);
  } else {
    digitalWrite(LED_PIN, LOW);
    digitalWrite(BUZZER_PIN, LOW);
  }
  delay(500);
}
4

Warm up, baseline and test

Power it in fresh air and let the 2-minute warm-up set the clean-air baseline (a brand-new MQ-7 also needs a longer 24–48 h burn-in before its readings settle). Then hold a small CO source nearby in a ventilated room — the smoke from a just-blown-out match works — and the buzzer and LED should trigger. Change ALARM_MARGIN to make it more or less sensitive.

5

Important safety limits

This is a LEARNING project and, at best, a supplementary indicator — it is NOT a certified life-safety device. A hobby MQ-7 gives a relative reading, not a calibrated ppm; it drifts over time and needs regular re-baselining, and it also responds to smoke and other gases. Carbon monoxide is invisible, odourless and can be fatal: for real protection always use a UL- or EN-certified CO alarm. Never rely on this circuit to keep anyone safe.

རྫས་རིགས

8

ལག་ཆས་དགོས་མཁོ

1
ཚོད་དཔག་བསྡོམས
$58.00

འབྲེལ་ཡོད་བིལུ་པིརིན་ཊི

བིལུ་པིརིན་ཊི་འདི་ཚུ་ཐབས་ལམ་དང་རྫས་རིགས། སྤྱི་ཆོས་བགོ་བཤའ་བྱེད

CC0 སྤྱི་དབང

བིལུ་པིརིན་ཊི་འདི་CC0 འོག་བཀྲམས་ཡོད། ཁྱེད་རང་གིས་ཆོག་མཆན་མ་བཞེས་པར་ཕབ་ལེན་དང་བཟོ་བཅོས། བགོ་བཤའ། དགོས་མཁོ་གང་ལའང་བཀོལ་སྤྱོད་བྱས་ཆོག

བཟོ་མཁན་ལ་རྒྱབ་སྐྱོར་བྱེད་པའི་ཆེད་ཁོང་ཚོའི་བིལུ་པིརིན་ཊི་བརྒྱུད་ཐོན་སྐྱེད་ཉོ། བཟོ་མཁན་གྱིས བཟོ་མཁན་གྱི་ཁེ་ཕོགས ཚོང་པས་གཏན་འཁེལ་བྱས་པ། ཡང་ན་བིལུ་པིརིན་ཊི་འདིའི་པར་གསར་བཟོས་ཏེ་ཁྱེད་རང་གི་བིལུ་པིརིན་ཊི་ནང་མཐུད་སྦྲེལ་བྱས་ཏེ་ཡོང་སྒོ་བགོ་བཤའ་བྱེད།

གྲོས་བསྡུར

(0)

ནང་འཛུལ གྲོས་བསྡུར་ནང་མཉམ་ཞུགས་ཆེད

བསམ་ཚུལ་ཚུ་ཐོབ་བཞིན...