Close
0%
0%

Infrared Home Intrusion System

Thermal imaging with MLX90642 32x24 InfraRed (IR) array

Similar projects worth following
Creating an IoT device with a MLX90642 32x24 InfraRed (IR) array that provides thermal data and images, and building a very basic IR camera thru an attached display.

One obvious UseCase is to make this device a burglar detection / home intrusion system for e.g. a bicycle store room. Another UseCase could be monitoring terrariums and the like.

0. Outline

The underlying physical principle is radiation. Every warm body radiates heat, and every creature radiates in the infrared spectrum.

The sensor I am using cost around 15€ (September '25). With the other components, the expenses for a prototype summed up to around 40€.

1. Prototype

Smoke test (SW V0.21). The display is intended for demo purposes.

The prototype is built around a Raspberry Pi Pico W, I am using a Raspberry Pi for program development, obviously (I am developing solely with C language), and for checking raw data on the serial port (debugging). Components are connected thru the I2C bus.

Two different branches of development (when the SW is "production level" I gonna have a 1.xx SW):

  • SW V0.2x -> non IoT / OLED display / acoustic burglar detection
  • SW V0.4x -> IoT

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 a 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

The MLX90642 IR array consists of (32x24=) 768 FIR sensors, each individual IR sensor 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.

Compared with commercial and ready-to-use systems, a resolution of 32x24 is not very high of course. This could theoretically be improved by using several sensors.

4. IoT

Several 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 computer makes more sense than on the IoT-platform itself, or on any attached off-the-shelf display for that matter. 

Example implementation where 60 sensors are read and shown in the web browser (15 pixels in 4 rows from left to right, temperature values are rounded); except displaying there is nothing be done with the data.

Implementation when all 768 pixels are read and data is visualized. The thermal data is automatically imported via Excel web interface running on a home computer, and here we have a moving object at a distance in an outdoors area.

Note: perceiving and visualizing a moving object in a couple of meters distance outdoors (perpetually changing temperature and light conditions) is the most difficult UseCase and needs a tricky implementation in order to get results.

5. Challenges

There are of course many challenges along the way until I have a somewhat useable burglar detection system that does not boast with too many false positives. To mention a few:

* adapting to differing environmental conditions, as mentioned (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

In order to tackle some of the challenges, different approaches will be employed (such as ML).

  • Emissivity

    Florian Wilhelm Dirnberger11/13/2025 at 07:56 0 comments

    SW V0.494. Playing around with the emissivity value (via address 0x11F2), the default is 1 (i. e. black body). 

    This value is good enough in most use cases, below a measurement of a human upper body where the emissivity is decreased significantly. Temperature values are too high, obviously.

  • UseCase: Burglar detection

    Florian Wilhelm Dirnberger09/26/2025 at 11:54 0 comments

    SW V0.26. OLED display and buzzer for show effect. System could be used in a bicycle storage room (ofc in a hidden location, setting off a silent alarm).

View all 2 project logs

Enjoy this project?

Share

Discussions

Similar Projects

Does this project spark your interest?

Become a member to follow this project and never miss any updates