Contents
- 1 Introduction
- 2 MLX90614 Infrared Thermometer
- 3 Hardware Overview of infrared Temperature Sensor(MLX90614)
- 4 PCB Manufacturer
- 5 Make Own MLX90614 Infrared Thermometer Module
- 6 Block Diagram of MLX90614 sensor
- 7 The distance between the Sensor and the Object
- 8 Pin Configuration of MLX90614
- 9 Interfacing Infrared Temperature Sensor with Arduino
- 10 Adding MLX90614 Library To Arduino IDE
- 11 Source code / Programming of Infrared Temperature Sensor with Arduino
- 12 Youtube Video
Introduction
In this article, We will interface non-contact infrared temperature sensor with Arduino. We all are very much familiar with the normal temperature sensors like DHT11, LM35 and DS18B20. All of the mentioned temperature sensors require physical contact with the object which temperature is to be measured. With the progress of technology, the method of measuring temperature has undergone changes. The conventional method of physically contacting an object to measure its temperature is no longer the only option. As a result, there emerged a requirement for measuring temperature without direct contact, leading to the development of infrared sensors for temperature measurement.
Infrared thermometers operate by utilizing the concept of black body radiation. When an object is at a temperature above absolute zero, its molecules are in constant motion, and the higher the temperature, the faster they move. During this movement, the molecules emit infrared radiation, which is a type of electromagnetic radiation that falls below the visible spectrum of light. As the temperature of the object increases, it emits more and more infrared radiation and can even emit visible light, such as in the case of heated metal that glows red or white. Infrared thermometers detect and measure this radiation to determine the temperature of the object being measured.
There may be certain situations where using a temperature sensor that requires physical contact with the object, such as the DS18B20, may not be feasible or practical. In such cases, one can opt for a contactless temperature sensor like the MLX90614. This sensor is capable of measuring two temperatures – the ambient temperature and the temperature of the object from a distance without needing to touch it.
In this project, we will connect our MLX90614 Non-Contact Infrared Temperature Sensor with Arduino and display the temperature reading in our serial monitor of Arduino IDE.
MLX90614 Infrared Thermometer
The MLX90614 is an infrared temperature sensor for non-contact temperature measurement. It can measure temperatures within the range of -70 to 380 degree Celsius with an accuracy of about 0.5C at room temperature.
Features of MLX90614 Infrared Thermometer
- Single and dual-zone versions
- Customizable PWM output for continuous reading
- Measurement resolution of 0.02°C
- Small size and low cost
- Factory calibrated in wide temperature range: -40 to 125°C for sensor temperature and -70 to 380°C for object temperature
- Available in 3V and 5V versions
- Easy to integrate
- High accuracy of 0.5°C over a wide temperature range (0..+50 C for both Ta and To)
- SMBus compatible digital interface for fast temperature readings and building sensor networks.
Hardware Overview of infrared Temperature Sensor(MLX90614)
The Melexis MLX90614 Module is centered around the MLX90614, a non-contact infrared temperature sensor with exceptional accuracy. Unlike many temperature sensors, this sensor does not require physical contact to measure temperature. This is particularly advantageous for temperature monitoring of moving objects, such as rotating motor shafts or items on a conveyor belt. By aiming the sensor at the target, it can detect the temperature by absorbing the infrared waves it emits
Capabilities
The MLX90614 sensor provides two temperature readings: object temperature and ambient temperature. Object temperature is measured non-contact, while ambient temperature measures the temperature on the sensor die. While ambient temperature can be useful for calibration purposes, the focus is on the object temperature measurement. Because it doesn’t require physical contact, it can measure a wider range of temperatures than most digital sensors, with object temperature ranging from -70 to 382.2°C and ambient temperature ranging from -40 to 125°C. Both object and ambient temperatures have a resolution of 0.02°C and standard accuracy of 0.5°C at room temperature.
Built-In Optical Filter
The MLX90614 sensor comes equipped with an optical filter that blocks visible and near-infrared light, minimizing their impact on temperature measurements. Additionally, the filter provides protection against interference from ambient light and sunlight.
Power Requirement
DATASHEET
The Melexis MLX90614 Module includes a 662K 3.3V precision voltage regulator and voltage level translator, making it compatible with both 3.3V and 5V microcontrollers. The MLX90614 sensor requires less than 2mA during measurement, which results in low power consumption, making it suitable for use in battery-powered devices like handheld thermal scanners.
Here are the complete specifications:
Object temperature | -70°C to 382.2°C |
Ambient temperature | -40°C to 85°C |
Accuracy | ±0.5°C (around room temperatures) |
Resolution | ±0.2°C |
Field of view | 90° |
Supply voltage | 3.3 to 5.5V |
Operating Current | 2mA |
If you want to know detail about MLX90614 . Click in the datasheet below
PCB Manufacturer
PCBWAY is a highly skilled company specializing in PCB manufacturing. They offer their services at incredibly low prices, such as providing 10 PCBs for only $5. Additionally, new members receive a $5 bonus. The website allows customers to upload their Gerber Files and place orders.
PCBWAY is known for producing PCBs of exceptional quality and maintaining high standards, which is why many people trust them for their PCB and PCBA needs.
Below are some of my PCB’S manufactured by PCBWAY and I am fully satisfied by their Quality of service they provide.
Make Own MLX90614 Infrared Thermometer Module
I have included the Design File (Geber , BOM ) in the article itself. You can just download it and order from your PCB manufacturer.
Bill Of Materials
I have already uploaded all these required manufacturing files in PCBWAY website. You can easily go to the below link and place you order, and get your own Own MLX90614 Infrared Thermometer Module manufactured from one of the best pcb manufacturer PCBWAY.
Block Diagram of MLX90614 sensor
Signal processing principle
The MLX90614 has an internal state machine that controls the measurement and calculation of both object and ambient temperatures. The sensor can support two infrared sensors, but only one is implemented in the MLX90614xAx. The output of the sensor is amplified by a low-noise, low-offset chopper amplifier with programmable gain and then converted by a Sigma Delta modulator into a single bit stream. The signal is then processed by programmable FIR and IIR low pass filters to achieve the desired noise performance and refresh rate. The output of the IIR filter is the measurement result and is available in the internal RAM.
The ambient temperature and object temperatures are calculated based on the measurement results and have a resolution of 0.01°C. The data can be read in two ways: either by reading RAM cells via the 2-wire interface or through the PWM digital output. The measured temperatures are then rescaled to the desired output resolution of the PWM and loaded into the registers of the PWM state machine, which creates a constant frequency with a duty cycle representing the measured data.
An infrared thermometer works by focusing the IR radiation emitted by an object or human onto a Thermo pile, which generates an electrical signal proportional to the amount of infrared energy detected in its field-of-view (FOV). This signal is then picked up by the ASSP’s 17-bit ADC and processed before being passed on to the microcontroller. This entire process is incredibly fast, taking only a fraction of a second to complete.
Working Principle
The MLX90614 is an infrared temperature sensor that can measure temperature without contact with the object being measured. It works based on the Stefan-Boltzmann principle, which states that all objects emit infrared radiation that is proportional to their temperature. The sensor uses a thermopile detector to collect the infrared radiation in its field of view, which can differ depending on the specific version of the sensor being used. The analog signals collected by the thermopile are then processed by an application-specific signal processing unit, which filters and amplifies the signals. The resulting digital signal is then transmitted through the I2C bus to a microcontroller for further analysis and use.
The distance between the Sensor and the Object
The datasheet doesn’t provide information about the distance between the object and the sensor. This distance is known as Field of View (FOV), and for this particular sensor, it has an FOV of approximately 90 degrees.
The field-of-view (FOV) of an infrared (IR) thermometer is a crucial metric to consider. It is calculated based on the sensor’s sensitivity to thermal radiation at a specific angle. As a result, the sensor can detect all objects within its field-of-view and provide an average temperature reading for all objects within it.
For accurate measurements, it’s crucial that the object being measured fully occupies the field-of-view of the sensor. If the object doesn’t completely fill the field-of-view, the sensor may detect other objects that are not intended to be measured, leading to inaccurate readings.
The field-of-view also determines the correlation between the object’s distance and the sensing area of the sensor. When the sensor is close to the object, its sensing area is narrow, and it becomes wider as it moves farther away.
The MLX90614’s field-of-view is cone-shaped and relatively broad, measuring 90 degrees. This implies that for every 1cm of distance from an object, the sensing area of the sensor expands by 2cm. For instance, if you are standing 30cm away from an object, the sensing area will be 60cm (about 2 feet) wide.
Pin Configuration of MLX90614
VCC | Positive power supply pin |
GND | Reference potential pin |
SCL | Open drain Serial Clock pin. An I2C line clock pulses pin for data synchronization. |
SDA | Open drain Serial Data pin. An I2C line to communicate data to the host MCU. |
Interfacing Infrared Temperature Sensor with Arduino
Bill of Materials
SN | COMPONENTS NAME | DESCRIPTION | QUANTITY | Amazon Link | AliExpress Link |
---|---|---|---|---|---|
1 | Arduino Nano Board | microcontroller | 1 | https://amzn.to/3EBaQFT | |
2 | Connecting wires | jumper wire | some | https://amzn.to/3tX7PLl | |
3 | Breadboard | Normal | 1 | https://amzn.to/3Vlefzw | |
4 | MLX90614 | Infrared tem sensor | 1 | https://amzn.to/3ZqdTtl |
Introduction
To connect the MLX90614 module to an Arduino board, first connect the VCC pin of the module to the power supply. The voltage should match the logic voltage of the microcontroller, which is typically 5V for most Arduinos. Next, connect the GND pin to the common ground.
Then, connect the SCL pin of the module to the I2C clock pin of the Arduino board and the SDA pin of the module to the I2C data pin of the Arduino board. It’s important to note that the specific I2C pins on the Arduino board will vary depending on the board’s layout. For example, on Arduino boards with the R3 layout, the SDA and SCL pins are located near the AREF pin and are labeled as A4 and A5, respectively.
The wiring diagram below shows the connections between the MLX90614 module and an Arduino board.
Adding MLX90614 Library To Arduino IDE
There are multiple libraries available for the MLX90614 sensor, but for our example, we’ll be using the Adafruit library. This library is straightforward to use, but it only provides basic temperature measurement and doesn’t support the advanced features of the sensor. To download the library, you can go to the Arduino IDE Library Manager, which can be accessed through the Sketch menu. From there, click on “Include Library” and then “Manage Libraries.” This will prompt the Library Manager to download the library index and update the list of installed libraries.
Filter your search by typing mlx90614‘. Click on the entry, and then select the latest version and Install.
Source code / Programming of Infrared Temperature Sensor with Arduino
The following is a simple Arduino code that enables you to test the functionality of the MLX90614 sensor. You can upload this code to your Arduino board. After that, you’ll be able to see the temperature readings for the ambient and object temperatures on the serial interface.
#include <Adafruit_MLX90614.h>
Adafruit_MLX90614 mlx = Adafruit_MLX90614();
void setup() {
Serial.begin(9600);
while (!Serial);
if (!mlx.begin()) {
Serial.println("Error connecting to MLX sensor. Check wiring.");
while (1);
};
}
void loop() {
Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempC());
Serial.print("*C\tObject = "); Serial.print(mlx.readObjectTempC()); Serial.println("*C");
Serial.print("Ambient = "); Serial.print(mlx.readAmbientTempF());
Serial.print("*F\tObject = "); Serial.print(mlx.readObjectTempF()); Serial.println("*F");
Serial.println();
delay(500);
}
After uploading the sketch to your Arduino, open the serial monitor, and ensure the baud rate is set to 9600 bps. Once you’ve done that, you’ll start receiving real-time readings of both the ambient and object temperatures on the serial monitor.
Manufacturing Files of the Project
If you are lazy for wiring this project. You can download the Gerber file below and order your PCB