PiThermalCam, a Raspberry Pi Thermal Camera

Tom Shaffner built a budget-friendly thermal camera using a Raspberry Pi 4 and an MLX90640 breakout board.

Jeremy Cook
3 years ago

Tom Shaffner has been working from home as of late, and thus leaving the heat on all day. Naturally, this means more thermal energy leaking out to the environment, which he decided to analyze using a thermal camera. Unfortunately, this type of camera costs hundreds (or even thousands) of dollars, so he decided to create his own Raspberry Pi-based solution.

His setup, dubbed PiThermalCam, is explained in some detail on his write-up with code available for your perusal and/or use. Hardware-wise, it’s a fairly simple build, with a Raspberry Pi 4 that runs things, along with the MLX90640 thermal camera that’s really the star of the show. Unlike inexpensive-ish thermal cameras that were available before in an 8x8 resolution, this ~$60 device features a 24x32 sensor matrix for 768 individual temperature readings. Perhaps not coincidentally, breakouts for the unit are out of stock on both Adafruit and Pimoroni as of this writing, though I’d have to bet you can get them somewhere if you poke around enough!

The PiThermalCam could be used with an onboard display, but Shaffner instead opted to have it stream thermal images generated with OpenCV to a web browser. Results certainly aren’t as good as cameras costing hundreds or even thousands of dollars more, but the system is quite usable for figuring out where heat is escaping the house. It could also be repurposed as an infrared security camera when analysis is done!

Jeremy Cook
Engineer, maker of random contraptions, love learning about tech. Write for various publications, including Hackster!
Latest articles
Sponsored articles
Related articles
Latest articles
Read more
Related articles