A simple but fast Thermal Imaging Camera using the MLX90640 sensor, a 1.5 inch RGB OLED Display Module, and two optional touch sensor modules.
- fast: 23 frames per second by employing both cores of the RP2040 (whereas a single core would only result in 11 fps):
- core0 fetches the pages from the MLX90640 and scales the data down to 8-bit integers
- core1 renders the data on the OLED after optionally smoothing the data by bilinear interpolation
- configurable heat-map (predefined 7-colors, 5-colors, 2-colors, and grey map)
- touch button for disabling interpolation
- touch button for freezing the displayed image
- unmodified Melexis Driver: https://github.com/melexis/mlx90640-library/
- heat map code inspired by: http://www.andrewnoske.com/wiki/Code_-_heatmaps_and_color_gradients
- the Pico SDK
- Raspberry Pi Pico (RP2040)
- MLX90640 Thermal Camera Breakout (55º or 110º), e.g. Pimoroni
- 1.5inch RGB OLED Display Module, 65K RGB Colors, 128×128, SPI, e.g. Waveshare
- Optional: 2 buttons, e.g. TTP223 Touch Sensor Modules
- Optional: battery module, e.g. LiPo Charger/Booster module
Connect the MLX90640 and the OLED to the 3.3 V Pin 36 of the Raspberry PI Pico.
MLX90640 | RP2040 | GPIO | Pin |
---|---|---|---|
SDA | I2C0 SDA | 16 | 21 |
SDC | I2C0 SDC | 17 | 22 |
OLED | RP2040 | GPIO | Pin |
---|---|---|---|
DC | SPI1 DC | 9 | 12 |
CLK | SPI1 SCK | 10 | 14 |
DIN | SPI1 TX | 11 | 15 |
CS | SPI1 CSn | 13 | 17 |
RST | RST | 15 | 20 |
Touch Buttons | GPIO | Pin |
---|---|---|
Disable Interpolation | 14 | 19 |
Freeze Image | 18 | 24 |
- make sure the "Pico SDK" is installed and the environment variable "PICO_SDK_PATH" refers to it.
git clone https://github.com/weinand/thermal-imaging-camera
cd thermal-imaging-camera
git submodule init
git submodule update
mkdir build
cd build
cmake ..
make