Overview
Remote infrared sensors are unique in their ability to measure something they are pointed at, but not touching, and we've been looking for a replacement for the now-discontiued TMP007 for a few years. The Adafruit MLX90632 FIR Temperature Sensor features a compact and low cost 'remote' infrared sensor. These are great when you want to measure the temperature of something very hot or very cold or maybe something that's delicate and tough to attach a probe to.
This sensor has a 50˚ field of view, so it will work best when only a few cm/inches away from the item being measured, otherwise you'll be getting an average of a large area.
Melexis is famous for their infrared sensor technology (we stock a lot of their IR thermal sensors!) and the MLX90632 is pick-and-placeable with a I2C interface which makes it a great match for any microcontroller or microcomputer. This breakout board comes with the MLX90632SLD-DCB which is 'medical grade'. The medical version is factory calibrated with an accuracy of ±0.2˚C within the narrow object temperature range from 35 to 42˚C for medical applications. You can also put it into 'extended' mode for measuring object temperatures from -20 to 100˚C. Of course, you can also measure the 'local' temperature on chip as well.
To get you going fast, we spun up a custom-made PCB in the STEMMA QT form factor, making them easy to interface with. The STEMMA QT connectors on either side are compatible with the SparkFun Qwiic I2C connectors. This allows you to make solderless connections between your development board and the MLX90632 or to chain them with a wide range of other sensors and accessories using a compatible cable (QT Cable is not included, but we have a variety in the shop).
We also include a bit of header if you want to solder this into a breadboard or perfboard. Level shifting and voltage regulation on board means it will work with any 3V or 5V microcontrollers / microcomputers that have I2C so it can get you temperature whether its on a classic Arduino compatible or a Raspberry Pi computer.
Page last edited September 05, 2025
Text editor powered by tinymce.
Pinouts
The default I2C address is 0x3A.
Power Pins
- VIN - this is the power pin. It can be powered by 3V or 5V. Give it the same power as the logic level of your microcontroller - e.g. for a 5V micro like Arduino, use 5V.
- 3Vo - this is the 3.3V output from the voltage regulator, you can grab up to 100mA from this if you like.
- GND - common ground for power and logic.
I2C Logic Pins
- SCL - I2C clock pin, connect to your microcontroller's I2C clock line. This pin can use 3-5V logic, and there's a 10K pullup on this pin.
- SDA - I2C data pin, connect to your microcontroller's I2C data line. This pin can use 3-5V logic, and there's a 10K pullup on this pin.
- STEMMA QT - These connectors allow you to connect to development boards with STEMMA QT (Qwiic) connectors or to other things with various associated accessories.
Address Pin and Jumper
You can change the I2C address with either the ADDR pin on the front of the board or the address jumper on the back of the board, labeled A0 on the board silk.
This pin lets you to chain up to 2 of these boards together on the same pair of I2C clock and data pins. To do so, you solder the jumper "closed" by connecting the two pads or connect the ADDR pin to VIN. The default I2C address is 0x3A. The other address options can be calculated by “adding” the value of ADDR/A0 to the base of 0x3A.
A0 sets the lowest bit with a value of 1. The final address is 0x3A + A0 which would be 0x3B.
If A0 is soldered closed or ADDR is connected to VIN, the address is 0x3A + 1 = 0x3B
The table below shows all possible addresses, and whether the pin should be high (closed) or low (open).
Power LED and Jumper
- Power LED - In the upper left corner, above the STEMMA connector, on the front of the board, is the power LED, labeled on. It is a green LED.
- LED jumper - This jumper is located on the back of the board and is labeled LED on the board silk. Cut the trace on this jumper to cut power to the "on" LED.
Page last edited September 05, 2025
Text editor powered by tinymce.
CircuitPython & Python
It's easy to use the MLX90632 breakout with Python or CircuitPython, and the Adafruit_CircuitPython_MLX90632 module. This module allows you to easily write Python code to read ambient and object temperatures with the sensor.
You can use this driver with any CircuitPython microcontroller board or with a computer that has GPIO and Python thanks to Adafruit_Blinka, our CircuitPython-for-Python compatibility library.
CircuitPython Microcontroller Wiring
First wire up the breakout to your board exactly as follows. The following is the breakout wired to a Feather RP2040 using the STEMMA connector:
-
Board STEMMA 3V to breakout STEMMA VIN (red wire)
-
Board STEMMA GND to breakout STEMMA GND (black wire)
-
Board STEMMA SCL to breakout STEMMA SCL (yellow wire)
- Board STEMMA SDA to breakout STEMMA SDA (blue wire)
The following is the breakout wired to a Feather RP2040 using a solderless breadboard:
-
Board 3V to breakout VIN (red wire)
-
Board GND to breakout GND (black wire)
-
Board SCL to breakout SCL (yellow wire)
- Board SDA to breakout SDA (blue wire)
Python Computer Wiring
Since there are dozens of Linux computers/boards you can use, we will show wiring for Raspberry Pi. For other platforms, please visit the guide for CircuitPython on Linux to see whether your platform is supported.
Here's the Raspberry Pi wired with I2C using the STEMMA connector:
-
Pi 3V to breakout STEMMA VIN (red wire)
-
Pi GND to breakout STEMMA GND (black wire)
-
Pi SCL to breakout STEMMA SCL (yellow wire)
- Pi SDA to breakout STEMMA SDA (blue wire)
Here's the Raspberry Pi wired with I2C using a solderless breadboard:
-
Pi 3V to breakout VIN (red wire)
-
Pi GND to breakout GND (black wire)
-
Pi SCL to breakout SCL (yellow wire)
- Pi SDA to breakout SDA (blue wire)
Python Installation of MLX90632 Library
You'll need to install the Adafruit_Blinka library that provides the CircuitPython support in Python. This may also require enabling I2C on your platform and verifying you are running Python 3. Since each platform is a little different, and Linux changes often, please visit the CircuitPython on Linux guide to get your computer ready!
Once that's done, from your command line run the following command:
pip3 install adafruit-circuitpython-mlx90632
If your default Python is version 3 you may need to run 'pip' instead. Just make sure you aren't trying to use CircuitPython on Python 2.x, it isn't supported!
CircuitPython Usage
To use with CircuitPython, you need to first install the Adafruit_CircuitPython_MLX90632 library, and its dependencies, into the lib folder on your CIRCUITPY drive. Then you need to update code.py with the example script.
Thankfully, we can do this in one go. In the example below, click the Download Project Bundle button below to download the necessary libraries and the code.py file in a zip file. Extract the contents of the zip file, and copy the entire lib folder and the code.py file to your CIRCUITPY drive.
Your CIRCUITPY/lib folder should contain the following folder and file:
- adafruit_bus_device/
- adafruit_mlx90632.mpy
Python Usage
Once you have the library pip3 installed on your computer, copy or download the following example to your computer, and run the following, replacing code.py with whatever you named the file:
python3 code.py
Example Code
If running CircuitPython: Once everything is saved to the CIRCUITPY drive, connect to the serial console to see the data printed out!
If running Python: The console output will appear wherever you are running Python.
# SPDX-FileCopyrightText: Copyright (c) 2025 Liz Clark for Adafruit Industries
#
# SPDX-License-Identifier: MIT
"""Simple test example for MLX90632 sensor"""
import time
import board
import adafruit_mlx90632
# Create I2C bus
i2c = board.I2C() # uses board.SCL and board.SDA
# Create MLX90632 instance
mlx = adafruit_mlx90632.MLX90632(i2c)
# Print sensor information
print(f"Product ID: 0x{mlx.product_id:012X}")
print(f"Product Code: 0x{mlx.product_code:04X}")
print(f"EEPROM Version: 0x{mlx.eeprom_version:04X}")
# Set measurement mode to continuous
mlx.mode = adafruit_mlx90632.MODE_CONTINUOUS
# Set refresh rate to 2Hz
mlx.refresh_rate = adafruit_mlx90632.REFRESH_2HZ
print("\nReading temperatures...")
while True:
# Check if new data is available
if mlx.data_ready:
# Read temperatures
ambient_temp = mlx.ambient_temperature
object_temp = mlx.object_temperature
print(f"Ambient: {ambient_temp:.2f}°C, Object: {object_temp:.2f}°C")
# Reset new data flag
mlx.reset_data_ready()
time.sleep(0.1)
First, the MLX90632 sensor is recognized over I2C. Then, in the loop, it prints out the ambient temperature and the object temperature readings.
Page last edited September 05, 2025
Text editor powered by tinymce.
Arduino
Using the MLX90632 breakout with Arduino involves wiring up the breakout to your Arduino-compatible microcontroller, installing the Adafruit_MLX90632 library, and running the provided example code.
Wiring
Wire as shown for a 5V board like an Uno. If you are using a 3V board, like an Adafruit Feather, wire the board's 3V pin to the sensor VIN.
Here is an Adafruit Metro wired up to the sensor using the STEMMA QT connector:
-
Board 5V to breakout VIN (red wire)
-
Board GND to breakout GND (black wire)
-
Board SCL to breakout SCL (yellow wire)
- Board SDA to breakout SDA (blue wire)
Here is an Adafruit Metro wired up using a solderless breadboard:
-
Board 5V to breakout VIN (red wire)
-
Board GND to breakout GND (black wire)
-
Board SCL to breakout SCL (yellow wire)
- Board SDA to breakout SDA (blue wire)
Library Installation
You can install the Adafruit_MLX90632 library for Arduino using the Library Manager in the Arduino IDE.
Click the Manage Libraries ... menu item, search for Adafruit MLX90632, and select the Adafruit MLX90632 library:
If asked about dependencies, click "Install all".
If the "Dependencies" window does not come up, then you already have the dependencies installed.
// Basic test sketch for Adafruit MLX90632 Far Infrared Temperature Sensor
#include "Adafruit_MLX90632.h"
Adafruit_MLX90632 mlx = Adafruit_MLX90632();
void setup() {
Serial.begin(115200);
while (!Serial) delay(10);
Serial.println(F("Adafruit MLX90632 test"));
if (!mlx.begin()) {
Serial.println(F("Failed to find MLX90632 chip"));
while (1) { delay(10); }
}
Serial.println(F("MLX90632 Found!"));
// Reset the device
if (!mlx.reset()) {
Serial.println(F("Device reset failed"));
while (1) { delay(10); }
}
Serial.println(F("Device reset: SUCCESS"));
uint64_t productID = mlx.getProductID();
Serial.print(F("Product ID: 0x"));
Serial.print((uint32_t)(productID >> 32), HEX);
Serial.println((uint32_t)(productID & 0xFFFFFFFF), HEX);
uint16_t productCode = mlx.getProductCode();
Serial.print(F("Product Code: 0x"));
Serial.println(productCode, HEX);
uint16_t eepromVersion = mlx.getEEPROMVersion();
Serial.print(F("EEPROM Version: 0x"));
Serial.println(eepromVersion, HEX);
// Decode product code bits
uint8_t fov = (productCode >> 8) & 0x3;
uint8_t package = (productCode >> 5) & 0x7;
uint8_t accuracy = productCode & 0x1F;
Serial.print(F("FOV: "));
Serial.println(fov == 0 ? F("50°") : F("Unknown"));
Serial.print(F("Package: "));
Serial.println(package == 1 ? F("SFN 3x3") : F("Unknown"));
Serial.print(F("Accuracy: "));
if (accuracy == 1) {
Serial.println(F("Medical"));
} else if (accuracy == 2) {
Serial.println(F("Standard"));
} else {
Serial.println(F("Unknown"));
}
// Need to be in HALT mode for EEPROM setting changes
Serial.println(F("\n--- Setting HALT mode for setup ---"));
if (!mlx.setMode(MLX90632_MODE_HALT)) {
Serial.println(F("Failed to set HALT mode"));
while (1) { delay(10); }
}
mlx90632_mode_t currentMode = mlx.getMode();
Serial.print(F("Current mode: "));
switch (currentMode) {
case MLX90632_MODE_HALT:
Serial.println(F("Halt"));
break;
case MLX90632_MODE_SLEEPING_STEP:
Serial.println(F("Sleeping Step"));
break;
case MLX90632_MODE_STEP:
Serial.println(F("Step"));
break;
case MLX90632_MODE_CONTINUOUS:
Serial.println(F("Continuous"));
break;
default:
Serial.println(F("Unknown"));
}
// Set and get measurement select (medical)
Serial.println(F("\n--- Measurement Select Settings ---"));
if (!mlx.setMeasurementSelect(MLX90632_MEAS_MEDICAL)) {
Serial.println(F("Failed to set measurement select to Medical"));
while (1) { delay(10); }
}
mlx90632_meas_select_t currentMeasSelect = mlx.getMeasurementSelect();
Serial.print(F("Current measurement select: "));
switch (currentMeasSelect) {
case MLX90632_MEAS_MEDICAL:
Serial.println(F("Medical"));
break;
case MLX90632_MEAS_EXTENDED_RANGE:
Serial.println(F("Extended Range"));
break;
default:
Serial.println(F("Unknown"));
}
// Set and get refresh rate (default to 2Hz)
Serial.println(F("\n--- Refresh Rate Settings ---"));
if (!mlx.setRefreshRate(MLX90632_REFRESH_2HZ)) {
Serial.println(F("Failed to set refresh rate to 2Hz"));
while (1) { delay(10); }
}
mlx90632_refresh_rate_t currentRefreshRate = mlx.getRefreshRate();
Serial.print(F("Current refresh rate: "));
switch (currentRefreshRate) {
case MLX90632_REFRESH_0_5HZ:
Serial.println(F("0.5 Hz"));
break;
case MLX90632_REFRESH_1HZ:
Serial.println(F("1 Hz"));
break;
case MLX90632_REFRESH_2HZ:
Serial.println(F("2 Hz"));
break;
case MLX90632_REFRESH_4HZ:
Serial.println(F("4 Hz"));
break;
case MLX90632_REFRESH_8HZ:
Serial.println(F("8 Hz"));
break;
case MLX90632_REFRESH_16HZ:
Serial.println(F("16 Hz"));
break;
case MLX90632_REFRESH_32HZ:
Serial.println(F("32 Hz"));
break;
case MLX90632_REFRESH_64HZ:
Serial.println(F("64 Hz"));
break;
default:
Serial.println(F("Unknown"));
}
// Clear new data flag before starting continuous measurements
Serial.println(F("\n--- Starting Continuous Measurements ---"));
if (!mlx.setMode(MLX90632_MODE_CONTINUOUS)) {
Serial.println(F("Failed to set CONTINUOUS mode"));
while (1) { delay(10); }
}
if (!mlx.resetNewData()) {
Serial.println(F("Failed to reset new data flag"));
while (1) { delay(10); }
}
Serial.println(F("New data flag reset - starting measurements"));
}
void loop() {
// Only check new data flag - much more efficient for continuous mode
if (mlx.isNewData()) {
Serial.print(F("New Data Available - Cycle Position: "));
Serial.println(mlx.readCyclePosition());
// Read ambient temperature
double ambientTemp = mlx.getAmbientTemperature();
Serial.print(F("Ambient Temperature: "));
Serial.print(ambientTemp, 4);
Serial.println(F(" °C"));
// Read object temperature
double objectTemp = mlx.getObjectTemperature();
Serial.print(F("Object Temperature: "));
if (isnan(objectTemp)) {
Serial.println(F("NaN (invalid cycle position)"));
} else {
Serial.print(objectTemp, 4);
Serial.println(F(" °C"));
}
// Reset new data flag after reading
if (!mlx.resetNewData()) {
Serial.println(F("Failed to reset new data flag"));
}
Serial.println(); // Add blank line between readings
}
// Check if we need to trigger a new measurement for step modes
mlx90632_mode_t currentMode = mlx.getMode();
if (currentMode == MLX90632_MODE_STEP || currentMode == MLX90632_MODE_SLEEPING_STEP) {
// Trigger single measurement (SOC bit) for step modes
if (!mlx.startSingleMeasurement()) {
Serial.println(F("Failed to start single measurement"));
}
}
// Small delay to prevent overwhelming the I2C bus
delay(10);
}
Upload the sketch to your board and open up the Serial Monitor (Tools -> Serial Monitor) at 115200 baud. You'll see the MLX90632 recognized over I2C.
Then, the ambient and object temperatures are printed to the Serial Monitor.
Page last edited September 05, 2025
Text editor powered by tinymce.
WipperSnapper
What is WipperSnapper
WipperSnapper is a firmware designed to turn any WiFi-capable board into an Internet-of-Things device without programming a single line of code. WipperSnapper connects to Adafruit IO, a web platform designed (by Adafruit!) to display, respond, and interact with your project's data.
Simply load the WipperSnapper firmware onto your board, add credentials, and plug it into power. Your board will automatically register itself with your Adafruit IO account.
From there, you can add components to your board such as buttons, switches, potentiometers, sensors, and more! Components are dynamically added to hardware, so you can immediately start interacting, logging, and streaming the data your projects produce without writing code.
If you've never used WipperSnapper, click below to read through the quick start guide before continuing.
First, wire up a MLX90632 to your board exactly as follows. Here is an example of the MLX90632 wired to an Adafruit ESP32 Feather V2 using I2C with a STEMMA QT cable (no soldering required)
-
Board 3V to sensor VIN (red wire on STEMMA QT)
-
Board GND to sensor GND (black wire on STEMMA QT)
-
Board SCL to sensor SCL (yellow wire on STEMMA QT)
- Board SDA to sensor SDA (blue wire on STEMMA QT)
Usage
Connect your board to Adafruit IO Wippersnapper and navigate to the WipperSnapper board list.
On this page, select the WipperSnapper board you're using to be brought to the board's interface page.
If you do not see your board listed here - you need to connect your board to Adafruit IO first.
On the device page, quickly check that you're running the latest version of the WipperSnapper firmware.
The device tile on the left indicates the version number of the firmware running on the connected board.
- If the firmware version is green with a checkmark - continue with this guide.
- If the firmware version is red with an exclamation mark "!" - update to the latest WipperSnapper firmware on your board before continuing.
Next, make sure the sensor is plugged into your board and click the I2C Scan button.
You should see the MLX90632's default I2C address of 0x3A pop-up in the I2C scan list.
First, double-check the connection and/or wiring between the sensor and the board.
Then, reset the board and let it re-connect to Adafruit IO WipperSnapper.
With the sensor detected in an I2C scan, you're ready to add the sensor to your board.
Click the New Component button or the + button to bring up the component picker.
Adafruit IO supports a large amount of components. To quickly find your sensor, type MLX90632 into the search bar, then select the MLX90632 component.
You can choose from the extended temperature range with lower accuracy, or the higher accuracy medical temperature range (recommended for most use cases). See the product page or datasheet for more details.
On the component configuration page, the MLX90632's sensor address should be listed along with the sensor's settings.
The Send Every option is specific to each sensor's measurements. This option will tell the Feather how often it should read from the MLX90632 sensor and send the data to Adafruit IO. Measurements can range from every second to every 24 hours.
For this example, set the Send Every interval to every 30 seconds.
Your device interface should now show the sensor components you created. After the interval you configured elapses, WipperSnapper will automatically read values from the sensor(s) and send them to Adafruit IO.
To view the data that has been logged from the sensor, click on the graph next to the sensor name.
Here you can see the feed history and edit things about the feed such as the name, privacy, webhooks associated with the feed and more. If you want to learn more about how feeds work, check out this page.
Page last edited September 05, 2025
Text editor powered by tinymce.
Downloads
Page last edited September 05, 2025
Text editor powered by tinymce.