شحن مجاني للأوردرات فوق
1000 ج
رمضان كريم
Multi-directional Flame Detection for Arduino and Robotics Projects
The 5-Channel Flame Sensor Module is an infrared detection system capable of identifying flame sources from multiple directions. With five independent IR receivers arranged in a 180° arc, it provides directional flame detection for fire prevention systems, robotics, and safety applications.
Key FeaturesFive independent detection channels covering 180°
Provides intensity readings for precise flame location
Potentiometers for each channel’s detection threshold
Works with 3.3V or 5V systems including Arduino
| Detection Angle | 180° (5× 36° sectors) |
|---|---|
| Detection Range | 0.8m-1.5m (depends on flame size) |
| Output Type | 5× Analog + 1× Digital |
| Operating Voltage | 3.3V – 5V DC |
| Current Consumption | <20mA per channel |
| Response Time | <100ms |

| Pin | Label | Description | Arduino Connection |
|---|---|---|---|
| 1 | VCC | Power (3.3V-5V) | 5V |
| 2 | GND | Ground | GND |
| 3 | A1 | Channel 1 Analog | A0 |
| 4 | A2 | Channel 2 Analog | A1 |
| 5 | A3 | Channel 3 Analog | A2 |
| 6 | A4 | Channel 4 Analog | A3 |
| 7 | A5 | Channel 5 Analog | A4 |
| 8 | D0 | Digital Output | D2 |
// Basic Connections: // VCC → 5V // GND → GND // A1-A5 → A0-A4 (analog inputs) // D0 → D2 (digital input - optional) // For best results, place sensor 30-50cm above surface
// 5-Channel Flame Sensor Basic Example
const int channels = 5;
const int pins[channels] = {A0, A1, A2, A3, A4};
void setup() {
Serial.begin(9600);
for(int i=0; i<channels; i++) {
pinMode(pins[i], INPUT);
}
}
void loop() {
for(int i=0; i<channels; i++) {
int value = analogRead(pins[i]);
Serial.print("Channel ");
Serial.print(i+1);
Serial.print(": ");
Serial.print(value);
Serial.print("\t");
}
Serial.println();
delay(200);
}
// Determine flame direction from 5 sensors
int getFlameDirection() {
int values[5];
int maxVal = 0;
int direction = 0; // 0 = no flame
// Read all channels
for(int i=0; i<5; i++) { values[i] = analogRead(A0 + i); if(values[i] > maxVal && values[i] > 500) { // 500 = threshold
maxVal = values[i];
direction = i + 1; // Channels 1-5
}
}
return direction;
}
void loop() {
int flameDir = getFlameDirection();
if(flameDir > 0) {
Serial.print("Flame detected from direction: ");
Serial.println(flameDir);
}
delay(100);
}
// Auto-calibration for changing light conditions
int baselines[5];
void calibrateSensors() {
for(int i=0; i<5; i++) {
baselines[i] = analogRead(A0 + i);
// Add 10% safety margin
baselines[i] += baselines[i] * 0.1;
}
}
// Calculate relative flame intensity
float getFlameIntensity() {
int total = 0;
for(int i=0; i<5; i++) {
total += analogRead(A0 + i);
}
return total / 5.0; // Average intensity
}
// Using the digital output pin
void setup() {
pinMode(2, INPUT); // D0 connected to D2
}
void loop() {
if(digitalRead(2) {
Serial.println("Flame detected!");
}
}
// Simple robot fire-fighting logic
void respondToFlame(int direction) {
switch(direction) {
case 1: turnLeft(45); break;
case 2: turnLeft(15); break;
case 3: moveForward(); break;
case 4: turnRight(15); break;
case 5: turnRight(45); break;
}
activateWaterPump();
}
No account yet?
Create an Account
Recent Comments