So i want to make a fire fighting robot. But im currently stuck on how the robot will detect fire.
So my idea was that the robot will guard a specific area and then every 10 seconds it will turn 360 degrees at which time it will search for fire.
HOW will i be able to get the temperature values while the robot is turning ? I want both of my robot to turn and read temperature processes running at the SAME TIME.
This is my idea of a pseudo code:
if (timer>10seconds) {
MOVE.LEFT(360);
if ( irTemperature > 50 || ambientTemperature > 50) {
STOP();
...................
}
}
Would this be a solution instead of MOVE.LEFT(360):
for (int i=0; i<360; i++)
{
MOVE.LEFT(1);
//read temperature
}
For the temperature readings to make sense in your application, the robot needs to "know" where it is pointing (or the temperature sensor is pointing), and those temperature sensors are quite slow with a 1 second response time. So, your last proposal is the way to go.
Something like rotate 30 degree increments, stop and read temp would be probably be OK because the temperature sensor detects the average temperature of its entire field of view. According to the docs on your sensor, the ratio of the detection spot size to the detection distance is about 1 (corresponding to a field of view of about 110 degrees), so your chance of detecting fire decreases pretty dramatically with distance. You cannot reduce the sensor's field of view with a shield, as its temperature will be measured too.
Have a look at the Melexis MLX90614 IR sensor. Its factory default settling tiime is 100 ms. I have run it at 200 ms between readings, and it works fine. They are relatively inexpensive. I picked one up for about $15 - 20 US or so.
I would be more inclined to use a servo (regular radio control servo) instead of moving the entire robot, and would go with the move through a short arc, take reading, move, etc. The end result will be about the same speed as taking readings while moving the servo, but will be a lot easier to decide which direction your sensor is facing. With the Melexis part, you can get different angles of view. I think the one I use is about 30 degrees, and it takes the average of temperatures in the field of view. You can then step your servo in larger angle increments, and if you find a hot spot, can hunt each side to narrow in on a direction.
The "flame" detector of the previous post detects short wave IR (700 - 1100 nm) as opposed to the temperature sensor, which detects long wave IR (5-14 micrometers). So the detection principle is pretty much the same, just different wavelengths. The IR diodes would be a lot faster and their field of view narrower, but are there any reviews of their performance as "flame" detectors? Obviously, they would be confused by bright sunlight.
Thank for your posts, as my deadline for my project approaches i will have to work with what i got;
So the TN9 is my only option for now, maybe later i can use that flame sensor you posted.
Since the TN9 can only send ir-temp values every 1000ms/1 sec. I will have to work on the code itself.
My idea of doing this as i previously mentioned will be,
while (degrees!=360) {
degrees=degrees+60; //Maybe 30, but that will slow down the process of finding fire by 12 seconds in total;
//Get Temperature
MOVE.LEFT(60);
}
So 6 seconds for the robot to find fire in my opinion is still quiet slow. But the sensor itself is slow, and most importantly it's distance is limited.