0. Outline
The underlying physical principle is radiation. Every warm body radiates heat, and every creature radiates in the infrared spectrum.
The infrared sensor costs around 15€ (September '25). With the other components, the expenses for a prototype amounted to forty-odd Euros.
1. Prototype
The prototype is built around a Raspberry Pi Pico W, components are connected thru the I2C bus (see farther below).
I am using a Raspberry Pi for program development, obviously (the actual SW is written in C language) and for checking raw data on the serial port (debugging). The Raspberry Pi is also on the receiving end of thermal data (IoT prototype).
SW V0.2x (non IoT / OLED display)
A first smoke test with the prototype, OLED display is intended for demo purposes. Displayed are 60 FIR pixels (out of 768), because that was easy to implement.
SW V0.49x (IoT)
A more advanced prototype, reading web data with a Python routine what is pretty slow. Thermal image of my hand, and of a tea pot.
2. I2C bus components
The Raspberry Pi Pico W is, by default, the I2C bus master. In fast mode we can operate up to 400 Kb/s, what entails an IR array refresh rate of 16 Hz, or lower.
Slaves:
* MLX90642 IR array (the actual sensor)
Optional:
* OLED display w/ SSD1306 controller (merely for experimenting / presentation)
* TSL25911 ambient light sensor (for night activation or error correction if applicable)
The Raspberry Pi is not part of this network. The components are just "daisy-chained" on two GPIO pins of the Pico W (SDA on Pin 4, and SCL on Pin 5), so I won't bother with a schematic.
As usual, some messing around with the PullUp resistors is necessary in order to make it work.
3. InfraRed (IR) array details
The MLX90642 IR array consists of (32x24=) 768 FIR pixels/sensors, each individual IR pixel delivering 2 Byte of thermal data to be acquired via I2C commands i. e. registers. Simple math formulas have to be applied on the data to get object temperatures.
Temperatures in the range -40°C to 85°C can be measured, values can be acquired continuously or step-wise. I2C clock speed has to be high enough to be able to deal with the array refresh rate to avoid glitches (see above). Emissivity of the object can be modified too (not important in the project context, human skin has an emissivity of approximately 1 what is the default value anyway).
Compared with commercial and ready-to-use systems, a resolution of 32x24 is not very high of course (those systems have their price though, obviously). This could theoretically be improved by using several sensors.
4. IoT
Different options for realizing an IoT device, but as mentioned I am using a Raspberry Pi Pico W and the home WiFi.
Analysis, rendering and display of thermal data on a computer makes more sense than on the IoT-platform itself, or on any attached off-the-shelf display for that matter.
Implementation where all 768 pixels are read and temperatures are just shown in a web browser.

The thermal data can automatically be imported via Excel web interface, or crawled and visualized via Python scripts. These methods are slow and cumbersome as you can see in one of my videos, when speed is important there exist better solutions I will not dive into here (MQTT comes to mind).
5. Challenges
There are of course many challenges along the way until I have a somewhat useable home intrusion system that does not boast with too many false positives. To mention a few:
* adapting to differing environmental conditions (bright sunlight is a particular challenge)
* recognizing (intelligently) the movement of objects
* interpolation, extrapolation and presentation of values
* SSL server implementation
* sensor fusion to get a higher resolution image (two IR arrays), or combining the array with a normal camera
Perceiving and visualizing a moving object in a couple...
Read more »
Florian Wilhelm Dirnberger
Alpha Charlie
Katarina Zvarova
Robert Gawron
Brenda Armour