Search models, users, collections, and posts

DIY Handheld Thermal Camera - ESP32 Heatmap

Print Profile(1)

All
P1S
H2S
P1P
X1E
X1
A1
P2S
H2C
X2D
H2D
A2L
X1 Carbon
H2D Pro

0.2mm layer, 2 walls, 15% infill
0.2mm layer, 2 walls, 15% infill
Designer
3.6 h
2 plates

Open in Bambu Studio
Boost
65
163
2
2
4
1
Released 

Bill of Materials

Bambu Filaments
Select all
Matte Ash Gray (11102) / Refill / 1kg

Description

Content has been automatically translated.
Show original

DIY Handheld Thermal Camera – ESP32 + AMG8833 + 8×8 LED Matrix

With this project, you can build a small DIY thermal camera. It is based on an ESP32, an AMG8833 8×8 thermal sensor, and a WS2812B 8×8 LED matrix. The camera displays temperature differences directly on the LED matrix. Additionally, the ESP32 creates its own Wi-Fi network through which the thermal image data can also be displayed in a browser

Assembly Video

Watch assembly video on YouTube

Required Components

ComponentQuantityLink
ESP32 Dev Boardclick me
AMG8833 / Grid-EYE Thermal Sensorclick me
WS2812B 8×8 LED-Matrixclick me
Thin Wires / Dupont Cablesseveralclick me
Screw M3 x 6mm8xclick me

Pinout

ConnectionESP32 PinComponent Pin
LED Data LineGPIO 5DIN of WS2812B Matrix
LED Power Supply5V / VIN5V of WS2812B Matrix
LED GNDGNDGND of WS2812B Matrix
AMG8833 Data LineGPIO 21SDA
AMG8833 Clock LineGPIO 22SCL
AMG8833 Power Supply3V3VIN / VCC
AMG8833 GNDGNDGND

Important: All GND lines must be connected to each other. This includes ESP32-GND, AMG8833-GND, and LED Matrix-GND

The LED matrix is powered by 5V. The AMG8833 should be powered by 3.3V

Prepare Firmware

For the firmware, you need the Arduino IDE or PlatformIO

Required Libraries:

  • Adafruit AMG88xx
  • FastLED
  • ESP32 Board Package

After uploading, the ESP32 automatically starts its own Wi-Fi network

Wi-Fi Name:

ThermalCamera

Then connect to this Wi-Fi network with your phone or laptop and open this address in your browser:

http://4.3.2.1

There, the thermal image display will be shown. You can also rotate or mirror the orientation of the web view and the LED matrix directly in the browser

Important Code Parameters

You can adjust these values in the upper part of the code:

ParameterDefaultMeaning
LED_PIN5Data pin of the WS2812B LED matrix
NUM_LEDS64Number of LEDs, 64 for 8×8
I2C_SDA21SDA pin for the AMG8833
I2C_SCL22SCL pin for the AMG8833
SERPENTINEfalseSet to true if your matrix is wired in a serpentine pattern
ORIGIN_TOP_LEFTtrueDetermines if the first LED is top left
FLIP_XfalseMirrors the LED output left/right
FLIP_YfalseMirrors the LED output top/bottom
BRIGHTNESS16Brightness of the LEDs, 0–255
MAX_MILLIAMPS450Current limit for the LED matrix
FRAME_MS100Frame rate, 100 ms corresponds to approx 10 FPS
DEADBAND_C3.0Temperature range around the reference temperature that remains black
MIN_SIGNAL_C2.5Minimum scaling, reduces flickering at uniform temperature
REF_SMOOTH0.90Smoothing of the reference temperature
PRINT_EVERY_N5Outputs every fifth frame in the serial monitor
AP_SSIDThermalCameraName of the Wi-Fi network created by the ESP32

Adjust Sensitivity

If you want to see more temperature details:

#define DEADBAND_C 2.0f

If only strong heat sources should be visible:

#define DEADBAND_C 4.0f

If the display flickers:

#define REF_SMOOTH 0.95f

If the response should be faster:

#define REF_SMOOTH 0.80f

LED Matrix Orientation

If the image is rotated or mirrored, there are two options:

  1. Rotate or mirror the LED matrix directly in the browser at http://4.3.2.1
  2. Adjust these values in the code:

#define SERPENTINE false #define ORIGIN_TOP_LEFT true #define FLIP_X false #define FLIP_Y false

Many 8×8 LED matrices are constructed differently. If the display is not right, first change SERPENTINE. Then test FLIP_X or FLIP_Y if needed

Assembly

  1. Print housing parts
  2. Place ESP32, AMG8833, and LED matrix into the housing for a test fit
  3. Connect AMG8833 with 3V3, GND, SDA, and SCL
  4. Connect LED matrix with 5V, GND, and GPIO 5
  5. Connect all GND lines together
  6. Upload firmware to the ESP32
  7. Before closing, test if the sensor and LEDs are working
  8. Insert AMG8833 so that the sensor faces forward
  9. Place LED matrix behind the front opening or diffuser
  10. Route cables neatly and close the housing
  11. Connect to the Wi-Fi network ThermalCamera and open http://4.3.2.1
  12. If necessary, adjust the display orientation in the browser

Troubleshooting

ProblemPossible Cause / Solution
AMG8833 not foundSDA/SCL swapped, incorrect voltage, GND missing
LED matrix remains darkCheck 5V/GND, check DIN, observe direction arrow of the matrix
ESP32 keeps restartingPower supply too weak, reduce brightness
Image is mirroredAdjust FLIP_X, FLIP_Y or browser settings
Image is rotated by 90°Change rotation in the browser
Wi-Fi does not appearRestart ESP32, re-upload code, check serial monitor
Browser shows no dataConnect to the Wi-Fi network ThermalCamera and open http://4.3.2.1

Notes

This thermal camera is a DIY maker project and not a calibrated measuring device. The display is suitable for visualizing temperature differences, but not for precise or safety-critical measurements

The LED matrix can draw a relatively large amount of current depending on the brightness. For USB operation, low brightness is advisable. Therefore, the brightness in the code is set to 16 by default and the current limit to 450 mA

 

Boost Me (for free)

Thank you!!! :) 

 


Documentation (1)

Other Files (1)
Code .txt

Comment & Rating (2)

(0/1000)

License

This user content is licensed under a Standard Digital File License.

You shall not share, sub-license, sell, rent, host, transfer, or distribute in any way the digital or 3D printed versions of this object, nor any other derivative work of this object in its digital or physical format (including - but not limited to - remixes of this object, and hosting on other digital platforms). The objects may not be used without permission in any way whatsoever in which you charge money, or collect fees.