Cirkit Designer LogoCirkit DesignerYour all-in-one circuit design IDE Launch Cirkit Designer App

How to Use MLX90614: Examples, Pinouts, and Specs

Image of MLX90614Design with MLX90614 in Cirkit Designer

Introduction

The MLX90614 is a non-contact infrared thermometer designed to measure the temperature of objects without requiring direct physical contact. It operates by detecting infrared radiation emitted by objects and converting it into a temperature reading. This sensor is highly versatile and is widely used in applications such as medical thermometers, industrial temperature monitoring, HVAC systems, and automotive climate control.

The MLX90614 is particularly valued for its accuracy, ease of use, and ability to measure both object and ambient temperatures. Its digital interface makes it compatible with microcontrollers like Arduino, Raspberry Pi, and other embedded systems.

Explore Projects Built with MLX90614

Use Cirkit Designer to design, explore, and prototype these projects online. Some projects support real-time simulation. Click "Open Project" to start designing instantly!
Image of Arduino Mega 2560-Based Autonomous Robot with GPS, Bluetooth, and Environmental Sensors: A project utilizing MLX90614 in a practical application
Arduino Mega 2560-Based Autonomous Robot with GPS, Bluetooth, and Environmental Sensors

This circuit is a robotic system controlled by an Arduino Mega 2560, which uses multiple sensors including temperature sensors (MLX90614), gas sensors (MQ-136), a GPS module, and a Bluetooth module to navigate and detect environmental conditions. The system drives motors via an L298N motor driver and displays information on a 16x2 I2C LCD, with the ability to receive commands via Bluetooth.

Open Project in Cirkit Designer
Image of ESP32-Based Infrared Thermometer with I2C LCD Display: A project utilizing MLX90614 in a practical application
ESP32-Based Infrared Thermometer with I2C LCD Display

This circuit features an ESP32 microcontroller powered by a 18650 Li-Ion battery, with a TP4056 module for charging the battery via a USB plug. The ESP32 reads temperature data from an MLX90614 infrared temperature sensor and displays it on an I2C LCD 16x2 screen. The ESP32, MLX90614 sensor, and LCD screen are connected via I2C communication lines (SCL, SDA), and the circuit is designed to measure and display ambient and object temperatures.

Open Project in Cirkit Designer
Image of ESP32-Based Infrared Thermometer with I2C LCD Display: A project utilizing MLX90614 in a practical application
ESP32-Based Infrared Thermometer with I2C LCD Display

This circuit features an ESP32 microcontroller interfaced with an MLX90614 infrared temperature sensor and a 16x2 I2C LCD display for temperature readouts. A tactile button is connected to the ESP32 to trigger temperature measurements, and an LED indicates when a measurement is in progress. The circuit is powered by an 18650 Li-Ion battery, with appropriate resistors for LED current limiting and button debouncing.

Open Project in Cirkit Designer

Technical Specifications

The MLX90614 is available in various models, but the following are the general technical specifications for the most commonly used version:

Parameter Value
Operating Voltage 3.6V to 5V
Current Consumption 1.5mA (typical)
Temperature Range (Object) -70°C to +380°C
Temperature Range (Ambient) -40°C to +125°C
Accuracy ±0.5°C (typical, for 0°C to +50°C range)
Field of View (FOV) 35°
Communication Protocol I²C and PWM
Resolution 0.02°C

Pin Configuration and Descriptions

The MLX90614 typically comes in a 4-pin TO-39 package. Below is the pin configuration:

Pin Name Description
1 VDD Power supply (3.6V to 5V)
2 VSS Ground
3 SDA Serial Data Line for I²C communication
4 SCL Serial Clock Line for I²C communication

Usage Instructions

How to Use the MLX90614 in a Circuit

  1. Power Supply: Connect the VDD pin to a 3.6V to 5V power source and the VSS pin to ground.
  2. I²C Communication: Use the SDA and SCL pins to interface with a microcontroller. Pull-up resistors (typically 4.7kΩ) are required on both SDA and SCL lines for proper I²C operation.
  3. Object Placement: Ensure the object to be measured is within the sensor's field of view (35° cone). Avoid obstructions or reflective surfaces that may interfere with accurate readings.

Important Considerations and Best Practices

Example: Using MLX90614 with Arduino UNO

Below is an example of how to interface the MLX90614 with an Arduino UNO using the I²C protocol. This example uses the Adafruit MLX90614 library.

Circuit Connections

Arduino Code

#include <Wire.h>
#include <Adafruit_MLX90614.h>

// Create an instance of the MLX90614 library
Adafruit_MLX90614 mlx = Adafruit_MLX90614();

void setup() {
  Serial.begin(9600); // Initialize serial communication at 9600 baud
  Serial.println("MLX90614 Test");

  if (!mlx.begin()) {
    Serial.println("Error: Could not find a valid MLX90614 sensor!");
    while (1); // Halt execution if sensor initialization fails
  }
}

void loop() {
  // Read object temperature in Celsius
  double objectTemp = mlx.readObjectTempC();
  // Read ambient temperature in Celsius
  double ambientTemp = mlx.readAmbientTempC();

  // Print the temperatures to the Serial Monitor
  Serial.print("Object Temperature: ");
  Serial.print(objectTemp);
  Serial.println(" °C");

  Serial.print("Ambient Temperature: ");
  Serial.print(ambientTemp);
  Serial.println(" °C");

  delay(1000); // Wait for 1 second before the next reading
}

Troubleshooting and FAQs

Common Issues and Solutions

  1. No Data or Incorrect Readings:

    • Ensure proper pull-up resistors (4.7kΩ) are connected to the SDA and SCL lines.
    • Verify that the sensor is powered correctly (3.6V to 5V).
    • Check the I²C address of the sensor. The default address is 0x5A.
  2. Inconsistent Temperature Readings:

    • Ensure the object being measured is within the sensor's field of view.
    • Avoid measuring reflective or shiny surfaces directly, as they can distort readings.
  3. Sensor Not Detected:

    • Confirm that the SDA and SCL lines are connected to the correct pins on the microcontroller.
    • Check for loose or faulty wiring.

FAQs

Q1: Can the MLX90614 measure human body temperature?
Yes, the MLX90614 is commonly used in medical thermometers to measure human body temperature. Ensure the sensor is calibrated for the specific application.

Q2: Can I use the MLX90614 with a 3.3V microcontroller?
Yes, the MLX90614 can operate at 3.6V, which is compatible with 3.3V systems. However, ensure proper level shifting for I²C communication if needed.

Q3: How do I reduce noise in the temperature readings?
Use a decoupling capacitor (e.g., 0.1µF) near the VDD pin and ensure the sensor is not exposed to electrical or thermal noise sources.

Q4: What is the maximum distance for accurate temperature measurement?
The effective distance depends on the size of the object and its ability to fill the sensor's field of view. For small objects, the sensor should be placed closer for accurate readings.

This concludes the documentation for the MLX90614.