The Grove Flame Sensor is a compact and reliable module designed to detect the presence of flames or fire by measuring the infrared (IR) radiation emitted by flames. It is highly sensitive to IR wavelengths in the range of 760 nm to 1100 nm, making it ideal for fire detection systems. This sensor is commonly used in safety applications, robotics, and home automation systems to detect and respond to fire hazards.
The Grove Flame Sensor is designed for ease of use and integration into various projects. Below are its key technical details:
The Grove Flame Sensor has a 4-pin interface. Below is the pinout description:
Pin | Name | Description |
---|---|---|
1 | VCC | Power supply pin. Connect to 3.3V or 5V. |
2 | GND | Ground pin. Connect to the ground of the circuit. |
3 | DOUT | Digital output pin. Outputs HIGH (1) when a flame is detected, LOW (0) otherwise. |
4 | AOUT | Analog output pin. Outputs a voltage proportional to the intensity of the flame. |
The Grove Flame Sensor is easy to use and can be connected to microcontrollers like the Arduino UNO. Follow the steps below to integrate it into your project:
The following code demonstrates how to use the Grove Flame Sensor with an Arduino UNO. It reads both the digital and analog outputs and prints the results to the Serial Monitor.
// Grove Flame Sensor Example Code
// Connect DOUT to digital pin 2 and AOUT to analog pin A0 on the Arduino UNO.
const int digitalPin = 2; // Digital output pin from the sensor
const int analogPin = A0; // Analog output pin from the sensor
void setup() {
pinMode(digitalPin, INPUT); // Set digital pin as input
Serial.begin(9600); // Initialize serial communication at 9600 baud
}
void loop() {
int flameDetected = digitalRead(digitalPin); // Read digital output
int flameIntensity = analogRead(analogPin); // Read analog output
// Print the digital output status
if (flameDetected == HIGH) {
Serial.println("Flame detected!");
} else {
Serial.println("No flame detected.");
}
// Print the analog output value (flame intensity)
Serial.print("Flame Intensity: ");
Serial.println(flameIntensity);
delay(500); // Wait for 500ms before the next reading
}
No Flame Detected Even When Present:
False Flame Detection:
Unstable Readings:
Q1: Can the sensor detect flames through glass?
A1: No, the sensor cannot detect flames through glass as glass blocks most IR radiation.
Q2: What is the difference between the digital and analog outputs?
A2: The digital output provides a simple HIGH/LOW signal indicating the presence of a flame, while the analog output gives a proportional voltage representing the flame's intensity.
Q3: Can I use this sensor with a 3.3V microcontroller?
A3: Yes, the sensor operates at both 3.3V and 5V, making it compatible with 3.3V microcontrollers like the ESP32 or Raspberry Pi Pico.
Q4: How do I increase the detection range?
A4: The detection range is hardware-limited, but you can improve sensitivity by ensuring the sensor is aligned directly with the flame and minimizing ambient IR interference.