Skip to the content
2 layers165 × 40 mmFrontpanel pcb, the printed circuit board in 3D

Frontpanel pcb

michael-betz/zed_vvm4

RF vector volt-meter: Zedboard, DC1525A daughter board, litex, debian

Size
165 × 40 mm
Copper layers
2
Thickness
1.6 mm
Parts
19
Nets
19
Pads
71
Tracks, vias
154, 23
Pours
2
Routed
Yes
KiCad
KiCad 5 (file 20190907)
Created
26 Oct 2019
Updated
11 Nov 2020

Overview

Frontpanel pcb is an open-source printed circuit board by michael-betz, from the michael-betz/zed_vvm repository on GitHub. It is a 2-layer board of 165 × 40 mm with 19 parts on 19 nets, routed with 154 tracks and 23 vias.

It is built around the BSS138. Its parts include 7 resistors, 2 capacitors, 2 ICs, 2 diodes and 1 transistor.

Main components

1

README

README.md

zed_vvm

A digital RF vector volt-meter (VVM). Measures amplitude and phase of a sinusoidal signal under test against a reference signal of same frequency. Intended as an instrument to monitor and troubleshoot legacy accelerator RF systems.

Photo of first prototype chassis

Based on a Digilent Zedboard running Debian with a DC1525A FMC daughter board on top.

  • 4 channel, 14 bit, 125 MSps, 800 MHz bandwidth (3 dB) analog to digital converter with LVDS interface: LTC2175-14
  • Sampling clock provided by a Si5xx-PROG_EVB evaluation board running custom firmware
  • 4 x 4096 sample buffer with oscilloscope-like trigger for raw ADC waveform storage (scope_app.py makes use of that)
  • FPGA implements
    • digital down-conversion and decimation to get a complex baseband (IQ) signal
    • rectangular (IQ) to polar conversion (magnitude, phase)
    • first order IIR filter to smooth the measurement result
    • uses Bedrock DSP blocks
    • makes good use of litex Control/Status Registers (CSRs), the wishbone2axi bridge and litex_server to make the measurements available to linux running on the CPU

The main reason to choose embedded linux is the convenience for application development:

  • python3 support with numpy / scipy or even jupyter notebook
  • sudo apt install <whatever_you_need>
  • ssh and scp make remote access secure and easy, even on the public internet
  • remote loading of bit-files through scp is very convenient
  • litex_server can run on the zedboard, making access to CSR-registers over ethernet easy and transparent. The TCP connection is tunneled trough ssh, making it secure
  • can run epics IOC, mosquitto client or many other tools to publish measurement results

Minimum design goals

  • support 125 MHz & 500 MHz signals
  • Same phase reading after power cycle (manage clock divider states)
  • 360 degree unique measurement range
  • Phase accuracy over a temperature range of 20 - 30 degC of better than 1 deg (0.2 %)
  • Less than 2 % amplitude error
  • At least 2 input channels + one phase reference channel
  • Self-contained instrument (only power is needed)
  • Easy to use
  • Not too expensive, such that it can be installed in multiple places across the facility
  • Epics support

System block diagram

High level system overview

vvm_dsp.py block diagram

DSP blocks implementing the VVM

phase_processor.py block diagram

Phase and Magnitude pipelined data path

Hardware modifications

Zedboard

  • remove XADC header (J2) as it interferes with the DC1525A board

DC1525A

  • Setup the board for differential sample clock input
    • Move R101 to R64 (0 Ohm jumper)
  • Remove low-pass filter on the analog input channels
    • Remove: R37, R38, R53, R54, R80, R81, R90, R91
    • Remove: R35, R52, R79, R89
    • Replace by 0 Ohm jumper: L4, L5, L6, L12

Installing litex

... on debian

bash
$ sudo apt install libevent-dev libjson-c-dev
$ sudo pip3 install virtualenvwrapper
$ mkvirtualenv litex
$ git clone git@github.com:yetifrisstlama/litex.git --recursive
$ cd litex
$ python litex_setup.py init
$ python litex_setup.py install
$ python setup.py develop

Building the .bit file

Most of the DSP blocks are from LBLs Bedrock repo, which needs to be cloned in the same directory as zed_vvm.

Vivado needs to be installed an in the PATH. I use v2019.1.

Setup your zedboard host-name in util/remote_config_fpga.sh and util/remote_litex_server.sh.

Note that the Zedboard PS will freeze if the FPGA is not loaded / in the process of being loaded and there is a AXI memory access through litex_server. So make sure to close the python apps before doing make upload.

bash
$ git clone https://github.com/yetifrisstlama/zed_vvm.git
$ git clone https://github.com/BerkeleyLab/Bedrock.git
$ cd zed_vvm/gateware
$ workon litex
$ make
# remote FPGA configuration
$ make upload
# start litex_server on zedboard for remote access to FPGA registers
$ make server
# Keep this terminal open and start a new one

Demo apps

litex_server_apps

Setting up linux

ZED_DEBIAN.md

Setting up Peripherals

How to connect Linux to the FPGA or the outside world. WIP ...

PS_PERIPHERALS.md

Load bitfile in linux

Bitfiles are loaded trough the Linux FPGA Manager. For this to work, the .bit file needs its header removed and its bytes swapped. This can either be done with the xilinx SDK or alternatively with bitstream_fix.py.

bash
python3 util/bitstream_fix.py <bitfile>.bit

copy the resulting <bitfile>.bit.bin on the zedboard, then

bash
    sudo -i
    cp <bitfile>.bit.bin /lib/firmware/
    echo 0 > /sys/class/fpga_manager/fpga0/flags
    echo <bitfile>.bit.bin > /sys/class/fpga_manager/fpga0/firmware
    dmesg

[ 1667.020520] fpga_manager fpga0: writing <bitfile>.bit.bin to Xilinx Zynq FPGA Manager

cd gateware; make upload tries to automate all these steps.

Parts

19
QtyValueFootprintReferences
72k2Resistor_SMD:R_0805_2012MetricR1, R2, R3, R4, R5, R6, R7
210uCapacitor_SMD:C_1206_3216MetricC1, C2
2LEDLED_THT:LED_D5.0mmD1, D2
1291V1newStuff:291V1U1
1BSS138Package_TO_SOT_SMD:SOT-23Q1
1Conn_02x06_Top_Bottompmod-conn_6x2:pmod_pin_array_6x2J1
1NHD-2.8-25664newStuff:NHD-2.8-25664UCB2U2

The 15 most common of 19 parts.

More from michael-betz/zed_vvm

1
  • 2 layers40 × 20.3 mmSi570 pmod, the printed circuit board in 3D

    Si570 pmod

    michael-betz/zed_vvm

    RF vector volt-meter: Zedboard, DC1525A daughter board, litex, debian

    17 parts4

Similar boards

  • 4 layers36 × 50.2 mmRacer, the printed circuit board in 3D

    Racer

    StuckAtPrototype/Racer

    These are structured into their own files. I could have used submodules, but decided against it.

    83 parts3.8kApache-2.0
  • 4 layers95 × 95 mmCube motherboard, the printed circuit board in 3D

    Cube motherboard

    willem-pennings/balancing-cube

    A cube that balances itself in a corner or edge using reaction wheels

    52 parts1.1kGPL-3.0
  • 2 layers54.6 × 70.9 mmBeagleLogic Cape, the printed circuit board in 3D

    BeagleLogic Cape

    abhishek-kakkar/BeagleLogic

    A Software Suite that implements a logic analyzer with the PRU on the BeagleBone / BeagleBone Black.

    22 parts479GPL-3.0
  • 2 layers44.2 × 29.3 mmI2c tiny usb, the printed circuit board in 3D

    I2c tiny usb

    harbaum/I2C-Tiny-USB

    Cheap and simple I²C to USB interface

    27 parts454
  • 2 layers21.6 × 52.3 mmPs2 pico hat, the printed circuit board in 3D

    Ps2 pico hat

    No0ne/ps2x2pico

    USB keyboard/mouse to PS/2 interface converter using a Raspberry Pi Pico

    17 parts399MIT
  • 2 layers45 × 45 mmAirCube, the printed circuit board in 3D

    AirCube

    StuckAtPrototype/AirCube

    Works standalone out of the box. Pairs with Home Assistant in minutes. Other platforms are supported through community-contributed extensions.

    61 parts379Apache-2.0
  • 4 layers74 × 104 mmBeepy, the printed circuit board in 3D

    Beepy

    sqfmi/beepy-hardware

    Beepy Hardware

    160 parts348MIT

Questions

How big is the Frontpanel pcb PCB?

It measures 165 × 40 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Frontpanel pcb use?

19 parts, built around the BSS138. 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 Frontpanel pcb KiCad files?

From the michael-betz/zed_vvm repository on GitHub, at the commit this page was made from: the board is hardware/frontpanel_pcb/frontpanel_pcb.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Frontpanel pcb design in my own project?

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