"Build your".rosnes 046 own infrared imaging device using an ESP32 and an MLX90640 sensor."
1. Overview
Thermal imagers are the unsung heroes in the industrial world, far surpassing the allure of X - ray vision. These devices can perceive both light and heat, enabling them to detect hidden energy consumption, precisely pinpoint overheating equipment, and even assist soldiers in low - light conditions. In industries like technical maintenance, they act as electronic bloodhounds to sniff out short - circuits. However, their high cost has been a deterrent. But with the rapid evolution of technology, thermal vision may soon become as ubiquitous as phone cameras.

In this project, we'll build a DIY thermal imager using cost - effective components. Among the cheaper thermal imaging sensors considered, such as Panasonic's AMG8833, Melexis's MLX90640, and MLX90641, the MLX90640 stands out. While the AMG8833 is the most affordable, it only offers an 8x8 resolution. In contrast, the MLX90640 provides a 32x24 resolution, making it the top choice for our DIY thermal imager.

The main screen interface of the assembled DIY thermal imager shows the thermal image, along with the minimum, maximum, and mid - point temperatures, and a battery icon. The settings screen features 7 options. The selected option is displayed in green text, and others are in white. You can change the selection by short - pressing the middle button and adjust the value of the selected option using the up / + or down / - buttons.

2. Hardware Features
- Image Sensor Resolution: The imager boasts an image sensor resolution of 32x24, providing detailed thermal images.
- Sensor Field of View (FoV): With a 55°x35° field of view, it can cover a relatively wide area.
- Temperature Measurement Range: It can measure temperatures from - 40 to 300°C, suitable for a variety of applications.
- Operating Temperature Range: The device can operate within a temperature range of - 40 to 85°C, ensuring reliability in different environments.
- Adjustable Refresh Rate: You can set the refresh rate from 4Hz to 32Hz according to your needs.
- Color Palettes and Interpolation Modes: There are 10 different color palettes and 5 different interpolation modes, allowing for customized visualizations.
- Graphical User Interface: It comes with an easy - to - use graphical user interface, enhancing the user experience.
- Display: A 2.4" TFT display with a resolution of 320x240 offers clear visuals.
- Data Storage: You can save thermal images to an SD card for later analysis.
- Power Supply: It has a built - in battery and charging circuit for convenient use.
3. Circuit Design
- Power and Charging: USB Type C is used for charging and programming. The power from the USB port is connected to a power path controller circuit with a P - channel MOSFET U2 and a diode D1. When USB power is available, the device runs on USB power while charging the internal battery. When USB power is cut off, it switches to battery power. A TP4056 charging controller with a maximum charging current of 1A is used to charge the internal battery. A classic voltage divider is used to detect the battery voltage.

- Voltage Regulation: Microchip's MIC5219 3.3V LDO is employed. It can supply up to 500mA of current with a low dropout voltage of only 500mV at full load. The enable pin of the MIC5219 is connected to a slide switch with a pull - up resistor, which is used to turn the infrared thermal imager on and off.

- Programming Circuit: The ESP32 SoC is paired with a programming circuit consisting of a CH340K USB - to - UART controller and ON Semi's 2N7002DW dual N - N - channel MOSFET. The CH340K is chosen for its small size and low cost. The MOSFET acts as an automatic reset circuit for the ESP32, though startup and reset buttons are also included as a backup.

- Image Sensor: The MLX90640 image sensor is directly soldered to the PCB for a compact design. It's connected to the SoC via I2C with only 4 pins (including power and ground). An I2C connector on the PCB allows for using an image sensor module or adding other I2C devices.

- Display and Storage: The 2.4 - inch TFT display with an ILI9341 driver chip is connected to the ESP32 via SPI, supporting a speed of up to 65MHz. An S8050 transistor is used for backlight control, and the brightness can be adjusted using a PWM signal. The display is connected to the ESP32's VSPI interface, while the Micro SD slot is connected to the HSPI interface, enabling simultaneous access to both.

3D Printed Parts

After assembly:

Schematic & PCB


License
NA
4. FAQs
- Q: Can I adjust the refresh rate easily?A: Yes, the refresh rate of the thermal imager can be adjusted from 4Hz to 32Hz, providing flexibility according to your application requirements.
- Q: Is it difficult to charge the internal battery?A: No, it's quite straightforward. You can use a USB Type C cable for charging. The device will automatically manage the charging process and switch to battery power when USB power is unavailable.
- Q: Can I use other image sensors instead of the MLX90640?A: The PCB has an I2C connector, which allows you to use other I2C - compatible image sensor modules. However, you may need to adjust the software accordingly.
Data Acquisition
The Made with KiCad series will support a new display method. You can dynamically view the designed schematic, PCB, 3D model, and BOM at https://www.eda.cn/ecadViewer/viewerPage/?xmlId=e8f03805-2659-4765-a14d-531e739efd9e&fileZip=%2Fdata%2Fdesign%2Fdemo%2Fe8f03805-2659-4765-a14d-531e739efd9e.zip,
and query the property details of components, traces, and pads in the design. You can also interact with the AI assistant in the schematic to help you learn the design details more efficiently:




