Wednesday, June 15, 2016

KY-026 IR Based Flame Detector


The 3-pin module detects the infrared in the flame in the range 760 to 1100nm. Aiming a TV remote control at the sensor will also work. Digital pin DO produces high or low electric level signal output. There is no analog output on the module used here. Sensitivity is adjustable via the onboard blue potentiometer. This module also comes equipped with a power supply indicator lamp and a comparator output indicator lamp. When the a certain threshold is reached, the comparator lamp lights up.

In the circuit below, the Arduino pin 12 that acts as digital input is connected to the digital pin DO on the sensor. When flame is detected, the onboard green LED on Arduino will illuminate. Keep in mind that the output from the board used here is HIGH when no flame or infrared emission is detected.


int ledPin=13;
int sensorPin=12;
int val;

void setup() {
  pinMode(ledPin,OUTPUT);
  pinMode(sensorPin,INPUT);
}

void loop() {
  val=digitalRead(sensorPin);
  if(val==HIGH){
    digitalWrite(ledPin,LOW);
  }
  else{
    digitalWrite(ledPin,HIGH);
  }
  //delay(500);
}

No comments:

Post a Comment