This is the Flame detection sensor its detect 60 degree angle spectral sensitivity of 720-1100nm. The spectral sensitivity of this sensor is optimized to detect emissions from naked flames. The output signal DO is pulled on a high state (active high) when a flame is detected. The switching threshold is adjustable via a preset adjustable POT. Analog for this sensor is available at pin A0 can be adjust to trigger on a specific values reads on analog.
These module use an infrared. It can detect infrared rays with wavelength mention above. A far infrared probe converts the strength charges of external infrared light into current charges then it converts analog quantities into digital. On this experiment we will used PIN D0 of the sensor to RPRI GPIO whether any flame exists. Just follow the schematics illustration below.
Required Components
- Raspberry Pi / Banana Pi / Orange Pi / Tinker Board (If your using Banana Pi, Orange Pi, Tinker Board See first the GPIO Pin-out’s)
- Flame Sensor Module
- Solder Less Bread Board
- Jumper Wire / DuPont Wire
Optional Output Indicator
- 220 Ohms Resistor
- LED 5mm / 3mm any color (Output Indicator)
Wiring Diagram
WiringPi C-Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# 14CORE Test Code for: Flame Detection Sensor # .:+osysso++:` # `+yhs/-` `-+s+` `:/+++++++++` .:/++ooo++/-` .ooooooooooo+: :///////////- # `odh/` `:y+` /ddhsooooooo+ /hddhsooooydddh sdddoooooosdddy` `////////////` # -hds` `sy. +ddy` .ddd: sddy.dddo +ddd- .-----------` # `hds :sssss/ -ossssso-yy` `hdd: oddy `ddd/oddd:......+dddo .++++++++++++ # +dd` :sdddh` :ydddddddo +y/ .ddd+........ `hddy:.....:yddy.hdddddddddddy+. ```````````` # ydy .hddd/+hdddhydddh/.+yo /hdddddddddd. :shddddddddhs/`+ddd:````-yddy- :ooooooooooo+ # odh` sdddooyyyyyhddddyy.sy+ ` `......... ``.... ....` ```...` ` `` `` ` # -dd+`::::` .:::- /yy. -oos+:-oos+--oos+: /o `+y o/: o:+/ h:`yos /+-`/+/+ s:y/y. # /dd/ `+yy: +//+ +/:+ +/:+ -. `/ -:o.:/:`//+- + +:- :`-+:`://: +`o`+. # -yds. `/yys- .`-.. .``` ```` .`` ` ` ``` ``-..` ` # :ydy/.`````.-/oyhs: `+++oo+oo+:.+-++/-/ooo+o +:o/oo///:+/ # .:oyhhhhhhhso:` `. ``` #!/usr/bin/env python import RPi.GPIO as GPIO ObstaclePin = 24 def setup(): GPIO.setmode(GPIO.BOARD) # Set GPIO by numbers GPIO.setup(ObstaclePin, GPIO.IN, pull_up_down=GPIO.PUD_UP) def loop(): while True: if (0 == GPIO.input(ObstaclePin)): print "14CORE | Flame detection sensor \n" print " DETECTED: Flame has been detected" def destroy(): GPIO.cleanup() # Release resource if __name__ == '__main__': # The Program start here setup() try: loop() except KeyboardInterrupt: # Control C is pressed, the child program destroy will be executed. destroy() |
Python Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
# 14CORE Test Code for: Flame Detection Sensor # .:+osysso++:` # `+yhs/-` `-+s+` `:/+++++++++` .:/++ooo++/-` .ooooooooooo+: :///////////- # `odh/` `:y+` /ddhsooooooo+ /hddhsooooydddh sdddoooooosdddy` `////////////` # -hds` `sy. +ddy` .ddd: sddy.dddo +ddd- .-----------` # `hds :sssss/ -ossssso-yy` `hdd: oddy `ddd/oddd:......+dddo .++++++++++++ # +dd` :sdddh` :ydddddddo +y/ .ddd+........ `hddy:.....:yddy.hdddddddddddy+. ```````````` # ydy .hddd/+hdddhydddh/.+yo /hdddddddddd. :shddddddddhs/`+ddd:````-yddy- :ooooooooooo+ # odh` sdddooyyyyyhddddyy.sy+ ` `......... ``.... ....` ```...` ` `` `` ` # -dd+`::::` .:::- /yy. -oos+:-oos+--oos+: /o `+y o/: o:+/ h:`yos /+-`/+/+ s:y/y. # /dd/ `+yy: +//+ +/:+ +/:+ -. `/ -:o.:/:`//+- + +:- :`-+:`://: +`o`+. # -yds. `/yys- .`-.. .``` ```` .`` ` ` ``` ``-..` ` # :ydy/.`````.-/oyhs: `+++oo+oo+:.+-++/-/ooo+o +:o/oo///:+/ # .:oyhhhhhhhso:` `. ``` #!/usr/bin/env python #!/usr/bin/env python import RPi.GPIO as GPIO import time FlamePin = 16 def init(): GPIO.setmode(GPIO.BOARD) GPIO.setup(FlamePin, GPIO.IN, pull_up_down=GPIO.PUD_UP) def myISR(ev=None): print "Flame is detected !" def loop(): GPIO.add_event_detect(FlamePin, GPIO.FALLING, callback=myISR) while True: pass if __name__ == '__main__': init() try: loop() except KeyboardInterrupt: print 'The end !' |