MLX90640-D110 Thermal Camera
| ||
Instruction
This is a 32 × 24 pixels, 55° field of view, IR array thermal imaging camera, communicating via the I2C interface. It is compatible with 3.3V/5V operating voltage and supports host platforms such as Raspberry Pi/Arduino(ESP32)/STM32, etc.
Features
- Adopts MLX90640 far-infrared thermal sensor array, 32 × 24 pixels.
- Communicating via I2C interface, configurable to fast mode (up to 1MHz data rate).
- Noise Equivalent Temperature Difference (NETD) 0.1K RMS @1Hz refresh rate.
- Onboard voltage translator, compatible with 3.3V/5V operating voltage.
- Comes with development resources and manual (examples for Raspberry Pi/Arduino(ESP32)/STM32).
Specification
- Operating voltage: 3.3V/5V
- Operating current: <23mA
- Communication interface: I2C (address 0 x 33)
- Field of view (Horizontal × Vertical):
- MLX90640-D55 Thermal Camera: 55°× 35° (narrow-angle FOV, suit for long-range measuring)
- MLX90640-D110 Thermal Camera: 110°× 75° (wide angle FOV, suit for short range measuring)
- Operating temperature: -40℃~85℃
- Target temperature: -40℃~300℃
- Resolution: ±1℃
- Refresh rate: 0.5Hz~64Hz (programmable)
- Dimensions: 28mm × 16 mm
- Mounting hole size: 2.0mm
Hardware Description
Hardware Connection
The MLX9064x-Dxx Thermal Camera has 4 pins that need to be connected to the controller and currently supports the Raspberry Pi series, STM32F405R, and ESP32 series. For details, please refer to the instruction section.
Interface
In the figure above, the MLX9064x-Dxx Thermal Camera has an onboard level shifter circuit.
- VCC, GND pin for the power supply, VCC connected to the control 3.3V or 5V power supply, GND corresponds to the connection of the GND.
- SDA is the data pin of I2C, connected to the GPIO of the controller, without an external pull-up resistor.
- SCL is the clock pin of I2C, connected to the GPIO of the controller, without an external pull resistance.
Application
- High-precision non-contact object temperature detection.
- Infrared thermal imager, infrared thermometer.
- Smart Home, Smart Building, Smart Lighting.
- Industrial temperature control, security, intrusion/motion detection.
Communication Protocol
- The MLX9064x-Dxxx Thermal Camera communicates using the I2C bus and supports I2C high-speed mode (up to 1MHz).
- The device address of the module is programmable and can have up to 127 addresses, the factory default value is 0x33.
- The read/write timing schematic is shown below, please refer to the datasheet for more details.
1. The controller (MCU, etc.) as a Master device has pulled down the SDA, and SCL pin to initiate the I2C bus START condition and then writes the device address (7bits) and writes commands (occupy 1bit), 8bits of data in total. if the pins are connected correctly, the MLX9064x as a Slave device to send out the ACK response.
2. The controller continues to write the register address (RA) and register value (DATA) and waits for the ACK response, write is complete, the controller has pulled up the SCL, and SDA pin to send the STOP condition.
3. If the controller reads the data from the register (RA), it should re-initiate the START condition after waiting for an ACK response, then write the device address (7 bits) and the read command (1 bit), totaling 8 bits, and wait for an ACK response. Once this is done, the MLX9064x will return the data. After the controller receives the data, it should maintain the SDA at a high level.
4. Consecutively write register register value please refer to the above figure in the burst Read/Write Sequence.
Dimensions
Other Description
- The MLX9064x-Dxx Thermal Camera utilizes thermopile technology, consisting of a total of 768 IR sensors. Each IR sensor is treated as a pixel. The row and column positions of each pixel in the field of view of the MLX9064x-Dxx Thermal Camera are identified as Pixel(i, j), where i represents its row number (ranging from 1 to 24), and j represents its column number (ranging from 1 to 32).
- The sensor manufacturer allows for up to 4 defective pixels at the time of sensor production. Each defective pixel is identified in the EEPROM table. As a result, there is a possibility that the module may have some defective pixels. This means that the presence of defective pixels cannot be used as a basis for returning or exchanging the product. The manufacturer's recommendation for addressing this issue is to use the average value of adjacent pixels as a replacement.
Memory and registers
The above picture shows the distribution of RAM area and control registers of MLX90640, in which there are two data modes in RAM area, and EEPROM is used to store calibration constants and device configuration parameters, as shown in the following figure:
Refresh rate
This module support 8 kinds of refresh rate, up to 64Hz. The refresh rate is configured by registers 1-0x800D
The settings of the 8 refresh rates are determined by bit 7, bit 8, and bit 9 of the control register 1 (0x800D), among which there are chess mode (factory default setting), TV interleave mode, as shown below:
The array frame is divided into two subpages and depending on bit 12 in “Control register 1” (0x800D). As a standard the MLX90640 is calibrated in Chess pattern mode, this results in better-fixed pattern noise behavior of the sensor when in chess pattern mode. For best results, we advise to use chess pattern mode.
Temperature measurement principle and measurement distance
Temperature measurement principle
What is infrared temperature measurement?(quoted from OPTRIS)
Next to time, temperature is the most frequently measured physical property. Infrared temperature measurement devices define the temperature according to the radiation law of Planck and Boltzmann through infrared radiation released by the measured object. But how does non-contact temperature measurement work?
Each body, with a temperature above the absolute zero of 0 K (-273.15°C) emits an electromagnetic radiation from its surface, which is proportional to its intrinsic temperature. A part of this radiation is infrared radiation which is used to measure temperature. The radiation of the body penetrates the atmosphere and can be focused on a detector element with the help of a lens. The detector element generates an electrical signal proportional to the radiation. This signal is amplified and, using successive digital signal processing, is transformed into an output signal proportional to the object temperature. The measuring value can be shown on a display or released as a signal.
The emissivity ε (Epsilon) has a central importance, if the temperature is measured through radiation. The emissivity defines the relation of the radiation value in real and of the black body. This is maximal 1 for a black body. But only few bodies meet the ideal of the black body. For the calibration of sensors contact faces of radiators are generally used, which consists of the favoured wave length of 0.99.
Many bodies have a constant emissivity regarding the wave length, but do emit far less radiation than black bodies. They are called grey bodies. Bodies whos emissivity depends on the temperature and the wave length, such as metals, are called selective radiator. The missing radiation part is compensated in both cases through the definition of emissivity. When using a selective radiator, one needs to bear in mind the measured wave length (short-wave for metal).
The infrared sensor receives the emitted radiation from the object surface, but also reflected radiation form the surroundings and perhaps penetrated infrared radiation from the measuring object.
Measurement distance
The FOV of this module is determined by 50% radiation signal which is received by the thermopile, it is also influenced by the main axis of the sensor. The temperature measured is the weighted average of the detected object's temperature in FOV. To improve the accuracy, you should make sure that the detected object is in the FOV totally.
For the relationship between the measurement distance and the field of view, please refer to the calculation formula shown in the following figure mentioned by Melexis
Examples
Raspberry Pi
1. When using the sensor, please pay attention to avoid direct contact with the onboard IC devices in your hands. Pay attention to prevent static electricity and check the power supply to prevent reverse connection before powering on.
2. When the sensor is working, please avoid excessive vibration and do not plug or unplug cables. Since MLX90640 has EEPROM, it will easily be damaged by vibration and a hot plug.
- Hardware Connection
Raspberry Pi | MLX90640 Thermal Camera |
---|---|
5V | 5V |
GND | GND |
SDA(BCM2) | SDA |
SCL(BCM3) | SCL |
Environment Setting
- It is recommended to install the library image for testing, and the use of mirrors for testing, please ignore the following environment settings and other operations.
- Raspberry Pi Drive-Google Drive, the image account and password both are "test".
- Enable the Raspberry Pi I2C bus, and reboot it after serring. It is recommended to reboot after setting the next step:
- Adjust the I2C rate, and add the speed parameter in the /boot/config.txt file. Reboot to take effect after changing. The commands are as shown below:
sudo nano /boot/config.txt dtparam=i2c_arm=on,i2c_arm_baudrate=400000
- If you want to install and download the C/C++ example demo by yourself, you can refer to the following commands:
cd ~ wget https://files.waveshare.com/upload/c/c9/Mlx90640_thermal_camera.zip unzip Mlx90640_thermal_camera.zip cd mlx90640_thermal_camera/RaspberryPi/cpp/ chmod +x install.sh sudo ./install.sh
- If you install and download the Python example demo by yourself, you can refer to the following commands:
sudo apt update pip3 install opencv-python==4.6.0.66 pip3 install pithermalcam sudo apt-get install libatlas-base-dev
C/C++ Example
- Input the following commands in the Raspberry Pi terminal and the effect is shown below:
make sudo ./main #If you are using Windodws MSTSC to log in remotely, you will need to use the following commands: sudo -E ./main
Python Example
- Thanks to pithermalcam opern-source code, you can install it referring to this link.
- Input the following commands in the Raspberry Pi terminal to execute the sample demo. After the execution of the local network video streaming example, other mobile devices or computers open the browser to enter the Raspberry Pi terminal to print the information, the effect is shown in the following figure:
python3 import pithermalcam as ptc # Example of performing local network video push streaming ptc.stream_camera_online() # Example of executing real-time video streaming display, and reference terminal printing information operation ptc.display_camera_live()
STM32
1. When using the sensor, please pay attention to avoid direct contact with the onboard IC devices in your hands. Pay attention to prevent static electricity and check the power supply to prevent reverse connection before powering on.
2. When the sensor is working, please avoid excessive vibration and do not plug or unplug cables. Since the MLX90640 has EEPROM, it will easily damaged by vibration and hot plug.
STM32 | MLX90640 Thermal Camera |
---|---|
5V | 5V |
GND | GND |
SDA(PB11) | SDA |
SCL(PB10) | SCL |
ESP32
1. When using the sensor, please pay attention to avoid direct contact with the onboard IC devices by your hands, Pay attention to prevent static electricity, and check the power supply to prevent reverse connection before powering on.
2. When the sensor is working, please avoid excessive vibration and do not plug or unplug cables. Since the MLX90640 has EEPROM, it will easily be damaged by vibration and hot plug.
- Hardware connection
ESP32 | MLX90640 Thermal Camera |
---|---|
5V | 5V |
GND | GND |
SDA(P21) | SDA |
SCL(P22) | SCL |
FAQ
Resources
Documents
Demo codes
Support
Technical Support
If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 AM GMT+8 (Monday to Friday)