{"id":10776,"date":"2023-03-03T22:02:36","date_gmt":"2023-03-03T16:32:36","guid":{"rendered":"http:\/\/myprojectideas.com\/?p=10776"},"modified":"2023-03-03T22:02:36","modified_gmt":"2023-03-03T16:32:36","slug":"arduino-smoke-detector-with-led","status":"publish","type":"post","link":"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/","title":{"rendered":"Arduino Smoke Detector With LED"},"content":{"rendered":"<h2><strong>Introduction of the Project<\/strong><\/h2>\n<p>Get your DIY on and safeguard your space with our Arduino Smoke Detector With LED! This innovative project allows you to build a custom smoke detector with the power of Arduino technology, complete with a bright LED to alert you to potential danger. Keep your home or office safe and stylish with this must-have gadget that&#8217;s sure to impress.<\/p>\n<p>In this Arduino project, we will glow a red colored LED if the gas sensor detects the smoke. This is a mini reflection of the fire safety system.<\/p>\n<iframe loading=\"lazy\"  id=\"_ytid_78114\"  width=\"1080\" height=\"607\"  data-origwidth=\"1080\" data-origheight=\"607\" src=\"https:\/\/www.youtube.com\/embed\/cjP818wGsjc?enablejsapi=1&autoplay=0&cc_load_policy=0&cc_lang_pref=&iv_load_policy=1&loop=0&rel=1&fs=1&playsinline=0&autohide=2&theme=dark&color=red&controls=1&\" class=\"__youtube_prefs__  no-lazyload\" title=\"YouTube player\"  allow=\"fullscreen; accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen data-no-lazy=\"1\" data-skipgform_ajax_framebjll=\"\"><\/iframe>\n<p>&nbsp;<\/p>\n<h2><strong>Supplies<\/strong><\/h2>\n<p>In order to make an Arduino Smoke Detector with LED, we will require the following components: To build physical projects, you can purchase the components online or from any electronics center. For online projects, we are using the <a href=\"https:\/\/www.tinkercad.com\/\">TinkerCad<\/a> website.<\/p>\n<h3><strong>Components<\/strong><\/h3>\n<ul>\n<li><a href=\"https:\/\/docs.arduino.cc\/hardware\/uno-rev3\">Arduino Uno R3<\/a><\/li>\n<li>1 LED<\/li>\n<li>1 <a href=\"https:\/\/www.amazon.in\/Gas-Sensor\/s?k=Gas+Sensor\">Gas Sensor<\/a><\/li>\n<li>1 Small Breadboard<\/li>\n<li>2 Resistors<\/li>\n<li>Connecting Wires<\/li>\n<\/ul>\n<h2><strong>Circuit Diagram<\/strong><\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10777\" src=\"http:\/\/myprojectideas.com\/wp-content\/uploads\/2023\/03\/word-image-10776-1.png\" alt=\"Arduino Smoke Detector With LED\" width=\"1517\" height=\"597\" \/><\/p>\n<h2><strong>Steps To Make An Arduino Smoke Detector With LED<\/strong><\/h2>\n<p><strong>Step 1:<\/strong> First, we must collect all the components on the Digital Board or Physical Table.<\/p>\n<p><em><strong>LED:<\/strong><\/em><\/p>\n<p><strong>Step 2:<\/strong> Connect the Cathode terminal of it to the GND pin of the Arduino.<\/p>\n<p><strong>Step 3:<\/strong> Connect the Anode terminal of it to the 5-number pin of the Arduino through a resistor, as shown in the circuit.<\/p>\n<p><em><strong>Gas Sensor:<\/strong><\/em><\/p>\n<p><strong>Step 4:<\/strong> Connect the B1, H2, and B2 terminals of it to the 5V pin of the Arduino.<\/p>\n<p><strong>Step 5:<\/strong> Connect the H1 &amp; A1 terminal of it to the GND pin of the Arduino.<\/p>\n<p><strong>Step 6:<\/strong> Connect the A2 terminal of it to the A0 number pin of the Arduino.<\/p>\n<h2><strong>Source Code<\/strong><\/h2>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">int led = 5;\n\nint sensor = A0;\n\nvoid setup()\n\n{\n\npinMode(5, OUTPUT);\n\npinMode(A0, INPUT);\n\n}\n\nvoid loop()\n\n{\n\nint sensorValue;\n\n\n\n\ndigitalWrite(led, LOW);\n\n\n\n\nsensorValue = analogRead(sensor);\n\nif(sensorValue &gt;= 100)\n\ndigitalWrite(led, HIGH);\n\n\n\n\ndelay(2000);\n\n}<\/pre>\n<h2><strong>Explanation of the Code<\/strong><\/h2>\n<p>1. In the beginning, we initialized two variables to which the respective component is connected to their respective Arduino pin number.<\/p>\n<p>2. In the setup function, we have configured the pins of the Arduino for input and output purposes.<\/p>\n<p>3. In the loop function, we have declared a variable to store the value of the gas sensor. After this, we are reading the value from the sensor.<\/p>\n<p>4. If the value is greater than 100, we are glowing the LED else. It will not glow.<\/p>\n<p>5. In the end, we used a delay function, which takes time in milliseconds.<\/p>\n<h2><a id=\"post-10776-_1fob9te\"><\/a><strong>Output<\/strong><\/h2>\n<p>Once you have successfully run the source code, you will get the result as shown below.<\/p>\n<p><a href=\"http:\/\/myprojectideas.com\/wp-content\/uploads\/2023\/03\/Arduino-Smoke-Detector-With-LED.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-10779\" src=\"http:\/\/myprojectideas.com\/wp-content\/uploads\/2023\/03\/Arduino-Smoke-Detector-With-LED.png\" alt=\"Arduino Smoke Detector With LED\" width=\"381\" height=\"199\" \/><\/a><\/p>\n<p>On starting the simulation, the LED will glow if the Smoke\u2019s value detected using the Gas sensor is greater than 100.<\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"http:\/\/myprojectideas.com\/category\/coding-projects\/basic-coding\/arduino\/\"><em><strong>More Arduino Projects&gt;&gt;&gt;<\/strong><\/em><\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this Arduino project, we will glow a red colored LED if the gas sensor detects the smoke. This is a mini reflection of the fire safety system.<\/p>\n","protected":false},"author":1,"featured_media":10777,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[31,4,7],"tags":[],"class_list":["post-10776","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-arduino","category-coding-basics","category-coding-projects"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.1.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Arduino Smoke Detector With LED - RUDE LABS<\/title>\n<meta name=\"description\" content=\"Get your DIY on and safeguard your space with our Arduino Smoke Detector With LED! This innovative project allows you to build a custom smoke detector with the power of Arduino technology.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Arduino Smoke Detector With LED - RUDE LABS\" \/>\n<meta property=\"og:description\" content=\"Get your DIY on and safeguard your space with our Arduino Smoke Detector With LED! This innovative project allows you to build a custom smoke detector with the power of Arduino technology.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/\" \/>\n<meta property=\"og:site_name\" content=\"RUDE LABS\" \/>\n<meta property=\"article:published_time\" content=\"2023-03-03T16:32:36+00:00\" \/>\n<meta name=\"author\" content=\"rudelabs.ai\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rudelabs_in\" \/>\n<meta name=\"twitter:site\" content=\"@rudelabs_in\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"rudelabs.ai\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/\"},\"author\":{\"name\":\"rudelabs.ai\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#\/schema\/person\/560bad88bae03cae99a326a46af0c894\"},\"headline\":\"Arduino Smoke Detector With LED\",\"datePublished\":\"2023-03-03T16:32:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/\"},\"wordCount\":418,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#organization\"},\"image\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/#primaryimage\"},\"thumbnailUrl\":\"\",\"articleSection\":[\"Arduino\",\"Coding Basics\",\"Coding Projects\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/\",\"url\":\"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/\",\"name\":\"Arduino Smoke Detector With LED - RUDE LABS\",\"isPartOf\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/#primaryimage\"},\"thumbnailUrl\":\"\",\"datePublished\":\"2023-03-03T16:32:36+00:00\",\"description\":\"Get your DIY on and safeguard your space with our Arduino Smoke Detector With LED! This innovative project allows you to build a custom smoke detector with the power of Arduino technology.\",\"breadcrumb\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/#primaryimage\",\"url\":\"\",\"contentUrl\":\"\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/rudelabs.ai\/blogs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Arduino Smoke Detector With LED\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#website\",\"url\":\"https:\/\/rudelabs.ai\/blogs\/\",\"name\":\"RUDE LABS\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/rudelabs.ai\/blogs\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#organization\",\"name\":\"RUDE LABS\",\"url\":\"https:\/\/rudelabs.ai\/blogs\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/rudelabs.ai\/blogs\/wp-content\/uploads\/2025\/09\/RUDE-LABS.webp\",\"contentUrl\":\"https:\/\/rudelabs.ai\/blogs\/wp-content\/uploads\/2025\/09\/RUDE-LABS.webp\",\"width\":2459,\"height\":414,\"caption\":\"RUDE LABS\"},\"image\":{\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/rudelabs_in\",\"https:\/\/www.linkedin.com\/company\/ru-delabs\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#\/schema\/person\/560bad88bae03cae99a326a46af0c894\",\"name\":\"rudelabs.ai\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/rudelabs.ai\/blogs\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/4d9f672e72f97294dfb6fac3d78e9f0bb5421a701cd2141cf2a2e540b4d67191?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/4d9f672e72f97294dfb6fac3d78e9f0bb5421a701cd2141cf2a2e540b4d67191?s=96&d=mm&r=g\",\"caption\":\"rudelabs.ai\"},\"sameAs\":[\"https:\/\/rudelabs.ai\/blogs\"],\"url\":\"https:\/\/rudelabs.ai\/blogs\/author\/rudelabs-ai\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Arduino Smoke Detector With LED - RUDE LABS","description":"Get your DIY on and safeguard your space with our Arduino Smoke Detector With LED! This innovative project allows you to build a custom smoke detector with the power of Arduino technology.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/","og_locale":"en_US","og_type":"article","og_title":"Arduino Smoke Detector With LED - RUDE LABS","og_description":"Get your DIY on and safeguard your space with our Arduino Smoke Detector With LED! This innovative project allows you to build a custom smoke detector with the power of Arduino technology.","og_url":"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/","og_site_name":"RUDE LABS","article_published_time":"2023-03-03T16:32:36+00:00","author":"rudelabs.ai","twitter_card":"summary_large_image","twitter_creator":"@rudelabs_in","twitter_site":"@rudelabs_in","twitter_misc":{"Written by":"rudelabs.ai","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/#article","isPartOf":{"@id":"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/"},"author":{"name":"rudelabs.ai","@id":"https:\/\/rudelabs.ai\/blogs\/#\/schema\/person\/560bad88bae03cae99a326a46af0c894"},"headline":"Arduino Smoke Detector With LED","datePublished":"2023-03-03T16:32:36+00:00","mainEntityOfPage":{"@id":"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/"},"wordCount":418,"commentCount":0,"publisher":{"@id":"https:\/\/rudelabs.ai\/blogs\/#organization"},"image":{"@id":"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/#primaryimage"},"thumbnailUrl":"","articleSection":["Arduino","Coding Basics","Coding Projects"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/","url":"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/","name":"Arduino Smoke Detector With LED - RUDE LABS","isPartOf":{"@id":"https:\/\/rudelabs.ai\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/#primaryimage"},"image":{"@id":"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/#primaryimage"},"thumbnailUrl":"","datePublished":"2023-03-03T16:32:36+00:00","description":"Get your DIY on and safeguard your space with our Arduino Smoke Detector With LED! This innovative project allows you to build a custom smoke detector with the power of Arduino technology.","breadcrumb":{"@id":"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/#primaryimage","url":"","contentUrl":""},{"@type":"BreadcrumbList","@id":"https:\/\/rudelabs.ai\/blogs\/arduino-smoke-detector-with-led\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/rudelabs.ai\/blogs\/"},{"@type":"ListItem","position":2,"name":"Arduino Smoke Detector With LED"}]},{"@type":"WebSite","@id":"https:\/\/rudelabs.ai\/blogs\/#website","url":"https:\/\/rudelabs.ai\/blogs\/","name":"RUDE LABS","description":"","publisher":{"@id":"https:\/\/rudelabs.ai\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/rudelabs.ai\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/rudelabs.ai\/blogs\/#organization","name":"RUDE LABS","url":"https:\/\/rudelabs.ai\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rudelabs.ai\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/rudelabs.ai\/blogs\/wp-content\/uploads\/2025\/09\/RUDE-LABS.webp","contentUrl":"https:\/\/rudelabs.ai\/blogs\/wp-content\/uploads\/2025\/09\/RUDE-LABS.webp","width":2459,"height":414,"caption":"RUDE LABS"},"image":{"@id":"https:\/\/rudelabs.ai\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/rudelabs_in","https:\/\/www.linkedin.com\/company\/ru-delabs\/"]},{"@type":"Person","@id":"https:\/\/rudelabs.ai\/blogs\/#\/schema\/person\/560bad88bae03cae99a326a46af0c894","name":"rudelabs.ai","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/rudelabs.ai\/blogs\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/4d9f672e72f97294dfb6fac3d78e9f0bb5421a701cd2141cf2a2e540b4d67191?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4d9f672e72f97294dfb6fac3d78e9f0bb5421a701cd2141cf2a2e540b4d67191?s=96&d=mm&r=g","caption":"rudelabs.ai"},"sameAs":["https:\/\/rudelabs.ai\/blogs"],"url":"https:\/\/rudelabs.ai\/blogs\/author\/rudelabs-ai\/"}]}},"_links":{"self":[{"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/posts\/10776","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/comments?post=10776"}],"version-history":[{"count":0,"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/posts\/10776\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/media?parent=10776"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/categories?post=10776"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/rudelabs.ai\/blogs\/wp-json\/wp\/v2\/tags?post=10776"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}