DIY: a 5 Minutes Contactless OLED Thermometer With Arduino and MLX90614




Introduction: DIY: a 5 Minutes Contactless OLED Thermometer With Arduino and MLX90614

About: I am a dreamer, maker and an engineer making and sharing interesting projects here at Instructables. Follow me @ instagram: @the_gadget.boy

Hello, everyone ! Today I'm going to show you how to make a contactless OLED thermometer with Arduino UNO and Infrared temp sensor MLX90614 in 5 minutes. This project is very simple, it requires basic programming and electronic skills to make it.

Lets beging !

Step 1: Materials for the Project

To make your IR thermometer, you will need:

  1. MLX90614 IR contactless thermometer
  2. Arduino UNO board
  3. 2 x Resistors by 4.7 k
  4. 1 x Capacitor by 0.1 uF(100 nF)
  5. A breadboard and 9 jumpers

Step 2: Info About the Sensor


Melexis' MLX90614ESF-BAA is an infrared thermometer designed for non-contact temperature sensing. An internal 17-bit ADC and a powerful DSP contribute to the MLX90614’s high accuracy and resolution. It has a huge number of applications including body temperature measurment and movement detection.

The MLX90614 provides two methods of output: PWM and SMBus (i.e. TWI, I2C). The 10-bit PWM output provides a resolution of 0.14°C, while the TWI interface has a resolution of 0.02°C. The MLX90614 is factory calibrated in wide temperature ranges: -40 to 85°C for the ambient temperature and -70 to 382.2°C for the object temperature. The measured value is the average temperature of all objects in the Field Of View of the sensor. The MLX90614 offers a standard accuracy of 0.5°C around room temperatures. This devices comes in an industry standard TO-39 package. We’re carrying the 3V version of this sensor.


  • Small size, low cost
  • Easy to integrate
  • Factory calibrated in wide temperature range:-40 to +85°C for sensor temperature -70 to +380°C for object temperature
  • SMBus compatible digital interface
  • Customizable PWM output for continuous reading
  • High accuracy of 0.5°C over wide temperature range (0 to +50°C for both Ta and To)
  • Measurement resolution of 0.02°C
  • Single and dual zone versions
  • Simple adaptation for 8 to 16V applications
  • Power saving mode
  • Different package options for applications and measurements versatility
  • Automotive grade

- SparkFun Electonics

Step 3: Info About the OLED Display

The one I use is produced by Waveshare. Its 1.3″ inch in size, features 128×64 pixels and uses the 4-wire Serial Peripheral Interface Bus. It is monochrome blue in color also it consumes 0.04 W of energy which is one tenth that is required to run traditional 16x2 LCD display.

The OLED could be modified (soldering required) to communicate with different Bus, like a I2C or a 3-wire SPI, by moving one of the two resistors which can be found on the back of the display board. They are marked with 0s, check the pic above.

Changing the Bus from a 4-wire SPI to a I2C or a 3-wire SPI:

I2C - move BS1 resistor on 1 but keep BS0 on 0 as it is.

3-wire SPI - BS1 must be 0 and BS0 on 1

Step 4: Building the Thermometer

If your sensor is not on breakout board gonna need to pull-up the SDA and SCL pins of it, the put a capacitor between the GND and +3.3v pins. If its on breakout board then just connect the pins to the Arduino board, SDA with A5 and SCL with A4, GND to GND and +3.3 to 3.3v.

Then plug the OLED on the breadboard and connect the following pins together. DIN to pin 13; CLK to pin 11; CS to pin 10; D/C to pin 9 and RES to pin 8 with the rest of the jumpers. 13, 11, 10, 9 and 8 are the SPI Bus of Arduino UNO they are also the ICSP connector under the microcontroller.

Step 5: Programming the Arduino

This step is easy, just download one of the two .INO files, named IR_OLED_Fahrenhait(measures in F) and IR_OLED_Celsius (measures in C), and open it with the Arduino IDE then upload the code to the Arduino board.

If you don't like the current font you can change it simply by editing the code. You can find all supported fonts here.

If you don't have Arduino IDE click here to download it. Then install it.

Libraries you will need: MLX90614 and u8glib, download the libraries and then unzip them at /Program Files(x86)/Arduino/Libraries (default).

Step 6: You Are All Done, and Now You Have Your Own Contacless Thermometer

Bitcoin tips: 1Bfgrq4dQSuRHuTdk5jzZPtnMZLymDQ5dv

1 Person Made This Project!


  • Anything Goes Contest 2021

    Anything Goes Contest 2021
  • Jewelry Challenge

    Jewelry Challenge
  • Fix It Speed Challenge

    Fix It Speed Challenge



1 year ago

What if I use Arduino ROBOT LED screen can you give me som ide

THX 1138
THX 1138

2 years ago

Hi. What is the highest temperature this sensor can read? Can you recommend any sensors for reading even higher temperatures?


4 years ago

I'm just a little confused as to why your diagram and the picture does not match?

I'm on the fence as to buying a Rasberry Pi and taking on that learning curve. Do you have any experience with Rasberry Pi yet?

I have never worked with a board setup before with hardwary. I'm a advanced cnc programmer, manual g-code and Mastercam are a walk in the park for me. I could just purchase this Arduino UNO board and keep it simple.

Thank you for sharing this! I ordered the IR sensor on Ebay and will start getting the other peices once I make my full mind up. I'm working on a prototype piece of equipment where this IR piece will be needed. The Rasberry Pi could replace a whole PLC/HMI interface I was about to order...


5 years ago

You are using a 3.3V IR sensor, but you have not put in any components to protect the sensor from 5V on the I2C bus. Is this safe?


5 years ago

Hi - nice stuff. You made no mention of the display details in your ibble...