{"id":4886,"date":"2026-06-10T09:04:31","date_gmt":"2026-06-10T16:04:31","guid":{"rendered":"https:\/\/www.donluc.com\/?p=4886"},"modified":"2026-06-10T09:04:31","modified_gmt":"2026-06-10T16:04:31","slug":"project-15-environment-mq-3-alcohol-detector-mk41","status":"publish","type":"post","link":"https:\/\/www.donluc.com\/?p=4886","title":{"rendered":"Project #15: Environment &#8211; MQ-3 Alcohol Detector &#8211; Mk41"},"content":{"rendered":"<div style=\"width: 1200px;\" class=\"wp-video\"><video class=\"wp-video-shortcode\" id=\"video-4886-1\" width=\"1200\" height=\"675\" preload=\"metadata\" controls=\"controls\"><source type=\"video\/mp4\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/06\/DL2606Mk01W.mp4?_=1\" \/><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/06\/DL2606Mk01W.mp4\">https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/06\/DL2606Mk01W.mp4<\/a><\/video><\/div>\n<p>&#8212;&#8212;<\/p>\n<p>#DonLucElectronics #DonLuc #  #AHT20 #Environment #FireBeetle2ESP32E #ESP32 #Display #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant<\/p>\n<p>&#8212;&#8212;<\/p>\n<figure id=\"attachment_4888\" aria-describedby=\"caption-attachment-4888\" style=\"width: 710px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/06\/DL2606Mk01a.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/06\/DL2606Mk01a.jpg\" alt=\"\" width=\"720\" height=\"534\" class=\"size-full wp-image-4888\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/06\/DL2606Mk01a.jpg 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/06\/DL2606Mk01a-300x223.jpg 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><figcaption id=\"caption-attachment-4888\" class=\"wp-caption-text\">MQ-3 Alcohol Detector<\/figcaption><\/figure>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/06\/DL2606Mk01b.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/06\/DL2606Mk01b.jpg\" alt=\"MQ-3 Alcohol Detector \" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-4889\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/06\/DL2606Mk01b.jpg 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/06\/DL2606Mk01b-300x200.jpg 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><a href=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/06\/DL2606Mk01c.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/06\/DL2606Mk01c.jpg\" alt=\"MQ-3 Alcohol Detector \" width=\"720\" height=\"480\" class=\"alignnone size-full wp-image-4890\" srcset=\"https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/06\/DL2606Mk01c.jpg 720w, https:\/\/www.donluc.com\/wp-content\/uploads\/2026\/06\/DL2606Mk01c-300x200.jpg 300w\" sizes=\"auto, (max-width: 720px) 100vw, 720px\" \/><\/a><\/p>\n<p>&#8212;&#8212;<\/p>\n<p><strong>MQ-3 Alcohol Detector<\/strong><\/p>\n<p>The MQ-3 Alcohol Detector is an electronic sensor designed to detect the presence of alcohol vapors in the air, such as ethanol, methanol, and isopropyl alcohol. It operates using a sensitive metal oxide component whose resistance varies according to the ambient alcohol concentration, generating an analog signal that can be read by microcontrollers. The MQ-3 is easy to use, has a fast response time, and can detect alcohol concentrations across a wide range, making it a useful tool for both home and professional applications.<\/p>\n<p>The MQ-3 Alcohol Detector is a widely used sensor for detecting the presence of alcohol vapors in the air, making it ideal for applications such as breathalyzers, vehicle security systems, access control projects, and environmental monitoring.<\/p>\n<p><strong>DL2606Mk01<\/strong><\/p>\n<p>1 x DFRobot FireBeetle 2 ESP32-E<br \/>\n1 x Fermion: 3.5\u201d 480&#215;320 TFT LCD Capacitive<br \/>\n1 x GDL Line 10 CM<br \/>\n1 x MQ-3 Alcohol Detector<br \/>\n1 x Gravity: AHT20 Temperature and Humidity Sensor<br \/>\n1 x Gravity: IO Shield for FireBeetle 2<br \/>\n1 x Terminal Block Board for FireBeetle 2 ESP32-E IoT<br \/>\n1 x Lithium Ion Battery &#8211; 1000mAh<br \/>\n1 x USB 3.0 to Type-C Cable<\/p>\n<p><strong>DL2606Mk01p<\/strong><\/p>\n<p><strong>DL2606Mk01p.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/****** Don Luc Electronics \u00a9 ******\r\nSoftware Version Information\r\nProject #15: Environment - MQ-3 Alcohol Detector - Mk41\r\n15-41\r\nDL2606Mk01p.ino\r\nDL2606k01\r\n1 x DFRobot FireBeetle 2 ESP32-E\r\n1 x Fermion: 3.5\u201d 480x320 TFT LCD Capacitive\r\n1 x GDL Line 10 CM\r\n1 x MQ-3 Alcohol Detector\r\n1 x Gravity: AHT20 Temperature and Humidity Sensor\r\n1 x Gravity: IO Shield for FireBeetle 2\r\n1 x Terminal Block Board for FireBeetle 2 ESP32-E IoT\r\n1 x Lithium Ion Battery - 1000mAh\r\n1 x USB 3.0 to Type-C Cable\r\n*\/\r\n\r\n\/\/ Include the Library Code\r\n\/\/ EEPROM Library to Read and Write EEPROM with Unique ID for Unit\r\n#include &quot;EEPROM.h&quot;\r\n\/\/ DFRobot Display GDL API\r\n#include &lt;DFRobot_GDL.h&gt;\r\n\/\/ AHT20 Humidity and Temperature Sensor\r\n#include &lt;DFRobot_AHT20.h&gt;\r\n\/\/ MQ-3 Alcohol Detector\r\n#include &lt;MQ3.h&gt;\r\n\r\n\/\/ MQ-3 Alcohol Detector\r\nint iMQ3 = A0;\r\nfloat iValMQ3 = 0;\r\n\/\/ Value Limit\r\nint iValLim = 400;\r\nString sVal = &quot;&quot;; \r\n\r\n\/\/ AHT20 Humidity and Temperature Sensor\r\nDFRobot_AHT20 aht20;\r\n\/\/ AHT20 Humidity and Temperature Sensor\r\nfloat h = 0;\r\nfloat t = 0;\r\n\r\n\/\/ Defined ESP32\r\n#define TFT_DC  D2\r\n#define TFT_CS  D6\r\n#define TFT_RST D3\r\n\r\n\/*dc=*\/ \/*cs=*\/ \/*rst=*\/\r\n\/\/ DFRobot Display 320x480\r\nDFRobot_ILI9488_320x480_HW_SPI screen(TFT_DC, TFT_CS, TFT_RST);\r\n\r\n\/\/ Software Version Information\r\n\/\/ EEPROM Unique ID Information\r\n#define EEPROM_SIZE 64\r\nString uid = &quot;&quot;;\r\n\r\n\/\/ Software Version Information\r\nString sver = &quot;15-41&quot;;\r\n\r\nvoid loop() {\r\n  \r\n  \/\/ isMQ3\r\n  isMQ3();\r\n  \r\n  \/\/ AHT20 Humidity and Temperature Sensor\r\n  isHT();\r\n\r\n  \/\/ isDisplay MQ-3 Alcohol Detector\r\n  isDisplayMQ3();\r\n\r\n  \/\/ Delay 2 Second\r\n  delay( 2000 );\r\n\r\n}\r\n<\/pre>\n<p><strong>getDisplay.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ DFRobot Display 320x480\r\n\/\/ DFRobot Display 320x480 - UID\r\nvoid isDisplayUID(){\r\n\r\n  \/\/ DFRobot Display 320x480\r\n  \/\/ Text Display\r\n  \/\/ Text Wrap\r\n  screen.setTextWrap(false);\r\n  \/\/ Rotation\r\n  screen.setRotation(3);\r\n  \/\/ Fill Screen =&gt; black\r\n  screen.fillScreen(0x0000);\r\n  \/\/ Text Color =&gt; white\r\n  screen.setTextColor(0xffff);\r\n  \/\/ Font =&gt; Free Sans Bold 12pt\r\n  screen.setFont(&amp;FreeSansBold12pt7b);\r\n  \/\/ TextSize =&gt; 1.5\r\n  screen.setTextSize(1.5);\r\n  \/\/ Don Luc Electronics\r\n  screen.setCursor(0, 30);\r\n  screen.println(&quot;Don Luc Electronics&quot;);\r\n  \/\/ Tilt Switch\r\n  screen.setCursor(0, 60);\r\n  screen.println(&quot;MQ-3 Alcohol Detector&quot;);\r\n  \/\/ Version\r\n  screen.setCursor(0, 90);\r\n  screen.println(&quot;Version&quot;);\r\n  screen.setCursor(0, 120);\r\n  screen.println( sver );\r\n  \/\/ EEPROM\r\n  screen.setCursor(0, 150);\r\n  screen.println(&quot;EEPROM&quot;);\r\n  screen.setCursor(0, 180);\r\n  screen.println( uid );\r\n\r\n}\r\n\/\/ isDisplay MQ3\r\nvoid isDisplayMQ3(){\r\n\r\n  \/\/ DFRobot Display 320x480\r\n  \/\/ Text Display\r\n  \/\/ Text Wrap\r\n  screen.setTextWrap(false);\r\n  \/\/ Rotation\r\n  screen.setRotation(3);\r\n  \/\/ Fill Screen =&gt; white\r\n  screen.fillScreen(0xffff);\r\n  \/\/ Text Color =&gt; blue\r\n  screen.setTextColor(0x001F);\r\n  \/\/ Font =&gt; Free Sans Bold 12pt\r\n  screen.setFont(&amp;FreeSansBold12pt7b);\r\n  \/\/ TextSize =&gt; 1.5\r\n  screen.setTextSize(1.5);\r\n  \/\/ Vibration Senso\r\n  screen.setCursor(0, 30);\r\n  screen.println(&quot;MQ-3 Alcohol Detector&quot;);\r\n  \/\/ Humidity\r\n  screen.setCursor(0, 70);\r\n  screen.println(&quot;Humidity&quot;);\r\n  screen.setCursor(0, 100);\r\n  screen.print( h );\r\n  screen.setCursor(65, 100);\r\n  screen.println( &quot;%RH&quot; );\r\n  \/\/ Temperature\r\n  screen.setCursor(0, 140);\r\n  screen.println(&quot;Temperature&quot;);\r\n  screen.setCursor(0, 170);\r\n  screen.print( t );\r\n  screen.setCursor(65, 170);\r\n  screen.println( &quot;C&quot; );\r\n  \/\/ MQ-3 Alcohol Detector\r\n  screen.setCursor(0, 210);\r\n  screen.println(&quot;MQ-3 Alcohol Detector&quot;);\r\n  screen.setCursor(0, 240);\r\n  screen.println( iValMQ3 );\r\n  screen.setCursor(0, 270);\r\n  screen.println( sVal );\r\n  \r\n}\r\n<\/pre>\n<p><strong>getEEPROM.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ isUID EEPROM Unique ID\r\nvoid isUID()\r\n{\r\n  \r\n  \/\/ Is Unit ID\r\n  uid = &quot;&quot;;\r\n  for (int x = 0; x &lt; 7; x++)\r\n  {\r\n    uid = uid + char(EEPROM.read(x));\r\n  }\r\n  \r\n}\r\n<\/pre>\n<p><strong>getHT.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ AHT20 Humidity and Temperature Sensor\r\nvoid isHT(){\r\n\r\n  if(aht20.startMeasurementReady(true)){\r\n\r\n    \/\/ Humidity\r\n    h = aht20.getHumidity_RH();\r\n  \r\n    \/\/ Temperature\r\n    t = aht20.getTemperature_C();\r\n    \r\n   }\r\n  \r\n}\r\n<\/pre>\n<p><strong>getMQ3.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ MQ-3 Alcohol Detector\r\n\/\/ isMQ3\r\nvoid isMQ3(){\r\n\r\n  \/\/ iValMQ3\r\n  iValMQ3 = analogRead( iMQ3 );\r\n\r\n  \/\/ Value Limit\r\n  if (iValMQ3 &gt; iValLim) {\r\n\r\n    sVal = &quot;HIGH&quot;;\r\n\r\n  } else {\r\n\r\n    sVal = &quot;LOW&quot;;\r\n\r\n  }\r\n\r\n}\r\n<\/pre>\n<p><strong>setup.ino<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"arduino\" data-enlighter-title=\"\">\r\n\/\/ Setup\r\nvoid setup()\r\n{\r\n \r\n  \/\/ Delay\r\n  delay( 100 );\r\n\r\n   \/\/ EEPROM Size\r\n  EEPROM.begin(EEPROM_SIZE);\r\n  \r\n  \/\/ EEPROM Unique ID\r\n  isUID();\r\n\r\n  \/\/ Delay\r\n  delay(100);\r\n\r\n  \/\/ DFRobot Display 320x480\r\n  screen.begin();\r\n\r\n  \/\/ Delay\r\n  delay( 100 );\r\n\r\n  \/\/ AHT20 Humidity and Temperature Sensor\r\n  aht20.begin();\r\n\r\n  \/\/ Delay\r\n  delay( 100 );\r\n\r\n  \/\/ DFRobot Display 320x480 - UID\r\n  \/\/ Don Luc Electronics\r\n  \/\/ Version\r\n  \/\/ EEPROM\r\n  isDisplayUID();\r\n\r\n  \/\/ Wait for the sensor to heat up for 20 seconds\r\n  delay( 20000 );\r\n\r\n}\r\n<\/pre>\n<p>&#8212;&#8212;<\/p>\n<p><strong>People can contact us:<\/strong> https:\/\/www.donluc.com\/?page_id=1927<\/p>\n<p><strong>Consultant, R&#038;D, Electronics, IoT, Teacher and Instructor<\/strong><\/p>\n<ul>\n<li>Programming Language<\/li>\n<li>Single-Board Microcontrollers (PIC, Arduino, Raspberry Pi, Arm, Silicon Labs, Espressif, Etc&#8230;)<\/li>\n<li>IoT<\/li>\n<li>Wireless (Radio Frequency, Bluetooth, WiFi, Etc&#8230;)<\/li>\n<li>Robotics<\/li>\n<li>Automation<\/li>\n<li>Camera and Video Capture Receiver Stationary, Wheel\/Tank , Underwater and UAV Vehicle<\/li>\n<li>Unmanned Vehicles Terrestrial,  Marine and UAV<\/li>\n<li>Machine Learning<\/li>\n<li>Artificial Intelligence (AI)<\/li>\n<li>RTOS<\/li>\n<li>Sensors, eHealth Sensors, Biosensor, and Biometric<\/li>\n<li>Research &#038; Development (R &#038; D)<\/li>\n<li>Consulting<\/li>\n<\/ul>\n<p><strong>Follow Us<\/strong><\/p>\n<p><strong>Luc Paquin \u2013 Curriculum Vitae &#8211; 2026<\/strong><br \/>\nhttps:\/\/www.donluc.com\/luc\/LucPaquinCVEng2026Mk01.pdf<br \/>\nhttps:\/\/www.donluc.com\/luc\/<\/p>\n<p><strong>Web:<\/strong> https:\/\/www.donluc.com\/<br \/>\n<strong>Web:<\/strong> https:\/\/www.jlpconsultants.com\/<br \/>\n<strong>Facebook:<\/strong> https:\/\/www.facebook.com\/neosteam.labs.9\/<br \/>\n<strong>YouTube:<\/strong> https:\/\/www.youtube.com\/@thesass2063<br \/>\n<strong>DFRobot:<\/strong> https:\/\/learn.dfrobot.com\/user-10186.html<br \/>\n<strong>TikTok:<\/strong> https:\/\/www.tiktok.com\/@luc.paquin8<br \/>\n<strong>Hackster:<\/strong> https:\/\/www.hackster.io\/luc-paquin<br \/>\n<strong>LinkedIn:<\/strong> https:\/\/www.linkedin.com\/in\/jlucpaquin\/<\/p>\n<p><strong>Don Luc<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8212;&#8212; #DonLucElectronics #DonLuc # #AHT20 #Environment #FireBeetle2ESP32E #ESP32 #Display #IoT #Project #Fritzing #Programming #Electronics #Microcontrollers #Consultant &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; &#8212;&#8212; MQ-3 Alcohol Detector The MQ-3 Alcohol Detector is an electronic sensor designed to detect the presence of alcohol vapors in the air, such as ethanol, methanol, and isopropyl alcohol. It operates using a sensitive metal &#8230; <a title=\"Project #15: Environment &#8211; MQ-3 Alcohol Detector &#8211; Mk41\" class=\"read-more\" href=\"https:\/\/www.donluc.com\/?p=4886\" aria-label=\"Read more about Project #15: Environment &#8211; MQ-3 Alcohol Detector &#8211; Mk41\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[106,50,49,317,38,368,80,59,115,5,287,58,82,10],"tags":[6,92,102,4,320,87,369,19,107,83,85,24,428,9,84,27,33,34,108],"class_list":["post-4886","post","type-post","status-publish","format-standard","hentry","category-environment","category-arduino","category-consultant","category-dfrobot","category-digitalelectronics","category-elecrow","category-esp32","category-fritzing","category-e-mentor","category-microcontrollers","category-program","category-arduino-programming","category-program-esp32","category-projects","tag-arduino","tag-battery","tag-components","tag-consultant","tag-dfrobot","tag-display","tag-elecrow","tag-electronics","tag-environment","tag-esp32","tag-fritzing","tag-microcontroller","tag-mq-3-alcohol-detector","tag-programming","tag-programming-esp32","tag-projects-2","tag-technology","tag-video-blog","tag-vlog"],"_links":{"self":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/4886","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4886"}],"version-history":[{"count":1,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/4886\/revisions"}],"predecessor-version":[{"id":4891,"href":"https:\/\/www.donluc.com\/index.php?rest_route=\/wp\/v2\/posts\/4886\/revisions\/4891"}],"wp:attachment":[{"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4886"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4886"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.donluc.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=4886"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}