Introduction: Thermal Camera, Human Detection (Think Halloween Follower)

About: I am an author and a maker. My current project is Santa's Shop. I'm working on a science fiction type book--more later. @EngineerRigsby

This project uses an Arduino Uno (or equivalent) and an Adafruit 8x8 thermal camera to detect a passing human. The software sketch I provided illuminates a "left, center or right" led corresponding to where a human is standing. My tests work well up to a distance of about 13 feet.


Supplies

Adafruit AMG8833 8x8 Thermal Camera Sensor

Arduino Uno

(3) led

(3) 220 ohm resistor

Step 1:

Wire according to the schematic.

I suggest going to the Adafruit site for more information about the setup of this camera. https://learn.adafruit.com/adafruit-amg8833-8x8-thermal-camera-sensor?view=all

You will need to install the Adafruit_AMG88xx library (see info link above) so that the Arduino will recognize the thermal sensor. The thermal sensor uses I2C (two wire serial) to communicate with the Arduino.

You can use the "terminal" mode on a computer to see what the data provided by the sensor looks like.


In the title, I alluded to making a "Halloween Follower" -- an eyeball or figure that tracks a passing human. This would require a bit of code change--instead of illuminating the left or right led, a servo motor should move and attempt to get the target into the center zone (if there's enough interest, maybe I'll write the code and show an example).






Step 2:

In the setup, the array size must be specified (64).

float pixels[64];

To read the sensor and place values in an array

amg.readPixels(pixels);

To read a particular cell in the array (for example, if I want "d" to equal the value in position "23")

d=(pixels [23]);

Note that the array begins with cell "0," not cell "1."

Step 3:

In "terminal mode" (if you activate the "Serial.println"lines) you can see the values of the array (and any other variables you wish. In this example, I placed my hand toward the right of the sensor field (notice the higher values for cells 39,47,55 and 63).

This output also shows the averages of "column 1,2,3"; "column 4,5"; "column 6,7,8."

This is followed by the highest value from "column 1,2,3"; "column 4,5"; "column 6,7,8."