How to use the 5-way Flame sensor module with an Arduino | 5 channel Flame sensor module with Arduino
Hello and welcome back. In this tutorial, we will learn how to use the 5-way Flame sensor module with an Arduino. For this project, I have used 5 LEDs to visually indicate when the sensor detects fire. However, you can test the sensor without using LEDs if you prefer. Also, I used an Arduino UNO board, but you can use any Arduino board you like. This knowledge can be applied to create fire alarm systems, fire-fighting robots, and more.
5-way Flame sensor module
This sensor module has 5 infrared (IR) receiver LEDs. Typically, a single flame sensor can detect flames within a 30-degree range, but this module can detect flames over a range of more than 120 degrees. It is designed to detect flame wavelengths in the range of 700-1100 nm, which falls within the short-wave near-infrared (SW-NIR) spectrum. The module also includes built-in LEDs to indicate the presence of flames, which is a useful feature. Also, we can get the 5 digital and analog signals using this sensor module. Additionally, it has a potentiometer that lets you adjust the sensitivity range of the sensor to better suit your needs. Also, this Flame sensor module operates within a voltage range of 3.3V to 9V, making it compatible with different power sources.
- How to use the Single Flame sensor module with Arduino – Click on me
OK let’s do it step by step. The required components are given below.
- Arduino UNO board x 1 — Our store / Amazon
- 5-way flame sensor module x 1 — Our store / Amazon
- LED x 5 — Our store / Amazon
- 100 ohm Resistor x 5 — Our store / Amazon
- Breadboard x 1 — Our store / Amazon
- Jumper wires — Our store / Amazon
Step 1
Firstly, identify these components.
Step 2
Secondly, connect the flame sensor module to the Arduino board. For that, use the circuit diagram below.
Step 3
Thirdly, place the LEDs on the breadboard. Please connect the cathode pins to the breadboard cathode rail. Then connect the one-by-one resistors to the anode pins.
Step 4
Next, connect these resistor legs to the Arduino board. For that, I used digital pins D7 to D11. Please connect the Arduino board power pins (5v, GND) to the breadboard power rails. Then, connect the Arduino board to the computer.
Step 5
Now copy and paste the following program to the Arduino IDE.
- Code and Circuit diagram — Download
#define Sone 2
#define Stwo 3
#define Sthree 4
#define Sfour 5
#define Sfive 6
#define LED1 7
#define LED2 8
#define LED3 9
#define LED4 10
#define LED5 11
void setup() {
Serial.begin(9600);
pinMode(Sone, INPUT);
pinMode(Stwo, INPUT);
pinMode(Sthree, INPUT);
pinMode(Sfour, INPUT);
pinMode(Sfive, INPUT);
pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);
pinMode(LED3, OUTPUT);
pinMode(LED4, OUTPUT);
pinMode(LED5, OUTPUT);
}
void loop() {
bool value1 = digitalRead(Sone);
bool value2 = digitalRead(Stwo);
bool value3 = digitalRead(Sthree);
bool value4 = digitalRead(Sfour);
bool value5 = digitalRead(Sfive);
Serial.println(value5);
if (value1 == 1) {
digitalWrite(LED1, HIGH);
} else {
digitalWrite(LED1, LOW);
}
if (value2 == 1) {
digitalWrite(LED2, HIGH);
} else {
digitalWrite(LED2, LOW);
}
if (value3 == 1) {
digitalWrite(LED3, HIGH);
} else {
digitalWrite(LED3, LOW);
}
if (value4 == 1) {
digitalWrite(LED4, HIGH);
} else {
digitalWrite(LED4, LOW);
}
if (value5 == 1) {
digitalWrite(LED5, HIGH);
} else {
digitalWrite(LED5, LOW);
}
}
- Next, select the board and port. Then click the upload button.
Ok, now you can test this project using Flames. I used a lighter for that. The full video guide is below. So, we hope to see you in the next project.