当前位置:网站首页>Flame sensor connected with Arduino
Flame sensor connected with Arduino
2022-08-02 04:51:00 【WENJIE Technology】
Flame sensor with Arduino 连接
前言
The damage caused by fire is devastating.To prevent personal injury or damage,It is necessary to detect fire,in order to provide a warning,An automatic fire extinguishing system can even be activated.There are several ways to detect fires,Such as detecting temperature changes、detect smoke etc..在所有这些方法中,Detecting temperature changes will be more accurate,Because some fires don't even have detectable smoke.Even temperature measurements are less reliable,Because sometimes it's too late to detect changes.为了克服这个问题,We can detect thermal radiation instead of temperature changes.The easiest and cheapest way to detect thermal radiation is to use a flame sensor.在本教程中,We'll see how to integrate the flame sensor module with Arduino 连接.
Flame sensor module pins
Common to flame sensor modules 4 个引脚.Two power pins and two signal pins.The pinout of the flame sensor module is as follows:
VCC==》为模块提供电源,连接到Arduino的5V引脚.
GND==》Ground is connected to Arduino 的接地引脚.
DO==》数字输出引脚.
AO==》Analog output pin.
Composed of flame sensor module
The flame sensor module has very few components,其中包括一个 IR 光电二极管、一个 LM393 比较器 IC and some free passive components.Power when the module is powered up LED 亮,When a flame is detected D0 LED 熄灭.Sensitivity can be adjusted with on-board trimmer resistors.
Frequently Asked Questions about Flame Sensors
How a flame sensor works?
Flame sensors work based on infrared radiation.An infrared photodiode will detect infrared radiation from any hot body.This value is then compared with the set value.Once the radiation reaches the threshold,The sensor will change its output accordingly.
What does the flame sensor detect?
This type of flame sensor detects infrared radiation.
Where is the flame sensor used?
Flame sensors are used anywhere a fire can occur.尤其是在工业领域.
Flame sensor module circuit diagram
A schematic diagram of the flame sensor module is shown below.如前所述,该板的组件数量非常少.The main components are the infrared photodiode and comparator circuit.
How the flame sensor module works?
The job of the flame sensor module is simple.The theory behind it is that hot objects emit infrared radiation.For flame or fire,This radiation will be very high.We will use an infrared photodiode to detect this infrared radiation.The conductivity of the photodiode will vary depending on the infrared radiation it detects.我们使用 LM393 to compare this radiation,当达到阈值时,The digital output will change.We can also use the analog output to measure infrared radiation intensity.The analog output is taken directly from the terminals of the photodiode.板载 D0 LED The presence of a fire will be displayed when detected.The sensitivity can be changed by adjusting the variable resistor on the board.This can be used to eliminate false triggers.
ArduinoFlame sensor interface circuit diagram
Now we fully understand how the flame sensor works,我们可以将所有必需的电线连接到 Arduino 并编写代码以从传感器中获取所有数据.The figure below shows the flame sensor module with the Arduino 连接的电路图.连接非常简单,只需要三根线.将模块的 VCC 和 GND 连接到 Arduino 的 5V 和 GND 引脚.然后将 D0 引脚连接到 Arduino 的数字引脚 2.We will monitor the state of this pin to detect fire.
Arduino Flame sensor code
The code to connect the flame sensor is very simple and easy to understand.我们只需要定义传感器与 Arduino 连接的引脚.完成此操作后,We will monitor the state of this pin.
void setup()
{
pinMode(2, INPUT);
pinMode(LED_BUILTIN, OUTPUT);
Serial.begin(9600);
}
在设置函数中,We will digital pins 2 初始化为输入.This pin is used to monitor the flame sensor output.接下来,We will connect the built-in LED 的引脚 13 初始化为输出.We will use this built-in LED as a status indicator.然后我们以 9600 The baud rate to initialize the serial port.
void loop()
{
if (digitalRead(2) == 1 )
{
digitalWrite(LED_BUILTIN, HIGH); // Led ON
Serial.println("** Warning!!!! Fire detected!!! **");
}
else
{
digitalWrite(LED_BUILTIN, LOW); // Led OFF
Serial.println("No Fire detected");
}
delay(100);
}
在Loop功能中,We will monitor the digital pins 2 的状态.When this pin is pulled low or high by the flame sensor,We will change the state LED 的状态,and print a warning message to the serial monitor.
下面的 GIF Displays the flame sensor interface in action.
边栏推荐
猜你喜欢
随机推荐
Type c PD 电路设计
IDEA2021.2安装与配置(持续更新)
判断子序列 —— LeetCode-392
AD8307对数检波器
本地数据库 sqlite3 编译和使用
TQP3M9009电路设计
火焰传感器与 Arduino 连接
Cadence allegro导出Gerber文件(制板文件)图文操作
Pylon CLI 低成本的本地环境管控工具应用实例
Comparative analysis of OneNET Studio and IoT Studio
408-二叉树-先序中序后序层次遍历
Arduino点亮数码管
Anaconda(Jupyter)里发现不能识别自己的GPU该怎么办?
移动云物联网预研及阿里云开发对比分析
基础IO(下):软硬链接和动静态库
bluez5.50+pulseaudio实现蓝牙音响音频播放
【科普贴】UART接口通讯协议
【科普贴】SD卡接口协议详解
使用批处理脚本修改hosts文件
list:list的介绍和模拟实现