The SparkFun IR Array Breakout with a 55 Degree Field of View (FOV) featuring the MLX90640 is an advanced infrared thermal imaging sensor. This component is capable of detecting and measuring temperature distributions across a wide area, which allows it to serve as the core for thermal cameras or for non-contact temperature measurement systems. Its ease of integration with microcontroller platforms, particularly those with Qwiic connectivity, makes it a popular choice for hobbyists and professionals working on projects in areas such as security systems, environmental monitoring, HVAC control, and health-related devices.
Pin Number | Pin Name | Description |
---|---|---|
1 | VDD | Power supply (3V to 3.6V) |
2 | GND | Ground |
3 | SDA | I2C Data |
4 | SCL | I2C Clock |
5 | INT | Interrupt (active low, open-drain) |
6 | 3V3 | 3.3V output from the onboard voltage regulator |
To use the MLX90640 IR Array Breakout in a circuit:
Q: Can the MLX90640 be used with an Arduino? A: Yes, it can be easily connected to an Arduino using the I2C interface.
Q: Does the sensor require calibration? A: The sensor comes factory-calibrated, but for precise applications, additional calibration may be necessary.
Q: What is the purpose of the INT pin? A: The INT pin can be used to trigger an interrupt in your microcontroller when new data is available to read.
Below is a simple example code to read data from the MLX90640 sensor using an Arduino UNO. This code assumes the use of the standard Wire
library for I2C communication and a compatible MLX90640 library.
#include <Wire.h>
#include <Adafruit_MLX90640.h>
Adafruit_MLX90640 mlx;
void setup() {
Serial.begin(9600);
Serial.println("MLX90640 test");
// Begin communication with the sensor
if (!mlx.begin()) {
Serial.println("Failed to find MLX90640 sensor");
while (1);
}
Serial.println("MLX90640 Found!");
}
void loop() {
float mlx90640Frame[32 * 24]; // Buffer to store temperature readings
// Trigger a new measurement
if (mlx.getFrame(mlx90640Frame) == 0) {
for (int i = 0; i < 32 * 24; i++) {
// Print temperature values in a grid format
Serial.print(mlx90640Frame[i], 2);
Serial.print(" ");
if ((i + 1) % 32 == 0) {
Serial.println();
}
}
Serial.println();
} else {
Serial.println("Failed to read frame");
}
delay(1000); // Wait for a second before reading again
}
Ensure that you have installed the necessary libraries before uploading this code to your Arduino UNO. The example code provided is for demonstration purposes and may require modifications to work with your specific setup.