Computer and electronics engineer Jannik Svensson has put together a low-cost thermal imaging camera with on-device live-view and USB streaming, built around a Teensy 4.0 microcontroller and a Melexis MLX90640 thermal imaging sensor.
"This started with that I wanted to check the house for heat loss, but also be able to check electrical things for pre-failure," Svensson explains in a posting brought to our attention by Adafruit.
"[I] realized that MLX90640 was cheap, and after a lot of thinking I did finally buy that sensor. I first did a Raspberry Pi Pico [and] CircuitPython [version] as it already did exist a working example that was very basic, but it was as expected very slow (~1fps [frame per second])."
Using Visual Studio Code and Platform.IO, and working on existing published code examples, Svensson settled on a build that uses the MLX90640 imaging sensor with a Teensy 4.0 and an ST7789 or ILI9341 — switching to the latter after finding the original display a little too small.
Rather than simply display the raw data from the thermal camera, however, Svensson opted to add interpolation functionality — smoothing the chunky pixels of the relatively low-resolution 24×32 sensor to provide a better image, complete with a choice of color palettes for interpretation of the temperature data.
Using threading to get the most out of the microcontroller, Svensson has been able to display footage from the camera at around seven frames per second — a considerable improvement over initial efforts — with bicubic interpolation.
As well as displaying the images on the on-board display, the camera can also stream out to a desktop application or the RoboRemo app running on an Android tablet or smartphone — both of which include an easy method to experiment with different palettes and interpolation options.