Skip to the content
PCBKitNew board
4 layers100 × 100 mmAFE, the printed circuit board in 3D

Custom 2-channel digital oscilloscope DAQ with 20MHz bandwidth. Built with a custom KiCad analog front-end (AFE) PCB, Gowin FPGA (Tang Nano 9K) for high-speed signal buffering (VHDL), and an RPi Pico MCU for SCPI-like control. Includes a simple Python GUI for data visualization.

Size
100 × 100 mm
Copper layers
4
Thickness
1.58 mm
Parts
216
Nets
184
Pads
733
Tracks, vias
1,591, 673
Pours
81
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
16 Nov 2025
Updated
7 Aug 2026

Overview

AFE is an open-source printed circuit board by Blaze-Pascal, from the Blaze-Pascal/Masters-Multi-Channel_DAQ repository on GitHub, published under the GPL-3.0 licence. It is a 4-layer board of 100 × 100 mm with 216 parts on 184 nets, routed with 1,591 tracks and 673 vias.

It is built around the LMV358, AD8132ARMZ and AD8330ARQZ, with the ADA4817-1ARDZ, AD9288BSTZ-40 and CDCV304PW among its other parts. Its parts include 85 resistors, 66 capacitors, 18 ICs, 9 connectors and 5 transistors. It belongs with the fPGA and programmable logic and sensors and measurement boards and the RP2040 and FPGA and CPLD boards of this library.

Main components

12

README

README.md

2-Channel Digital Oscilloscope

Hardware Setup

Project Overview

Goal: Build a custom data acquisition system capable of capturing and displaying fast analog signals with at least a 15 MHz bandwidth.

Project Scope:

  • Custom PCB & Analog Front-End (AFE): Designed and routed in KiCad.
  • FPGA Data Acquisition Engine (DAQ): Written in VHDL, deployed on a Tang Nano 9K (Gowin GW1NR-9).
  • MCU Control & Data Handling: Written in C (Arduino core) on a Raspberry Pi Pico, featuring a pseudo-SCPI command parser.
  • PC Software: A basic Python GUI for data visualization.

System Architecture

System Architecture Diagram

The system is divided into four main functional blocks:

  1. Analog Front-End: Conditions the input signal by applying attenuation/amplification, removing or shifting the DC offset, and applying AC/DC coupling.
  2. Digitization: An ADC converts the conditioned analog signal into the digital domain. Currently, a crystal oscillator and a clock buffer/splitter IC provide the clock to both the ADC and the FPGA.
  3. FPGA DAQ: Manages the high-speed digital logic, executing pre-filling, edge triggering, post-filling, and hardware-level memory buffering.
  4. MCU & PC Software: A microcontroller asynchronously reads the buffered data from the FPGA (two channels simultaneously via a custom parallel protocol). It then transmits this data to a PC for visualization while receiving SCPI commands to control the FPGA (horizontal scaling) and the AFE (vertical scaling).

Hardware Details

The Analog Front-End (AFE)

Frontend block schematic Frontend Photo

The AFE is a fully custom design inspired by commercial oscilloscope teardowns and open-source projects. The signal chain operates as follows:

  • Input Stage: The signal enters via a BNC connector, passes through an AC/DC coupling circuit, and reaches a relay that toggles between 1:1 and 10:1 attenuation.
  • Protection & Buffering: A BAV99 diode provides input protection before the signal hits an ADA4817 FET-input op-amp acting as a buffer.
  • Offset & Gain: The signal is routed to an AD8132 Fully Differential Amplifier (FDA), where the DC offset is applied. Finally, it is amplified by an AD8330 Variable Gain Amplifier (VGA), which also acts as the driver for the AD9288 100MSPS ADC.

The Offset Circuitry

Offset Photo ADC detail Photo

The offset adjustment is achieved by injecting a control voltage into one of the FDA pins. This voltage is generated by an MCP4728 quad-channel DAC, which simultaneously controls the VGA gain. By utilizing a summing amplifier connected to the negative rail, the offset voltage can swing approximately ±4.5V.


Digital & Firmware

The FPGA Engine (VHDL)

FPGA detailed diagram FPGA State Machine Diagram

The core of the DAQ engine is a state machine responsible for the pre-fill, trigger, and post-fill capture sequence. The VHDL architecture includes several key design features:

  • Clock Domain Crossing: Buffer memory is implemented using Gowin Semi Dual Port RAM IP cores. To safely cross from the high-frequency ADC clock domain to the slower MCU read clock domain, the state machine halts capture and enters a STOP state, preventing concurrent memory overwrites while the MCU reads the data.
  • Hardware Data Unwrapping: Instead of forcing the slower MCU to track indices and unwrap a circular buffer, the FPGA handles this natively. The logic automatically aligns the data so the trigger source sample is always properly positioned (e.g., in the exact middle for a 50/50 prefill/postfill ratio). The MCU simply reads and transmits raw, glued data for both channels.
  • Command Interface: An SPI read block receives and parses commands sent by the MCU.

Results & Verification

Testing was conducted in progressive stages to isolate the scope of potential problems:

Simulated Trigger Data
  1. Digital Simulation: The first round of testing was performed by feeding simulated digital data from a Raspberry Pi Pico into the FPGA. The logic was verified using the GoWin Analyzer Oscilloscope app.
1MHz ADC Sample
  1. ADC Verification: A real 1 MHz sinusoidal signal was then sampled by the ADC to confirm analog-to-digital conversion integrity.

1MHz Final Test 19MHz Bandwidth Test

  1. Full System Test: A PyQt5 visualization application was used to interface with the hardware. Final testing confirmed that the front-end analog bandwidth reaches approximately 19 MHz, successfully exceeding the 15 MHz project goal.

Future Improvements

While the current revision meets all initial project goals, several architectural improvements could be made in future iterations:

  • Simplify the AFE: The FDA is not strictly necessary; the front-end could be streamlined by merging the offset functionality directly into the VGA.
  • Improve Offset Stability: The offset section could be reworked to utilize a dedicated, high-stability voltage reference rather than relying on the main power rail.
  • Upgrade the VGA: The analog VGA could be swapped for a digitally controlled alternative, such as the LMH6518 or AD8370, for more precise gain stepping.
  • Adjust Clock Architecture: Instead of using an external crystal to clock the ADC and decimating samples on the FPGA to change the timebase, the FPGA could generate and drive the ADC clock directly, allowing for dynamic sampling rate adjustments. The PCB was designed with such a possibility in mind so it just needs necessary VHDL code and one jumper changeover.
  • Revise the PSU: Currently, the project is powered by a custom charge-pump-based PSU that introduces significant noise. While small-signal/high-gain performance analysis was outside the initial scope, it is likely hampered by this setup.
  • System Integration: Replacing the Tang Nano 9K development board with a discrete FPGA integrated directly onto the PCB could improve digital signal integrity, which is theorized to be the cause of some signal glitches observed during testing.
  • MCU Migration: Transitioning from the Raspberry Pi Pico dev board to an integrated STM32 chip on the PCB would streamline the design and eliminate the reliance on the RP2040's external flash memory dependencies.
  • Increase Memory Depth: The Gowin FPGA has limited BRAM, restricting the buffer memory size. This could be addressed by upgrading to a larger FPGA (e.g., the 20 series) or adding discrete RAM. Using a module like the Primer 20K (which features a SODIMM connector and onboard RAM) could bypass the complexities of routing high-speed memory interconnects on a custom PCB. Additionally, sourcing bare Gowin ICs can currently be challenging.
  • Interleaved Mode: Inspired by other open-source projects like ScopeFun, interleaving could effectively double the sampling rate. Bridging the signal from one channel to the other and forcing sampling 180 degrees out of phase is highly feasible thanks to the AD9288's two independent clock inputs.

Expansion Potential

Currently, the project has reached a successful proof-of-concept stage and sits at a crossroads. For simplicity, the captured data is currently sent to a PC app and visually represented as raw sample values. For the next version, there are two primary paths forward:

  1. PC-Attached Oscilloscope: Expand upon the PC app concept, turning it into a fully-featured interface with potential for robust data logging, advanced measurements, and network control.
  2. Standalone Benchtop Device: Pivot into a self-contained benchtop instrument by swapping the MCU for a more powerful processor and integrating a dedicated hardware UI (an LCD screen, rotary encoders, and physical buttons).

Parts

216
QtyValueFootprintReferences
37100nPCM_Capacitor_SMD_AKL:C_0603_1608MetricC1, C10, C11, C12, C13, C14, C15, C101, C102, C107, C108, C110, C112, C116, C117, C118 +21
3010kPCM_Resistor_SMD_AKL:R_0603_1608MetricR1, R10, R11, R12, R14, R15, R16, R17, R104, R105, R115, R116, R118, R122, R123, R126 +14
1010uPCM_Capacitor_SMD_AKL:C_0603_1608MetricC25, C26, C103, C104, C106, C111, C203, C204, C206, C211
90PCM_Resistor_SMD_AKL:R_0603_1608MetricR6, R7, R13, R18, R19, R20, R21, R22, R23
8100RPCM_Resistor_SMD_AKL:R_0603_1608MetricR26, R27, R112, R113, R114, R212, R213, R214
8499PCM_Resistor_SMD_AKL:R_0603_1608MetricR102, R103, R107, R108, R202, R203, R207, R208
61kPCM_Resistor_SMD_AKL:R_0603_1608MetricR24, R28, R31, R33, R106, R206
64.7kPCM_Resistor_SMD_AKL:R_0603_1608MetricR25, R29, R30, R32, R124, R224
522uCapacitor_SMD:CP_Elec_5x5.4C18, C19, C20, C28, C29
40PCM_Resistor_SMD_AKL:R_Array_Convex_4x0402RN1, RN2, RN3, RN4
415pPCM_Capacitor_SMD_AKL:C_0603_1608MetricC114, C115, C214, C215
4330nPCM_Inductor_SMD_AKL:L_0402_1005MetricL1, L2, L3, L4
449.9PCM_Resistor_SMD_AKL:R_0603_1608MetricR101, R109, R201, R209
450-100PCM_Resistor_SMD_AKL:R_0603_1608MetricR110, R111, R210, R211
4TestPoint_ProbeTestPoint:TestPoint_Pad_D1.0mmTP4, TP5, TP6, TP7
3BSS138PCM_Package_TO_SOT_SMD_AKL:SOT-23Q1, Q2, Q3
3LOGOLOGOG***, G***, G***
3MCU_ConnConnector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ2, J102, J202
21.5-3pFPCM_Capacitor_SMD_Handsoldering_AKL:C_Trimmer_Sprague-Goodman_SGC3C109, C209
2100kPCM_Resistor_SMD_AKL:R_0603_1608MetricR120, R220
2150pPCM_Capacitor_SMD_AKL:C_0402_1005MetricC21, C22
21MPCM_Resistor_SMD_AKL:R_0805_2012MetricR121, R221
2220kPCM_Resistor_SMD_AKL:R_0603_1608MetricR119, R219
222nPCM_Capacitor_SMD_AKL:C_1206_3216MetricC105, C205
222pPCM_Capacitor_SMD_AKL:C_0402_1005MetricC23, C24
23.3kPCM_Resistor_SMD_AKL:R_0603_1608MetricR125, R225
25VTestPoint:TestPoint_Pad_D2.0mmTP1, TP2
2680kPCM_Resistor_SMD_AKL:R_0603_1608MetricR117, R217
2AD8132ARMZPCM_Package_SO_AKL:MSOP-8_3x3mm_P0.65mmU102, U202
2AD8330ARQZPCM_Package_SO_AKL:QSOP-16_3.9x4.9mm_P0.635mmU104, U204
2ADA4817-1ARDZPCM_Package_SO_AKL:SOIC-8-1EP_3.9x4.9mm_P1.27mm_EP2.29x3mm_ThermalViasU103, U203
2AMS1117-3.3PCM_Package_TO_SOT_SMD_AKL:SOT-223-3_TabPin2U9, U10
2AO3400APCM_Package_TO_SOT_SMD_AKL:SOT-23Q101, Q201
2BAV99PCM_Package_TO_SOT_SMD_AKL:SOT-23D101, D201
2CPC1017NPCM_Package_SO_AKL:SOP-4_3.8x4.1mm_P2.54mmU101, U201
2Conn_CoaxialConnector_Coaxial:BNC_Amphenol_B6252HB-NPP3G-50_HorizontalJ101, J201
2DNPPCM_Capacitor_SMD_AKL:C_0603_1608MetricC113, C213
2G6K-2Relay_SMD:Relay_DPDT_Omron_G6K-2F-YK101, K201
2LMV358PCM_Package_SO_AKL:SOIC-8_3.9x4.9mm_P1.27mmU1, U2
2MCP4551T-103E_MSPCM_Package_SO_AKL:MSOP-8_3x3mm_P0.65mmU4, U5
2SS14Diode_SMD:D_SMAD102, D202
1-5VTestPoint:TestPoint_Pad_D2.0mmTP3
13.3VTestPoint:TestPoint_Pad_D2.0mmTP8
19ESC400C0033LOscillator:Oscillator_SMD_SeikoEpson_SG8002LB-4Pin_5.0x3.2mmY1
1AD9288BSTZ-40PCM_Package_QFP_AKL:LQFP-48_7x7mm_P0.5mmU8
1CDCV304PCM_Package_SO_AKL:TSSOP-8_4.4x3mm_P0.65mmU3
1Conn_02x24_Odd_EvenConnector_PinHeader_2.54mm:PinHeader_2x24_P2.54mm_VerticalJ4
1GEN_INConnector_Coaxial:U.FL_Molex_MCRF_73412-0110_VerticalJ3
1MCP4728PCM_Package_SO_AKL:MSOP-10_3x3mm_P0.5mmU6
1MCU_ConnConnector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_VerticalJ5
1PWR_ConnConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ1
1SolderJumper_2_OpenJumper:SolderJumper-2_P1.3mm_Open_TrianglePad1.0x1.5mmJP1
1Tang_Nano_9Knosuz-lib:DIP-48_TangNano9KU7

The 210 most common of 216 parts.

Questions

How big is the AFE PCB?

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

What parts does the AFE use?

216 parts, built around the LMV358, AD8132ARMZ, AD8330ARQZ and ADA4817-1ARDZ. 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 AFE KiCad files?

From the Blaze-Pascal/Masters-Multi-Channel_DAQ repository on GitHub, at the commit this page was made from: the board is KiCad/AFE/AFE.kicad_pcb and its schematic KiCad/AFE/AFE.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the AFE design in my own project?

Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

More from Blaze-Pascal/Masters-Multi-Channel_DAQ

1
  • 4 layers50 × 26 mmPSU, the printed circuit board in 3D

    PSU

    Blaze-Pascal/Masters-Multi-Channel_DAQ

    Custom 2-channel digital oscilloscope DAQ with 20MHz bandwidth. Built with a custom KiCad analog front-end (AFE) PCB, Gowin FPGA (Tang Nano 9K) for high-speed signal buffering (VHDL), and an RPi Pico MCU for SCPI-like…

    29 parts2GPL-3.0

Similar boards

  • 2 layers70.7 × 53.3 mmGladiolus, the printed circuit board in 3D

    Gladiolus

    greatfet-hardware/gladiolus

    a Software Defined Infrared (SDIR) neighbor

    159 parts19
  • 2 layers187.5 × 45 mmGamma spectrometer, the printed circuit board in 3D

    Gamma spectrometer

    Motokichirou/gamma-spectrometer

    NaI(Tl) gamma spectrometer: STM32G474 + R1307 PMT + 4-board stack, KiCad schematics, LTspice simulations

    231 parts
  • 6 layers100 × 160 mmScopefun v2, the printed circuit board in 3D

    Scopefun v2

    snhobbs/scopefun-hardware

    This repository contains Scopefun hardware schematics and pcb layout files.

    840 parts
  • 4 layers100 × 100 mmPower Supply, the printed circuit board in 3D

    Power Supply

    bernau01/zh_power_supply

    Power management for mobile robotic

    318 parts
  • 4 layers124 × 89.4 mmATMega 328 PU Board, the printed circuit board in 3D

    ATMega 328 PU Board

    olexsu/ATmega328_control_Board

    Custom ATmega328 embedded control board designed in KiCad with Arduino firmware.

    140 parts
  • 2 layers195.6 × 113 mmHVA, the printed circuit board in 3D

    HVA

    blue-wind-25/JxMake

    JxMake is a Java-based, cross-platform build system primarily inspired by the syntax and features of GNU Make, Perforce Jam, and CMake.

    228 parts
  • 2 layers170.1 × 96.9 mmSmartPrintCoreH7x, the printed circuit board in 3D

    SmartPrintCoreH7x

    BoltzRnD/SmartPrintCoreH7x

    STM32H7 based Robust and Open Source 3D Printer Mainboard

    567 parts89