Thermal-Camera-Module
| ||
| ||
Overview
Introduction
This is a long-wave IR thermal imaging camera module that adopts the hybrid technology of microbolometer and thermopile pixel, featuring 80 × 62 array pixels. It overcomes the limitations of traditional temperature measurement devices, such as single-point detection and light dependency. By capturing infrared radiation signals from objects, it enables the core capability of "visualizing temperature distribution" for devices in the fields of industry, consumer electronics, security, and healthcare, serving as the hardware foundation for intelligent temperature monitoring and risk early warning.
Note: Do not update the firmware at will, updating the firmware may cause the device to malfunction
Features
- Hybrid technology of microbolometer and thermopile with 80(H)×62(V) pixels
- Continuous operation and thermal imaging video stream due to shutterless design
- Noise Equivalent Temperature Difference (NETD) 150mK RMS@1Hz refresh rate
- Up to 25FPS (Max) thermal imaging video stream output
- Comes with online resources and manuals (Python demo for Raspberry Pi, etc.)
Specifications
- Operating voltage: 3.3V/5V
- Operating voltage: 20mA@5V
- Wavelength range: 8~14μm
- Field of View (FOV):
- Standard version: 55°(D) × 44°(H) × 35°(V)
- Wide angle version: 143°(D) × 90°(H) × 66°(V)
- Operating temperature: -20℃~85℃
- Target temperature: -20℃~400℃
- Detection accuracy: ±2℃
- Refresh rate: 25 FPS(Max)
- Dimensions: 45.00 x 22.00 (mm)
- Noise Equivalent Temperature Difference (NETD): 150mK
Hardware Description
- Connect the Thermal Camera Module to the 40 GPIO Pin of the Raspberry Pi series
- Configure the camera register using I2C and send temperature data using SPI
- There is a RESET button on the board, which can be pressed to achieve hardware reset when there is an abnormality
Hardware Connection
- Connect the Thermal Camera Module to the Raspberry Pi series
- Use a 100mm flexible cable to extend the camera connection, allowing its field of view to be adjustable
Pinout Definition
Thermal Camera HAT uses I2C to configure the camera registers, and uses SPI to send temperature data
| PI-4B | Thermal Camera HAT |
| 5V | 5V |
| GND | GND |
| D2(BCM) | SDA |
| D3(BCM) | SCL |
| D10(BCM) | MOSI |
| D9(BCM) | MISO |
| D11(BCM) | CLK |
| D23(BCM) | nRESET |
| D24(BCM) | D_READY |
| D7(BCM) | SS |
I2C Bus
- The read/write timing diagram is shown in the figure below. For more details, please refer to the datasheet
- The Thermal Camera HAT can use a 0R resistor to select the I2C address. The default is 0x40, and 0x41 is optional. For more details, please refer to the schematic diagram
- The Raspberry Pi 4B, as the Master device, first pulls down the SDA and SCL pins to initiate the I2C bus's START condition, then writes the device address (7 bits) and write command (1 bit), totaling 8 bits of data. If the pins are connected correctly, the Thermal Camera HAT, as the Slave device, sends an ACK response
- The Raspberry Pi 4B continues to write the register address (RA) and register value (DATA) separately and waits for the ACK response. After writing is completed, the controller pulls up the SCL, SDA pins to send the STOP condition
- If Raspberry Pi 4B reads the DATA from register (RA), after writing to RA and waiting for an ACK response, it reinitiates a START condition, then writes the device address (7 bits) and a read command (occupying 1 bit) for a total of 8 bits, waiting for an ACK response. After the Thermal Camera HAT returns DATA and Raspberry Pi 4B receives the DATA, it can maintain the SDA high level
- Please refer to the burst read/write sequence in the above figure for continuous writing of register values
- For register Map, please refer to the datasheet
SPI Bus
- The SPI read timing diagram of the Thermal Camera HAT is shown in the figure below. For more details, please refer to the datasheet
- The SPI interface of the Raspberry Pi 4B must operate in mode 0, with MSB active, using a 16-bit data width
- When reading data, 0x0000 must be sent to generate a clock signal, supporting full frame temperature data readout mode
- When DATA_READY (D24 pin, abbreviated as D_READY) is high, the full-frame temperature data of the camera is valid
- After reading the full frame data, DATA_READY will decrease. The Frame Header and Temperature data in the figure above represent the full frame data
Dimensions
Temperature Measurement Principle
What is infrared temperature measurement? (Refer to OPTRIS)
In the field of measurement, "temperature" is one of the most commonly used physical parameters after "time". Based on the principles of Planck's and Boltzmann's radiation laws, an infrared thermometer measures the temperature of an object by absorbing the infrared radiation emitted by the object. So, how does non-contact temperature measurement work?
Any object with a temperature above absolute zero (0 K or -273.15 °C) emits electromagnetic radiation from the surface, and the radiation is proportional to the object's inherent temperature. This radiation includes infrared radiation used to achieve temperature measurement. When this radiation penetrates the atmosphere, it can be concentrated on the detector with the help of a special lens. The detector then generates an electrical signal proportional to this radiation. This signal is amplified and converted into an output signal proportional to the temperature of the object by undergoing continuous digital signal processing. In this way, the measured value of the temperature will be displayed on the display, or output as a signal.
In the application of radiation for temperature measurement, the emissivity ε (Epsilon) plays a crucial role. It shows the relationship between the radiation values of actual objects and those of a black body. The emissivity of a black body is 1 (maximum value). However, there are not many objects that can meet the ideal condition of a black body. When calibrating the sensor, the contact surface of the radiator (including the recommended wavelength: 0.99) is generally used.
In terms of their wavelength, many objects usually have a constant emissivity, but their radiation capacity is much inferior to that of a black body, they are called gray bodies. If the emissivity of an object depends on its temperature and wavelength (e.g., metal), it is called a selective radiator. In both cases, the missing radiation part is explicitly supplemented by the radiation rate. When using selective radiators, it is important to keep in mind the wavelength being measured (for metals, short wavelengths are chosen).
In addition to the radiation emitted from the surface of the object, the infrared sensor can also receive reflected radiation from the surrounding environment and perhaps penetrating infrared radiation from the object being measured.
Measurement Distance
- Based on the 175cm mannequin and the test distance is about 12m, the contours of the human body will not be distinguished
Measurement Accuracy
- When the target object exceeds the FOV of the module by 25% or more, the relative humidity should be below 95%, and there should be no condensation vapor or moisture on the lens
| Operating temperature °C | Target temperature °C | Maximum deviation °C | |
| Full frame accuracy | 30.0 | 32.0-40.0 | ±0.8 (center 32x24), ±1.0 (entire) |
| 30.0 | 10-32.0, 40.0-70.0 | ±1.5 (entire) | |
| 30.0 | <10.0, >70.0 | ±2.0 (entire), or 5% | |
| Single pixel | 30.0 | 32.0-40.0 | ±0.5 (center 32x24), ±0.7 (entire) |
| 30.0 | 10-32.0, 40.0-70.0 | ±1.0 (entire) | |
| 30.0 | 32.0-40.0 | ±2.5 (entire), or 5% | |
| Temperature stability | 30.0 | 32.0-40.0 | -0.21℃/℃ |
| Power stability | 30.0 | - | ±1.0 ℃ / 100 mA |
Main Applications
- Long-term non-contact object temperature online monitoring solution
- IR thermal imaging devices, IR thermometers
- Smart home, intelligent building, intelligent lighting
- Industrial temperature control, security & safety, intrude/motion detection
- Small target thermal analysis, heat trend analysis and solutions
Usage Guide
Raspberry Pi 4B(buster&bullseys)
Note: The new version of the program has been updated to provide less noise and clearer images for infrared imaging
- It is recommended to test the image of the installed library, please ignore the following environment installation and other operations for testing
- Google cloud drive Raspberry Pi image, the image account and password are all test
- If you want to download the library and install it by yourself, please install the library according to the prompts
- Enable the SPI and I2C buses for Raspberry Pi 4B
Open the terminal and enter sudo raspi-config, select Interface Options, enable the following SPI and I2C interfaces, select Yes for both, and finally restart the device
- Download the demo and then unzip it, please install the library according to the prompts, the installation process takes a long time, the following information is for reference
wget https://files.waveshare.com/wiki/Thermal_Camera_Module/Thermal_camera_code.zip unzip Thermal_camera_code.zip cd pysenxor-master/ sudo apt update sudo pip uninstall numpy (If the prompt indicates there is no library, proceed with the next step. If there is a library, uninstall the library: pip uninstall numpy) sudo pip install numpy sudo pip install smbus sudo pip install crcmod sudo pip install matplotlib sudo pip install imutils wget https://www.piwheels.org/simple/opencv-python/opencv_python-4.6.0.66-cp39-cp39-linux_armv7l.whl#sha256=c1360e46e5ebd47a92e00c1f75c7d293d6ffd00d7f9ff06666f9af05eff2094f pip install opencv_python-4.6.0.66-cp39-cp39-linux_armv7l.whl pip install cmapy sudo python setup.py install
- If the installation is successful, running the program will start a window displaying a thermal image, as shown in the following figure
cd pysenxor-master/example sudo python stream_spi.py
Raspberry Pi Bookworm Tutorial
Note: Since the bookworm environment itself no longer supports python-pip, you need to operate it in a virtual machine environment in order to use the installation package normally. If you find it complicated to configure your environment, you can use the image here. The username and password are both "test".
sudo apt install python3-venv python3 -m venv myenv #myenv is the name of the virtual environment created source myenv/bin/activate
Note: If you need to boot up and enter the virtual environment, you can follow the following steps, or execute source myenv/bin/activate to enter the virtual environment.
deactivate #Exit the virtual environment sudo nano ~/.bashrc
Add the following to the last line of the file:
source /home/username/myenv/bin/activate
Ctrl+X to save and exit
source ~/.bashrc #Make the document effective
After executing the command, you will see that you have re-entered the virtual environment.
Demo Download
wget https://files.waveshare.com/wiki/Thermal_Camera_Module/Thermal_Camera_Hat.zip
Install Dependencies
pip install numpy pip install smbus pip install crcmod pip install matplotlib pip install opencv-python pip install cmapy
Unzip and Install Demo
unzip Thermal_Camera_Hat.zip cd pysenxor-master/ pip install -e ./
After the installation is complete, the following prompt will appear:
The terminal executes the command to enable SPI
sudo raspi-config
Select Interface Options, then SPI, click Yes and press Enter key

![]()
![]()
![]()
Then select Interface Options, then I2C, click Yes and press Enter key, press Enter again and click Finish

![]()
![]()
![]()

sudo nano /boot/firmware/config.txt
Add dtoverlay=spi0-0cs statement below the dtparam=spi=on statement, save and exit, and then restart.
cd example sudo python stream_spi.py
Resources
Demos
Software
Datasheets
FAQ
Support
Technical Support
If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 PM GMT+8 (Monday to Friday)






