Monday, April 21, 2025

An Exhaust Fan That Switches On Automatically On Detecting Smoke

Normally exhaust fans installed in kitchens, including restaurant kitchens, keep running continuously—whether 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 and working

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.

- Advertisement -
Circuit diagram
Fig. 1: Circuit diagram

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.

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 ‘high’ 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.

- Advertisement -

When the concentration of smoke near the sensor goes below the preset level, digital pin PB0 goes ‘low’ 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.

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.

Software

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Preferences and in the additional boards manager URLs, add the below URL.

EFY++ CONTENT: ACCESS TO THIS CONTENT IS FREE! BUT YOU NEED TO BE A REGISTERED USER.

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.

Good News: You can register to our website for FREE! CLICK HERE to register now.

Already a registered member? 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!)

EFY Prime

Unique DIY Projects

Truly Innovative Electronics

Electronics News

Latest DIY Videos

Electronics Components

Electronics Jobs

Calculators For Electronics