Flame Sensor

Flame sensor makes use of the characteristic that infrared ray is very sensitive to the flame, use the special infrared ray receiving tube to detect the flame, then convert the brightness of the flame to the level signal of high and low change, input to the CENTRAL processing unit, the central processing unit makes corresponding program processing according to the change of the signal.

The flame sensor (infrared receiving triode) is a sensor specially used by the robot to search for the fire source. This sensor is especially sensitive to the flame.

Component Required:

  • 1 x Uno R3

  • 1 x The flame sensor

  • 1 x Potentiometer (10k)

  • 1 x 830 tie-points Breadboard

  • 1 x Passive Buzzer

  • 6 x M-M wires (Male to Male jumper wires)

Connection Diagram:

Wiring schematic:

Physical wiring diagram:

The short lead end of the infrared is negative, while the long lead end is positive. Connect the negative electrode to the 5V interface as shown in the figure below, then connect the positive electrode to the 10K resistor, connect the other end of the resistor to the GND interface, and finally connect a jumper wire from the positive extreme column of the flame sensor, and connect the other end of the jumper wire to the simulation mouth as shown in pic above.


The voltage values read by the analog PIN vary with or without flame proximity. As measured by a multimeter, the voltage read by the simulated PIN was about 0.3V when there was no flame near. When a flame approached, the simulated PIN read a voltage of about 1.0V. The closer the flame approached, the greater the voltage.

So in the beginning, can store a first voltage value when no flame simulation, the analog port voltage value is continuously cyclically read and the difference value K = J-i and the difference value K = 0.6V are compared with the stored value. At odds with a difference of K at 0.6V (and at odds with 123), be at odds with flames and be at odds with a buzzer. If the difference is less than 0.6V, the buzzer will not sound.


int flame = A0; //A0
int Beep = 8; //Define the buzzer interface as the pin 7
int val = 0; //
void setup()
{ pinMode(Beep, OUTPUT);
  pinMode(flame, INPUT);
  Serial.begin(9600);//Set the baud rate to 9600
void loop() {
  val = analogRead(flame);
  //Read the simulated value of the flame sensor
  Serial.println(val);//Output the analog value and print it out
  if (val >= 600) //The buzzer will sound when the simulation value is greater than 600
    digitalWrite(Beep, HIGH);
  else {
    digitalWrite(Beep, LOW);

Last updated