<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ko">
	<id>https://arduwiki.com/html/index.php?action=history&amp;feed=atom&amp;title=MQ_Sensors_EN</id>
	<title>MQ Sensors EN - 편집 역사</title>
	<link rel="self" type="application/atom+xml" href="https://arduwiki.com/html/index.php?action=history&amp;feed=atom&amp;title=MQ_Sensors_EN"/>
	<link rel="alternate" type="text/html" href="https://arduwiki.com/html/index.php?title=MQ_Sensors_EN&amp;action=history"/>
	<updated>2026-04-29T00:26:35Z</updated>
	<subtitle>이 문서의 편집 역사</subtitle>
	<generator>MediaWiki 1.40.1</generator>
	<entry>
		<id>https://arduwiki.com/html/index.php?title=MQ_Sensors_EN&amp;diff=2519&amp;oldid=prev</id>
		<title>ArduWiki: /* 2. Using a Library */</title>
		<link rel="alternate" type="text/html" href="https://arduwiki.com/html/index.php?title=MQ_Sensors_EN&amp;diff=2519&amp;oldid=prev"/>
		<updated>2025-03-27T10:05:22Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;2. Using a Library&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;ko&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← 이전 판&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;2025년 3월 27일 (목) 19:05 판&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l142&quot;&gt;142번째 줄:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;142번째 줄:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Uses the MQUnifiedsensor library by Miguel Califa.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Uses the MQUnifiedsensor library by Miguel Califa.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;See the [[Arduino &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Library&lt;/del&gt;|Library Usage Guide]] for installation and usage instructions.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;See the [[Arduino &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Libraries&lt;/ins&gt;|Library Usage Guide]] for installation and usage instructions.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:Mq6 예제 라이브러리.png|center|class=coders100]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[File:Mq6 예제 라이브러리.png|center|class=coders100]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key arduwiki:diff::1.12:old-2517:rev-2519 --&gt;
&lt;/table&gt;</summary>
		<author><name>ArduWiki</name></author>
	</entry>
	<entry>
		<id>https://arduwiki.com/html/index.php?title=MQ_Sensors_EN&amp;diff=2517&amp;oldid=prev</id>
		<title>ArduWiki: 새 문서: {{#seo:|title=Arduino Wiki: Arduino MQ Gas Sensor Guide|title_mode=append|keywords=Arduino, Computer Science, Maker Education, Performance Assessment, MQ Gas Sensor, Arduino Projects, Capstone Project, Arduino Example Code|description=Learn how to use the MQ gas sensor with Arduino (basic info, circuit, example code). Useful for CS and maker classes.}}class=coders100  == &#039;&#039;&#039;Overview&#039;&#039;&#039; == The MQ sensor is a low-cost electronic sensor that...</title>
		<link rel="alternate" type="text/html" href="https://arduwiki.com/html/index.php?title=MQ_Sensors_EN&amp;diff=2517&amp;oldid=prev"/>
		<updated>2025-03-27T09:58:42Z</updated>

		<summary type="html">&lt;p&gt;새 문서: {{#seo:|title=Arduino Wiki: Arduino MQ Gas Sensor Guide|title_mode=append|keywords=Arduino, Computer Science, Maker Education, Performance Assessment, MQ Gas Sensor, Arduino Projects, Capstone Project, Arduino Example Code|description=Learn how to use the MQ gas sensor with Arduino (basic info, circuit, example code). Useful for CS and maker classes.}}&lt;a href=&quot;/wiki/%ED%8C%8C%EC%9D%BC:Mq6_%EB%8C%80%ED%91%9C%EC%9D%B4%EB%AF%B8%EC%A7%80.png&quot; title=&quot;파일:Mq6 대표이미지.png&quot;&gt;center|class=coders100&lt;/a&gt;  == &amp;#039;&amp;#039;&amp;#039;Overview&amp;#039;&amp;#039;&amp;#039; == The MQ sensor is a low-cost electronic sensor that...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;새 문서&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{#seo:|title=Arduino Wiki: Arduino MQ Gas Sensor Guide|title_mode=append|keywords=Arduino, Computer Science, Maker Education, Performance Assessment, MQ Gas Sensor, Arduino Projects, Capstone Project, Arduino Example Code|description=Learn how to use the MQ gas sensor with Arduino (basic info, circuit, example code). Useful for CS and maker classes.}}[[File:Mq6 대표이미지.png|center|class=coders100]]&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Overview&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
The MQ sensor is a low-cost electronic sensor that can detect various gas concentrations. Each sensor is designed to detect specific gases and can be easily used with microcontrollers like Arduino. It is widely used in air quality monitoring, gas leak detection, industrial safety, and other applications.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Main Models&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
The MQ series includes a variety of models, each detecting different gases.&lt;br /&gt;
&lt;br /&gt;
Most sensors require a preheating time of around 24 hours. Considering measurement range and accuracy, they are better used for gas presence detection than precise safety applications.&lt;br /&gt;
&lt;br /&gt;
Sensitivity can be adjusted via a variable resistor on the back.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
!Sensor Type&lt;br /&gt;
!Detected Gas&lt;br /&gt;
!Preheat Time&lt;br /&gt;
!Detection Range&lt;br /&gt;
!Operating Voltage&lt;br /&gt;
!Output Type&lt;br /&gt;
|-&lt;br /&gt;
|MQ-2&lt;br /&gt;
|LPG, Propane, Hydrogen, Methane, Alcohol, Smoke&lt;br /&gt;
|24 hours&lt;br /&gt;
|300–10000 ppm&lt;br /&gt;
|5V&lt;br /&gt;
|Analog&lt;br /&gt;
|-&lt;br /&gt;
|MQ-3&lt;br /&gt;
|Alcohol, Benzene, CH4, Hexane, CO&lt;br /&gt;
|24 hours&lt;br /&gt;
|25–500 ppm (Alcohol)&lt;br /&gt;
|5V&lt;br /&gt;
|Analog&lt;br /&gt;
|-&lt;br /&gt;
|MQ-4&lt;br /&gt;
|Methane, CNG&lt;br /&gt;
|24 hours&lt;br /&gt;
|200–10000 ppm&lt;br /&gt;
|5V&lt;br /&gt;
|Analog&lt;br /&gt;
|-&lt;br /&gt;
|MQ-5&lt;br /&gt;
|LPG, Natural Gas, Town Gas&lt;br /&gt;
|24 hours&lt;br /&gt;
|200–10000 ppm&lt;br /&gt;
|5V&lt;br /&gt;
|Analog&lt;br /&gt;
|-&lt;br /&gt;
|MQ-6&lt;br /&gt;
|LPG, Butane, Isobutane, Propane&lt;br /&gt;
|24 hours&lt;br /&gt;
|200–10000 ppm&lt;br /&gt;
|5V&lt;br /&gt;
|Analog&lt;br /&gt;
|-&lt;br /&gt;
|MQ-7&lt;br /&gt;
|Carbon Monoxide&lt;br /&gt;
|24 hours&lt;br /&gt;
|20–2000 ppm&lt;br /&gt;
|5V&lt;br /&gt;
|Analog&lt;br /&gt;
|-&lt;br /&gt;
|MQ-8&lt;br /&gt;
|Hydrogen&lt;br /&gt;
|24 hours&lt;br /&gt;
|100–10000 ppm&lt;br /&gt;
|5V&lt;br /&gt;
|Analog&lt;br /&gt;
|-&lt;br /&gt;
|MQ-9&lt;br /&gt;
|Carbon Monoxide, Methane, LPG&lt;br /&gt;
|24 hours&lt;br /&gt;
|10–10000 ppm (CO), 100–10000 ppm (flammable gas)&lt;br /&gt;
|5V&lt;br /&gt;
|Analog&lt;br /&gt;
|-&lt;br /&gt;
|MQ-135&lt;br /&gt;
|Ammonia, Benzene, Alcohol, Smoke&lt;br /&gt;
|24 hours&lt;br /&gt;
|10–1000 ppm (NH3, Alcohol, Benzene)&lt;br /&gt;
|5V&lt;br /&gt;
|Analog&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Working Principle&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
MQ sensors contain a heater and a gas-sensitive component. When gas contacts the sensor, the resistance of the material changes, allowing gas concentration to be measured. The sensor element is usually made of SnO₂ (tin dioxide), whose resistance varies with the surrounding gas.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Electrical Characteristics&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Power supply&amp;#039;&amp;#039;&amp;#039;: 5V (some models 3.3V)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Output&amp;#039;&amp;#039;&amp;#039;: Analog voltage (some models also support digital output)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Heater current&amp;#039;&amp;#039;&amp;#039;: ~150mA&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Response time&amp;#039;&amp;#039;&amp;#039;: 1–2 minutes (for sensor stabilization)&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Example Application&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
=== &amp;#039;&amp;#039;&amp;#039;Example Hardware&amp;#039;&amp;#039;&amp;#039; ===&lt;br /&gt;
* Arduino board&lt;br /&gt;
* Jumper wires&lt;br /&gt;
* MQ-6 module&lt;br /&gt;
&lt;br /&gt;
=== &amp;#039;&amp;#039;&amp;#039;Wiring&amp;#039;&amp;#039;&amp;#039; ===&lt;br /&gt;
Digital pins are not used in this example but are included as a reference.&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|Arduino Uno&lt;br /&gt;
|MQ-6&lt;br /&gt;
|-&lt;br /&gt;
|5V&lt;br /&gt;
|VCC&lt;br /&gt;
|-&lt;br /&gt;
|GND&lt;br /&gt;
|GND&lt;br /&gt;
|-&lt;br /&gt;
|A0&lt;br /&gt;
|AO&lt;br /&gt;
|-&lt;br /&gt;
|D7&lt;br /&gt;
|DO&lt;br /&gt;
|}&lt;br /&gt;
[[File:Mq6 회로.png|center|class=coders100]]&lt;br /&gt;
&lt;br /&gt;
=== Example Code ===&lt;br /&gt;
&lt;br /&gt;
==== 1. Basic Value Reading ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;c++&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
int sensorPin = A0;&lt;br /&gt;
int sensorValue = 0;&lt;br /&gt;
&lt;br /&gt;
void setup() {&lt;br /&gt;
  Serial.begin(9600);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void loop() {&lt;br /&gt;
  sensorValue = analogRead(sensorPin);&lt;br /&gt;
  Serial.println(sensorValue);&lt;br /&gt;
  delay(1000);&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can observe increasing values when gas is introduced.&lt;br /&gt;
&lt;br /&gt;
==== 2. Using a Library ====&lt;br /&gt;
Uses the MQUnifiedsensor library by Miguel Califa.&lt;br /&gt;
&lt;br /&gt;
See the [[Arduino Library|Library Usage Guide]] for installation and usage instructions.&lt;br /&gt;
[[File:Mq6 예제 라이브러리.png|center|class=coders100]]&lt;br /&gt;
&lt;br /&gt;
=== Library Example Output ===&lt;br /&gt;
&amp;lt;youtube&amp;gt; C6zQvGlMygA &amp;lt;/youtube&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When gas is detected, the LED on the back of the sensor lights up.&lt;br /&gt;
&lt;br /&gt;
[[File:Mq6 예제 결과.png|center|class=coders100]] The rightmost PPM value increases when exposed to lighter gas.&lt;br /&gt;
&lt;br /&gt;
== &amp;#039;&amp;#039;&amp;#039;Application Fields&amp;#039;&amp;#039;&amp;#039; ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Gas Leak Detection&amp;#039;&amp;#039;&amp;#039;: Detect leaks in kitchens, factories, etc.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Air Quality Monitoring&amp;#039;&amp;#039;&amp;#039;: Monitor harmful gases in indoor environments.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Alcohol Detection&amp;#039;&amp;#039;&amp;#039;: Measure alcohol concentration for breathalyzers.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Industrial Safety&amp;#039;&amp;#039;&amp;#039;: Protect workers by detecting harmful gases in workplaces.&lt;/div&gt;</summary>
		<author><name>ArduWiki</name></author>
	</entry>
</feed>