

Pmod shield
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.mdKV260-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):

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
- Screw 3D printed parts using M3 15mm screws,
- Insert 608 bearings into bearing holes of lidar_frames,
- Slide 190mm threaded rod through bearings and cradle (with M8 nuts inserted) into nema_connector,
- Using M3 15mm screws and corresponding nuts, screw NEMA17 stepper motor, Creality endstops and YDlidar X4
- Slide KV260 into the frame,
- Connect LIDAR through it's UART board to one of KV260's USB ports,
- Connect PMod shield to KV260 and then connect stepper motor and endstops to the shield.
- Connect KV260 to PC and to local network using Ethernet connector.
Use these images for reference:




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
- 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.
- In terminal, in <REPO>/ run:
chmod +x ./regenerate_hw.sh && ./regenerate_hw.shThis 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
-
Flash <REPO>/linux/images/linux/petalinux-sdimage.wic into SD card (i.e using balenaEtcher)
-
Verify whether everything is working via Putty and set new petalinux's password (called <DEVPWD> onwards):
sudo putty /dev/ttyUSBn -serial -sercfg 115200,8,n,1,Nreplace "n" in "/dev/ttyUSBn" with correct USB number that responds with PetaLinux booting process.
Before leaving PetaLinux's shell, check device's ip with
ifconfigWrite down address near "inet" under "eth0". This address will be called <DEVIP> from now onwards.
Build project
- a) Only to build the application, in terminal, in <REPO>/ run:
chmod +x ./build_app.sh && ./build_app.shThis will generate all necessary files in <REPO>/package/app/final
- b) To build and upload to the device:
chmod +x ./build_app.sh && ./build_app.sh -u petalinux@<DEVIP>This method will ask for petalinux's password multiple times.
- c) (sshpass required!) To build and upload to the device:
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
- a) SSH into KV260:
ssh petalinux@<DEVIP>-
b) Use Putty terminal from previous steps.
-
Run:
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| Qty | Value | Footprint | References |
|---|---|---|---|
| 2 | 4.7k | Resistor_THT:R_Axial_DIN0204_L3.6mm_D1.6mm_P7.62mm_Horizontal | R1, R2 |
| 1 | Conn_02x06_Odd_Even | Connector_PinHeader_2.54mm:PinHeader_2x06_P2.54mm_Horizontal | J2 |
| 1 | I2C CON | Connector_JST:JST_XH_B4B-XH-AM_1x04_P2.50mm_Vertical | J6 |
| 1 | MOTOR CON | Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_Vertical | J1 |
| 1 | Pololu_Breakout_A4988 | Module:Pololu_Breakout-16_15.2x20.3mm | A1 |
| 1 | STOP1 CON | Connector_JST:JST_XH_B2B-XH-AM_1x02_P2.50mm_Vertical | J4 |
| 1 | STOP2 CON | Connector_JST:JST_XH_B2B-XH-AM_1x02_P2.50mm_Vertical | J5 |
| 1 | SUPPLY CON | Connector_Phoenix_MSTB:PhoenixContact_MSTBA_2,5_2-G-5,08_1x02_P5.08mm_Horizontal | J3 |
Similar boards
- 2 layers103 × 30.5 mm

- 2 layers31.8 × 47.6 mm

- 2 layers24 × 27.3 mm

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 mm

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 mm

Learnoliver
hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!
9 parts915 - 2 layers17.4 × 16.9 mm

- 2 layers9.8 × 108 mm

- 2 layers

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).