Panel For Example Panel For Example Panel For Example

DIY Infrared Thermal Camera Using ESP32

Author : Adrian April 15, 2026

 

Overview

Thermal cameras can detect heat as well as visible light, making them useful for finding hidden energy losses, locating overheated components, and operating in darkness. Their high value in maintenance and diagnostics is well known, but cost can be a barrier. This project demonstrates a lower-cost DIY thermal camera using affordable components. Candidate sensors considered were Panasonic AMG8833, Melexis MLX90640, and MLX90641. The AMG8833 is the cheapest but only provides 8x8 resolution, while the MLX90640 offers 32x24 and the MLX90641 16x12. The MLX90640 provides the best resolution in this price range, so it was selected for this DIY thermal camera.

Below is the assembled DIY thermal camera:

4f5086d4-c412-11f0-8ce9-92fbcf53809c.png

This is the main screen interface. The main screen shows the thermal image along with minimum, maximum, and center-point temperatures and a battery icon.

4f606dba-c412-11f0-8ce9-92fbcf53809c.png

The image below shows the device settings screen. There are seven options. The selected option is shown in green text, while others are white. Short press the middle button to change the selection. Adjust the selected option's value with the up/+ and down/- buttons.

4f6a83c2-c412-11f0-8ce9-92fbcf53809c.png

Sample thermal images:

4f7aae14-c412-11f0-8ce9-92fbcf53809c.jpg

4f839204-c412-11f0-8ce9-92fbcf53809c.jpg

4f91551a-c412-11f0-8ce9-92fbcf53809c.jpg

4f9af46c-c412-11f0-8ce9-92fbcf53809c.jpg

 

Hardware Features

  • Image sensor resolution: 32x24.
  • Sensor field of view (FoV): 55° x 35°.
  • Temperature measurement range: -40 to 300°C.
  • Operating temperature range: -40 to 85°C.
  • Adjustable refresh rate: 4 Hz to 32 Hz.
  • 10 color palettes.
  • 5 interpolation modes.
  • User-friendly graphical interface.
  • 2.4" TFT display, resolution 320x240.
  • Save thermal images to an SD card.
  • Built-in battery and charging circuit.

 

Circuit Design

First, an overview of the schematic is presented for clarity. A USB Type-C connector is used for charging and firmware programming. The USB power input is routed through a power-path controller built with a P-channel MOSFET (U2) and a diode (D1). When USB power is present the device runs from USB power and charges the internal battery; when USB is removed the device automatically switches to battery power.

4fa4afde-c412-11f0-8ce9-92fbcf53809c.png

For voltage regulation, a Microchip MIC5219 3.3V LDO is used, capable of supplying up to 500 mA and featuring a low dropout of about 500 mV at full load. The enable pin of the MIC5219 is tied to a slide switch with a pull-up resistor. This switch is used to turn the thermal camera on and off. When the enable pin is pulled low, the LDO shuts down and most of the device is powered off, except for the battery charging section.

4faf1e10-c412-11f0-8ce9-92fbcf53809c.png

The battery charger is a TP4056 charge controller with a maximum charge current of 1 A. Battery voltage is monitored with a simple resistive divider to scale the voltage to a safe measurement range.

4fbb8740-c412-11f0-8ce9-92fbcf53809c.png

Next is the ESP32 SoC, the programming circuit, and the MLX90640 infrared sensor array. The programming interface uses a CH340K USB-to-UART controller and an ON Semiconductor 2N7002DW dual N-channel MOSFET. The CH340K was chosen for its small size and low cost. The MOSFETs form an auto-reset circuit for the ESP32 to avoid manual toggling during programming. Although auto-reset works reliably, manual boot and reset buttons were also included. Surrounding circuitry for the ESP32 is standard, with bypass capacitors and pull-up resistors where needed.

4fc66994-c412-11f0-8ce9-92fbcf53809c.png

The image sensor is soldered directly to the PCB for compactness. The sensor communicates with the SoC over I2C and requires only four pins including power and ground. If a sensor module is preferred, or additional I2C devices are needed, an I2C connector is provided on the PCB.

4fd5f9d6-c412-11f0-8ce9-92fbcf53809c.png

The final section contains the TFT display, navigation buttons, and Micro SD slot. The display is a 2.4" TFT with 320x240 resolution driven by an ILI9341 driver. It connects to the ESP32 via SPI and supports up to 65 MHz SPI clock. The display is soldered directly to the PCB. Backlight control uses an S8050 transistor and can be PWM-driven to adjust brightness. The display is connected to the ESP32 VSPI interface, while the Micro SD slot is connected to the HSPI interface so the ESP32 can access both if required.

4fde516c-c412-11f0-8ce9-92fbcf53809c.png

 

3D Printed Parts

4ff0b258-c412-11f0-8ce9-92fbcf53809c.png

Assembled device:

4ffc66a2-c412-11f0-8ce9-92fbcf53809c.png

 

Schematics & PCB

500947f0-c412-11f0-8ce9-92fbcf53809c.png

501932f0-c412-11f0-8ce9-92fbcf53809c.png

5024787c-c412-11f0-8ce9-92fbcf53809c.png

50339e7e-c412-11f0-8ce9-92fbcf53809c.png

503d7016-c412-11f0-8ce9-92fbcf53809c.png

505e7b08-c412-11f0-8ce9-92fbcf53809c.png

 

Resources

Designs were created with KiCad. The project files include schematics, PCB layout, 3D models, and BOM. An online viewer supports inspecting design elements and component attributes.

5067a5d4-c412-11f0-8ce9-92fbcf53809c.png

50735532-c412-11f0-8ce9-92fbcf53809c.png