{"id":2296,"date":"2023-11-29T10:01:45","date_gmt":"2023-11-29T10:01:45","guid":{"rendered":"https:\/\/vegaprocessors.in\/blog\/?p=2296"},"modified":"2023-11-29T10:01:45","modified_gmt":"2023-11-29T10:01:45","slug":"mq-6-gas-sensor-module-with-vega-aries-boards","status":"publish","type":"post","link":"https:\/\/vegaprocessors.in\/blog\/mq-6-gas-sensor-module-with-vega-aries-boards\/","title":{"rendered":"MQ-6 Gas Sensor Module with VEGA ARIES Boards"},"content":{"rendered":"\n<p>In this tutorial we will see how we can interface the MQ-6 Gas Sensor with Aries v3.0 Board.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">MQ-6<\/h2>\n\n\n\n<p>MQ-6 gas sensor is a widely used sensor for detecting the concentration of LPG (liquefied petroleum gas) and butane in the air. It is commonly used in gas leak detection systems and gas leak alarms. &nbsp;The module has 4 pins for interfacing of which two pins are VCC and ground, one pin is analog output and one pin is digital pin via a comparator (LM358). The analog output pin of the module is used for detecting concentration level of gas leakage and interfaced with the A0 analog input pin of the Arduino board. The sensor measures the concentration of leaked gas in ppm.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Specifications:<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Operating Voltage is +5V<\/li>\n\n\n\n<li>Can be used to detect LPG or Butane gas<\/li>\n\n\n\n<li>Analog output voltage: 0V to 5V<\/li>\n\n\n\n<li>Digital Output Voltage: 0V or 5V (TTL Logic)<\/li>\n\n\n\n<li>Preheat duration 20 seconds<\/li>\n\n\n\n<li>Can be used as a Digital or analog sensor<\/li>\n\n\n\n<li>The Sensitivity of Digital pin can be varied using the potentiometer<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"435\" height=\"552\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/09\/mq6.png\" alt=\"\" class=\"wp-image-3333\" style=\"width:194px;height:246px\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/09\/mq6.png 435w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/09\/mq6-236x300.png 236w\" sizes=\"auto, (max-width: 435px) 100vw, 435px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Working<\/strong><\/h2>\n\n\n\n<p>Monitoring Gas Concentration \u2013 Once the reference value is set, the program code on Arduino keeps track of the analog value read from the MQ6 sensor. The device is programmed to read current sensor reading as analog value and is compared with the user defined reference value in an infinite loop. To use this Sensor Module, you have power the device with 5V supply and the Power LED will start to glow. You should give it some time for its&nbsp;<strong>pre heating period<\/strong>&nbsp;before start reading the output. While measuring the gas present, the Output LED will glow in a&nbsp;<strong>specific concentration<\/strong>&nbsp;of the gas.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prerequisites<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Windows 10 or above\/Linux (64 bit)<\/li>\n\n\n\n<li>Arduino IDE<\/li>\n\n\n\n<li><a href=\"https:\/\/vegaprocessors.in\/devboards\/ariesv3.php\" target=\"_blank\" rel=\"noreferrer noopener\">VEGA ARIES Board support package<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Components Required<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>ARIES v3.0 Board<\/li>\n\n\n\n<li>USB type C to USB type A cable<\/li>\n\n\n\n<li>MQ-6 Gas sensor<\/li>\n\n\n\n<li>Jumper Wires<\/li>\n<\/ul>\n\n\n\n<p><strong>Not<\/strong><strong>e:<\/strong>&nbsp;All of the following boards can be used for this project<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/vegaprocessors.in\/devboards\/ariesv2.php\">ARIES v2.0<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/vegaprocessors.in\/devboards\/ariesv3.php\">ARIES v3.0<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/vegaprocessors.in\/devboards\/ariesmicro.php\">ARIES Micro<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/vegaprocessors.in\/devboards\/ariesdot.php\">ARIES DOT<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/vegaprocessors.in\/devboards\/ariesiot.php\">ARIES IoT<\/a><\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Connection Diagram<\/h2>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><tbody><tr><td><strong>MQ-6 Gas Sensor &nbsp; &nbsp;&nbsp;&nbsp;<\/strong><\/td><td><strong>Aries Board<\/strong><\/td><\/tr><tr><td>VCC &nbsp; &nbsp; &nbsp;<\/td><td>5V<\/td><\/tr><tr><td>GND &nbsp; &nbsp; &nbsp;&nbsp;<\/td><td>GND<\/td><\/tr><tr><td>A0&nbsp; &nbsp; &nbsp; &nbsp;<\/td><td>A0 using 2.7K &amp; 4.7K&nbsp; Resistor&nbsp;<\/td><\/tr><\/tbody><\/table><figcaption class=\"wp-element-caption\"><strong><sub><em>Connection pins of MQ-6 Gas Sensor Module &amp; ARIES v2.0 Board<\/em><\/sub><\/strong><\/figcaption><\/figure>\n\n\n\n<p>Note: A voltage divider is required between MQ3 sensor output and Analog pin of Aries board, for accurate measurements.&nbsp;Connect a 2.7K resistor to A0 pin of MQ3 sensor. Connect one end of the 4.7K resistor in series to the 2.7K resistor, and the other end to the GND. Take the output from the junction of 2.7K and 4.7K resistors.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"511\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/10\/mq3-1024x511.png\" alt=\"\" class=\"wp-image-4194\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/10\/mq3-1024x511.png 1024w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/10\/mq3-300x150.png 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/10\/mq3-768x383.png 768w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/10\/mq3.png 1162w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Libraries<\/h2>\n\n\n\n<p>Arduino libraries are an extension of the standard Arduino API and consists of thousands of libraries, both official and contributed by the community. Libraries simplifies the use of complex codes. Every version of Arduino IDE has a library manager for installing Arduino software libraries. The libraries required for this projects are<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>MQUnifiedsensor<\/li>\n<\/ul>\n\n\n\n<p>To install the libraries required for this project.<\/p>\n\n\n\n<p>Go to\u00a0<strong>Tools -> Manage Libraries<\/strong>\u00a0-> and search for\u00a0<strong>MQUnifiedsensor<\/strong><\/p>\n\n\n\n<p>Click on<strong>\u00a0Install <\/strong><\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"574\" data-id=\"4545\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/11\/1-1024x574.png\" alt=\"\" class=\"wp-image-4545\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/11\/1-1024x574.png 1024w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/11\/1-300x168.png 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/11\/1-768x430.png 768w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/11\/1.png 1192w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Procedure:<\/strong><\/h2>\n\n\n\n<p>Open and set up the Arduino IDE as described in&nbsp;<a href=\"https:\/\/vegaprocessors.in\/devboards\/ariesv3.php\" target=\"_blank\" rel=\"noreferrer noopener\">Getting Started with ARIES v3.0<\/a>.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Make sure you have selected&nbsp;<strong>ARIES v3<\/strong>&nbsp;Board from&nbsp;<strong>Tools<\/strong>&nbsp;-&gt;&nbsp;<strong>Board<\/strong>&nbsp;-&gt;&nbsp;<strong>VEGA Processor: ARIES Boards<\/strong>&nbsp;-&gt;&nbsp;<strong>ARIES v3<\/strong><\/li>\n\n\n\n<li>Select Programmer as VEGA XMODEM from&nbsp;<strong>Tools<\/strong>&nbsp;-&gt;&nbsp;<strong>Programmer<\/strong>&nbsp;-&gt;&nbsp;<strong>VEGA XMODEM<\/strong><\/li>\n\n\n\n<li>Also select appropriate port from&nbsp;<strong>Tools<\/strong>&nbsp;-&gt;&nbsp;<strong>Port&nbsp;-&gt; COM* (ARIES Board)<\/strong><\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-2 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"847\" height=\"415\" data-id=\"4424\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/11\/tools.png\" alt=\"\" class=\"wp-image-4424\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/11\/tools.png 847w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/11\/tools-300x147.png 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/11\/tools-768x376.png 768w\" sizes=\"auto, (max-width: 847px) 100vw, 847px\" \/><\/figure>\n<\/figure>\n\n\n\n<p>Open<strong> File -&gt; Examples -&gt; Examples for ARIES v3 -&gt; ADC<\/strong> -&gt; Open <strong>MQ6_Gas Sensor<\/strong> example<\/p>\n\n\n\n<figure class=\"wp-block-image is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1052\" height=\"940\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/07\/mq6ex.png\" alt=\"MQ-6 Example\" class=\"wp-image-2298\" style=\"width:476px;height:425px\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/07\/mq6ex.png 1052w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/07\/mq6ex-300x268.png 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/07\/mq6ex-1024x915.png 1024w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/07\/mq6ex-768x686.png 768w\" sizes=\"auto, (max-width: 1052px) 100vw, 1052px\" \/><\/figure>\n\n\n\n<p>Finally Compile and Upload the code&nbsp;<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Output<\/h2>\n\n\n\n<div class=\"wp-block-columns is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/10\/mq61-1024x576.jpg\" alt=\"\" class=\"wp-image-4197\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/10\/mq61-1024x576.jpg 1024w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/10\/mq61-300x169.jpg 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/10\/mq61-768x432.jpg 768w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/10\/mq61-1536x863.jpg 1536w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/10\/mq61-2048x1151.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<figure class=\"wp-block-image size-large is-style-default\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/10\/mq61-1-1024x576.jpg\" alt=\"\" class=\"wp-image-4198\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/10\/mq61-1-1024x576.jpg 1024w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/10\/mq61-1-300x169.jpg 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/10\/mq61-1-768x432.jpg 768w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/10\/mq61-1-1536x863.jpg 1536w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/10\/mq61-1-2048x1151.jpg 2048w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>As we know the MQ-6 Gas sensor can detect gases like LPG, iso-butane, propane, smoke and alcohol. Similar to other MQ series gas sensor, this sensor also has a digital and analog output pin. Once the gas leakage is detected, the analog reading will increase and decrease if less toxic gases. Open serial monitor to observe the changes in the values.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"377\" src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/10\/Screenshot-47-1024x377.png\" alt=\"\" class=\"wp-image-4312\" srcset=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/10\/Screenshot-47-1024x377.png 1024w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/10\/Screenshot-47-300x110.png 300w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/10\/Screenshot-47-768x283.png 768w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/10\/Screenshot-47-1536x566.png 1536w, https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/10\/Screenshot-47.png 1844w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Demonstration<\/h2>\n\n\n\n<figure class=\"wp-block-video\"><video height=\"720\" style=\"aspect-ratio: 1280 \/ 720;\" width=\"1280\" controls src=\"https:\/\/vegaprocessors.in\/blog\/wp-content\/uploads\/2023\/10\/mq6.mp4\"><\/video><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>In this tutorial we will see how we can interface the MQ-6 Gas Sensor with Aries v3.0 Board. MQ-6 MQ-6 gas sensor is a widely used sensor for detecting the concentration of LPG (liquefied petroleum gas) and butane in the air. It is commonly used in gas leak detection systems and gas leak alarms. &nbsp;The [&hellip;]<\/p>\n","protected":false},"author":13,"featured_media":4197,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[94],"tags":[60,95,76,7,31,24],"class_list":["post-2296","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-aries-with-arduinoide","tag-adc","tag-aries-v3-board","tag-c-dac","tag-cdac","tag-thejas32","tag-vegaprocessor"],"_links":{"self":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts\/2296","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/users\/13"}],"replies":[{"embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/comments?post=2296"}],"version-history":[{"count":12,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts\/2296\/revisions"}],"predecessor-version":[{"id":4547,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/posts\/2296\/revisions\/4547"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/media\/4197"}],"wp:attachment":[{"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/media?parent=2296"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/categories?post=2296"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vegaprocessors.in\/blog\/wp-json\/wp\/v2\/tags?post=2296"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}