Each body with a temperature above the absolute zero emits an electromagnetic radiation, which is proportional to its intrinsic temperature. A part of this intrinsic radiation is infrared radiation, which can be used to measure a body’s temperature. The devices that measures infrared electromagnetic radiation and converts it to the temperature are so-called non-contact thermometers.
History
Infrared radiation is discovered in 1800 by the German scientist Sir Frederick William Herschel. He directed sunlight through a glass prism to create a spectrum and then measured the temperature of each color. As he measured the individual temperatures of the violet, blue, green, yellow, orange, and red light, he noticed that all of the colors had temperatures higher than the controls and that the temperatures of the colors increased from the violet to the red part of the spectrum. He decided to measure temperature just beyond the red portion of the spectrum in a region where no sunlight was visible and found that this region had the highest temperature of all. What Herschel had discovered was a form of light beyond red light, now known as infrared radiation.
Infrared detectors
The most important element in each infrared thermometer is the radiation receiver, also called detector. There are 2 main groups of infrared detectors :
- Thermal detectors
- Quantum detectors
Thermal detectors uses the sensitive element which temperature varies depend on absorption of electromagnetic radiation. This leads to a modified property of the detector which represents the temperature. This modified property can be electrically analysed and used as a standard for the absorbed energy. This type of detectors can be divided to :
- Thermopile detector
- Pyroelectrical detector
- Bolometer FPA
Thermopile detector stands for the joint between two wires of different metallic material heats up, the thermo-electrical effect results in an electrical voltage proportional to a local temperature difference. Our IrThermo click works exactly like this.
Pyroelectrical detector have sensitive element consists of pyroelectric material with two electrodes. The absorbed infrared radiation results in a changed temperature of the sensitive element which leads to a changed surface loading due to the pyroelectric effect.
Bolometers use the temperature dependency of the electric resistance. The sensitive element consists of a resistor, which changes when it absorbs heat. The change in resistance leads to a changed signal voltage.
Difference between quantum detectors and thermal detectors is their faster reaction on absorbed radiation. The mode of operation of quantum detectors is based on the photo effect. The striking photons of the infrared radiation lead to an increase of the electrons into a higher energy level inside the semiconductor material. When the electrons fall back an electric signal (voltage or power) is generated. Also a change of the electric resistance is possible. These signals can be analysed in an exact way.
Emissivity
The emissivity stands for the relation of thermal radiations, which are generated by a grey and a black body at the same temperature. The maximum emissivity for the black body is 1. A grey body is an object, which has the same emissivity at all wavelengths and emits less infrared radiation than a black radiator (ε < 1).
The emissivity depends on the material, its surface, temperature, wavelength and sometimes on the measuring arrangement.
Metallic materials show a low emissivity, which strongly depends on the surface consistency and which drop in higher wavelengths, so the shortest possible wavelength should be used, as the measuring error increases in correlation to the wavelength.
Transmissivities of plastics vary with the wavelength. They react inversely proportional to the thickness, whereas thin materials are more transmissitive than thick plastics. Optimal measurements can be carried out with wavelengths, where transmissivity is almost zero independent from the thickness.
Glass temperature measurement implies that you take care of reflection and transmissivity. A careful selection of the wavelength facilitates measurements of the glass surface as well as of the deeper layers of the glass.
Applications
Non-contact temperature measurement with infrared thermometers is a qualified method of controlling, monitoring and managing process temperatures and of preventive maintenance of machines and facilities.
New products apply a technology which uses two-lens optics. Similar to digital cameras, the inner lens position can be switched digitally into focusing onto very small spot sizes. The result is a very small spot size, but only at a constant distance. If the distance grows smaller or longer between measuring spot and infrared thermometer, the measuring spot increases in size. The infrared thermometers are also designed for applications under difficult industrial conditions. They might be used inside and outside, in sun and rain, in unsteady temperature conditions.
Main usage of infrared thermometers could be :
- Temperature measurements of moving machines and facilities, electrical connections of engines and of objects in hazardous surroundings
- Detection of loose connection joints
- Localization of hidden failures in cable channels
- Inspection of fuses and circuit breakers
- Monitoring the low and medium voltage facilities
- Detection of one-sided overload and unbalanced energy distribution
- Checking transformers and small components
Online infrared temperature sensors are applicable for quality management purposes in production lines. In addition to the non-contact temperature measurement and the display of the results the user is able to control and manage the process temperatures. The wide range of possibilities to adjust infrared sensors to the measuring task allows an easy upgrade in existing production facilities as well as in the long-term planned equipment in cooperation with OEM customers in the machine construction industry.
Example
We are offering IrThermo and IrThermo2 click boards as solution for your own development. Both of them are thermopile type of sensor. Currently we providing well commented source code with example that can be used as a start point for your library or your own application. You can download it from Libstock or from our GIT repository.
https://github.com/MikroElektronika/Click_IrThermo_MLX90614
This simple example for ARM architecture
#include "resources.h" /* Ir Termo click constants ****************************/ const int _ir_thermo_addr = 0x5A; const int _amb_temp = 0x06; const int _obj_temp = 0x07; const int _fahrenheit = 0x01; const int _celsius = 0x02; /* Globals ***********/ float temp; char temp_format; unsigned int x_coord, y_coord; char counter; const int pressed_color = 0xE71C; /* Button declarations ***********************/ typedef struct Button { unsigned int x1; unsigned int y1; unsigned int x2; unsigned int y2; }button_t; button_t button1 = { 170, 150, 220, 185 }; button_t button2 = { 240, 150, 290, 185 }; /* Draw Screen ***************/ void draw_screen() { TFT_Fill_Screen( CL_WHITE ); TFT_Set_Pen( CL_Black, 1 ); TFT_Line( 20, 220, 300, 220 ); TFT_LIne( 20, 46, 300, 46 ); TFT_Set_Font( &HandelGothic_BT21x22_Regular, CL_RED, FO_HORIZONTAL ); TFT_Write_Text( "IrThermo click", 75, 14 ); TFT_Set_Font( &Verdana12x13_Regular, CL_BLACK, FO_HORIZONTAL ); TFT_Write_Text( "EasyMX PRO for Stellaris", 19, 223 ); TFT_Set_Font( &Verdana12x13_Regular, CL_RED, FO_HORIZONTAL ); TFT_Write_Text( "www.mikroe.com", 200, 223 ); TFT_Set_Font( &TFT_defaultFont, CL_BLACK, FO_HORIZONTAL ); TFT_Set_Font( &TFT_FontR, CL_BLACK, FO_HORIZONTAL ); TFT_Set_Font( &Verdana12x13_Regular, CL_BLACK, FO_HORIZONTAL ); TFT_Write_Text( "Ambient", 70, 75 ); TFT_Set_Font( &HandelGothic_BT21x22_Regular, CL_BLACK, FO_HORIZONTAL ); TFT_Write_Text( "Target", 70, 100 ); TFT_Set_Font( &TFT_FontR, CL_BLACK, FO_HORIZONTAL ); TFT_Set_Pen( CL_BLACK, 1 ); TFT_Rectangle_Round_Edges( button1.x1, button1.y1, button1.x2, button1.y2, 5 ); TFT_Set_Brush( 1, pressed_color, 0, 0, 0, 0 ); TFT_Rectangle_Round_Edges( button2.x1, button2.y1, button2.x2, button2.y2, 5 ); TFT_Set_Font( &Tahoma30x34, CL_BLACK, FO_HORIZONTAL ); TFT_Write_Text( " °F", button1.x1 + 5, button1.y1 ); TFT_Write_Text( " °C", button2.x1 + 5, button2.y1 ); } /* Init function *****************/ void init_mcu() { TFT_Init( 320, 240 ); Delay_ms( 150 ); TFT_Set_Font( &TFT_FontR,CL_BLACK, FO_HORIZONTAL ); Delay_ms( 100 ); GPIO_Digital_Output( &GPIO_PORTA, _GPIO_PINMASK_3 ); TFT_BLED = 1; draw_screen(); ADC_Set_Input_Channel( _ADC_CHANNEL_10 | _ADC_CHANNEL_11 ); ADC0_Init_Advanced( _ADC_EXTERNAL_REF ); // Initialize touch panel TP_TFT_Init( 320, 240, 11, 10 ); // Set touch panel ADC threshold TP_TFT_Set_ADC_Threshold( 800 ); // Set calibration constants TP_TFT_Set_Calibration_Consts( 69, 925, 64, 917 ); // Initialize I2C bus for communication with IrThermo I2C0_Init_Advanced( 100000, &_GPIO_MODULE_I2C0_B23 ); } /***************************************************************************** * Function : read_sensor( char temp_source ) * ---------------------------------------------------------------------------- * Overview: Function Reads Ir Termo sensor via I2C interface * Input: Temp_Source 0x06 for Ambient temperature * 0x07 for Target temperature * Output: Value that's proportional to Temperature in Kelvin degrees *****************************************************************************/ float read_sensor( char temp_source ) { unsigned char temp_var[ 2 ]; // Set Slave address for writing I2C0_Master_Slave_Addr_Set( _ir_thermo_addr, _I2C_DIR_MASTER_TRANSMIT ); // Write proper address for reading I2C0_Write( temp_source, _I2C_MASTER_MODE_BURST_SEND_START ); // Set Slave address for rading I2C0_Master_Slave_Addr_Set( _ir_thermo_addr, _I2C_DIR_MASTER_RECEIVE ); // Issue repeated start signal I2C0_MCS |= ( 0x0000000F & _I2C_MASTER_MODE_BURST_RECEIVE_START ); // Wait while the module is busy while( I2C_MCS_BUSY_bit ); // Read first byte from the slave temp_var[ 0 ] = I2C0_MDR; // Read last byte from the slave I2C0_Read( &temp_var[1], _I2C_MASTER_MODE_BURST_RECEIVE_FINISH ); return ( ( temp_var[ 1 ] << 8 ) + temp_var[ 0 ] ); } /***************************************************************************** * Function : display_temperature( char temp_source, float temperature ) * ---------------------------------------------------------------------------- * Overview: Function Displays temperature on LCD * Input: Temp_Source 0x06 for Ambient temperature * 0x07 for Target temperature * temperature value of temperature that will be written on LCD * Output: Nothing *****************************************************************************/ void display_temperature( char temp_source, float temperature ) { char text[ 40 ]; // Convert temperature into string FloatToStr( temperature, text ); // Display it with only two decimals if( text[ 1 ] == '.' ) text[ 4 ] = 0; if( text[ 2 ] == '.' ) text[ 5 ] = 0; if( text[ 3 ] == '.' ) text[ 6 ] = 0; if( text[ 4 ] == '.' ) text[ 7 ] = 0; TFT_Set_Pen( CL_WHITE, 1 ); TFT_Set_Brush( 1, CL_WHITE, 0, 0, 0, 0 ); if ( temp_source == _amb_temp ) { TFT_Set_Font( &Digital711x21_Regular, CL_BLACK, FO_HORIZONTAL ); TFT_Rectangle( 180, 75, 220, 95 ); TFT_Write_Text( text, 180, 75 ); } if ( temp_source == _obj_temp ) { TFT_Set_Font( &Digital723x40, CL_BLACK, FO_HORIZONTAL ); TFT_Rectangle( 180, 100, 270, 135 ); TFT_Write_Text( text, 180, 100 ); } } /***************************************************************************** * Function : read_temperature( char source ) * ---------------------------------------------------------------------------- * Overview: Function Reads Ir Termo sensor and converts result into degrees * Input: Temp_Source 0x06 for Ambient temperature * 0x07 for Target temperature * Output: Value in Celsius or fahrenheit degrees *****************************************************************************/ float read_temperature( char source ) { float temperatue; // Read Ambient temperature temperatue = read_sensor( source ); if ( temp_format == _fahrenheit ) { // Convert result in FAHRENHEIT degrees temperatue = ( ( temperatue * 0.02 ) - 273.15 ) * 9.0/5 + 32; } else if ( temp_format == _celsius ) { // Convert result in Celsius degrees temperatue = ( temperatue * 0.02 ) - 273.15; } else { temperatue = 0; } return temperatue; } /***************************************************************************** * Main function *****************************************************************************/ void main() { init_mcu(); temp_format = 2; counter = 200; while ( 1 ) { // process pressed buttons if ( TP_TFT_Press_Detect() ) { if ( TP_TFT_Get_Coordinates( &x_coord, &y_coord ) == 0 ) { // button1 if ( ( x_coord > button1.x1 ) && ( x_coord < button1.x2 ) && ( y_coord > button1.y1 ) && ( y_coord < button1.y2 ) ) { if ( temp_format == 2 ) { temp_format = 1; TFT_Set_Pen( CL_BLACK, 1 ); TFT_Set_Brush( 1, CL_WHITE, 0, 0, 0, 0 ); TFT_Rectangle_Round_Edges( button2.x1, button2.y1, button2.x2, button2.y2, 5 ); TFT_Set_Brush( 1, pressed_color, 0, 0, 0, 0 ); TFT_Rectangle_Round_Edges( button1.x1, button1.y1, button1.x2, button1.y2, 5 ); TFT_Set_Font( &Tahoma30x34, CL_BLACK, FO_HORIZONTAL ); TFT_Write_Text( " °F", button1.x1 + 5, button1.y1 ); TFT_Write_Text( " °C", button2.x1 + 5, button2.y1 ); } } else if ( ( x_coord > button2.x1 ) && ( x_coord < button2.x2 ) && ( y_coord > button2.y1 ) && ( y_coord < button2.y2 ) ) { if ( temp_format == 1 ) { temp_format = 2; TFT_Set_Pen( CL_BLACK, 1 ); TFT_Set_Brush( 1, CL_WHITE, 0, 0, 0, 0 ); TFT_Rectangle_Round_Edges( button1.x1, button1.y1, button1.x2, button1.y2, 5 ); TFT_Set_Brush( 1, pressed_color, 0, 0, 0, 0 ); TFT_Rectangle_Round_Edges( button2.x1, button2.y1, button2.x2, button2.y2, 5 ); TFT_Set_Font( &Tahoma30x34, CL_BLACK, FO_HORIZONTAL ); TFT_Write_Text( " °F", button1.x1 + 5, button1.y1 ); TFT_Write_Text( " °C", button2.x1 + 5, button2.y1 ); } } } } if ( counter > 150 ) { temp = read_temperature( _amb_temp ; // Display result display_temperature( _amb_temp, temp ); // Read Ambient temperature temp = read_temperature( _obj_temp ); // Display result display_temperature( _obj_temp, temp ); counter = 0; } else { counter ++; } Delay_ms( 2 ); } }
References
William Herschel Wikipedia 2016
Thermopile Wikipedia 2016
Pyroelectricity Wikipedia 2016
Bolometer Wikipedia 2016
Emissivity Wikipedia 2016
Libstock IrThermo Example 2016
GITHub Source for IrThermo Example 2016