Ditch X-ray vision, thermal cameras are the real industrial superheroes! They don't just see light, they see heat, making them masters of uncovering hidden energy drains, pinpointing overheating gadgets, and even aiding soldiers in the dark. They're invaluable in industries like tech repair, where they sniff out shorted circuits like electronic bloodhounds. The only catch? Their price tag can be a bit frosty. But hey, technology is always evolving, and soon, thermal vision might be just as common as your phone camera! So remember, that seemingly ordinary camera might just be packing some extraordinary heat-sensing powers.
A few months back I have created such a thermal camera with easy to find components. Here I'm sharing that project with you hoping some of you may find this helpful. So, in this project, we are going to find some solution for that by making a DIY thermal imager using much cheaper available components. The cheaper thermal imaging sensors we have considered are the AMG8833 from Panasonic, MLX90640 and MLX90641 from Melexis. Even though the AMG8833 is the cheapest of them all it only has a resolution of 8x8, while MLX90640 offers a resolution of 32x24 and MLX90641 offers a resolution of 16x12. Since the MLX90640 offers the best resolution in the price range we choose it for our DIY thermal camera.
Features- Image sensor resolution: 32x24.
- Sensor field of view (FoV): 55°x35°
- Temperature measurement range: -40 to 300°C
- -40 to 85°C operational temperature range.
- Adjustable refresh rate – 4Hz – 32Hz.
- 10 different colour pallets.
- 5 different interpolation modes.
- Easy to use GUI.
- 2.4” TFT display with 320x240 resolution.
- Save thermal image to SD card.
- Built-in battery and charging circuit.
- Open source
The complete circuit diagram for the DIY Thermal Camera is shown above. It can also be downloaded in PDF format. We have used KiCad to design the schematics and PCB for this project, you can find the complete files on the GitHub repo. To understand everything easily I have divided the schematics into different sections and marked everything accordingly.
Here we have the power section. It consists of the USB C connector for power input and programming, power path controller built around AO3041 MOSFET, 3.3V regulator and battery charging circuit built around the TP4056 charge controller. A voltage divider is used to measure the battery voltage. The power switch is connected to the enable pin of the 3.3V LDO.
Next we have the main circuitry, that includes the ESP32 SoC, USB to UART controller and the MLX90640 image sensor. The programming circuit uses a CH340K chip for USB communication. And a dual N-Channel MOSFET is used for auto-reset circuit. The MLX90640 is interfaced to the ESP32 using I2C. An additional I2C port is also provided in case if needed for anything else.
Last we have the display, micro SD card and button inputs. The display uses hardware HSPI bus for interfacing with ESP32. The micro SD interface uses the VSPI pins on the ESP32 module. Detecting key presses we are using simple pushbuttons connected to the GPIOs and ground.
PCB DesignWe have used KiCad for designing the PCB. We have used a simple two layer layout for our PCB, because they are cheap and easy to get manufactured. The PCB has a dimension of 80mm x 50mm. Here are the top and bottom layers of the PCB.
And here is the 3D view of the PCB.
Finally ere is the fully assembled PCB.
Here is the overall overview of a fully assembled DIY Thermal Camera.
We have designed a cool-looking 3D-printed enclosure for the DIY thermal camera. The files for all the 3D printed parts can be downloaded from the GitHub/Thingyverse link provided below.
The button usage is the following.
Up/+ Button:
- Default: Change/cycle through interpolation mode.
- In Settings: Change the selected value.
Middle/Ok Button:
- Default:Short press: Save images to SD card.Long Press: Enter the settings menu.
- In Settings:Short press: Change the selection in the menu.Long Press: Exit the settings menu.
Down/- Button:
- Default: Change colour pallet.
- In Settings: Change the selected value.
Here is the main screen interface. On the main screen, you can see the thermal image itself along with the minimum, maximum and middle point temperatures and battery icon.
The image below shows the Settings screen of the DIY thermal camera. The settings have 7 options. The selected option will show in green text while others will be shown in white text. You can change the selection by short pressing the middle button. The value of the selected option can be adjusted using the Up/+ or Down/- button.
Here are the settings options and the corresponding values available.
- Auto ScaleOn: Auto scale on. Colour will display according to the maximum and minimum temperature readings from the sensor.Off: Auto scale on. Colour will display according to the maximum and minimum temperature set manually.
- Min Temperature: Minimum temperature for colour palette calculation when the auto scale is off.
- Max Temperature: Maximum temperature for colour palette calculation when the auto scale is off.
- Interpolation: Interpolation method. It refers to the interpolation algorithm used to upscale the low-resolution image from the sensor(32x24) to the high-resolution image(320x240) displayed on the screen. Depending on the interpolation method the quality of the image as well as the image processing time will change. The available methods are the following.
- Nearest Neighbor
- Average
- Bilinear
- Bilinear Fast
- Triangle
- Palette: The colour palette refers to the different display modes. There are 10 different palettes available to select.
- Refresh Rate: Refresh rate of the image sensor. The MLX90640 supports refresh rates from 0.5Hz to 64Hz. But while testing the most usable refresh rates were 4Hz, 8Hz, 16Hz and 32 Hz. So, we have only included these refresh rates.
- Backlight: Backlight brightness. You can set it from 10% to 100%.
If you want to know more about the project including how the firmware works please visit the original project page.
Show CaseHere are some of the images taken using our thermal camera.
Comments