Thermal Imaging Embedded System (STM32 + MLX90640)
A portable handheld thermal camera that captures, processes, and displays live infrared data in real time.
Author: Ionescu Andrei
GitHub Project Link: https://github.com/UPB-PMRust-Students/fils-project-2026-ionescuaandrei
Description
This project is a battery-powered embedded thermal imaging system built on STM32, using the MLX90640 (32x24 IR array) to capture temperature frames and render them on a TFT display.
Motivation
I chose this project because it combines real-time data acquisition, embedded data processing, and graphical rendering in a single portable system. It is a practical and technically challenging alternative to simpler IoT projects.
Architecture
Main software and system components:
- Sensor Acquisition Module: reads raw IR frames from MLX90640 over I2C.
- Processing Pipeline: calibration, normalization, temperature-to-color mapping.
- Rendering Engine: draws thermal image and overlays on TFT display.
- Storage Manager: saves captured frames to microSD.
- UI Controller: joystick-driven menus and capture actions.
- Communication Module (optional): sends frames to mobile app via WiFi.
How components connect:
MLX90640 Sensor
|
| I2C
v
Sensor Acquisition Module
|
v
Processing Pipeline
|
+---------------------> Storage Manager (microSD)
|
+---------------------> Communication Module (WiFi -> Mobile App)
|
v
Rendering Engine -> TFT Display
^
|
UI Controller (Joystick)
Log
Week 5 - 11 May
- Initial idea was a reflex-based system.
- Pivoted to thermal imaging after feedback.
- Selected MLX90640 as core sensor.
- Studied MLX90640 communication and frame format.
Week 12 - 18 May
- Defined system blocks and data flow.
- Selected peripherals: TFT display, microSD, joystick, optional WiFi.
- Planned local processing pipeline (normalization and color mapping).
Week 19 - 25 May
- Planned hardware integration order.
- Planned first bring-up tests for I2C communication with MLX90640.
- Planned display pipeline validation with test frames.
Hardware
The system uses an STM32 NUCLEO-U545RE-Q for development, an MLX90640 thermal sensor, a TFT display for visualization, a microSD module for storage, and a joystick for navigation. An ESP8266/ESP32 module can be added for WiFi transfer to a mobile app.
Schematics
Bill of Materials
| Device | Usage | Price |
|---|---|---|
| STM32 NUCLEO-U545RE-Q | Main controller | 125 RON |
| MLX90640 | Thermal sensor (32x24 IR array) | ~150 RON |
| TFT Display | Real-time thermal visualization | ~40 RON |
| microSD Module | Frame storage | ~15 RON |
| Joystick Module | Menu navigation and input | ~10 RON |
| ESP8266/ESP32 | Optional WiFi communication | ~25 RON |
| Battery / Power Bank | Portable power supply | ~50 RON |
| Misc. Wires and Connectors | Integration accessories | ~50 RON |
Software
| Library | Description | Usage |
|---|---|---|
| embassy-stm32 | Async HAL for STM32 | Hardware access for I2C/SPI/UART/GPIO |
| embassy-executor | Async task executor | Schedules concurrent firmware tasks |
| embassy-time | Embedded timers | Frame timing and periodic operations |
| embedded-hal | HAL traits | Driver abstraction across peripherals |
| mlx9064x | MLX90640 driver | Sensor frame acquisition and temperature extraction |
| embedded-graphics | 2D drawing library | Rendering thermal pixels and UI overlays |
| st7735-lcd / ili9341 | TFT display drivers | Sending rendered buffers to the display |
| heapless | No-std data structures | Fixed-capacity buffers without allocator |
| embedded-sdmmc | FAT filesystem support | Saving captured thermal frames |
| express | Node.js web framework | Lightweight API backend for mobile add-on |
| multer / sharp | Upload and image processing | Frame upload handling and optional JPEG encoding |
| expo-image / expo-media-library | React Native media tools | Display and save captured images on mobile |
| axios | HTTP client | API communication from mobile app |
| zustand | State management | Local app state for stream/history/settings |