Hello guys, in this blog, I will discuss Flame Sensor, its interfacing with Raspberry Pi Pico RP2040, and its programming in Micropython using Thonny ide.
The KY-026 flame sensor is quite popular among the DIY community due to its low power and low cost, easy to use, and wide detection range. These flame sensors are used to detect flames or fire or lights ranging between 760nm to 1100nm wavelength.
KY-026 flame sensor has 4 pins VCC, GND, and D0, and A0. It has an onboard voltage regulator to drive it between voltage range 3.3 to 5 Volts. In the case of this blog, I am going to use 5V from Pico 5v(VBUS) Pin.
Components Required
- Raspberry Pi Pico x 1
- KY-026 Flame Sensor x 1
- USB Cable for programming x 1
- Breadboard (optional)
- Jumper cables
Circuit Diagram
Wiring of this setup is quite easy and simple, Connect VCC of flame Sensor to VBUS (5V) Pin of Raspberry Pi Pico, GND to GND terminal of PICO, and D0 pin to GP16 of Raspberry Pi Pico. This Connection diagram of the flame Sensor with Raspberry Pi Pico will guide you to connect things easily in no time. I am using digital pin D0 here, which will give a high pulse on the detection of flame. Sensitivity to detect flame can be adjusted using the onboard potentiometer on the flame sensor module. You can also use A0 pin which will give analog output instead of high or low.
from machine import Pin import utime flame_sensor = Pin(16, Pin.IN) utime.sleep(2) while True: if flame_sensor.value() == 1: print("Flame Detected") utime.sleep(3) else: print("No Flame") utime.sleep(1) utime.sleep(0.1)
Raspberry pi pico projects, pico projects, flame sensor with pico, flame sensor with raspberry pi pico, pico rp2040 projects, Rpi pico projects
0 Comments