Main Content

Simple thermal camera with monochrome display.

Thanks for checking out the project.

I always wanted to have a thermal imaging ability but “grown up” thermal cameras are a rather pricey piece of equipment. So I decided to build it my self.

It appeared that AGM8833 IR sensor is within my reach so I decided to give it a try. With the sensor at hand I start exploring display options. In my parts drawer I found an 0.96 inch monochromatic OLED ans decided to check it out. It took me several attempts to make it work. This project is more a prototype or a proof of concept, but in my opinion it seems like a good base to build upon.

How does it work
In this part I’m going to describe how I managed to make all parts talk to each other.

The AGM 8833 sensor is able to generate a picture with 8x8 resolution. In order to make the sensor work I used the Adafruit library which allowed me to receive sensor data in form of an array of 64 floats - the detected temperature values between 0 and 80.

OLED display is capable of delivering picture in a 128x64 resolution. My first idea was to scale 8 x 8 picture to fit OLED display better, and depending on temperature value generate correct shade of gray by dithering. In order to save memory I would generate correct bitmap by using randomly generated number and threshold. For example for temperature between 60 and 80 degrees (out of the total range of 0-80) I would set threshold to 0.75. In first attempt I used Adafruit OLED library. Then I encountered an issue. Both parts worked separately, but as soon as I tried to initiate the OLED display and get data from the sensor, code ceased to work. AGM8833 Hardware initialization was not successful. It appeared that Adafruit OLED library is using to much memory for Arduino Uno. Next I tried some other libraries but eventually settled down on U8g2. The problem was that this library was lacking pixel drawing capability. Then I came up with an idea to use characters to “emulate” grayscale with ASCII characters. There are some nice ASCII artworks out there so it seemed to be a viable solution. I ended up selecting one out of 8 character base on temperature value in order to generate the thermal picture. This solution is working great on Arduino Uno.

Those are the steps (simplified) that I took to get and display data:

- Get AGM8833 data.
- Loop through results and:
- Get a character to display by calling function.
- Check if row coordinate should be increased.
- Draw assigned character in a correct coordinates.
- Increment column number.”

Link to article