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.
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)
For ESP8266 versions, uncomment the following lines in User_Setup.h:
define TFT_CS PIN_D8 // Chip select control pin D8
define TFT_DC PIN_D3 // Data Command control pin
define TFT_RST -1 // Set TFT_RST to -1 if the display RESET is connected to NodeMCU RST or 3.3V
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°