In this tutorial, we are going to interface a buzzer and flame sensor with Surilli GSM. Whenever a flame is detected, a buzzer starts beeping.
What Is a Flame Sensor?The flame sensor is a rather simple device located at the burner assembly. It's not much more than a thin, usually bent, metallic rod that sits in front of the flame stream inside the furnace. The purpose of the flame sensor is to confirm to the system that whenever the gas valve is open, a fire is actually present.
Flame sensor to Surilli GSM:
VCC -> USB
GND-> GND
A0 -> A0
Led interfacing to Surilli GSM:
LED +ve is connected to PIN 9 of Surilli GSM
LED -ve is connected to GND pin of Surilli GSM
Buzzer interfacing to Surilli GSM:
Buzzer +ve is connected to PIN 12 of Surilli GSM
Buzzer -ve is connected to GND pin of Surilli GSM
Step 2: The Circuitryint 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);
SerialUSB.begin(9600);
}
void loop()
{
sensorValue = analogRead(sensorPin);
if (sensorValue < 100)
{
SerialUSB.println("Fire Detected");
SerialUSB.println("LED ON");
digitalWrite(led,HIGH);
digitalWrite(buzzer,HIGH);
delay(1000);
}
else
{
SerialUSB.println("Fire Not Detected");
SerialUSB.println("LED OFF");
digitalWrite(led,LOW);
digitalWrite(buzzer,LOW);
delay(1000);
}
}
Open Arduino IDE and make sure that you have selected the right board and port. Now copy and paste the Arduino IDE sketch from down below.
That's it! After uploading this code on you Surilli board, the sensor will start working, and whenever a flame is detected, the buzzer will produce a beep.
If you have any queries, feel free to contact us at surilli.io.
Comments
Please log in or sign up to comment.