Make Your Own Smoke Detector Circuit Using Arduino




Introduction: Make Your Own Smoke Detector Circuit Using Arduino

About: Be enthusiastic about electronic design, enjoy the process in bringing a design to life. Always being happy to share good stuffs with others.

Smoke Detectors are very useful in detecting smoke or fire in buildings, and so are the important safety parameters. In this DIY session, we are going to build a Smoke Detector Circuit which not only sense the smoke in the air but also reads and displays the level of Smoke in the Air in PPM (parts per million). This circuit triggers the Buzzer when Smoke level becomes higher than 1000 ppm, this threshold value can be changed in the Code according to the requirement. This circuit mainly uses MQ2 Smoke/Gas sensor and Arduino to detect and calculate the level of smoke. MQ2 gas sensor is also sensible to LPG, Alcohol, and Methane etc.

This Smoke Detector can be easily built on Bread Board or Dot Board but we have decided to build this as an Arduino Shield on PCB. We have used EasyEDA free online PCB simulator and designer to build this Smoke Detector Shield for Arduino.

We have explained the whole process in this Article and also provided PCB layout for this Arduino Shield so that you can also order this Shield if you need.

Step 1: Components Required:

  • Arduino UNO
  • Smoke Detector Arduino Shield (Self Designed)
  • Power Supply

Components for Smoke Detector Arduino Shield:

  • Smoke Sensor (MQ2)
  • Resistors (10K and 1K)
  • Buzzer
  • 16x2 LCD
  • 10k POT
  • LED
  • LM358
  • Burg strips

Step 2: Designing Smoke Detector Shield for Arduino:

For designing Smoke Detector Shield for Arduino we have used EasyEDA, in which first we have designed a Schematic and then converted that into the PCB layout by Auto Routing feature of EasyEDA.

EasyEDA provides such an online collaborative workspace for makers-engineers-hackers & creatives, it's also easy to learn and easy to use, which lower the threshold for makers.The greatest feature is the ability to share projects privately or publicly, you can share your project with your team and work with them in a same project anytime and anywhere.

We have made the Circuit and PCB design of this Smoke Detector Shield public, so you can just follow the link to access the Circuit Diagram and PCB layouts.

Step 3: MQ2 Smoke Detector Arduino Shield Circuit:

In this Smoke Detector Circuit with Arduino, we have used a MQ2 Gas Sensor to detect preset smoke in the air. A 16x2 LCD is used for displaying the PPM value of Smoke. And an LM358 IC for converting smoke sensor output into digital form (this function is optional). A buzzer is placed as an alarm which gets triggered when smoke level goes beyond 1000 PPM.

Circuit connections for this project are very simple, we have a Comparator Circuit for comparing output voltage of smoke sensor with preset voltage (output connected at pin D7). Also smoke sensor output is connected at an analog pin of Arduino (A0). Buzzer is connected at Pin D9. And LCD connections are same as Arduino LCD examples that are available in Arduino IDE (12, 11, 5, 4, 3, 2). Remaining connections are shown in the circuit diagram.

Note: In the circuit we need to short all the three pin of J2 header to calculate PPM of smoke.

Above you can find the Snapshots of the circuit diagram and Top layer of PCB layout from EasyEDA, you can view

any Layer (Top, Bottom, Topsilk, bottomsilk etc) of the PCB by selecting the layer form the ‘Layers’ Window.

Feel free to clone or modify it here, enjoy!

Step 4: Prototype PCB:

Once you're happy with the design, you can click the icon of Fabrication output, which will take you on the PCB order page. Here you can view your PCB in Gerber Viewer or download Gerber files of your PCB and send them to any manufacturer, it’s also a lot easier (and cheaper) to order it directly in EasyEDA.

The cheapest option is for 10pcs of 50mmx50mm boards, which comes to 9.8USD. 10pcs of 100mmx100mm boards is 17.6USD. For larger boards, 5pcs is cheaper than 10pcs.

Step 5: Got the PCBs:

affordable and HQ-PCB

I ordered 5 2-Layer PCBs. The whole process from order submission to receipt of the product took about 2 weeks.

Short and sweet: short delivery time, cheap, high quality

There are pictures of the PCB for Smoke Detector Arduino Shield.

Step 6: Mounting And soldering

After getting the PCBs, we have mounted and soldered all the required components and burg strips over the PCB, you can have a final look here.

Now we just need to place this Smoke Detector Shield over the Arduino. Align the Pins of this Shield with the Arduino and firmly press it over the Arduino. Now just upload the code to the Arduino and power on circuit and you are done! Your Smoke Detector is ready to test. Check the Video below for demonstration.

Step 7: Programming

Program of this project is little difficult to make. User needs to read MQ2 Smoke Sensor datasheet very carefully to understand the calculations for this project. In this we have to read slop or curve of smoke concentration in air with respect to clean air. After reading datasheet, we get some values that we will need in the Code to calculate ppm of smoke in air. Here mostly we need curve values (we take two points from the curve), sensor resistance (will be calculated in code), clean air constant (9.83) and Load Resistance (I used 10K). We can find curve values from the datasheet and we can put load resistance 5k-54k and then we will calculate sensor resistance by these value and smoke samples.

Take two points from the curve and take log of them like point one: (lg200, lg3.4)=(2.3,0.53) and point two: (lg10000,lg0.63)=(4,-0.20). Then find slope of the curve using Formula: (y2-y1)/(x2-x1), then take one point and slope (-0.44) and use them in the Program (x, y, slope). Further check the Code below to understand the Calculation.

For the complete DIY project and Code to build this project, check out the project page on circuit digest.

Step 8: Demonstration Video:

So here we have built the Smoke Detector Circuit using Arduino, which also calculates and displays the level of the Smoke in PPM. For this Project, we have developed our own Smoke detector Arduino Shield using EasyEDA PCB designing services, and made those PCB layouts Public so that anyone can use them to order this Smoke Detector Shield.

PS: If you find any problem in using EasyEDA, then check out our previously developed 100 watt inverter circuit, where we have explained the process step by step.

Be the First to Share


    • Pocket-Sized Speed Challenge

      Pocket-Sized Speed Challenge
    • Audio Challenge 2020

      Audio Challenge 2020
    • Maps Challenge

      Maps Challenge

    3 Discussions


    3 years ago

    Hey, please how did you preheat and calibrate the sensor

    R Jordan Kreindler
    R Jordan Kreindler

    3 years ago

    You're welcome. Have a great day.

    Again, the very best.