Infrared Temperature Sensor



Infrared (IR) temperature sensor is used to measure an object’s temperature without contacting it. 
The GY-906 is a kind of low-cost IR thermometer sensor which is perfectly suitable for use with Arduino .
This project demonstrates how to connect with Arduino UNO and run simple code to read temperature.


GY-906 specifications in brief :-

Sensor temperature range: -40 ~ 125 degree C
Object temperature range: -70 ~ 380 degree C
Power supply : 3V - 5V DC





Hardware required:

1. Arduino UNO
2. Sensor infrared thermometer GY-906
3. Some connected cables



SAMPLE CODE


#include <Wire.h>
#include <Adafruit_MLX90614.h>
 
Adafruit_MLX90614 mlx = Adafruit_MLX90614();
 
void setup()
{
  Serial.begin(9600);
  mlx.begin();
}
 
void loop()
{
  Serial.print("Ambient = ");
  Serial.print(mlx.readAmbientTempC());
  Serial.print("*C\tObject = ");
  Serial.print(mlx.readObjectTempC());
  Serial.println("*C");
 
  Serial.println();
  delay(1000);

}


Remember that, before compiling the code, library for this sensor should be installed 
as shown below :-