Skip to the content
4 layers82 × 82 mmLiDAR Scanner, the printed circuit board in 3D

Handheld LiDAR Room Scanner pcb

Size
82 × 82 mm
Copper layers
4
Thickness
1.58 mm
Parts
49
Nets
60
Pads
218
Tracks, vias
324, 340
Pours
2
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
16 Jun 2026
Updated
8 Oct 2026

Overview

LiDAR Scanner is an open-source printed circuit board by JEly613, from the JEly613/Mini-LiDAR-Board repository on GitHub. It is a 4-layer board of 82 × 82 mm with 49 parts on 60 nets, routed with 324 tracks and 340 vias.

It is built around the AP2112K-3.3, ICM-42688-P and USBLC6-2SC6, with the USB4215-03-A among its other parts. Its parts include 18 capacitors, 7 resistors, 6 connectors, 5 ICs and 3 diodes. It belongs with the sensors and measurement boards and the STM32 boards of this library.

Main components

4

README

README.md

Mini-LiDAR-Board

This project fuses data from LiDAR and IMU measurements to reconstruct internal scans of a room. The LiDAR module is mounted on a custom 4-layer PCB that hosts an STM32 microcontroller and an ICM-42688-P IMU. The data from both sensors is collected by the microcontroller and sent via a custom USB protocol to the host software, where the room is reconstructed.

The Completed Device


Operation Principle

The board spins a LiDAR module that measures distances in a 2D plane. On its own that only ever produces a flat ring. The on-board IMU tracks how the boardis oriented, so every distance reading can be rotated out of the sensor's 2D plane and into a 3D environment. Tilting the sensor so that all 360 degrees of freedom are covered constructs a full scan of the room.


Hardware

Designed using KiCad.

Board4-layer, 82 × 82 mm, 49 components, 212 vias
StackupF.Cu signal · In1.Cu GND plane · In2.Cu VDD plane · B.Cu signal
MCUSTM32F411CEU6 — QFN-48, 7 × 7 mm, 0.5 mm pitch, 96 MHz
IMUTDK ICM-42688-P — LGA-14, 2.5 × 3 mm, on SPI1
LiDARSlamtec RPLIDAR A1, PWM-driven spindle
PowerUSB-C in, AP2112K-3.3 LDO, 5 V and 3.3 V rails
Clock8 MHz ABM3B crystal → 96 MHz core + exact 48 MHz USB

Assembled PCB Front Side

Assembled PCB Back Side

PCB Schematic

PCB Layout - Traces

PCB Layout - Full Stackup

A few notable design decisions:

  • The IMU is mounted on the bottom copper, rotated −90 degrees. I was worried about the brushed motor on the LiDAR creating noise that would interfere with the IMU, so I shielded it with a few layers of copper. I probably didn't need to but wanted to be safe.
  • The LiDAR motor supply is permanently on through ferrite bead FB2, with no enable pin. The motor is only driven by the PWM signal, which sometimes causes issues with startup. Next revision I'll add a motor enable.
  • PA9 carries the LiDAR UART, which means that the MCU can only be flashed through the SWD header.

Gerbers are in: production/.


Firmware

NOTE: Designed, tested, and validated by me. Implemented with the help of Claude Code.

Register-level bare-metal C with a 12 KB flash image.

  • 96 MHz core from the 8 MHz crystal, with the exact 48 MHz PLLQ that USB needs
  • ICM-42688-P at 1 kHz over SPI1 with DMA, triggered by its data-ready interrupt
  • 6-DOF Madgwick fusion at the full sample rate, with startup gyro-bias calibration
  • RPLIDAR A1 SCAN decoding off USART1 with circular DMA and byte-level resync
  • TIM2_CH3 PWM spindle control
  • CRC-16 framed binary protocol, hardware watchdog, and independent stall detection for the IMU, the LiDAR link, and the spindle

Full detail in firmware/README.md, firmware/HARDWARE.md, and the wire format in firmware/PROTOCOL.md.

Build and flash

Requires arm-none-eabi-gcc and st-flash (from stlink-tools).

bash
cd firmware
make            # builds build/lidar-imu.bin and prints section sizes
make flash      # writes it over SWD

Host software

NOTE: Designed, tested, and validated by me. Implemented with the help of Claude Code.

Python 3 with NumPy and matplotlib. Reads the USB CDC stream, parses the binary protocol, and renders three views.

bash
cd host
python3 -m pip install -r requirements.txt

python3 -m lidarscan              # live orientation + LiDAR rings
python3 -m lidarscan --cloud      # 3D point cloud, device fixed at the origin
python3 -m lidarscan --cloud-ins  # 3D point cloud with dead-reckoned position
python3 -m lidarscan --sim        # synthetic data, no hardware needed
python3 -m lidarscan --selftest   # 60 self-tests covering the transform chain

--cloud assumes the device only rotates in place. --cloud-ins additionally double-integrates the accelerometer to estimate translation — see host/lidarscan/cloud_ins.py for the error budget and why it drifts. Both write binary PLY that opens in MeshLab, CloudCompare, or Blender.

Scanning Software

Coordinate frames

Getting these straight is most of the work:

FrameDefinition
SensorRaw ICM-42688-P axes. What the Madgwick filter integrates.
BodyThe board: X forward, Y left, Z up. +Y sensor is forward, −Z sensor is up.
EarthMadgwick's output frame, Z up. Yaw has no absolute reference.
LiDARThe A1's scan plane, related to the body frame by its physical mounting.

The A1 is a separate module on a cable, so its orientation relative to the PCB is mechanical and cannot be known from code. --lidar-yaw-deg aligns forward and --lidar-ccw un-mirrors the sweep; set them once for your mounting.


Repository layout

text
firmware/          bare-metal STM32F411 firmware
  src/             16 C source files
  include/         headers, incl. board.h — the authoritative pin map
  cmsis/           vendored ARM CMSIS headers
  PROTOCOL.md      normative wire format
  HARDWARE.md      pin map, DMA allocation, link budget
host/
  lidarscan/       Python host application
    protocol.py    framing, CRC, packet encode/decode
    reader.py      serial + simulated sources
    viz.py         orientation and ring views
    cloud.py       3D reconstruction, rotation only
    cloud_ins.py   3D reconstruction with dead reckoning
production/        gerbers, drill, pick-and-place
docs/images/       photos and screenshots for this README
*.kicad_*          schematic and PCB source

Status and known limitations

Working end to end: the board is fabricated, assembled, and validated driving the IMU, LiDAR, and USB concurrently at 0.00% measured packet loss and 5.6 rev/s sustained scanning.

Known limits, all understood rather than mysterious:

  • Yaw drifts. A 6-DOF filter has no magnetic reference, so long sessions smear the cloud about the vertical axis. Sweep and look; don't leave it accumulating for ten minutes and expect crisp walls.
  • --cloud-ins position drifts as t². Double integration of a MEMS accelerometer diverges; zero-velocity updates and bias tracking bound it but cannot repeal it. Pause frequently while scanning.
  • Orientation packets are decimated 10:1 without an anti-alias filter, so vibration above 50 Hz aliases into the band the dead-reckoner integrates. Averaging the samples in firmware would fix it.
  • The −90° IMU mounting rotation is not separately calibrated — only the Z-flip is handled, via the stated sensor-to-body convention.

Parts

49
QtyValueFootprintReferences
6100nFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC2, C4, C5, C6, C7, C15
4MountingHole_3mmMountingHole:MountingHole_3mm1, 2, 3, 4
310uFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC1, C3, C8
210kCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderR5, R6
210nFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC9, C14
222pFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC11, C12
25.1kCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderR1, R2
2ESD5ZxxDiode_SMD:D_SOD-523D1, D2
10Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderR3
10.1uFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC10
110kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR7
11A, low DCR, 600R @ 100MHzInductor_SMD:L_0805_2012Metric_Pad1.05x1.20mm_HandSolderFB2
12.2uFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC16
122uFLiDAR:PCAP_6.3x3-ELECT_NCA-LC17
1270Capacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderR4
14.7uFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC13
147uFLiDAR:PCAP_6.3x3-ELECT_NCA-LC18
18MHzLiDAR:ABM3B_ABRY1
1AP2112K-3.3Package_TO_SOT_SMD:SOT-23-5U3
1FerriteBead_SmallInductor_SMD:L_0603_1608Metric_Pad1.05x0.95mm_HandSolderFB1
1GENERAL DEBUGConnector_PinHeader_2.54mm:PinHeader_2x06_P2.54mm_VerticalJ6
1GPIO DEBUGConnector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_VerticalJ4
1GREENLED_SMD:LED_0805_2012Metric_Pad1.15x1.40mm_HandSolderD3
1ICM-42688-PLiDAR:LGA14_2P5X3X0P91_TDKU2
1PWR TESTConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ2
1Polyfuse_SmallFuse:Fuse_0805_2012Metric_Pad1.15x1.40mm_HandSolderF1
1RESETLiDAR:SW_B3F-1000_OMRSW1
1STM32F411CEUxPackage_DFN_QFN:QFN-48-1EP_7x7mm_P0.5mm_EP5.6x5.6mmU5
1SWDConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ5
1SW_Nidec_CAS-120A1Button_Switch_SMD:Nidec_Copal_CAS-120ASW2
1UART DEBUGConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ3
1USB4215-03-ALiDAR:GCT_USB4215-03-A_REVAJ1
1USBLC6-2SC6Package_TO_SOT_SMD:SOT-23-6U4
1~LiDAR:CONN_22035075_MOLU1

Similar boards

  • 6 layers133.1 × 133.1 mmAERIS H743-PCB, the printed circuit board in 3D

    AERIS H743-PCB

    7903555032/AERIS-H743-PCB

    A 6-layer STM32H743-based embedded development and flight-control/data-logging PCB designed as a practical hardware-design and PCB-layout project.

    114 parts1
  • 4 layers55 × 55 mmThetaAnomalain, the printed circuit board in 3D

    ThetaAnomalain

    Barsy-Barsevich/Barsotion-TA

    Board computer for model rockets

    110 parts1GPL-3.0
  • 6 layers40.6 × 40.5 mmFlight Controller, the printed circuit board in 3D

    Flight Controller

    desanv01/Flight-Controller-V2

    STM32H743 controller: regulated power, signal-only ESC, neutral ArduPilot firmware, manufacturing data and engineering history.

    169 partsCERN-OHL-S-2.0
  • 2 layers39 × 39 mmFCHardware, the printed circuit board in 3D

    FCHardware

    DiScarlet/FlightController

    52 parts
  • 4 layers60 × 60 mmWeek1, the printed circuit board in 3D

    Week1

    DVeldhurthi/halflifeweek1

    Half Life Week 1: Design PCB

    77 parts
  • 6 layers48 × 58 mmFlightControllerV2, the printed circuit board in 3D

    FlightControllerV2

    HazzerTheGreat/SPAR

    A flight controller for fixed wing UAVs based on the STM32H7 and designed to run betaflight or INAV

    105 parts
  • 2 layers42 × 50 mmImu daq, the printed circuit board in 3D

    Imu daq

    klimemam/aiproto_imu

    A compact USB-C IMU acquisition board built around the TDK InvenSense ICM-42688-P (high-precision 6-axis MEMS accel + gyro) and an RP2040 microcontroller that streams samples to a PC over USB Type-C as a virtual serial…

    51 parts
  • 4 layers45 × 45 mmFlightController, the printed circuit board in 3D

    FlightController

    QuadFlyController/Electronics

    A high-performance, compact, 4-layer flight controller PCB engineered for quadcopters and small UAVs. Built around the STMicroelectronics STM32F411CEU6 MCU, featuring high-rate low-noise motion sensing, barometric…

    74 partsMIT

Questions

How big is the LiDAR Scanner PCB?

It measures 82 × 82 mm and has 4 copper layers, 1.58 mm thick.

What parts does the LiDAR Scanner use?

49 parts, built around the AP2112K-3.3, ICM-42688-P, USBLC6-2SC6 and USB4215-03-A. 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 LiDAR Scanner KiCad files?

From the JEly613/Mini-LiDAR-Board repository on GitHub, at the commit this page was made from: the board is LiDAR Scanner.kicad_pcb and its schematic LiDAR Scanner.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the LiDAR Scanner design in my own project?

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