This Flame Sensor can be used to detect fire source or other light sources of the wave length in the range of 760nm – 1100 nm. It is based on the YG1006 sensor which is a high speed and high sensitive NPN silicon phototransistor. Due to its black epoxy, the sensor is sensitive to infrared radiation. In fire fighting robot game, the sensor plays a very important role, it can be used as a robot eyes to find the fire source.
When detected the flame the Signal LED will on and the D0 output LOW voltage level.
Features
- High Photo Sensitivity
- Fast Response Time
- Sensitivity adjustable
Specification
- Working voltage: 3.3v-5v
- Detect range: 60 degrees
- Digital/Analog output
- On-board LM393 chip
- Dimension of the board: 3.2cm x 1.4cm
شرح باللغة عربية
Simple 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 |
/* Flame Sensor analog example. To test view the output, point a serial monitor such as Putty at your arduino. */ // lowest and highest sensor readings: const int sensorMin = 0; // sensor minimum const int sensorMax = 1024; // sensor maximum void setup() { // initialize serial communication @ 9600 baud: Serial.begin(9600); } void loop() { // read the sensor on analog A0: int sensorReading = analogRead(A0); // map the sensor range (four options): // ex: 'long int map(long int, long int, long int, long int, long int)' int range = map(sensorReading, sensorMin, sensorMax, 0, 3); // range value: switch (range) { case 0: // A fire closer than 1.5 feet away. Serial.println("** Close Fire **"); break; case 1: // A fire between 1-3 feet away. Serial.println("** Distant Fire **"); break; case 2: // No fire detected. Serial.println("No Fire"); break; } delay(1); // delay between reads } |
Reviews
There are no reviews yet.