Skip to the content
PCBKitNew board
2 layers38.5 × 31 mmTOF SCANNER, the printed circuit board in 3D

Real-time Edge AI firmware & desktop studio for STM32H533 and VL53L8CH 8x8 multi-zone dToF sensor. On-device 3D gesture recognition, surface texture classification, hand posture detection, and raw CNH optical histogram processing.

Size
38.5 × 31 mm
Copper layers
2
Thickness
1.6 mm
Parts
58
Nets
74
Pads
247
Tracks, vias
521, 99
Pours
2
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
24 Oct 2026
Updated
24 Oct 2026

Overview

TOF SCANNER is an open-source printed circuit board by Circuit-Digest, from the Circuit-Digest/EdgeSense repository on GitHub. It is a 2-layer board of 38.5 × 31 mm with 58 parts on 74 nets, routed with 521 tracks and 99 vias.

It is built around the LD1117V18, ST1L08SPU33R and STM32H533CEU6. Its parts include 25 capacitors, 17 resistors, 6 ICs, 4 connectors and 2 diodes. It belongs with the sensors and measurement boards and the STM32 boards of this library.

Main components

3

README

README.md

EdgeSense: STM32 Edge AI Texture and Gesture Classifier

text
  ███████╗██████╗  ██████╗ ███████╗███████╗███████╗███╗   ██╗███████╗███████╗
  ██╔════╝██╔══██╗██╔════╝ ██╔════╝██╔════╝██╔════╝████╗  ██║██╔════╝██╔════╝
  █████╗  ██║  ██║██║  ███╗█████╗  ███████╗█████╗  ██╔██╗ ██║███████╗█████╗  
  ██╔══╝  ██║  ██║██║   ██║██╔══╝  ╚════██║██╔══╝  ██║╚██╗██║╚════██║██╔══╝  
  ███████╗██████╔╝╚██████╔╝███████╗███████║███████╗██║ ╚████║███████║███████╗
  ╚══════╝╚═════╝  ╚═════╝ ╚══════╝╚══════╝╚══════╝╚═╝  ╚═══╝╚══════╝╚══════╝

Platform Core Sensor Edge AI License: GPL v3

EdgeSense is a compact, high-performance edge artificial intelligence platform that performs on-device 3D gesture recognition, surface/texture classification, static hand posture detection, and optical obscuration sensing.

Powered by the STM32H533CEU6 (ARM Cortex-M33 running at 250 MHz) and the ST VL53L8CH 8x8 direct Time-of-Flight (dToF) sensor, EdgeSense executes quantized neural networks entirely on-chip in real time with sub-7 ms inference latency.


Key Capabilities

EdgeSense features a runtime multi-model execution engine (pipeline_manager.c) allowing dynamic model switching over USB CDC:

  1. 3D Gesture Recognition (8x8 ToF, 15 FPS):

    • Recognizes dynamic directional swipes: SWIPE_LEFT, SWIPE_RIGHT, SWIPE_UP, SWIPE_DOWN, and IDLE.
    • Continuous 15-frame sliding window (1.0 s temporal context) with zero gesture-lockout.
    • Physical temporal motion energy guard to eliminate stationary phantom triggers.
    • Inference latency: ~6.8 ms per inference.
  2. Distance-Invariant Surface Classifier (4x4 CNH, 48 Bins):

    • Classifies textures and materials: HARD_FLOOR (tile/wood), CARPET (subsurface scattering), SPECULAR (mirrors/polished metal), and VOID (drop-offs/cliffs).
    • Utilizes ST-aligned Cumulative Normalized Histogram (CNH) peak-centered canonical alignment.
    • Inference latency: ~3.2 ms per inference.
  3. Static Hand Posture Classifier (8x8 Depth + Signal Intensity):

    • Identifies static human hand postures: FLAT_HAND, LIKE, DISLIKE, BREAK_TIME, FIST, and NONE.
    • Dual-channel 2D-CNN processing distance geometry and photon reflection intensity simultaneously.
    • Robust to ambient lighting variations and skin tone differences.
    • Inference latency: ~4.1 ms per inference.
  4. Optical Obscuration & Smoke Detector:

    • Detects microscopic particles, airborne obscuration, and smoke.
    • Computes multi-zone signal attenuation and ambient light scattering indices in real time.

Hardware Specifications

ComponentSpecification
MicrocontrollerSTMicroelectronics STM32H533CEUx (ARM Cortex-M33, 250 MHz, TrustZone, FPU, DSP)
On-Chip Memory512 KB Flash ROM, 256 KB SRAM
ToF SensorSTMicroelectronics VL53L8CH / VL53LMZ Direct Time-of-Flight
Sensor FoV65° Diagonal Field of View
Spatial Resolution8x8 (64 zones) or 4x4 (16 zones with 48-bin CNH histograms)
Ranging Distance20 mm to 4000 mm
Host ConnectivityHigh-Speed USB 2.0 CDC (Virtual COM Port @ 921600 baud)
Communication BusDedicated Fast-mode Plus (Fm+) 1 MHz I2C bus
Power Supply5V via USB-C or 3.3V external rail

Repository Structure

text
EdgeSense/
├── Core/                      # STM32H533 HAL drivers, ISRs, and main loop
├── Drivers/                   # CMSIS and STM32H5xx HAL libraries
├── Middlewares/               # ST X-CUBE-AI runtime v10.2.1 & USB Device stack
├── USB_Device/                # USB CDC Virtual COM Port descriptors & handlers
├── VL53LMZ_ULD/               # Ultra-Lite Driver & CNH Histogram Plugin
├── X-CUBE-AI/                 # Edge AI Pipeline Manager & Active Networks
│   └── App/                   # pipeline_manager, model_gesture, model_posture, model_surface, model_smoke
│
├── Models/                    # Pre-trained production ONNX models & datasets
│   ├── gesture_nn_model.onnx  # 5-class 2D-CNN Gesture Classifier
│   ├── posture_nn_model.onnx  # 6-class 2D-CNN Posture Classifier
│   ├── surface_nn_model.onnx  # 4-class 1D-CNN Surface Classifier
│   ├── gesture_dataset.npz    # Default Gesture training dataset
│   ├── posture_dataset.npz    # Default Posture training dataset
│   ├── surface_dataset.npz    # Default Surface training dataset
│   └── Archive/               # Intermediate training iterations
│
├── Tools/                     # Python Studio, GUIs, and deploy automation
│   ├── Studio/                # 4-in-1 EdgeSense Neural Network Studio
│   │   ├── run_nn_studio.bat  # Double-click to launch Studio GUI
│   │   ├── deploy_to_project.bat # Unified model conversion & firmware build
│   │   ├── edgesense_nn_studio.py
│   │   ├── requirements.txt

Getting Started

1. Prerequisites

  • STM32CubeIDE (v2.2.0 or newer) with GNU Tools for STM32 (ARM GCC 14.3+)
  • STM32Cube.AI Studio (STEDGEAI-CUBEAI) / ST Edge AI Core (stedgeai) v10.2.1+
  • Python 3.10+ (64-bit)
  • ST-LINK V2 / V3 Programmer

2. Python Environment Setup

Install the required dependencies for the EdgeSense AI Studio:

bash
cd Tools/Studio
pip install -r requirements.txt

3. Launching EdgeSense Studio

Double-click Tools/Studio/run_nn_studio.bat or run:

bash
python Tools/Studio/edgesense_nn_studio.py

From the Studio, you can:

  • View live 8x8 depth heatmaps and 4x4 CNH pulse shapes.
  • Record new training datasets for Gestures, Postures, or Surfaces.
  • Train PyTorch neural networks with 1 click.
  • Deploy trained models to the project via deploy_to_project.bat.

4. Building Firmware via Command Line

bash
make -C Debug all

The compiled binary will be located at Debug/EdgeSense.elf and Debug/EdgeSense.bin.

5. Flashing Firmware

Choose your preferred flashing method:

  • USB-C (DFU Mode - No external programmer required):
    1. Press and hold SW2 (BOOT0), press and release SW1 (RESET), then release SW2.
    2. Run:
    bash
    Tools/Flashing/flash_firmware_usb.bat
  • ST-LINK (SWD Mode): Connect your ST-LINK probe to the J3 header and run:
    bash
    Tools/Flashing/flash_firmware.bat
  • STM32CubeIDE: Open the project in STM32CubeIDE and click Run or Debug.

Serial Communication & AT Commands

Connect to the USB CDC COM port at 921600 baud, 8-N-1.

CommandAction
ATVerify connection (returns OK)
AT+MODE=?List available modes: (0:GESTURE, 1:SURFACE, 2:POSTURE, 3:SMOKE)
AT+MODE?Query currently active mode
AT+MODE=0Switch to 3D Gesture Recognition mode
AT+MODE=1Switch to Surface / Texture Classifier mode
AT+MODE=2Switch to Hand Posture Classifier mode
AT+MODE=3Switch to Optical Smoke / Obscuration mode
AT+STREAM=1Enable real-time 8x8 JSON depth streaming
AT+STREAM=0Disable streaming
AT+STATUSView sensor health, frame counts, and FPS
AT+RESETSoftware system reboot

License

This project is licensed under the GNU General Public License v3.0. See the LICENSE file for details.

Parts

58
QtyValueFootprintReferences
9100nFCapacitor_SMD:C_0603_1608MetricC12, C13, C14, C15, C16, C27, C28, C29, C30
61uFCapacitor_SMD:C_0603_1608MetricC1, C3, C4, C5, C6, C20
647KResistor_SMD:R_0603_1608MetricR8, R9, R10, R14, R15, R16
20.1uFCapacitor_SMD:C_0603_1608MetricC21, C22
210KResistor_SMD:R_0603_1608MetricR6, R11
218pFCapacitor_SMD:C_0603_1608MetricC23, C24
22.2uFCapacitor_SMD:C_0603_1608MetricC18, C19
2220RResistor_SMD:R_0603_1608MetricR5, R7
25K1Resistor_SMD:R_0603_1608MetricR12, R13
29pFCapacitor_SMD:C_0603_1608MetricC25, C26
2LEDLED_SMD:LED_0603_1608MetricD1, D2
2SW_PushButton_Switch_SMD:SW_SPST_TS-1088-xR025SW1, SW2
110nFCapacitor_SMD:C_0603_1608MetricC2
110uFCapacitor_SMD:C_0603_1608MetricC17
112KResistor_SMD:R_0603_1608MetricR1
11KResistor_SMD:R_0603_1608MetricR3
132KHzCrystal:Crystal_SMD_3215-2Pin_3.2x1.5mmY1
13K3Resistor_SMD:R_0603_1608MetricR2
1470RResistor_SMD:R_0603_1608MetricR4
17K5Resistor_SMD:R_0603_1608MetricR17
1BATConnector_JST:JST_PH_B2B-PH-K_1x02_P2.00mm_VerticalJ2
1Crystal_GND24_SmallCrystal:Crystal_SMD_3225-4Pin_3.2x2.5mmY2
1L6924D013TRL6924D013TR:VFQFPN-16_STMU2
1LD1117V18Package_TO_SOT_SMD:SOT-223-3_TabPin2U3
1ST1L08SPU33RST1L08PU33R:DFN_SPU33R_STMU1
1ST2378ETTRST2378ETTR:TSSOP20_4P4X6P5_STMU4
1STLINKConnector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_VerticalJ3
1STM32H533CEU6STM32H533CEU6:UFQFPN-48_STMIC1
1UARTConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ5
1USB_C_Receptacle_USB2.0_16PConnector_USB:USB_C_Receptacle_HCTL_HC-TYPE-C-16P-01AJ4
1VL53L8CHV0GC_1VL53L8CHV0GC_1:VL53L8CHV0GC1IC2

Questions

How big is the TOF SCANNER PCB?

It measures 38.5 × 31 mm and has 2 copper layers, 1.6 mm thick.

What parts does the TOF SCANNER use?

58 parts, built around the LD1117V18, ST1L08SPU33R and STM32H533CEU6. 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 TOF SCANNER KiCad files?

From the Circuit-Digest/EdgeSense repository on GitHub, at the commit this page was made from: the board is Hardware/Schematics/TOF SCANNER.kicad_pcb and its schematic Hardware/Schematics/TOF SCANNER.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the TOF SCANNER design in my own project?

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

Similar boards

  • 2 layers70 × 59.7 mmMyMachine LED cap, the printed circuit board in 3D

    MyMachine LED cap

    BrnoMarsRover/myMachine-LED-cap

    Repository for my Machine LED Cap project, including software, PCBs, and documentation.

    58 partsMIT
  • 2 layers252.9 × 77.6 mmSteno, the printed circuit board in 3D

    Steno

    hackclub/OnBoard

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

    58 parts915
  • 2 layers50 × 50 mmAvrcraft poed, the printed circuit board in 3D

    Avrcraft poed

    cnlohr/avrcraft

    Minecraft server optimized for 8-bit devices.

    58 parts471
  • 2 layers97.3 × 71 mmZynScreen v1.5, the printed circuit board in 3D

    ZynScreen v1.5

    zynthian/zynthian-hw

    Zynthian hardware stuff: PCBs, schemes, parts specifications, pin assignment, ...

    58 parts156
  • 2 layers34 × 46 mmNfcemu, the printed circuit board in 3D

    Nfcemu

    solosky/nfc-emu

    NFC模拟器

    58 parts117Apache-2.0
  • 2 layers148 × 81 mmCommunicator pcb, the printed circuit board in 3D

    Communicator pcb

    Hack-a-Day/2025-Communicator_Badge

    The 2025 Hackaday Supercon RF Communicator Badge

    58 parts107MIT
  • 2 layers53.3 × 36.3 mmMcu holder, the printed circuit board in 3D

    Mcu holder

    AlaaSaadAbdo/Rommana

    A 30 key well powered by Xiao BLE

    58 parts105
  • 2 layers70 × 30.3 mmPico 2HP Audio, the printed circuit board in 3D

    Pico 2HP Audio

    rheslip/2HPico-Eurorack-Module-Hardware

    2HP Eurorack module based on Raspberry Pi Pico 2

    58 parts84