Skip to content

IR Array Thermal Camera Wireling Python Tutorial

This Wireling gives your project heat-vision in an 8x8 array of temperature output using the Infrared Array Grid-EYE AMG8833 Sensor! This can be used to detect the passage of humans, animals, and keep track of how hot your PC is getting.

Technical Details

AMG8833 IR Array Sensor Specs

  • Temperature detection of 2D area: 8x8 (64 pixels)
  • Digital output of temperature readings
  • Human detection up to 7m
  • Temperature accuracy:
    • High gain: Typical ± 2.5°C 
    • Low gain: Typical ± 3.0°C 
  • Setup time typical 50ms, time to stabilize typical 15s
  • Viewing angle typical 60° ± 5.6°

Power Requirements

  • Voltage: 3.0V - 5.5V 
  • Current:
    • Normal: 4.5mA
    • Sleep mode: 0.2mA
    • Stand-by mode: 0.8mA

Pins Used

  • A5/SCL - I2C Serial Clock line
  • A4/SDA - I2C Serial Data line

Dimensions

  • 15mm x 10mm (0.59 inches x 0.39 inches)
  • Max Height (from the lower bottom of Wireling to upper top Wireling Connector): 8 mm (0.31 inches)
  • Weight: 1 gram (.04 ounces)

Materials

Hardware

Required Software


Hardware Assembly

Plug your Wireling into the port you plan on using! The default in the included program is port 0.

If you want to use a different port, you just need to change the port value in the program mentioned later.


Programming

Install the necessary Python package:

sudo pip3 install adafruit-circuitpython-amg88xx

Lets look at the beginning of one of the package examples:

amg88xx-example.py
# IR Array Thermal Camera Example
# This example will print out an array of the temperature data read by the camera in Celsius
# Example modified by: Laverena Wienclaw for TinyCircuits

import time
import busio
import board
import adafruit_amg88xx
import tinycircuits_wireling

# Enable and power Wireling Pi Hat
wireling = tinycircuits_wireling.Wireling()
wireling.selectPort(0) # Select port labeled on Pi Hat (0-3)

i2c = busio.I2C(board.SCL, board.SDA)
amg = adafruit_amg88xx.AMG88XX(i2c)

while True:
    for row in amg.pixels:
        # Pad to 1 decimal place
        print(['{0:.1f}'.format(temp) for temp in row])
        print("")
    print("\n")
    time.sleep(1)

Run Program

Navigate in the terminal to the directory with the file parent to the examples folder.

python3 amg88xx-example.py

Once the program is running, it will print out an 8x8 array of the temperature data in Celsius:


['21.2', '21.0', '21.0', '21.8', '21.5', '21.0', '21.5', '20.5']

['21.8', '21.8', '22.0', '21.5', '21.5', '21.8', '21.5', '21.8']

['21.8', '22.0', '21.5', '22.0', '21.8', '21.8', '21.5', '21.5']

['21.2', '21.8', '21.8', '21.8', '22.2', '21.8', '21.8', '22.0']

['21.5', '22.0', '22.0', '22.2', '22.2', '22.0', '21.8', '21.0']

['21.5', '22.0', '22.2', '22.5', '21.5', '21.5', '21.8', '21.5']

['21.8', '21.8', '22.2', '22.0', '22.0', '21.2', '21.8', '21.2']

['22.0', '21.8', '23.2', '22.2', '21.8', '22.0', '22.0', '21.0']

The best way to view this data is using a colorful screen, see how it can be used in the Thermal Camera Wireling TinyScreen+ Tutorial.


Contact Us

If you have any questions or feedback, feel free to email us at info@tinycircuits.com or make a post on the forum.

Show us what you make by tagging @TinyCircuits on Instagram, Twitter, or Facebook so we can feature it!

Thanks for making with us!


Downloads