USA warehouse now open. Our USA warehouse is now open! Low cost shipping and an ever growing variety make ordering from the US warehouse even better value!
Both this, the temp/humid sensor and the light sensor seem to be analog sensors with an adjustable gain opamp. Would help if hobby king gave some actual specs such as amount of gain, analog voltage ranges, etc.
The wavelength of this is in the NIR (near infra-red) range, so the actual detector is apparently a NIR photo-diode. Use 2, directed maybe 45 degrees away from each other, and you can program a robot that steers to the hottest spot.
Found the following code used to make it work. Developer:
Akbar (Shahab) F. Moghaddam
20.05.12
Comment : I assume this component uses Infrared and should be in direct sight to detect flame. This would work easily on big flames but for a match flame (very small), it could miss it.
*/
//CONSTANTS
const int pinD0 = 0*
const int pinA0 = 1*
//VARIABLE
int A = -999*
int D = -999*
int readVal = 0*
boolean logging = false*
boolean fire = false*
boolean changed = true*
void setup() {
// initialize the digital pin as an output.
// Pin 13 has an LED connected on most Arduino boards:
pinMode(13, OUTPUT)*
pinMode(0, INPUT)*
pinMode(1, INPUT)*
Serial.begin(19200)*
}
void loop() {
initialAll()*
readValues()*
loggingProcess()*
if (changed)
printState()*
delay(1000)*// wait for a second
}
void initialAll(){
readVal = 0*
}
void readValues(){
A = analogRead(pinA0)*
D = analogRead(pinD0)*
fireCheck()*
if (Serial.available()>0){
readVal = Serial.read()*
}
}
void loggingProcess(){
if (readVal == 'l'){
if (logging)
logging = false*
else
logging = true*
}
if (logging){
Serial.println("************")*
Serial.println("SYUMMARY")*
Serial.print("A0:")*
Serial.println(A)*
Serial.print("D0:")*
Serial.println(D)*
Serial.println("************")*
}
}
void printState(){
if (fire){
Serial.println("************")*
Serial.println("FLAME Detected")*
Serial.println("************")*
}
else{
Serial.println("************")*
Serial.println("NO FLAME")*
Serial.println("************")*
}
changed = !changed*
}
void fireCheck(){
if (A < 350 && D < 350){
fire = true*
changed = !changed*
}
else{
fire = false*
changed = !changed*
}
}
Copyright 2012 Hextronik Limited.
The HobbyKing.com®, OrangeRx, Turnigy, Durafly, nano-tech and other brand logos and names are trademarks of hexTronik Limited.
All rights reserved