Components Required –
Circuit Connections –
Fig. 2: Prototype of Arduino Based Smoke Detector
The circuit is built on Arduino Pro Mini. The MQ-06 gas sensor, LCD display, buzzer and L293D motor driver IC are interfaced with the Arduino board. The circuit is connected in the following manner –
How the circuit works –
Fig. 7: Image of Arduino Based Smoke Detector
When the device is powered on, the Arduino initializes the sensor module and the LCD display. It starts reading data from the MQ-06 sensor. The data is read from the analog output pin of the sensor. The read data is in the form of an analog voltage which is digitized using inbuilt ADC channel. The ADC channels on the Arduino board are 10-bit long so the digitized reading varies from 0 to 1023. On calibration, the ADC reading is directly proportional by a factor of one to the concentration of smoke in PPM. The reading is stored in a variable and displayed on the LCD display.
Programming Guide –
Project Source Code
###
//Program to
#include <LiquidCrystal.h> LiquidCrystal lcd(2, 3, 4, 5, 6, 7); //int Buzzer = 10; int led = 12; int Gassensor = A0; int motor11 = 10; int motor12 = 11; void setup() { //pinMode(Buzzer,OUTPUT); pinMode(motor11,OUTPUT); pinMode(motor12,OUTPUT); pinMode(led,OUTPUT); Serial.begin(9600); lcd.begin(16, 2); lcd.print("ENGINEERS GARAGE"); lcd.setCursor(0, 1); } void loop() { int sensorValue = analogRead(Gassensor); Serial.println(sensorValue); delay(1); if(sensorValue < 200) { // digitalWrite(Buzzer,HIGH); digitalWrite(led,HIGH); delay(1000); digitalWrite(motor11,HIGH); digitalWrite(motor12,LOW); delay(500); digitalWrite(motor11,LOW); digitalWrite(motor12,LOW); delay(1000); lcd.setCursor(0, 2); lcd.print("Smoke Not Detected"); } else if (sensorValue > 400) { // digitalWrite(Buzzer,LOW); digitalWrite(led,LOW); delay(1000); digitalWrite(motor11,LOW); digitalWrite(motor12,LOW); delay(1000); lcd.setCursor(0, 2); lcd.print("Smoke Detected"); } }
###
Circuit Diagrams
Project Video
Filed Under: Electronic Projects
Filed Under: Electronic Projects
Questions related to this article?
👉Ask and discuss on Electro-Tech-Online.com and EDAboard.com forums.
Tell Us What You Think!!
You must be logged in to post a comment.