Documentation

GY-906 MLX90614 BAA Non-Touch Infrared Temperature Sensor
Documentation / GY-906 MLX90614 BAA Non-Touch Infrared Temperature Sensor

GY-906 MLX90614 BAA Non-Touch Infrared Temperature Sensor

manualshillehtek

Overview

The GY-906 MLX90614 is a non-contact infrared thermometer module built around Melexis's MLX90614 sensor. Instead of touching an object to read its temperature, the MLX90614 detects the thermal infrared radiation emitted from its surface — making it ideal for industrial monitoring, body-temperature kiosks, HVAC diagnostics, 3D printer bed monitoring, or any application where physical contact isn't practical or safe.

The sensor outputs both ambient and object temperatures over I2C at up to ±0.5°C accuracy across a wide range (-70°C to +380°C for object temp). ShillehTek's GY-906 module pre-mounts the MLX90614 on a breakout PCB with an onboard regulator and I2C pull-ups, so it works on both 3.3V and 5V systems. The default I2C address is 0x5A.

This manual covers specifications, the pinout, wiring for Arduino, ESP32, Raspberry Pi, and the Pico, a working "hello world" code example for each platform, and FAQs covering field of view, emissivity, and troubleshooting.

At a Glance

Voltage
3.3V - 5V
Interface
I2C
I2C Address
0x5A
Object Range
-70°C to +380°C
Accuracy
±0.5°C
Pins
4 (Pre-Soldered)

Specifications

Parameter Value
Sensor IC Melexis MLX90614-BAA
Measurement Type Non-contact IR thermopile
Operating Voltage 3.3V - 5V (onboard regulator)
Communication I2C (SMBus compatible)
I2C Address 0x5A (default, reprogrammable)
Ambient Temp Range -40°C to +125°C
Object Temp Range -70°C to +380°C
Accuracy ±0.5°C (around room temperature)
Resolution 0.02°C
Field of View ~90° (BAA variant)
Current Draw ~1.5 mA
Pin Count 4 (VIN, GND, SCL, SDA)

Pinout Diagram

GY-906 MLX90614 Pinout Diagram

Wiring Guide

Arduino Wiring

The GY-906 module has an onboard 3.3V regulator and level shifter, so you can safely power it from the Arduino Uno's 5V rail. Only four wires are needed.

Module Pin Arduino Pin
VIN 5V
GND GND
SCL A5 (SCL)
SDA A4 (SDA)
Tip: The module has built-in I2C pull-ups, so external resistors aren't required.

ESP32 Wiring

The ESP32 runs at 3.3V, but the module's regulator handles both 3.3V and 5V. Connect to the default I2C pins.

Module Pin ESP32 Pin
VIN 3.3V
GND GND
SCL GPIO 22
SDA GPIO 21
Info: Any free GPIO pair can be remapped as I2C on the ESP32 using Wire.begin(sda, scl).

Raspberry Pi Wiring

Use hardware I2C on GPIO 2 and GPIO 3. Enable I2C via sudo raspi-config before running code.

Module Pin Raspberry Pi Pin
VIN 3.3V (Pin 1)
GND GND (Pin 6)
SCL GPIO 3 (Pin 5, SCL)
SDA GPIO 2 (Pin 3, SDA)
Warning: The MLX90614 uses SMBus timing. Some Pi kernels have issues with the default 100 kHz I2C clock — if you see repeated read errors, try slowing it to 50 kHz by adding dtparam=i2c_arm_baudrate=50000 to /boot/config.txt.

Raspberry Pi Pico Wiring

Connect to the Pico's I2C0 bus on GP0 and GP1. Works in both MicroPython and C SDK.

Module Pin Pico Pin
VIN 3.3V (Pin 36)
GND GND (Pin 38)
SCL GP1 (Pin 2, I2C0 SCL)
SDA GP0 (Pin 1, I2C0 SDA)

Code Examples

Arduino

mlx90614_read.ino
// MLX90614 - Read ambient and object temperature
// Requires: Adafruit MLX90614 Library

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

Adafruit_MLX90614 mlx = Adafruit_MLX90614();

void setup() {
  Serial.begin(9600);
  while (!Serial);

  if (!mlx.begin()) {
    Serial.println("Error connecting to MLX sensor. Check wiring.");
    while (1);
  }
  Serial.println("MLX90614 ready.");
}

void loop() {
  Serial.print("Ambient = ");
  Serial.print(mlx.readAmbientTempC());
  Serial.print(" C\tObject = ");
  Serial.print(mlx.readObjectTempC());
  Serial.println(" C");
  delay(500);
}

ESP32

mlx90614_esp32.ino
// MLX90614 on ESP32 via I2C (GPIO21 SDA, GPIO22 SCL)

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

Adafruit_MLX90614 mlx = Adafruit_MLX90614();

void setup() {
  Serial.begin(115200);
  Wire.begin(21, 22);
  if (!mlx.begin()) {
    Serial.println("MLX90614 not found.");
    while (1);
  }
  Serial.println("MLX90614 ready.");
}

void loop() {
  Serial.printf("Ambient: %.2f C | Object: %.2f C\n",
                mlx.readAmbientTempC(),
                mlx.readObjectTempC());
  delay(500);
}

Raspberry Pi

mlx90614_read.py
# MLX90614 on Raspberry Pi via I2C
# Install: pip install smbus2 mlx90614
# Enable I2C: sudo raspi-config -> Interface Options -> I2C

from smbus2 import SMBus
from mlx90614 import MLX90614
import time

bus = SMBus(1)
sensor = MLX90614(bus, address=0x5A)

try:
    while True:
        print(f"Ambient: {sensor.get_ambient():.2f} C")
        print(f"Object:  {sensor.get_object_1():.2f} C")
        print("-" * 30)
        time.sleep(1)
except KeyboardInterrupt:
    bus.close()

Raspberry Pi Pico (MicroPython)

mlx90614_pico.py
# MLX90614 on Pico via I2C0 (GP0 SDA, GP1 SCL)
# Upload an mlx90614.py driver to the Pico filesystem first.

from machine import I2C, Pin
from mlx90614 import MLX90614
import time

i2c = I2C(0, sda=Pin(0), scl=Pin(1), freq=100000)
print("I2C scan:", [hex(d) for d in i2c.scan()])

sensor = MLX90614(i2c)

while True:
    print("Ambient: {:.2f} C".format(sensor.read_ambient_temp()))
    print("Object:  {:.2f} C".format(sensor.read_object_temp()))
    print("-" * 30)
    time.sleep(1)

Frequently Asked Questions

What's the difference between ambient and object temperature?
Ambient temperature is the temperature of the sensor itself (the air around the chip). Object temperature is the temperature of the surface the sensor is pointed at, calculated from the IR radiation it receives.
What's the field of view of the BAA variant?
The MLX90614-BAA has a wide ~90° field of view. That means the reading averages IR radiation across a large cone — if you want to measure a small, distant object precisely, move the sensor closer to narrow the measured area.
Can I use it as a body thermometer?
The MLX90614 is accurate enough for approximate body temperature screening, but the BAA (wide FOV) variant is not medical grade and requires careful distance and emissivity calibration. For medical-grade fever detection, use certified medical devices.
Why am I getting strange or wildly fluctuating readings?
IR sensors are affected by emissivity (how well a surface radiates IR). Shiny metal surfaces reflect IR and give inaccurate readings. Point the sensor at matte, non-reflective surfaces for best accuracy. Also avoid aiming it at hot/cold objects in the background because they affect the reading.
Do I need external I2C pull-up resistors?
No. The GY-906 module has 4.7 kΩ pull-ups built in. You can chain other I2C devices without adding resistors.
My Raspberry Pi returns I/O errors reading the sensor — what's wrong?
This is a known clock-stretching issue with the Pi's I2C driver and the MLX90614's SMBus timing. Lower the I2C clock speed by adding dtparam=i2c_arm_baudrate=50000 to /boot/config.txt and reboot.

Related Tutorials