Infrared Temperature Sensor - MLX90614




Introduction: Infrared Temperature Sensor - MLX90614

Infrared thermometers work based on a phenomenon called black body
radiation. Anything at a temperature above absolute zero has molecules inside of it moving around. The higher the temperature, the faster the molecules move. As they move, the molecules emit infrared radiation--a type of electromagnetic radiation below the visible spectrum of light. As they get hotter, they emit more infrared, and even start to emit visible light. That is why heated metal can glow red or even white. Infrared thermometers detect and measure this radiation.

For many reasons, sometimes I can't contact my temperature sensor (like DS18b20) with object, which temperature I want measure. I decided to buy this nice contactless temperature sensor - MLX90614, which measure 2 temperatures - ambient temperature and temperature of object on distance.


Step 1: BOM

Step 2: MLX90614


  • -40°C...+125 °C for ambient temperature
    -70°C...+380 ° C for object temperature.
  • High accuracy of 0.5°C in a wide temperature range (0°C...+50°C for both)
  • Measurement resolution of 0.02°C
  • I2C communication.
  • High (medical) accuracy calibration
  • When measuring the temperature, please maintain a measuring distance of 1 cm!

I think, this is good sensor for sense temperature for hot things, like cooking food or chips on motherboards. Also, it is good for cold, like ice cream. No contact with food make healthily sensing. And still you can use sensor for measure ambient temperature for weather station.

Step 3: Circuit

Circuit is simple, as sensor use I2C communication.

Connect Vin to 3.3 Volts or 5 Volts.

Connect GND to GND of Arduino.

Connect SDA to A4 on Arduino.

Connect SCL to A5 on Arduino.

Step 4: Code

Code is simple.

First, you need Adafruit library ( Open library folder, and unzip it.

In setup function, with mlx.begin() you initialized sensor.

In loop function, I use Serial monitor, for read ambient temperature, you use mls.readAmbientTempC()

for Contactless mlx.readObjectTempC().

If you want temperatures in Fahrenheit, just replace "C" with "F":

mls.readAmbientTempF() and mls.readAmbientTempF()

#include <Wire.h>
#include <Adafruit_MLX90614.h>
mlx = Adafruit_MLX90614(); void setup() { Serial.begin(9600); mlx.begin(); } void loop() { Serial.println("Temperature from MLX90614:"); Serial.print("Ambient: "); Serial.print(mlx.readAmbientTempC()); Serial.println(" °C"); Serial.print("Contactless: "); Serial.print(mlx.readObjectTempC()); Serial.println(" °C"); Serial.println(); delay(1000); }

Step 5: Measure

I try to measure temperature of ice cream. You can see negative values of temperature. Important thing is, measure not too close and not far. Also check, if sensor point to object.

Sensors Contest

Participated in the
Sensors Contest

Be the First to Share


    • Reclaimed Materials Contest

      Reclaimed Materials Contest
    • Paint Challenge

      Paint Challenge
    • Unusual Uses Contest

      Unusual Uses Contest



    1 year ago

    Very good info.Sir I wanted to adopt this project for hospital,would you suggest if this device could be helpful to track patient fever from 3 foot away

    Michal Choma
    Michal Choma

    Reply 1 year ago

    I dont know if it will work. That is about 1 meter.


    1 year ago

    Hi chief, Im trying to combine mlx90614 with st7789 display, but it doesn't seem to work. I can get the reading on serial print monitor but nothing on st7789.

    Michal Choma
    Michal Choma

    Reply 10 months ago

    i2c adress of display can be same as ic2 adres of sensor


    1 year ago

    Hi.. After making the project, I am getting lower temperature values on serial output. What could be the reason?

    Thank you


    11 months ago

    hi I was going to use this sensor to make a non-contact thermometer to take the temperature of people in this time of covid 19 is this the ideal sensor


    Question 1 year ago

    Thank you a lot. I am doing the same project with NodeMCU board. According to datasheet the sensor has a sleep mode. My question is how to active sleep mode with Arduino or we need hardware component to achieve sleep mode to save power.