Home LCD Projects MLX90614 and OLED display example

MLX90614 and OLED display example

by shedboy71

In this example we will connect a MLX90614 to our ARduino and display the output on a 128 x 32 I2C OLED LCD display, you could use a different type of LCD or a bigger OLED variety but that is what we had at hand here

The MLX90614 is an Infra Red thermometer for non contact temperature measurements. Both the IR sensitive thermopile detector chip and the signal conditioning ASIC are integrated in the same TO-39 can.  Integrated into the MLX90614 are a low noise amplifier, 17-bit ADC and powerful DSP unit thus achieving high accuracy and resolution of the thermometer.

I used a module for MLX90614, see the links at the bottom but here is a picture of a typical one



Now both the OLED display and the MLX90614 are I2C devices and both require 3v3 and GND, so the wiring is pretty straightforward for this project. Here is a layout drawn up in fritzing to give you the general idea

MLX90614 and OLED_bb MLX90614 and OLED_bb


This example requires a couple of libraries, which make development a little easier. Both are from Adafruit and are the MLX90614 and SSD1306 libraries, using newer Arduino IDEs you can search for these but here are the links if you need to download them and manually import them

MLX90614 library

SSD1306 library

[codesyntax lang=”cpp”]

#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#include <stdint.h>
#include <Adafruit_MLX90614.h>

#define OLED_RESET 4

Adafruit_SSD1306 display(OLED_RESET);
Adafruit_MLX90614 mlx = Adafruit_MLX90614();

#if (SSD1306_LCDHEIGHT != 32)
#error("Height incorrect, please fix Adafruit_SSD1306.h!");

void setup()   
  Serial.println("Adafruit MLX90614 test");  
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);  // initialize with the I2C addr 0x3C (for the 128x32)

void loop() 
    // Clear the buffer.

  // text display tests
  display.print("Ambient: ");
  display.print(" c");
  display.print("Object: ");
  display.print(" c");






Now all going well you should see something like this on your OLED display

MLX90614 output

MLX90614 output



The sensor module costs about $10
MLX90614 Contactless Temperature Sensor Module For Arduino

You may also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More