MLX90640

Driver for a Far Infrared Thermal Sensor Array (32x24 RES).

picture of MLX90640 device
image credit:Melexis Datasheet

The MLX90640 addresses growing demands seen across numerous applications for thermal management.¹ More detail is available in the Melexis product flyer.

Our driver provides the full functionality of the device in an easy to use API. We also support several advanced features such as adaptive refresh rate and sub-frame selection.

We offer both C/C++ and Python language bindings. The C/C++ interface is a C-compatible header file and a compiled static library. We also offer Python modules for both Python 2 and Python 3.

Datasheet

The device datasheet is available from Melexis.

Commonly provided by

This sensor is commonly available from:

Performance

Performance of this device is largely driven by the I²C transfer rate. Each cycle reads data for 768 pixels (24 rows by 32 columns each), where each pixel is two bytes. Each byte requires 9 clock edges on the I²C bus, for a total of 13,824 clocks. As shown in the following table, it is barely possible to sustain the maximum refresh rate, even at the maximum I²C bus speed.

The times shown in this table do not account for Operating System level overhead.
I²C bitrate Transfer time
100 kbit/s 138.2 ms (~7 Hz)
400 kbit/s 34.5 ms (~29 Hz)
1 Mbit/s 13.8 ms (~70 Hz)

The maximum refresh rate of the device is 64Hz, which means the refresh period is about 15.6 ms. As shown in the table, even at the maximum support I²C transfer rate, there is only about 1.8 ms available for calculating the temperature of each pixel.

Non-trivial math is required to convert from the raw ADC counts reported by the device to calibrated temperatures for each pixel. The time to perform this conversion depends in large part on the MCU. The calculation times for the IOT Driver Supply implementation are summarized in the following table.

Measurements were taken across 1000 samples, with no other activity.
Target Platform Average Calculation Time Standard Deviation
Nvidia Jetson Nano (aarch64 GNU/Linux) 2712 us 351 us 13%
Raspberry Pi4 (armv7l GNU/Linux) 426 us 19 us 4%

Features

Managing the refresh rate of the device can complicate the application implementation. Our driver has several features that simplify the implementation of your application.

Adaptive Refresh Rate

When this mode is selected, the driver will monitor performance. When the driver detects too many missed deadlines, it will automatically modify the device refresh rate.

Sub Frame Selection

Our driver allows the application to select a region smaller than the full frame. By reducing the number of pixels, there is less data transfer and less pixel conversions. In certain situations, this can lead to significant reductions in the data that is processed, while also maintaining a high refresh rate.

Ordering

More detail, including a pricing sheet, is available upon request.

Thanks for your interest! The pricing sheet for the driver has been sent to .