Skip to the content
PCBKitNew board
2 layers69 × 34 mmThermal camera v2, the printed circuit board in 3D

Thermal camera v2

fedetft/thermal_camera7

An open source thermal camera, including firmware, schematic and PCB design.

Size
69 × 34 mm
Copper layers
2
Thickness
1.6 mm
Parts
52
Nets
69
Pads
203
Tracks, vias
466, 0
Pours
1
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
6 Nov 2022
Updated
20 May 2026

Overview

Thermal camera v2 is an open-source printed circuit board by fedetft, from the fedetft/thermal_camera repository on GitHub. It is a 2-layer board of 69 × 34 mm with 52 parts on 69 nets, routed with 466 tracks and 0 vias.

It is built around the STM32F205RCT6, LP2981-3.3 and TP4056, with the AP2311SG, AP2312 and BAT54A among its other parts. Its parts include 16 capacitors, 15 resistors, 5 ICs, 4 connectors and 2 diodes. It belongs with the STM32 boards of this library.

Main components

6

README

README.md

Thermal camera

An open source thermal camera, including firmware, schematic and PCB design.

UI example PCB render

Principle of operation

Showing a frame on the thermal camera requires to perform three operations

  • Reading the raw ADC data from the sensor via I2C
  • Processing the data (compute temperatures, compute pixel colors)
  • Writing the computed frame to the display via SPI

The sensor frame rate can be set anywhere from 1fps to 32fps in discrete increments (1,2,4,8,16,32). However, on the STM32F205RC processing one frame takes ~41ms of CPU time, so the maximum achievable frame rate is 16fps. TODO: to go faster we could use an MCU with a floating point unit such as an STM32F4.

Focusing on the current hardware, we have another problem: consider the 16fps rate, the required operations take the following time

  • Reading sensor via I2C takes ~62.5ms (1/16s, mostly waiting for the sensor)
  • Processing takes ~41ms
  • Writing to display requires to send 128x128 16 bit pixels on a 16MHz SPI bus or ~18ms

Thus, the effective frame rate would be 1/(62.5ms+41ms+18ms)=8fps.

To solve this issue, we use pipelining. Instead of doing the operations sequentially

Sequential

we use pipelining to perform each operation at the same time on three different data buffers

Parallel

As always with pipelining, the latency (lag) is the same or higher than in the sequential case, but the throughput (frames per second) matches the longest pipeline stage, which in this case is waiting for the sensor.

But, I hear you say, how can you perform the three operations in parallel on a single-core CPU?

The answer is DMA. You may have noticed that two of the required operations are just receiving/sending data through a peripheral such as I2C/SPI. Thus with appropriately written device drivers which make use of DMA, the threads performing the read/write operations will be waiting on I/O letting the OS scheduler run the CPU-intensive computation thread.

Thread priorities are set so that the I/O threads have higher priority than the computation thread, making sure the computation thread is preempted as soon as I/O operations complete.

From an implementation perspective, the thermal camera uses the Miosix OS and the three threads performing the mentioned operations are in application.cpp:

  • The sensor reading thread is Application::sensorThreadMain()
  • The processing thread is Application::processThreadMain()
  • The display writing thread is Application::renderThreadMain()

How to build

This guide assumes you already have a Miosix build environment installed, if not see here.

text
# Dependencies (should work both on Linux and WSL)
sudo apt install build-essential cmake libboost-all-dev libpng-dev

# Submodules
git submodule init
git submodule update

# Build mxgui code generators for embedding images and fonts
cd mxgui/_tools/code_generators
chmod +x compile_freetype.sh
mkdir build
cd build
cmake ..
make

# Build the thermal camera application
cd ../../../..
make -j`nproc`

How to flash

Install the dfu-util program on your pc.

Connect the USB cable between the PC an thermal camera, while the camera is off.

Use a jumper wire to connect BOOT0 (on the 4 pin header) to +3.3V (a convenient spot is a capacitor next to the voltage regulator). You can just hold the wire with your hands.

While the jumper is in place, press and hold the power on button of the camera.

You can disconnect the jumper but keep holding the power button. If you release the power button, you need to reconnect the jumper and start again.

On the PC, run the command while holding the power button.

text
dfu-util -a 0 -s 0x08000000:leave -D main.bin

You should see a progress bar on the PC, keep holding the power button till the progress bar reaches 100%.

Release the power button, and disconnect the USB cable.

Power on the camera and enjoy the new firmware. You cannot brick the camera, if something goes wrong you can repeat the operation.

Parts

52
QtyValueFootprintReferences
6100nCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC3, C5, C8, C9, C10, C14
50Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR11, R12, R13, R14, R15
51uCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC1, C2, C4, C11, C15
53k3Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR1, R3, R6, R9, R10
4220kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR2, R4, R5, R8
3Conn_01x01_MaleConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalB-1, B+1, J2
21-1825910-4Button_Switch_THT:SW_PUSH_6mmSW1, SW2
210pCapacitor_SMD:C_0603_1608MetricC12, C13
22u2Capacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC6, C7
2MountingHoleMountingHole:MountingHole_2.1mmH1, H2
1100nCapacitor_SMD:C_0603_1608MetricC16
1470Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR7
18MHzCrystal:Crystal_SMD_5032-4Pin_5.0x3.2mmY1
1AP2311Package_TO_SOT_SMD:SOT-23Q2
1AP2312Package_TO_SOT_SMD:SOT-23Q1
1BAT54APackage_TO_SOT_SMD:SOT-23D1
1Conn_01x01_FemaleConnector_PinSocket_2.54mm:PinSocket_1x01_P2.54mm_VerticalJ4
1Conn_01x04_FemaleConnector_PinSocket_2.54mm:PinSocket_1x04_P2.54mm_VerticalJ1
1Conn_01x07_FemaleConnector_PinSocket_2.54mm:PinSocket_1x07_P2.54mm_VerticalJ3
1LEDLED_SMD:LED_0603_1608Metric_Pad1.05x0.95mm_HandSolderD2
1LP2981-3.3Package_TO_SOT_SMD:SOT-23-5U2
1MLX90640Connector_PinSocket_2.54mm:PinSocket_2x02_P2.54mm_VerticalU5
1STM32F205RCPackage_QFP:LQFP-64_10x10mm_P0.5mmU1
1TP4056Package_SO:SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.29x3mmU3
1USB_B_MiniTFT_footprints:USB_mini_china_unknownJ5
1W25Q64Package_SO:SOIC-8W_5.3x5.3mm_P1.27mmU4

Questions

How big is the Thermal camera v2 PCB?

It measures 69 × 34 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Thermal camera v2 use?

52 parts, built around the STM32F205RCT6, LP2981-3.3, TP4056 and AP2311SG. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.

Where can I download the Thermal camera v2 KiCad files?

From the fedetft/thermal_camera repository on GitHub, at the commit this page was made from: the board is hardware_design/thermal_camera_v2.kicad_pcb and its schematic hardware_design/thermal_camera_v2.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Thermal camera v2 design in my own project?

Its repository states no licence, so its author keeps all rights: ask fedetft before reusing the design.

Similar boards

  • 2 layersTiny861-3, the printed circuit board in 3D

    Tiny861-3

    MicrochipTech/avrfreaks-projects

    Projects from AVRFreaks

    23 parts63Apache-2.0
  • 4 layers50 × 43 mmOpenlst hw, the printed circuit board in 3D

    Openlst hw

    harmalkar/satellite-prototype

    Open-source hardware and software for a satellite with a custom on-board computer to interface over I2C, SPI, and UART with a flash chip, IMU, barometer, camera, and thermal sensors. Built to fit within a 1U form factor.

    98 parts1
  • 4 layers15 × 15 mmDRV8213 brushed Motor Driver, the printed circuit board in 3D

    DRV8213 brushed Motor Driver

    techy-robot/CACKLE-Driver-DRV8213_brushed_Motor_Driver

    This is a single motor driver based on the DRV8213RTER Texas Instruments chip. It is capable of 4 amps current in a voltage range of 1.65 to 11 volts.

    26 parts
  • 4 layers15 × 15 mmDRV8213 brushed Motor Driver, the printed circuit board in 3D

    DRV8213 brushed Motor Driver

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    26 parts915
  • 4 layers67 × 98 mmSJ-201-R6, the printed circuit board in 3D

    SJ-201-R6

    MycroftAI/hardware-mycroft-mark-II

    Mycroft's Mark II Rpi mechanical, electrical and industrial designs

    235 parts113
  • 2 layers129.2 × 50 mmRIPPLE, the printed circuit board in 3D

    RIPPLE

    LIV2/RIPPLE-IDE

    Zorro 2 IDE Interface for Amiga 2000/3000/4000

    61 parts41GPL-2.0
  • 4 layers23.9 × 44.5 mmATTINY3226, the printed circuit board in 3D

    ATTINY3226

    marsairforce/breakout_boards

    Small circuit boards to assist with breadboard prototyping with SMD packages.

    56 parts39Unlicense
  • 4 layers158 × 95 mmFHNW Pro4E FS19T8-3DPrinterBoard STM32, the printed circuit board in 3D

    FHNW Pro4E FS19T8-3DPrinterBoard STM32

    mnemocron/FHNW-Pro4E-FS19T8-3DPrinterBoard-STM32

    Marlin 2.0 compatible 3D printer board based on STM32F103 (KiCad)

    264 parts17GPL-3.0