A fire detector is essential and should be available everywhere for early fire detection and extinguishing without causing damage.
In this post, we’ll show you how to easily make fire detector using arduino and fire sensor, along with some programming code that we will share with you.
Electronic components that we need:
- Arduino UNO
- Breadboard
- 1 LED lights
- 1 resistor 5k Ohm
- 1 resistor 220 Ohm
- buzzer
- fire sensor
- Electrical wires
Circuit diagram:

Programming Code:
int FlameSensorPin=A0;
int FlameSensorReading;
int LED=2;
// by www.andprof.com
void setup() {
// put your setup code here, to run once:
Serial.begin(9600); // open the serial port
pinMode(LED, OUTPUT); // led
}
void loop()
{
// put your main code here, to run repeatedly:
FlameSensorReading=analogRead(FlameSensorPin);
Serial.println(FlameSensorReading);
if(FlameSensorReading>5){
digitalWrite(LED,HIGH);
tone( 3, 2000, 500);
}
else {
digitalWrite(LED,LOW);
}
delay(500);
}















