Thermal camera, AMG8833
The AMG8833 Grid-EYE: an 8x8 thermal camera, sixty-four temperatures ten times a second over I2C. Aliases: Grid-EYE, AMG88xx, 8x8 thermal sensor.
Each pixel is a thermopile that sees one patch of the scene, so a hand at arm's length is a warm blob a few pixels across. It is the sensor of the cheap thermal cameras, people counters and "is somebody in the room" builds.
Pins
| Pin | What it does |
|---|---|
VIN |
Supply, 3 V to 5 V on the breakout. |
GND |
Ground. |
SCL |
I2C clock. |
SDA |
I2C data. |
INT |
Open drain, low when a pixel crosses the interrupt levels. Optional. |
Properties
address is 0x69 (105), or 0x68 (104) with the AD pin low. background is the
scene's temperature, 22 C; spot the warm spot's, 34 C; pixel where the spot is,
0 to 63 from the top left, or 64 for no spot.
While it runs
The grid over the board is the scene. Click a square to move the warm spot there, or click it again to take it away; drag the sliders for the two temperatures. The readout is the hottest pixel.
What the model gets right
From the Grid-EYE specification:
The registers. Power control, reset, frame rate, interrupt control and status, the interrupt levels, the thermistor at 0x0E and the sixty-four pixels from 0x80.
The formats. Pixels are twelve-bit two's complement in quarters of a degree; the thermistor is twelve-bit sign and magnitude in sixteenths.
The frames. A new frame every 100 ms at ten frames a second, every second at one, none while asleep.
The absolute interrupt. A pixel over the upper level or under the lower one sets
its bit in the table and pulls INT low until the flag is cleared.
What it does not model
The scene is Mokxi's: a background and one spot that spreads half its difference to the pixels beside it and a quarter to the corners. A real sensor is noisy by about a degree from frame to frame; this one is not. The difference interrupt mode, the hysteresis and the moving average are stored but do nothing. The thermistor reads the background, standing in for the room.
Libraries
Adafruit AMG88xx Library (Adafruit_AMG88xx.h): amg.begin(), then
amg.readPixels(pixels) into an array of 64 floats.
Common mistakes
Reading the 128 pixel bytes in one go on an Uno: the Wire buffer holds 32. The library reads them in pieces.
See it in action
Thermal camera paints the sixty-four pixels on an ST7735 color screen. Open it at /templates.