Skip to the content
4 layers68.6 × 53.3 mmLab SDHD, the printed circuit board in 3D

CW Doppler radar with on-chip CA-CFAR detection (PSoC5), custom PCB, and MATLAB verification

Size
68.6 × 53.3 mm
Copper layers
4
Thickness
1.6 mm
Parts
35
Nets
45
Pads
104
Tracks, vias
99, 1
Pours
4
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
23 Jul 2026
Updated
23 Jul 2026

Overview

Lab SDHD is an open-source printed circuit board by Archit293, from the Archit293/Real-Time-Radar-Detection repository on GitHub. It is a 4-layer board of 68.6 × 53.3 mm with 35 parts on 45 nets, routed with 99 tracks and 1 via.

Its parts include 12 resistors, 6 capacitors, 5 connectors, 4 diodes and 2 ICs.

README

README.md

Real-Time Radar Detection

A continuous-wave (CW) Doppler radar system with on-chip target detection, built on a Cypress/Infineon PSoC5 microcontroller, with a custom PCB and a MATLAB testbench used to verify the embedded signal processing against a reference implementation.

Overview

The system samples an incoming analog signal, runs a real-time FFT on the microcontroller itself, and applies CA-CFAR (Cell-Averaging Constant False Alarm Rate) detection to automatically flag a moving target while keeping the false-alarm rate statistically controlled — a standard radar signal-processing technique, implemented here entirely in embedded C on a resource-constrained microcontroller. A MATLAB testbench then cross-checks the on-chip results against MATLAB's own FFT of the same raw data to confirm the embedded implementation is correct.

Repository Structure

text
.
├── KiCad_Project/     # Custom PCB: schematic, layout, and fabrication (Gerber) files
├── PSoC_Project/      # PSoC5 firmware: ADC capture, FFT, CFAR detection
└── MATLAB_TestBench.m # Host-side verification: triggers a capture, compares FFTs

Signal Chain

text
   Analog       ADC Capture      Windowing         FFT            CFAR
   Input   -->  (1024 samples) --> (Hann)   -->  (1024-pt)  -->  Detection
                                                     |
                                                     v
                                          UART (115200 baud)
                                                     |
                                                     v
                                          MATLAB verification
                                          (compares on-chip vs.
                                           reference FFT)

How It Works

StageDetail
Capture1024 samples via the PSoC's delta-sigma ADC
WindowingHann window applied in-place to reduce spectral leakage before the FFT
FFT1024-point FFT (CMSIS-DSP, fixed-point Q31)
Power spectrumMagnitude computed from the real/imaginary FFT output pairs
CFAR detectionCell-Averaging CFAR: NR=10 reference cells per side, NG=1 guard cell per side, target false-alarm probability PFA=1e-6

The firmware supports two modes:

  • Standalone mode — runs the full pipeline on-device and lights an LED when a target is detected. No host computer required.
  • Verification mode — streams the raw ADC samples, the on-chip FFT magnitudes, and the computed CFAR thresholds over UART, so the result can be checked against an independent reference.

Hardware

KiCad_Project/ contains the full custom PCB design (schematic, board layout, and the Gerber/drill files needed to send it to a fab house).

Verification

MATLAB_TestBench.m connects to the board over serial, triggers a capture via a push-button handshake, and for each transfer:

  • Plots the received time-domain signal and the PSoC's on-chip FFT
  • Computes MATLAB's own FFT of the same raw ADC data as a reference
  • Overlays both FFTs (normalized), reports the peak-frequency error between them, the correlation coefficient, and a bin-by-bin comparison table

This closes the loop on correctness: the same signal is processed two ways — once on the constrained embedded target, once on a full-precision reference — and the results are checked against each other directly.

Building

  • Firmware: open PSoC_Project/Lab_SDHD_Radar.cywrk in PSoC Creator. Peripheral drivers are regenerated automatically on build from the schematic (TopDesign/TopDesign.cysch) and are not checked into this repo.
  • PCB: open KiCad_Project/Lab_SDHD.kicad_pro in KiCad.
  • Verification: run MATLAB_TestBench.m in MATLAB with the board connected over USB (requires the serialport interface).

Acknowledgments

  • The FFT routine is built on a CMSIS-DSP static library credited in-code to Guillermo Urizar.
  • The MATLAB serial communication testbench started from a course-provided base template.

Parts

35
QtyValueFootprintReferences
4330Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR8, R9, R10, R11
21kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR1, R2
24.7uCapacitor_THT:CP_Radial_D5.0mm_P2.00mmC1, C5
2OPA340PPackage_DIP:DIP-8_W7.62mm_SocketU1, U2
11.5nCapacitor_THT:C_Rect_L7.2mm_W5.0mm_P5.00mmC3
1100Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR7
1100kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR6
1100nFCapacitor_THT:C_Rect_L7.0mm_W3.5mm_P5.00mmC4
110kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR12
12.2kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR3
1220kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR4
122uCapacitor_THT:CP_Radial_D6.3mm_P2.50mmC2
13.3nCapacitor_THT:C_Rect_L7.2mm_W5.0mm_P5.00mmC6
133kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR5
1AnalogConnector_PinSocket_2.54mm:PinSocket_1x06_P2.54mm_VerticalJ3
1Conn_01x03_PinConnector_PinSocket_2.54mm:PinSocket_1x03_P2.54mm_HorizontalJ5
1Digital/PWMConnector_PinSocket_2.54mm:PinSocket_1x08_P2.54mm_VerticalJ4
1Digital/PWMConnector_PinSocket_2.54mm:PinSocket_1x10_P2.54mm_VerticalJ2
1LEDLED_THT:LED_D5.0mmD4
1LED_GLED_THT:LED_D5.0mmD1
1LED_RLED_THT:LED_D5.0mmD3
1LED_YLED_THT:LED_D5.0mmD2
1PowerConnector_PinSocket_2.54mm:PinSocket_1x08_P2.54mm_VerticalJ1
1PushButtonButton_Switch_THT:SW_PUSH_6mm_H5mmSW1
1TP_INConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalTP2
1TP_Op1Connector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalTP4
1TP_PBConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalTP1
1TP_VcmConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalTP3
1TP_VoutConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalTP5

Similar boards

  • 4 layers25.9 × 63.9 mmEasyduino ESP32S3, the printed circuit board in 3D

    Easyduino ESP32S3

    Hanqaqa/Easyduino

    Easily dive into different PCB KiCad designs of the most popular microcontroller devboards

    35 parts755CERN-OHL-P-2.0
  • 4 layers36.8 × 78.6 mmGamepad Left, the printed circuit board in 3D

    Gamepad Left

    tschicki/PS2-Portable

    A custom designed PS2 Portable

    35 parts207MIT
  • 4 layers35.6 × 17.8 mmLofive, the printed circuit board in 3D

    Lofive

    mwelling/lofive

    RISC-V microcontroller board based on SiFive FE310.

    35 parts161
  • 4 layers89 × 93 mmFlasher2, the printed circuit board in 3D

    Flasher2

    clydeshaffer/gametank

    design files for the gametank hardware implementation

    35 parts150
  • 4 layers50 × 60 mmPiCCANTE OBD Dongle, the printed circuit board in 3D

    PiCCANTE OBD Dongle

    Alia5/PiCCANTE

    PiCCANTE is a powerful tool for exploring and reversing CAN busses of vehicles, based on Raspberry Pi Pico (any model)

    35 parts104GPL-3.0
  • 4 layers28.9 × 28.9 mmAgnus, the printed circuit board in 3D

    Agnus

    jbilander/ReAgnus

    A drop-in replacement PCB for the Amiga Agnus chip

    35 parts97CC-BY-SA-4.0
  • 4 layers30.5 × 68.6 mmKick, the printed circuit board in 3D

    Kick

    bread-modular/bread-modular

    Modular Synths for Everyone

    35 parts67MIT
  • 4 layers17.5 × 35 mmKungFuSID, the printed circuit board in 3D

    KungFuSID

    Sgw32/KungFuSID

    Kung Fu SID is a firmware based on Kung Fu Flash which allows SID emulation

    35 parts65

Questions

How big is the Lab SDHD PCB?

It measures 68.6 × 53.3 mm and has 4 copper layers, 1.6 mm thick.

What parts does the Lab SDHD use?

35 parts. 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 Lab SDHD KiCad files?

From the Archit293/Real-Time-Radar-Detection repository on GitHub, at the commit this page was made from: the board is KiCad_Project/Lab_SDHD.kicad_pcb and its schematic KiCad_Project/Lab_SDHD.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Lab SDHD design in my own project?

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