DIY thermal vision shoots 360 panoramas

Like most of you, I do like new technology and spend some money on new parts, sensors, toys, instruments and gadgets. While purchased small toy is on slow route I usually forget about it and remember only after it is delivered. Then item is settled in box proudly named “inbox” and continues it’s existence there for a while. Sometimes it lives there for years. Few days ago I found this forgotten Melexis MLX90614 thermopile (not to be confused with microbolometer) thermal sensor. Unused, unopened and abandoned. Time to make use of it.

I was keen to build my version of scanning thermometer and see what resolution and technological limits are, so let’s get started.


There is not much to invent about scanner construction – it is pan/tilt rig made of two stacked rotary stages. Thermal sensor is installed in more or less rotation center. Slip rings are not necessary but a nice touch that allows continuous rotation.

Motion platform

I have been building modular motorized rotary stage Kurokesu RSA1 (smallest and simplest of upcoming series) for a while and finally assembled all custom made parts in to one piece. So it was a good opportunity to test it and use it as a motion platform.

Motion controller

Motion platform is controlled with controller Kurokesu SCA1 based on GRBL code (powerful enough to be used with small CNC machines or laser engraver). It allows to control directly two stepper motors and have two homing switches. While construction is not over-complicated, I selected top of the shelf Trinamic controllers with 1/256 micro stepping for super quiet and smooth operation. In theory there are 256000 steps per revolution but in reality it is more like 16000 (0.0225 deg resolution per step) which is also more than enough.

Thermometer controller

For reading temperature data I used dirt cheap Atmega328 board (aka Arduino Nano) and medical grade MLX90614 thermometer. Arduino is programed to spit measured temperature every 50ms over serial port.

In action

While rig can move pretty fast (30rpm) it needs to be slowed down to collect enough data points.

How it works

It might seem simple task but it involves some tricks to control motors and read sensor data from two separate controllers.

One of the challenges I faced is meshing position and temperature data. Feedback received from each controllers is timestamped. After scan is complete timings are being analyzed and each temperature value is assigned interpolated coordinate from motor feedback. If done incorrectly (brute forced) this procedure can take hours. Luckily there are tricks to speed this up to few seconds. Hint: Python numpy searchsorted.

Another annoying (but luckily easy to fix) task is correctly and evenly visualizing data. Unless you oversample few times there will be black dots on complete picture. In photography they are called dead pixels. In our situation it is pretty easy to spot these pixels and filling is done by averaging neighboring ones.


Well, results are pretty spectacular. Single point 360 panorama, native 720×360 resolution, but being pretty cheap to build it has major drawback – speed. For example to capture all visible sphere it took more than a hour to complete. Speed is limited by thermal sensor refresh rate which is about 20 samples per second.

Future considerations – recently Melexis produced few new sensors one of them has grid array 32×24 pixels – this should speed scanning time by factor of ~500 so scanning could take few minutes. Also it would be nice to add narrower lens to increase resolution.


Comments ( 23 )

  1. John
    Light grey text on a white background is very hard to read...
  2. saulius
    Thank you John. Will consider darker text color.
  3. Trey Aughenbaugh
    This is really cool. I've always wanted to build a device that sits on my roof and scans around the house to see any changes in heat. Neat way to know when the deer or other animals are visiting, or worse, an uninvited guest. Of course, would need much faster scanning, and could easily be handled other ways, but this is more fun. Thanks for sharing, Trey Aughenbaugh
    • saulius
      Hi Trey, Actually I wanted to build similar device but purpose would be neighbourhood monitoring heat loss.
  4. Arduino Blog » DIY panoramic thermal imaging
    […] You can find more details of the build here. […]
  5. MathGon
    Awesome device, nice construction ;)
  6. SasaKaranovic
    Very nice! Could be useful for thermal "time-lapse" captures of objects that you want to monitor over prolonged periods of time.
    • saulius
      Was thinking of it!
  7. DrStein99
    The rotary stage is too costly.
    • saulius
      Ain't cheap, but that's a cost of a quality and small scale manufacturing. Add all parts like custom aluminum machining, custom pulleys, belt, instrumentation bearings, stainless steel hollow shaft axle with custom nut, known brand motors, also add shipping to all of these separate parts, taxes... But I still think it is a good alternative to few times more expensive optical rotary stages. On the other hand you always can build rotary stage from MDF / 3D printed parts and servo motors.
  8. KevinJay
    Great project! What is the cost of the two rotary stages with steppers and controller for a pan/tilt like you are showing? Could you break it down in list form here and then total it at the bottom? If it's not to expensive I would be interested :)
    • saulius
      Hi Kevin, replied to your email with more details.
  9. DIY an Arduino Scanning Thermometer | Open Electronics
    […] Using an Arduino Nano and two rotary stages, this Maker hacked together a panoramic thermal imaging camera. […]
  10. Carpin
    Can you do the same thing with a microphone to visualize sound?
    • saulius
      Good idea, Carpin! Have to find highly directional microphone.
  11. Thermal Panorama One Pixel At A Time | Hackaday
    […] Inspiration can strike from the strangest places. Unearthing a forgotten Melexis MLX90614 thermopile from his  ‘inbox,’ [Saulius Lukse] used it to build a panoramic thermal camera. […]
  12. ss
    What did you use to process the image? Could you post the code?
    • saulius
      I wrote quick and dirty Python script. Plan few other blog records in similar topic. Will reveal code later when it will be more mature.
  13. Piksel po pikselu czyli kamera termowizyjna DIY - MakerZone
    […] DIY thermal vision shoots 360 panoramas […]
  14. » 3D scanning like a pro
    […] any sensor yields more interesting results if mounted on a moving platform. Remember scanning thermometer? It’s time to mount TOF LIDAR (Time Of Flight / Light Imaging, Detection, And Ranging) on two […]
  15. 3D scanning like a pro - DIY Photography
    […] any sensor yields more interesting results if mounted on a moving platform. Remember scanning thermometer? It’s time to mount TOF LIDAR (Time Of Flight / Light Imaging, Detection, And Ranging) on two […]
  16. jensenbox
    Could you do the same thing for WiFi?
    • saulius
      Visualizing WiFi is more complicated as directional antennas are heavy and bulky and it will not fit this pan/tilt table.

Leave a reply

Your email address will not be published.