Flame sensor is interfaced to arduino to detect Flame. Led and buzzer are interfaced to arduino to indicate the flame.
Hardware components required:-
1) Flame sensor (Analogue Output)
2)Arduino
3)Breadboard
4)LED
5)Buzzer
6)Connecting wires
Step 1: Hard ware connections
- Flame sensor interfacing to Arduino
- Flame sensor to Arduino
- vcc -> vcc
- gnd -> gnd
- A0 -> A0
- Led interfacing to Arduino
- LED +ve is connected to 9th pin of Arduino
- LED -ve is connected to gnd pin of arduino
- Buzzer interfacing to Arduino
- Buzzer +ve is connected to 12th pin of Arduino
- Buzzer -ve is connected to GND pin of Arduino
Step 2: Programming
Arduino Code
#include<SoftwareSerial.h>
int sensorPin = A0; // select the input pin for the LDR
int sensorValue = 0; // variable to store the value coming from the sensor
int led = 9; // Output pin for LED
int buzzer = 12; // Output pin for Buzzer
void setup() {
// declare the ledPin and buzzer as an OUTPUT:
pinMode(led, OUTPUT);
pinMode(buzzer,OUTPUT);
Serial.begin(9600);
}
void loop()
{
Serial.println(“Welcome to TechPonder Flame Sensor Tutorial”);
sensorValue = analogRead(sensorPin);
Serial.println(sensorValue);
if (sensorValue < 100)
{
Serial.println(“Fire Detected”);
Serial.println(“LED on”);
digitalWrite(led,HIGH);
digitalWrite(buzzer,HIGH);
delay(1000);
}
digitalWrite(led,LOW);
digitalWrite(buzzer,LOW);
delay(sensorValue);
}
The items used in this experiment
المواد المستخدمة في التجربة يمكنكم اضافتها الى سلة مشترياتكم مباشرة من هنا
-
Gas & Weather, Sensors
Flame Sensor Module
حساس الحريق (يتحسس اللهب) يستعمل لأكتشاف الحرائق وفي روبوتات اطفاء او انذار الحريق وفي اجهزة الحماية المنزلية والانذار الخاصة بالحرائق، يمكن استخدامه مع كافة المتحكمات مثل الاردوينو والرازبيري باي ويتميز بانه ممكن ان يعطي اشارة تماثلية او رقمية في نفس الوقت.
SKU: 733 -
Results are displayed on the serial window.
When there is Flame the LED and Buzzer automatically ON and when there is no flame amount Arduino automatically turns off LED and Buzzer.
Here based on our room condition the threshold value we took was 100 for the Flame sensor.
When we place a Flame Near Flame Sensor Arduino automatically turns on the LED and Buzzer. When we remove Flame from the flame sensor Arduino automatically Turns Off LED and buzzer.