Always Wanted a Thermal Camera
I've always wanted a thermal camera, but professional ones are expensive — often costing hundreds or even thousands of dollars. So I decided to build an entry-level one with the help of AI to code the software application. This time, Codex was used by submitting all the desired information and requirements upfront, and the main major areas of the application seemed to be running fine after the first attempt to upload the code to the device.
The hardware used this time is an ESP32-32U module and an MLX90640 ESF-BAB infrared thermal camera module, able to produce 32×24 pixel-wise resolution — that's 768 individual thermal pixels. It's not FLIR-grade, but for an entry-level exploration tool, it delivers genuinely useful thermal imagery at a fraction of the cost.
The Idea — Real-Life Use Cases
The idea came from needing this kind of device in a few real-life situations — locating leaking pipes, checking insulation, and inspecting plumbing within walls. All commercial devices seemed expensive for occasional use. Although after the initial test and research, I found that it's not easy to find a leaking pipe that is 50cm underground using a thermal approach alone. But for hot water pipes within the wall of a shower room, or for general thermal pattern observation, it is still fun and interesting to see it running.
Hardware — Two Simple Components
The beauty of this project is its simplicity. The entire hardware setup consists of just two modules connected via I²C:
• ESP32-WROOM-32U — Dual-core 240 MHz, Wi-Fi, 4 MB flash, runs the web server and sensor driver
• MLX90640ESF-BAB — 32×24 far-infrared thermal array, 55°×35° field of view, I²C interface
• Wiring: SDA → GPIO25, SCL → GPIO26, power from ESP32 3.3V to sensor VIN
Four Hours from Idea to Working Device
The total time invested in this project was surprisingly short — roughly a 4-hour project from concept to first working test:
The Application — Mobile Web Dashboard
The ESP32 creates its own Wi-Fi access point. Once connected with a phone, the entire application runs through a mobile-friendly web dashboard served directly by the microcontroller — no cloud, no internet required. The dashboard provides a live thermal view with a colour palette, adjustable refresh rates from 0.2 to 32 fps, image saving, and even MP4 video recording handled entirely by the phone's browser.
Field Test — Pool Pipe & The Reality
The pool pipe had leaked years ago and was repaired, but the exact location of the original break was never confirmed. The hope was to use the thermal camera to find the layout of the underground piping by detecting temperature differences between the pipe and surrounding ground. Unfortunately, no luck finding the pipe in the evening cold weather — at roughly 50cm depth, the thermal signature simply doesn't reach the surface in a way that a 32×24 sensor can reliably detect.
Final Lap — Device in Action
Below is a video demonstration of the device in action, following the firmware upload to the ESP32 system. Despite the limitations discovered during field testing, the thermal camera performs well as a general-purpose thermal observation tool and the entire software stack worked on the first upload — a testament to what AI-assisted coding can achieve.
What's Next?
While the underground pipe detection didn't pan out as hoped, this project opened up new ideas. The thermal camera could still be useful for inspecting hot water pipes within shower room walls, checking window insulation, monitoring electronics for overheating, or even as an educational tool. The total investment — both time and money — was minimal compared to a commercial thermal camera, and the satisfaction of building something functional with AI assistance in just 4 hours is hard to beat.