Introduction: M5Stack IR Thermal Camera Using AMG8833 Infrared Array Imaging Sensor
Like many I have had a fascination
with thermal cameras but they have always been out of my price range – until now!!
Whilst browsing through the Hackaday website I came across this camera build using the M5Stack ESP32 module and a relatively inexpensive Panasonic Grid-EYE / High performance AMG8833 Infrared Array Sensor. I already had an M5Stack core module, so building this was a no-brainer!
You will find the parts list in the final step.
The video shows the build and the following steps explain the process.
Step 1: Install Sketch on M5Stack
Go to the GitHub site and
download the Arduino sketch for the M5Stack https://github.com/hkoffer/M5Stack-Thermal-Camera-
When I first verified the sketch it failed because the required interpolation.cpp file was not in the same directory as the sketch. Move the file and all will be well. Now it is time to upload the sketch to the M5Stack. Check that you have the correct board selected in the Boards manager and that the correct serial USB COM port is selected. A 0.1 µF capacitor is put between the ground and reset pin to enable the M5Stack to be flashed.
You can see more detail on this in one of my other videos:
Step 2: Connect AMG8833 Infrared Array Sensor
The AMG8833 Infrared Array
Sensor is connected to the M5Stack using the I²C bus. This uses the two pins SDA (pin 21) and SCL (pin 22) on the M5Stack. These pins can be found on both the connectors on the top or bottom of the M5Stack. Choose whichever suits your needs. The other two connections are Ground and VCC 3.3 volts.
Now when you switch the M5Stack on you should see the thermal image, great!
Step 3: Alternative Sketch With More Features
I saw that someone had “forked”
the original GitHub repository and added some interesting new features including:
- Move the spot value (in float) to the center
- Pinpoint the min and max pixel (min colored in blue and max in white)
- Display Frames Per Second
- Auto scaling temperature
- Auto reboot and reset the i2c port in case of bad connection
- Pause state Auto sleep function
You can download this repository here:
Check the sketch in the Arduino IDE and look for the command “M5.Lcd.setRotation (1);” The value should be set to “0” otherwise the screen will be rotated through 90°!
Now you can upload the sketch and try out the new menus!
The components I use are: