Skip to main content
Skip table of contents

IR Temperature Sensor (MLX90614)

This example script collects temperature data from the MLX90614 infrared temperature sensor available through Adafruit, SparkFun, Keyestudio, or Pololu.

The data obtained from the non-contact temperature sensor is published to the registers:

  • USER_RAM0_F32 (Ambient temperature)

  • USER_RAM1_F32 (Object Temperature)

These registers can accessed by any programs reading data from a T-Series device collecting this data.  This enables any logging or SCADA application to easily collect data from the MLX90614 temperature sensor without any additional complexities.

When getting started with this sensor, the datasheet for this sensor is important to read.  There are multiple online tutorials through SparkFun, Adafruit, and more that can serve as supplementary documents.  There is also a legacy app-note worth reading Melexis MLX90614 IR Temperature Sensor - I2C (App Note).  This sensor has multiple features that allow its slave address to be reprogrammed, enabling multiple IR sensors to exist on the same I2C bus.  It can also be enabled for PWM output (not utilized by this application).

Schematic & Hook-up

Below is a picture of the MLX90614 IR temperature sensor connected to a LabJack with 1.8kΩ resistors installed on a breadboard.

Below is a schematic of the MLX90614 IR Temperature sensor connected to an I2C master MCU.  Again, this example used 1.8kΩ resistors.

In this example, the MLX90614 IR Temperature sensor is connected to EIO6 and EIO7.  A 3.3V supply was not needed to properly control this sensor.  The VS could be 5V while the I/O lines were communicating with 3.3V logic.

Working Example with LJLogM

After configuring the below example script using Kipling, data can be collected using LJLogM.

Lua Script Example Code

https://github.com/labjack/labjack_kipling/tree/master/ljswitchboard-module_manager/lib/switchboard_modules/lua_script_debugger/premade_scripts/i2c/ir-temp-sensor-mlx90614.lua

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.