{"id":89620,"date":"2022-01-14T13:35:38","date_gmt":"2022-01-14T08:05:38","guid":{"rendered":"https:\/\/www.electronicsforu.com\/?p=89620"},"modified":"2024-07-26T15:34:23","modified_gmt":"2024-07-26T10:04:23","slug":"exhaust-fan-switches-automatically-detecting-smoke","status":"publish","type":"post","link":"https:\/\/www.electronicsforu.com\/electronics-projects\/exhaust-fan-switches-automatically-detecting-smoke","title":{"rendered":"An Exhaust Fan That Switches On Automatically On Detecting Smoke"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignright wp-image-73217 size-thumbnail\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2021\/03\/efy-tested-150x150.jpg\" alt=\"\" width=\"150\" height=\"150\" \/>Normally exhaust fans installed in kitchens, including restaurant kitchens, keep running continuously\u2014whether smoke is present or not. Here is how you can build a small electronic device that switches on the exhaust fan automatically only when there is smoke in the air. It switches the exhaust fan off when the smoke has been removed.<\/p>\n<p><center><iframe loading=\"lazy\" title=\"YouTube video player\" src=\"https:\/\/www.youtube.com\/embed\/lRG2IiMowgw\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><\/center><\/p>\n<h2>Circuit and working<\/h2>\n<p style=\"text-align: left;\">The circuit diagram of the auto exhaust fan switch is shown in Fig. 1. It has 5V voltage regulator 7805 (IC1), AVR microcontroller ATtiny85A (IC2), gas sensor MQ2 (SEN1), common-cathode bi-colour LED (BICO1), 5V single changeover relay (RL1), NPN transistor BC547 (T1), and a few other components.<\/p>\n<figure id=\"attachment_89621\" aria-describedby=\"caption-attachment-89621\" style=\"width: 500px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-89621 size-medium\" src=\"https:\/\/www.electronicsforu.com\/wp-contents\/uploads\/2022\/01\/1-7-500x275.jpg\" alt=\"Circuit diagram\" width=\"500\" height=\"275\" \/><figcaption id=\"caption-attachment-89621\" class=\"wp-caption-text\">Fig. 1: Circuit diagram<\/figcaption><\/figure>\n<p>The ATtiny85A turns the exhaust fan connected through the relay on or off based on extent of smoke in the air. The resistance offered by MQ2 sensor changes with smoke concentration near the sensor and thus changes voltage at analogue input pin 3 (PB4) of IC1. Potentiometer VR1 is used to adjust the sensitivity of the sensor during calibration.<\/p>\n<p>When the circuit is powered on, bi-colour LED BICO1 blinks in red colour for 20 seconds, indicating that the circuit is in the necessary pre-heat stage (see Fig. 1). After that the microcontroller continuously checks whether voltage at analogue input (pin 3) is above the threshold value set using potentiometer VR1 during calibration. When the sensor detects sufficient smoke, its digital pin 5 (PB0) goes \u2018high\u2019 and energises the relay to turn on the exhaust fan connected at CON2. The bi-colour LED BICO1 glows continuously in red colour to indicate that smoke is present.<\/p>\n<p>When the concentration of smoke near the sensor goes below the preset level, digital pin PB0 goes \u2018low\u2019 after one minute. The exhaust fan keeps running during this one minute to ensure smoke in the entire kitchen has been removed. During this one-minute period, BICO1 blinks in orange colour to indicate that the exhaust fan is now running to remove the smoke that may be present elsewhere in the kitchen. After this period, the digital pin goes low and de-energises the relay, which switches the exhaust fan off. Bi-colour LED BICO1 now emits green colour to indicate that no smoke is present in the air.<\/p>\n<p>Pushbutton switch S1 can be used to reset the microcontroller. Capacitor C4 is used to debounce switch S1 and it helps in power-on resetting along with resistor R1.<\/p>\n<h2>Software<\/h2>\n<p>The source code ExhaustFanSwitch.ino is written in Arduino programming language using Arduino IDE. By default, Arduino IDE does not support ATtiny85, so ATtiny board needs to be added to Arduino IDE. To add ATtiny support to Arduino IDE, open File\uf0aePreferences and in the additional boards manager URLs, add the below URL.<\/p>\n<div class=\"mepr_error\"><div class=\"locked-content\">\n<b>EFY++ CONTENT: ACCESS TO THIS CONTENT IS FREE! BUT YOU NEED TO BE A REGISTERED USER.<\/b><\/p>\n<p>Oops! This is an EFY++ article, which means it's our Premium Content. You need to be a Registered User of our website to read its complete content.<\/p>\n<p><b>Good News: <\/b>You can register to our website for FREE! <a href=\"https:\/\/www.electronicsforu.com\/plans\/subscription-plans\" target=\"_blank\" rel=\"noopener\">CLICK HERE<\/a> to register now.<\/p>\n<p><b>Already a registered member? <\/b>If YES, then simply login to you account below. (TIP: Use 'forgot password' feature and reset and save your new password in your browser, if you forgot the last one!)\n<\/div>\n<\/div><div>\n<div class=\"mp_wrapper mp_login_form\">\n                  <!-- mp-login-form-start -->     <form name=\"mepr_loginform\" id=\"mepr_loginform\" class=\"mepr-form\" action=\"https:\/\/www.electronicsforu.com\/login\" method=\"post\">\n            <div class=\"mp-form-row mepr_username\">\n        <div class=\"mp-form-label\">\n                              <label for=\"user_login\">Username<\/label>\n        <\/div>\n        <input type=\"text\" name=\"log\" id=\"user_login\" value=\"\" \/>\n      <\/div>\n      <div class=\"mp-form-row mepr_password\">\n        <div class=\"mp-form-label\">\n          <label for=\"user_pass\">Password<\/label>\n          <div class=\"mp-hide-pw\">\n            <input type=\"password\" name=\"pwd\" id=\"user_pass\" value=\"\" \/>\n            <button type=\"button\" class=\"button mp-hide-pw hide-if-no-js\" data-toggle=\"0\" aria-label=\"Show password\">\n              <span class=\"dashicons dashicons-visibility\" aria-hidden=\"true\"><\/span>\n            <\/button>\n          <\/div>\n        <\/div>\n      <\/div>\n            <div>\n        <label><input name=\"rememberme\" type=\"checkbox\" id=\"rememberme\" value=\"forever\" \/> Remember Me<\/label>\n      <\/div>\n      <div class=\"mp-spacer\">&nbsp;<\/div>\n      <div class=\"submit\">\n        <input type=\"submit\" name=\"wp-submit\" id=\"wp-submit\" class=\"button-primary mepr-share-button \" value=\"Log In\" \/>\n        <input type=\"hidden\" name=\"redirect_to\" value=\"\/wp-json\/wp\/v2\/posts\/89620\" \/>\n        <input type=\"hidden\" name=\"mepr_process_login_form\" value=\"true\" \/>\n        <input type=\"hidden\" name=\"mepr_is_login_page\" value=\"false\" \/>\n      <\/div>\n    <\/form>\n    <div class=\"mp-spacer\">&nbsp;<\/div>\n    <div class=\"mepr-login-actions\">\n      <a href=\"https:\/\/www.electronicsforu.com\/login?action=forgot_password\">Forgot Password<\/a>\n    <\/div>\n\n      \n    <!-- mp-login-form-end --> \n  <\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Normally exhaust fans installed in kitchens, including restaurant kitchens, keep running continuously\u2014whether smoke is present or not. Here is how you can build a small electronic device that switches on the exhaust fan automatically only when there is smoke in the air. It switches the exhaust fan off when the smoke has been removed. Circuit [&hellip;]<\/p>\n","protected":false},"author":110824,"featured_media":89621,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22,23,3713],"tags":[1985,1911,110,83,10404,8296],"class_list":{"0":"post-89620","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-electronics-projects","8":"category-hardware-diy","9":"category-premium","10":"tag-diy-projects","11":"tag-do-it-yourself","12":"tag-electronics-projects","13":"tag-featured","14":"tag-jan-2022","15":"tag-premium"},"_links":{"self":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts\/89620","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/users\/110824"}],"replies":[{"embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/comments?post=89620"}],"version-history":[{"count":1,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts\/89620\/revisions"}],"predecessor-version":[{"id":144762,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/posts\/89620\/revisions\/144762"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/media\/89621"}],"wp:attachment":[{"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/media?parent=89620"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/categories?post=89620"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.electronicsforu.com\/wp-json\/wp\/v2\/tags?post=89620"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}