Fire Detection Solution for Arduino and Raspberry Pi Projects
Introduction
The 4-PIN IR Flame Sensor is a specialized module that detects infrared light emitted by flames in the 760nm-1100nm wavelength range. This compact sensor provides both digital and analog outputs, making it ideal for fire detection systems, smart home devices, and robotics projects.
Key Features
🔥 IR Detection
760nm-1100nm wavelength range
📊 Dual Output
Digital (TTL) and Analog signals
🎚️ Adjustable
Sensitivity potentiometer
🔌 Simple Interface
4-pin connection (VCC, GND, DO, AO)
Technical Specifications
Detection Range
0.8m (standard lighter flame)
Detection Angle
≈60°
Operating Voltage
3.3V – 5V DC
Output Signals
Digital (TTL) + Analog
Response Time
<100ms
Dimensions
32mm × 14mm
Pin Configuration
Pin
Label
Description
Connection
1
VCC
Power (3.3V-5V)
5V
2
GND
Ground
GND
3
DO
Digital Output
Digital Pin
4
AO
Analog Output
Analog Pin
Note: The module includes a sensitivity adjustment potentiometer (clockwise to increase sensitivity)
Wiring with Arduino
// Basic Connections:
// VCC → 5V
// GND → GND
// DO → D2 (Digital Input)
// AO → A0 (Analog Input)
// For best results, position sensor 30-50cm from detection area
Important: Avoid direct sunlight or strong IR sources to prevent false triggers
Basic Digital Detection
// Digital Output Example
const int flameDigital = 2;
void setup() {
pinMode(flameDigital, INPUT);
Serial.begin(9600);
}
void loop() {
if (digitalRead(flameDigital) {
Serial.println("Flame detected!");
// Add your response code here
}
delay(100);
}
Analog Flame Intensity
// Analog Output Example
const int flameAnalog = A0;
void setup() {
Serial.begin(9600);
}
void loop() {
int sensorValue = analogRead(flameAnalog);
Serial.print("Flame intensity: ");
Serial.println(sensorValue);
if (sensorValue > 500) { // Adjust threshold as needed
Serial.println("Danger! Strong flame detected");
}
delay(200);
}