Lemontree

# Sixth Lichuang Electric Competition# Infrared thermal imaging camera

 
Overview

1. Introduction to project functions

Infrared thermal imaging camera is used to display circuit board temperature imaging, equipment temperature imaging, etc.

When working, you may encounter the following scenarios:

1. After the newly welded board is powered on, it is found that the current is abnormal. You need to check where the heat on the board is abnormal.

2. It is necessary to monitor the temperature of a certain device (such as a transistor, MOS) to prevent it from overheating and burning.

3. Measure the temperature rise.

Therefore, I need an infrared thermal imaging camera, but I looked online and it costs around 2,000. Although the resolution is very high, I don’t need such good performance, so I just made one myself. The infrared pixels of the AMG8833 are 8x8, which felt too low, so I chose the MLX90640 with 32x24 pixels. The price on Taobao is 172 yuan. Together with the microcontroller and LCD screen, it can be done within 300 yuan.

What it looks like when finished:

image.png


Has the following functions:

1. Powered by lithium battery and charged by USB port.

2. Built-in 16M SPI flash, the size of an infrared picture is 150K, so 109 pictures can be saved.

3. SPI Flash is used as a virtual U disk. You can directly view and copy the saved pictures by connecting it to the computer through the USB port.

image.png

image.png

2. Project attributes

First public release, completely original.

3. Open source agreement

GPL3.0 open source license.


4. Hardware part

The overall schematic diagram is as follows:

image.png

1. Power supply part

image.png

When the USB port is not connected, it is powered by lithium battery. When the USB port is connected, it is powered by USB and charges the lithium battery through TP4057.


2. Screen and SPI Flash

image.png

The screen uses a 3.5-inch, 320x240 resolution. SPI Flash uses XT25F128B from Xintianxia, ​​16MB.


3. MLX90640 and AD buttons.

image.png

MLX90640 uses analog IIC driver, and uses ADC to read 3 buttons because the IO port is used up.


4. MCU

image.png

The microcontroller uses GD32F103C8T6.

6. Shell selection

image.png

The shell is ready-made on Taobao.

image.png

There is still plenty of space.


7. PCB

image.png

image.png

5. Software part

1. Software processing block diagram

image.png

2. Transplant the MLX90640 official API library

Get the official API library from github: https://github.com/melexis/mlx90640-library

Insert image description here

Insert image description here

Modify the IIC driver in the API library to your own to complete the transplant.

3. Image interpolation

You can read 32x24 infrared pixels by calling the function in the API library. However, the screen is 320x240, so the original image needs to be interpolated and enlarged and displayed on the screen.

Since the computing power of GD32 is not very strong, a bilinear interpolation algorithm with a relatively small amount of calculation was chosen.

Insert image description here


Perform two linear interpolation calculations in the X direction


Insert image description here


Then perform an interpolation calculation in the Y direction:


Insert image description here

Image effect after interpolation:


Insert image description here

4. Convert temperature value to color

Now the 32x24 pixels are enlarged 10 times to get 320x240 pixels, but these pixels still have temperature values ​​of -40 degrees to 300 degrees. How to convert them into color for display?

In fact, there are already conversion specifications, and there are many solutions:

Insert image description here


Method of converting temperature to color:



first assume the upper and lower limits of the temperature range and convert the actual temperature data into a value between 0 and 255


Use the converted value to substitute into the following pseudo-color coding calculation function to generate pseudo-color



image.png


Check out other color conversion methods on my blog: https://blog.csdn.net/qlexcel/article/details/119421679 .

5. Transplant the Fatfs file system and GD32 USB program

Just match the file system driver read and write functions with the USB read and write functions.

image.png

6. BOM list

image.png



7. Contest LOGO verification

image.png


8. Demonstrate your project and record it as a video for uploading

image.png

image.png

image.png

参考设计图片
×
 
 
Search Datasheet?

Supported by EEWorld Datasheet

Forum More
Update:2025-05-15 16:23:42
  • Can I use domain name in socket programming?
  • [Please recommend a data I/O interface card]
  • When CMOS meets TTL
  • Bluetooth computer switch
  • I cannot register on TI official website. I want to register and download CCS
  • What does LED color rendering index mean?

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
community

Robot
development
community

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号