This Thermal Camera was inspired by the DIY Mini Thermal Camera from Adafruit, based on the 8 x 8 infrared grid array sensor amg8833. This version is based on the cheap ESP8266 and an ILI9341 touch screen. Two software versions are available, one is based to the Adafruit example, the second and more advanced regarding interpolation, is based on the code of Kris Kasprzak. Both were slightly enhanced to provide a portrait screen orientation, a thermal scale, a touch screen autoscale function, a lipo monitoring and a temperature measurement in the center.
By exchanging the micro controller, the total cost of hardware was reduced to around 55€. Since the design was kept simple and the code was available, this was a nice little weekend project.
As AliExpress offers a smaller version of the amg8833 pcb, Manuauto designed a small adapter to fit the housing. The adapter is available at https://www.thingiverse.com/thing:3066479. Link the sensor pcb: https://de.aliexpress.com/item/AMG8833-IR-8-8-W-rmebildkamera-Array-Temperatur-Sensor-Modul-8x8-Infrarot-Kamera-Sensor/32867572849.html
The user Manuauto added support of the SD card to save images by pressing a button, the code can be found at github: https://github.com/wilhelmzeuschner/arduino_thermal_camera_with_sd_and_img_processing I will try to add the slot for the SD card as soon as possible
UPDATE / 12.08.2018
Due to the change from 22.02.2018, the pin assignment was inconsistent. Mapping was updated at sourcecode, table and graphic. Data type of MINTEMP&MAXTEMP was changed to float, this should fix the compile error which was observed by some users
UPDATE / 28.03.2018
There was a mistake in the connection table, SDA and SCL were swapped, the pinning is corrected. The hardware will not be harmed, it just would not work.
Added Fritzing sketch
UPDATE / 22.02.2018
For a new display driver which allows a higher framerate, the pin mapping was updated as well as the arduino sketches. Pin D3 and D8 have been swapped. Faster display driver included for the ESP8266 Wemos D1 Mini or Node MCU. Fixed battery display
The parts were designed to be printed without supports, overhangs less than 45° and no part bigger than 100mm to be printable easily.
The assembly is very simply and consists of the following steps:
- Grip is attached to the body by two M4 screws which could be inserted directly to the PLA. The lens hole points to the front.
- The lipo, the loading circuit and the used micro controller are mounted with wire strips to the holder with the USB connectors facing to the top for easy loading and flashing. Why wire strips? By this, all different lipos, loader pcbs and different µC controllers could be used
- Installation of switch in the housing, it could be glued or screwed
- Wiring everything up
- The amg8833, the display and the electronics are inserted in the corresponding position
- Top is simply clipped in place and could be opened to update the software or to load the lipo
See attached screenshot for wiring. For battery monitoring, a 130kOhm resistor connects A0 of the Wemos D1 Mini and Lipo anode.
Two software version are available which could be used, both use the interrupt of the touch screen for user interaction. If a bigger µC (like the teensy 3.2) is used, the touch screen could be used, but the code needs to be enhanced for this feature. Wemos D1 Mini was set to 160MHz in Arduino IDE
Recommended version "ThermalCameraMod" is based on the work of Kris Kasprzak and provides a smooth and fast interpolation algorithm.
Adafruit example sketch for amg8833 with some extensions, this version provides less colors, less resolution but a higher framerate.
Required libraries (Arduino IDE manage libraries):
- Adafruit AMG88xx Library
- Adafruit ILI9341
- Adafruit GFX Library
- for ESP8266 (folders ending with TFT_eSPI) version, TFT_eSPI ZIP import from (https://github.com/Bodmer/TFT_eSPI)
The camera starts after booting with a default temperature range. If the target temperatures do not fit the scale, a tap on the screen searches for the minimum and maximum temperature value and adapts the scale accordingly. A long press on the screen toggles the measurement of the center, the value is an average of the four center pixels from the raw data.
- Temperature range ~ 0 - 80°C
- Framerate up to 10Hz
- Field of view 60°