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

How to Use SparkFun IR Array Breakout - 110 Degree FOV, MLX90640 (Qwiic): Examples, Pinouts, and Specs

Image of SparkFun IR Array Breakout - 110 Degree FOV, MLX90640 (Qwiic)Design with SparkFun IR Array Breakout - 110 Degree FOV, MLX90640 (Qwiic) in Cirkit Designer

Introduction

The SparkFun IR Array Breakout is a sophisticated sensor module designed to capture thermal images using infrared (IR) radiation. It utilizes the MLX90640 sensor to provide a thermal imaging solution with a 110-degree field of view (FOV). This breakout board simplifies the integration of the sensor with various microcontroller platforms, especially those compatible with the Qwiic connect system, which allows for easy daisy-chaining and requires no soldering.

Explore Projects Built with SparkFun IR Array Breakout - 110 Degree FOV, MLX90640 (Qwiic)

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 Nano-Powered PID Line Following Robot with Reflectance Sensor Array and Dual Motor Driver: A project utilizing SparkFun IR Array Breakout - 110 Degree FOV, MLX90640 (Qwiic) in a practical application
Arduino Nano-Powered PID Line Following Robot with Reflectance Sensor Array and Dual Motor Driver

This circuit is designed for an advanced line-following robot that uses a QTRX-HD-07RC Reflectance Sensor Array for line sensing and a Motor Driver 1A Dual TB6612FNG to control two DC Mini Metal Gear Motors. The Arduino Nano serves as the microcontroller, running a PID control algorithm to adjust the motor speeds for precise tracking. Power is supplied by a 5V battery for the logic and a 12V battery for the motor driver.

Open Project in Cirkit Designer
Image of Adafruit MPU6050 and VL6180X Sensor Interface with Servo Control: A project utilizing SparkFun IR Array Breakout - 110 Degree FOV, MLX90640 (Qwiic) in a practical application
Adafruit MPU6050 and VL6180X Sensor Interface with Servo Control

This circuit features an Adafruit QT Py microcontroller interfaced with an Adafruit MPU6050 6-axis accelerometer/gyroscope and an Adafruit VL6180X Time of Flight (ToF) distance sensor, both connected via I2C communication. The QT Py also controls a Servomotor SG90, likely for physical actuation based on sensor inputs. The embedded code initializes the sensors, reads their data, and outputs the readings to a serial monitor, with the potential for motion control based on the sensor feedback.

Open Project in Cirkit Designer
Image of ESP32-CAM and IR Sensor Interface with USB UART Communication: A project utilizing SparkFun IR Array Breakout - 110 Degree FOV, MLX90640 (Qwiic) in a practical application
ESP32-CAM and IR Sensor Interface with USB UART Communication

This circuit features an ESP32 CAM module interfaced with an IR sensor and a SparkFun USB UART Breakout board. The ESP32 CAM provides power to the IR sensor and receives its output signal, likely for processing or triggering camera actions based on IR detection. The USB UART Breakout board is connected to the ESP32 CAM for serial communication, enabling programming, debugging, or data exchange with a computer.

Open Project in Cirkit Designer

Common Applications and Use Cases

Technical Specifications

Key Technical Details

Pin Configuration and Descriptions

Pin Name Description
GND Ground connection
VCC Power supply (3V to 3.6V)
SDA I2C data line
SCL I2C clock line
INT Interrupt pin (optional use)

Usage Instructions

How to Use the Component in a Circuit

  1. Power Connections: Connect the VCC pin to a 3.3V source and the GND pin to the ground on your microcontroller board.
  2. I2C Connections: Connect the SDA and SCL pins to the corresponding I2C data and clock lines on your microcontroller.
  3. Qwiic Connection: If using a Qwiic-enabled board, simply connect the Qwiic cable from the breakout board to the microcontroller's Qwiic connector.

Important Considerations and Best Practices

Example Code for Arduino UNO

#include <Wire.h>
#include <Adafruit_MLX90640.h>

Adafruit_MLX90640 mlx;

void setup() {
  Serial.begin(9600);
  while (!Serial) delay(10); // wait for serial port to connect

  Serial.println("MLX90640 IR Array Example");

  // Initialize the MLX90640 sensor
  if (!mlx.begin()) {
    Serial.println("Failed to initialize MLX90640!");
    while (1) delay(10);
  }
  // Set the refresh rate to 2Hz
  mlx.setRefreshRate(MLX90640_REFRESH_2_HZ);
}

void loop() {
  float mlx90640Frame[32 * 24]; // buffer for full frame of temperatures

  // Capture an image frame
  if (mlx.getFrame(mlx90640Frame)) {
    for (int i = 0; i < 32 * 24; i++) {
      Serial.print(mlx90640Frame[i]);
      Serial.print(",");
      if ((i + 1) % 32 == 0) {
        Serial.println();
      }
    }
    Serial.println();
  } else {
    Serial.println("Failed to read frame");
  }

  delay(500); // Delay between frames
}

Troubleshooting and FAQs

Common Issues Users Might Face

Solutions and Tips for Troubleshooting

FAQs

Q: Can the MLX90640 sensor be used outdoors? A: Yes, but it should be protected from direct sunlight and harsh weather conditions to maintain accuracy.

Q: What is the maximum I2C bus length for the sensor? A: It is recommended to keep the I2C bus length as short as possible, ideally less than 1 meter, to ensure reliable communication.

Q: Can the sensor detect through glass or other materials? A: No, the MLX90640 cannot detect IR radiation through glass or similar materials as they block IR wavelengths.

Q: How do I change the I2C address of the sensor? A: The I2C address of the MLX90640 sensor is fixed and cannot be changed. If you need to use multiple sensors, you will need an I2C multiplexer.

Q: Is it possible to change the refresh rate of the sensor? A: Yes, the refresh rate can be adjusted using the mlx.setRefreshRate() function in the provided library.