Skip to the content
2 layers41.5 × 31.6 mmPmod shield, the printed circuit board in 3D

3D Lidar based neural human detector on Kria KV260. Part of Adaptive Computing Challenge 2021 with AMD-Xilinx

Size
41.5 × 31.6 mm
Copper layers
2
Thickness
1.6 mm
Parts
9
Nets
19
Pads
49
Tracks, vias
113, 0
Pours
1
Routed
Yes
KiCad
KiCad 5 (file 20171130)
Created
9 Jan 2022
Updated
30 Mar 2022

Overview

Pmod shield is an open-source printed circuit board by Tai-Min, from the Tai-Min/KV260-Human-Detector repository on GitHub, published under the MIT licence. It is a 2-layer board of 41.5 × 31.6 mm with 9 parts on 19 nets, routed with 113 tracks and 0 vias.

Its parts include 6 connectors and 2 resistors. It belongs with the fPGA and programmable logic and sensors and measurement boards and the FPGA and CPLD boards of this library.

README

README.md

KV260-Human-Detector

Lidar based human detector on Kria KV260.

Created for Adaptive Computing Challenge 2021 with Xilinx.

For more information about the project itself see Human position estimator for mobile robots.

This repository contains all files and instructions required to recreate the project from scratch, including code, hardware design files, PCB design and 3D printable parts.

Recreating the project

PCB shield

Use included in <REPO>/pmod_shield/grbl Gerber files to order the shield using some PCB manufacturing service, or use included <REPO>/pmod_shield/pcb.pdf to etch it by yourself.

For the parts you will need:

  • 1x A4988 stepper motor driver,
  • 2x 2 pin female JST PCB connectors,
  • 1x 4 pin female JST PCB connector or 4x1 male vertical goldpin connector, whatever fits your stepper motor better,
  • 1x 2x6 pin male horizontal goldpin connector,
  • 2x 8x1 female vertical goldpin connectors,
  • 1x 5.08mm screw terminal block

Solder the parts as in the picture below (ignore crossed parts):

Pmod shield

Attaching hardware

Print listed below parts (from <REPO>/stl):

  • 1x bottom_panel
  • 1x bottom_panel_stopper
  • 2x bottom_panel_feets
  • 2x lidar_frame
  • 1x motor_frame
  • 2x top_panel
  • 1x cradle
  • lidar_board_holder
  • 1x nema_connector
  1. Screw 3D printed parts using M3 15mm screws,
  2. Insert 608 bearings into bearing holes of lidar_frames,
  3. Slide 190mm threaded rod through bearings and cradle (with M8 nuts inserted) into nema_connector,
  4. Using M3 15mm screws and corresponding nuts, screw NEMA17 stepper motor, Creality endstops and YDlidar X4
  5. Slide KV260 into the frame,
  6. Connect LIDAR through it's UART board to one of KV260's USB ports,
  7. Connect PMod shield to KV260 and then connect stepper motor and endstops to the shield.
  8. Connect KV260 to PC and to local network using Ethernet connector.

Use these images for reference:

Assembly

Assembly

Assembly

Connections

Building the software

Project created and tested using Ubuntu-20.04.

This repo's root directory is from now onwards called <REPO>

Prerequisites

This instruction assumes that Vitis software (Vivado, Vitis, Vitis-AI, PetaLinux) runs on version 2021.1 and is correctly sourced in ".bashrc". It also assumes that PetaLinux has installed all required packages.

For SD flashing balenaEtcher will be used.

Also, there are additional packages that should be installed via apt:

  • putty
  • sshpass (OPTIONAL used in build_app.sh with -p option provided to ignore multiple petalinux password inputs, considered bad practice so use at your own risk)

Regenerate project

  1. In Vivado open hardware project <REPO>/hardware/hardware.xpr and press Generate Bitstream

Considering that build files for PetaLinux and it's SDK take roughly 60Gb of space, I don't think than anyone would want to download and extract such blob of files (also GitHub would be mad at me I guess). So to create this project locally I have provided simple script that builds everything from scratch up to the Vitis platform.

  1. In terminal, in <REPO>/ run:
text
chmod +x ./regenerate_hw.sh && ./regenerate_hw.sh

This script will:

  • export hardware design (XSA file)
  • generate and compile device tree overlay (DTO)
  • compile pre-configured PetaLinux image, it's SDK and unpack it to Vitis workspace directory
  • create .wic image for SD card
  • update Vitis platform with new hardware description and linux image
  1. Flash <REPO>/linux/images/linux/petalinux-sdimage.wic into SD card (i.e using balenaEtcher)

  2. Verify whether everything is working via Putty and set new petalinux's password (called <DEVPWD> onwards):

text
sudo putty /dev/ttyUSBn -serial -sercfg 115200,8,n,1,N

replace "n" in "/dev/ttyUSBn" with correct USB number that responds with PetaLinux booting process.

Before leaving PetaLinux's shell, check device's ip with

text
ifconfig

Write down address near "inet" under "eth0". This address will be called <DEVIP> from now onwards.

Build project

  1. a) Only to build the application, in terminal, in <REPO>/ run:
text
chmod +x ./build_app.sh && ./build_app.sh

This will generate all necessary files in <REPO>/package/app/final

  1. b) To build and upload to the device:
text
chmod +x ./build_app.sh && ./build_app.sh -u petalinux@<DEVIP>

This method will ask for petalinux's password multiple times.

  1. c) (sshpass required!) To build and upload to the device:
text
chmod +x ./build_app.sh && ./build_app.sh -u petalinux@<DEVIP> -p <DEVPWD>

This method will ask for petalinux's password once.

Run the application

  1. a) SSH into KV260:
text
ssh petalinux@<DEVIP>
  1. b) Use Putty terminal from previous steps.

  2. Run:

text
sudo su
source ./setup.sh
./smart_lidar
  • Sudo is required to use xmutil and access /lib folder.
  • source.sh will setup FPGA bitstream and source ROS2 into our environment
  • smart_lidar will start the application.

Troubleshoting

If PetaLinux does not build due to error in Vitis-AI meta package, try to remove "dnndk" package from <REPO>/linux/components/yocto/layers/meta-petalinux/recipes-core/packagegroups/packagegroup-petalinux-vitisai.bb

Parts

9
QtyValueFootprintReferences
24.7kResistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_HorizontalR1, R2
1Conn_02x06_Odd_EvenConnector_PinHeader_2.54mm:PinHeader_2x06_P2.54mm_HorizontalJ2
1I2C CONConnector_JST:JST_XH_B4B-XH-AM_1x04_P2.50mm_VerticalJ6
1MOTOR CONConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ1
1Pololu_Breakout_A4988Module:Pololu_Breakout-16_15.2x20.3mmA1
1STOP1 CONConnector_JST:JST_XH_B2B-XH-AM_1x02_P2.50mm_VerticalJ4
1STOP2 CONConnector_JST:JST_XH_B2B-XH-AM_1x02_P2.50mm_VerticalJ5
1SUPPLY CONConnector_Phoenix_MSTB:PhoenixContact_MSTBA_2,5_2-G-5,08_1x02_P5.08mm_HorizontalJ3

Similar boards

  • 2 layers103 × 30.5 mmTS Back Endcap, the printed circuit board in 3D

    TS Back Endcap

    EEVengers/ThunderScope

    ThunderScope GitHub Repo

    9 parts1.3kMIT
  • 2 layers31.8 × 47.6 mmNGC 38 connector, the printed circuit board in 3D

    NGC 38 connector

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    9 parts1.2k
  • 2 layers24 × 27.3 mmExpansion Card Retrofit, the printed circuit board in 3D

    Expansion Card Retrofit

    FrameworkComputer/ExpansionCards

    Reference designs and documentation to create Expansion Cards for the Framework Laptop

    9 parts1.1kCC-BY-4.0
  • 2 layers15.6 × 17.3 mmSKR Mini TFT Thermistor Board, the printed circuit board in 3D

    SKR Mini TFT Thermistor Board

    VoronDesign/Voron-Hardware

    Cool Hardware designed by the Voron Design group

    9 parts1.1kGPL-3.0
  • 2 layers39.1 × 49.5 mmLearnoliver, the printed circuit board in 3D

    Learnoliver

    hackclub/OnBoard

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

    9 parts915
  • 2 layers17.4 × 16.9 mmToolhead, the printed circuit board in 3D

    Toolhead

    tanaes/whopping_Voron_mods

    9 parts787GPL-3.0
  • 2 layers9.8 × 108 mmExpander, the printed circuit board in 3D

    Expander

    wntrblm/Castor_and_Pollux

    A Juno-inspired dual oscillator

    9 parts587
  • 2 layersKeyboard after, the printed circuit board in 3D

    Keyboard after

    adamws/kicad-kbplacer

    KiCad plugin for automatic keyboard's key placement and routing

    9 parts547GPL-3.0

Questions

How big is the Pmod shield PCB?

It measures 41.5 × 31.6 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Pmod shield use?

9 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 Pmod shield KiCad files?

From the Tai-Min/KV260-Human-Detector repository on GitHub, at the commit this page was made from: the board is pmod_shield/pmod_shield.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.

Can I use the Pmod shield design in my own project?

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