nanoFramework.Iot.Device.Amg88xx 1.2.889

Prefix Reserved
dotnet add package nanoFramework.Iot.Device.Amg88xx --version 1.2.889
                    
NuGet\Install-Package nanoFramework.Iot.Device.Amg88xx -Version 1.2.889
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="nanoFramework.Iot.Device.Amg88xx" Version="1.2.889" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="nanoFramework.Iot.Device.Amg88xx" Version="1.2.889" />
                    
Directory.Packages.props
<PackageReference Include="nanoFramework.Iot.Device.Amg88xx" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add nanoFramework.Iot.Device.Amg88xx --version 1.2.889
                    
#r "nuget: nanoFramework.Iot.Device.Amg88xx, 1.2.889"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package nanoFramework.Iot.Device.Amg88xx@1.2.889
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=nanoFramework.Iot.Device.Amg88xx&version=1.2.889
                    
Install as a Cake Addin
#tool nuget:?package=nanoFramework.Iot.Device.Amg88xx&version=1.2.889
                    
Install as a Cake Tool

AMG8833/AMG8834/AMG8853/AMG8854 Infrared Array Sensor Family

The sensors of the AMG88xx family of infrared array sensors have 64 thermophile pixels arranged in an 8×8 matrix. The sensor works as a thermal infrared camera. It can detect objects (e.g. human bodies) from a distance of up 5-7m. A pixel can measure object temperatures in a range of 0 to 80°C / -20 to 100°C with a resolution of 0.25°C and an accuracy of ±2.5°C / ±4.5°C. The sensor has a view field angle of 60° and a 7.5° view angle per pixel.

The manufacturer (Panasonic) names the following applications: home appliances (microwaves and air-conditioners), building automation (people counting, air conditioning control), home automation (people detection), factory automation (fault prevention). The sensor delivers a heat image through its digital interface (I2C) at a rate of 1 or 10 frames per second. Additionally an interrupt pin can raise an event when any individual pixel goes above or below a configured threshold.

Illustration of thermophile pixel array and heat map

Documentation

Device Family

the AMG88 family consists of 4 members:

Type Resolution Gain Vcc Obj. Temp. Range Resolution Accuracy
AMG8833 8x8 High 3V3 0-80°C 0.25°C ±2.5°C
AMG8834 8x8 Low 3V3 -20-100°C 0.25°C ±4.5°C
AMG8853 8x8 High 5V0 0-80°C 0.25°C ±2.5°C
AMG8854 8x8 Low 5V0 -20-100°C 0.25°C ±4.5°C

The sensor is equipped with an on-chip thermistor which can be read out. The thermistor has a measurement range of -20...80°C at a resolution of 0.0625°C.

Binding Notes

The Amg88xx binding provides a lean interface to retrieve the pixel array and to control the sensor. All sensor functions are covered. Any further processing, e.g. pattern recognition, is beyond the scope of the binding.

Thermal image / Pixel array

The temperature readings of the pixel array can be read as a thermal image with 64 pixels arranged in an 8x8 matrix. The pixel array can be read out at any time and speed. However, the sensor updates the corresponding registers depending on the configured frame rate.

The sensor has an integrated thermistor which can be readout to get the chip temperature.

Note: The chip temperature does not equal to the environmental temperature.

The current image can be read from the sensor into the binding by:

public void ReadImage()

The temperature of a pixel specified by its coordinates can be read using an indexer:

public Temperature this[int x, int y]

The whole temperature image can be read as a two-dimensional array:

public Temperature[,] TemperatureImage

The raw reading (12-bit two's complement format) of a pixel specified by its number can be read using an indexer:

public Int16 this[int n]

Note: there is no statement in the reference specification regarding the synchronization between an update of the pixel registers and the readout operation. So, you may read out pixel data from two subsequent frames in one readout operation. However, for normal application this shouldn't be relevant.

Property:

public Temperature SensorTemperature

Note: the thermistor temperature is not equivalent to the

Operating Mode / Power Control

The sensor supports four operating modes to control power consumption:

  • Normal
  • Sleep Mode
  • Stand-by with 60 seconds intermittence
  • Stand-by with 10 seconds intermittence

Property:

public OperatingMode OperatingMode

Note: refer to the reference specification for further details on mode transitions and sensor behavior.

Reset

The sensor supports two types of resets.

  • Reset: Resets all flags and registers to default values
  • Resetting all flags: Resets all flags (status register, interrupt flag, interrupt table)
public void Reset()
public void ResetAllFlags()

Note: resetting the interrupt related flags is only required if you want to clear flags while the readings are still within the hysteresis span. See interrupts section for further details on interrupt behavior.

Sensor Status

The sensor status indicates if any pixel or the chip internal thermistor overran the upper or lower operating range limit. It also flags on the occurrence of an interrupt. The status can be read out and reset per flag:

public bool HasTemperatureOverflow();
public void ClearTemperatureOverflow();

public bool HasThermistorOverflow();
public void ClearThermistorOverflow();

public bool HasInterrupt();
public void ClearInterrupt();

public void ClearAllFlags();

Note: resetting the interrupt flag is only required if you want to clear flags while the readings are still within the hysteresis span (but already within the lower-upper range). This method does not clear the interrupt flags of the individual pixels. See interrupts section for further details on interrupt behavior.

Note: the thermistor overflow flag is only menthioned in early versions of the reference specification. It is not clear whether this is a specification error or a change in a newer revision of the sensor.

Frame Rate

Default: 10fps

The sensor supports frame rates of 1fps and 10fps. The frame rate defines the update interval of the pixels. This is independent from the readout interval through the I2C interface.

Property:

public FrameRate FrameRate

Moving average

Default: off

The sensor supports a moving average mode. In this mode it builds the twice moving average for each pixel.

  • If the frame rate is set to 10fps the sensor takes the average of the readings n and n+1 and yields their average as output.
  • If the frame rate is set to 1fps the sensor takes the readings of 10 frames (as the sensor runs internally always at 10fps) and builds the average. The average of two averages of 10 readings is the resulting output.

Moving average principle

The noise per pixel will decrease to 1/sqrt2 when using the moving average mode.

Property:

public bool UseMovingAverageMode

Important: the reference specification states that the current mode can be read, but it doesn't seem to work at the time being. In this case the property is always read as false.

Interrupt control, levels and pixel flags

The sensor can raise an interrupt if any pixel passes a given value. The event is signaled by the interrupt flag of the status register. Additionally the INT pin of the sensor can be pulled low.

Properties:

public InterruptMode PixelTemperatureInterruptMode
public bool InterruptPinEnabled

The interrupt levels can be configured. The lower and upper limit as well as the hysteresis level can be set and read. Initially the register is filled with zeros. The levels apply to all pixels equally.

Properties:

public Temperature InterruptLowerLevel
public Temperature InterruptUpperLevel
public Temperature InterruptHysteresis

After the sensor raised an interrupt the triggering pixels can be readout from the interrupt table register.

public bool[,] GetInterruptFlagTable()

Interrupt levels and hysteresis

Interrupt levels and hysteresis

Note:

  • be aware that the interrupt flag in the status register is reset automatically if no pixel temperature exceeds the lower or upper threshold. It is not required to reset the flag manually.
  • any flag in the interrupt flag table is automatically reset if the corresponding pixel is no long exceed the lower or upper threshold.
  • if a hysteresis is applied and the reading of a pixel is not passing the threshold anymore, while at the same time the reading is still within the hysteresis span, the interrupt flag can be cleared by using the ResetAllFlags method.

Example

Overview

The sample application demonstrates the key functions of the sensor and the binding:

  • thermal image readout
  • interrupt triggering based on temperature levels incl. hysteresis
  • sensor states
  • noise reduction by using the sensor's moving average function

There are AMG88xx breakout boards available from a variety of vendors. You can use any of them as long as it provides access to the I2C interface of the sensor.

Note: There are also boards available with additional interfaces or even with an integrated Arduino or compatible circuit. You can use this binding only if the boards gives you access to the I2C interface only.

Wiring

For demonstration purpose the INT-pin of the sensor is connected to a valid GPIO PIN of the MCU. Additionally an LED is connected to another valid GPIO PIN of the MCU. The LED signals the occurrence of an interrupt. The resistor depends on the LED type; however 150R-220R is a safe choice for a standard red LED. Or precisely: R = (3,3V - U LED,forward) / I LED, forward

Wiring of a sensor breakout and LED for the sample

Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.2.889 98 7/28/2025
1.2.869 228 4/2/2025
1.2.864 201 4/2/2025
1.2.852 216 3/11/2025
1.2.846 208 3/10/2025
1.2.822 145 2/26/2025
1.2.785 163 2/4/2025
1.2.775 162 2/4/2025
1.2.772 140 2/4/2025
1.2.759 152 1/31/2025
1.2.755 149 1/31/2025
1.2.743 152 1/20/2025
1.2.737 131 1/13/2025
1.2.718 165 12/30/2024
1.2.704 152 12/18/2024
1.2.696 147 12/16/2024
1.2.673 162 10/23/2024
1.2.665 146 10/16/2024
1.2.656 154 10/3/2024
1.2.651 158 9/27/2024
1.2.639 172 9/6/2024
1.2.631 161 8/28/2024
1.2.613 187 8/9/2024
1.2.601 145 7/26/2024
1.2.590 136 7/17/2024
1.2.580 183 6/28/2024
1.2.573 169 6/19/2024
1.2.570 171 6/14/2024
1.2.560 165 5/29/2024
1.2.548 178 5/15/2024
1.2.536 183 4/15/2024
1.2.514 175 3/22/2024
1.2.494 156 2/28/2024
1.2.474 201 1/24/2024
1.2.462 211 1/5/2024
1.2.458 172 12/20/2023
1.2.436 211 11/10/2023
1.2.416 164 11/8/2023
1.2.403 192 10/6/2023
1.2.396 163 9/27/2023
1.2.384 193 9/6/2023
1.2.378 209 8/16/2023
1.2.369 215 8/2/2023
1.2.363 224 7/28/2023
1.2.357 227 7/19/2023
1.2.354 200 7/14/2023
1.2.345 209 6/21/2023
1.2.341 250 6/14/2023
1.2.337 272 6/7/2023
1.2.335 237 6/2/2023
1.2.329 218 5/26/2023
1.2.316 245 5/16/2023
1.2.313 232 5/12/2023
1.2.308 247 5/11/2023
1.2.304 267 5/10/2023
1.2.302 269 5/10/2023
1.2.297 237 5/3/2023
1.2.273 323 3/17/2023
1.2.267 324 3/10/2023
1.2.263 360 3/8/2023
1.2.259 318 2/27/2023
1.2.256 369 2/24/2023
1.2.253 370 2/22/2023
1.2.222 401 1/9/2023
1.2.212 389 1/5/2023
1.2.208 415 1/3/2023
1.2.203 380 12/28/2022
1.2.159 491 11/14/2022
1.2.153 457 11/5/2022
1.2.141 474 10/25/2022
1.2.128 505 10/22/2022
1.2.122 582 10/12/2022
1.2.114 489 10/8/2022
1.2.95 528 9/22/2022
1.2.87 589 9/15/2022
1.2.73 523 9/8/2022
1.2.63 525 9/3/2022
1.2.47 548 8/15/2022
1.2.40 550 8/6/2022
1.2.38 584 8/5/2022
1.2.28 575 8/1/2022
1.2.13 554 7/24/2022
1.2.10 554 7/23/2022
1.1.145.58726 604 7/7/2022
1.1.133.52556 563 6/30/2022
1.1.121.35854 601 6/26/2022
1.1.116.8772 573 6/24/2022
1.1.113.2032 579 6/23/2022
1.1.102.51394 541 6/15/2022
1.1.99.36719 567 6/14/2022
1.1.97.17326 538 6/13/2022
1.1.92.53000 572 6/8/2022
1.1.72.29765 579 5/31/2022
1.1.64.21380 586 5/26/2022
1.1.58.10097 589 5/23/2022
1.1.54.28879 595 5/23/2022
1.1.40 592 5/5/2022
1.1.3 601 4/15/2022
1.1.1 584 4/14/2022
1.0.300 581 3/31/2022
1.0.288-preview.114 204 3/25/2022
1.0.288-preview.113 213 3/25/2022
1.0.288-preview.104 191 3/22/2022
1.0.288-preview.103 200 3/21/2022
1.0.288-preview.100 213 3/19/2022
1.0.288-preview.99 206 3/18/2022
1.0.288-preview.98 203 3/18/2022
1.0.288-preview.93 196 3/15/2022
1.0.288-preview.87 210 3/10/2022
1.0.288-preview.86 205 3/8/2022
1.0.288-preview.77 196 2/27/2022
1.0.288-preview.75 194 2/26/2022
1.0.288-preview.65 213 2/18/2022
1.0.288-preview.63 202 2/16/2022
1.0.288-preview.61 204 2/12/2022
1.0.288-preview.58 202 2/10/2022
1.0.288-preview.53 195 2/9/2022
1.0.288-preview.48 218 2/4/2022
1.0.288-preview.41 220 1/31/2022
1.0.288-preview.29 213 1/28/2022
1.0.288-preview.20 228 1/27/2022
1.0.288-preview.19 217 1/27/2022
1.0.288-preview.18 214 1/27/2022
1.0.288-preview.5 215 1/24/2022
1.0.288-preview.1 211 1/21/2022
1.0.272 254 1/10/2022
1.0.259 453 12/9/2021
1.0.258 464 12/7/2021
1.0.218 284 10/18/2021
1.0.157 457 9/4/2021
1.0.155 441 8/31/2021
1.0.153 258 8/14/2021
1.0.151 264 8/6/2021
1.0.146 261 7/22/2021
1.0.136 311 7/17/2021
1.0.135 247 7/16/2021
1.0.134 260 7/15/2021
1.0.133 271 7/14/2021
1.0.130 246 7/6/2021
1.0.127 254 7/5/2021
1.0.125 289 7/5/2021
1.0.122 300 6/30/2021
1.0.121 295 6/29/2021
1.0.119 306 6/28/2021
1.0.111 273 6/14/2021
1.0.105 362 5/29/2021
1.0.104 346 5/29/2021
1.0.97 265 5/28/2021
1.0.80 243 5/26/2021