Skip to the content
2 layers68.6 × 53.3 mmGantry shield, the printed circuit board in 3D

Repository containing the files to create the lab-scale gantry crane used in a couple of publications.

Size
68.6 × 53.3 mm
Copper layers
2
Thickness
1.6 mm
Parts
26
Nets
55
Pads
112
Tracks, vias
148, 7
Pours
1
Routed
Yes
KiCad
KiCad 6 (file 20211014)
Created
28 Jan 2025
Updated
6 Mar 2026

Overview

Gantry shield is an open-source printed circuit board by Cosys-Lab, from the Cosys-Lab/lab-scale-gantry-crane repository on GitHub, published under the MIT licence. It is a 2-layer board of 68.6 × 53.3 mm with 26 parts on 55 nets, routed with 148 tracks and 7 vias.

It is built around the TL084 and BS170FTA. Its parts include 11 resistors, 8 connectors, 1 IC, 1 diode and 1 transistor.

Main components

2

README

README.md

Lab-scale Gantry Crane Digital Twin Exemplar

This repository describes a lab-scale gantry crane digital twin exemplar. This exemplar was used in a couple of our publications. This readme only contains basic information, for the complete documentation, head to github pages.

The gantry crane

The repository is structured as follows:

  • BOM: the Bill-of-Materials of the crane.
  • C4-diagrams: C4 diagrams of the crane's software used in the EDTConf submitted exemplar paper.
  • CAD: CAD models of the crane in Fusion360, as well as 3MF exports for 3D printing.
  • arcadia: Capella models of the crane used in the SpaceRaise doctoral school.
  • arduino: KiCad project of an optional Arduino shield that simplifies connecting the sensors of the crane, and accompanying code.
  • docker: A Docker compose file and associated files allowing for easy setup of the necessary background services.
  • docs: docs for creating the GitHub pages with MkDocs
  • examples: Examples of the Python module that controls the crane.
  • gantrylib: The Python module controlling and monitoring the crane.
  • tests: Tests of the gantrylib module.

Hardware Quickstart

Refer to the build guide on GitHub Pages.

Software Setup

Python

Install Python. On Windows, preferably use Python 3.13 or higher, since earlier versions have a low resolution (only 15.6 ms) of the time() and datetime.now() functions, which are used often in the code.

Install the gantrylib module locally as editable installation. From the root of the repository folder, run:

text
python -m pip install -e .

Background services

The software relies on a TimescaleDB database, a Grafana dashboard and, optinally an MQTT broker. The setup files of all of these are contained in the docker folder. Assuming docker and docker compose are installed, from the docker folder, it suffices to run:

text
docker compose up

The containers can then be started and stopped with:

text
docker compose stop
docker compose start

To remove the containers and the network connecting them, run:

text
docker compose down

The config is exceptionally insecure, since all of the default usernames/passwords are used. If this is a problem, do change them.

TimeScaleDB
  • address: localhost
  • port: 5432
  • user: postgres
  • password: postgres
  • database: gantrycrane
Grafana Dashboard
  • address: localhost
  • port: 3000
  • user: admin
  • password: admin (On first login via http://localhost:3000, you will be prompted to change the password. Nothing blocks you from reusing the old password though.)
MQTT
  • address: localhost
  • port: 1883
  • user: not necessary, anonymous connections are allowed

The MQTT broker is really only needed if you want to run the TrajectoryGenerator service in its MQTT mode. Ofter services (Simulator, Validator) have in this release not yet been implemented in MQTT mode.

Software quickstart

Assuming you went through the software setup and built the crane according to the hardware quickstart, the fastest way to get the crane to do something is using the run_with_hmi.py example. A short video demonstrating the example can be found on youtube.

You will have to configure crane-properties.yaml for your specific installation, more specifically, specify the serial ports of the two motor controller boards. Unfortunately, the Trinamic devkits don't offer a unique ID that allows you to identify them, therefore we recommend plugging in the boards one by one, and noting down the serial ports that appear as you plug them in (in device manager/Ports (COM & LPT) in Windows, or under /dev/tty* in Linux.)

Once you have noted down those ports, update the following two fields in the config:

text
cart_motor_port: COM13
...
hoist_motor_port: COM8

You can now run the example.

Upon first starting, it will home the cart and hoist motor. Homing the cart motor happens automatically, homing the hoist motor must be done with some manual user input. The script prompts you to confirm this on the command line. Afterwards you will see the simple HMI interface that allows you to move the crane.

HMI Screenshot

Publications

Below are publications in which this exemplar was used:

  1. J. Mertens and J. Denil, Localizing Faults in Digital Twin Models by Using Time Series Classification Techniques, 2024 Winter Simulation Conference (WSC), IEEE, Dec. 2024, pp. 2868–2879. https://doi.org/10.1109/wsc63780.2024.10838825

  2. J. Mertens, S. Klikovits, F. Bordeleau, J. Denil, and Ø. Haugen, Continuous Evolution of Digital Twins using the DarTwin Notation, Software and Systems Modeling, p. 22, Nov. 2024. https://doi.org/10.1007/s10270-024-01216-7

  3. J. Mertens and J. Denil, Reusing model validation methods for the continuous validation of digital twins of cyber-physical systems, Software and Systems Modeling, p. 23, Oct. 2024. https://doi.org/10.1007/s10270-024-01225-6

  4. J. Mertens and J. Denil, Digital-twin Co-evolution using Continuous Validation, In Proceedings of the ACM/IEEE 14th International Conference on Cyber-Physical Systems (with CPS-IoT Week 2023), ICCPS ’23, San Antonio, TX, USA: ACM, 2023, pp. 266–267. https://doi.org/10.1145/3576841.3589628

Parts

26
QtyValueFootprintReferences
5100kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR2, R4, R6, R8, R10
422kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR5, R7, R9, R11
4MountingHole_3.2mmArduino_MountingHole:MountingHole_3.2mmMH1, MH2, MH3, MH4
110kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR1
11N4007Diode_THT:D_DO-41_SOD81_P10.16mm_HorizontalD1
1220Resistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P10.16mm_HorizontalR3
124V inputConnector_Phoenix_MSTB:PhoenixContact_MSTBA_2,5_2-G-5,08_1x02_P5.08mm_HorizontalJ8
1AnalogConnector_PinSocket_2.54mm:PinSocket_1x06_P2.54mm_VerticalJ3
1BS170FPackage_TO_SOT_SMD:SOT-23Q1
1Conn_02x13_Odd_EvenConnector_IDC:IDC-Header_2x13_P2.54mm_VerticalJ5
1Digital/PWMConnector_PinSocket_2.54mm:PinSocket_1x10_P2.54mm_VerticalJ2
1Digital/PWMConnector_PinSocket_2.54mm:PinSocket_1x08_P2.54mm_VerticalJ4
1PowerConnector_PinSocket_2.54mm:PinSocket_1x08_P2.54mm_VerticalJ1
1TL084Package_SO:SOIC-14_3.9x8.7mm_P1.27mmU1
1electromagnetConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ7
1encoderConnector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_VerticalJ6

Similar boards

  • 2 layers21.9 × 17.1 mmAlimTeleinfoMySensors, the printed circuit board in 3D

    AlimTeleinfoMySensors

    tdouez/TeleinfoMySensors

    Interface Téléinfo pour compteur Linky avec MySensors

    14 parts14
  • 2 layers29.2 × 109.2 mmSkis, the printed circuit board in 3D

    Skis

    kraakenstuff/Skis

    The SMD, 6HP version of Bastl Skis. Includes sliders :)

    96 parts11
  • 2 layers93 × 73.5 mmOne synapse electronic, the printed circuit board in 3D

    One synapse electronic

    RepRapLtd/AnalogueNeuralNet

    Project to make a photonic neural network using photochromic material for the synaptic weighting adjustments

    141 parts8GPL-3.0
  • 2 layers18.7 × 26 mmEsp32-wled pcb, the printed circuit board in 3D

    Esp32-wled pcb

    driemekasten/esp32-wled-pcb

    pcb for wled based on esp32-pico-d4 mcu

    19 parts3
  • 2 layers62.7 × 87.8 mmLinky TEMPO, the printed circuit board in 3D

    Linky TEMPO

    tdouez/Linky_TEMPO

    Module de récupération des sorties relais pour le compteur Linky avec un contrat TEMPO Compatible en TIC historique et standard

    34 parts3Apache-2.0
  • 10 layers17 × 50 mmSip board, the printed circuit board in 3D

    Sip board

    hprd/z80-fpga-drop-in-replacement

    UT Austin Fall 2025-Spring 2026 Senior Design Project for developing a Zilog Z80 CPU drop-in replacement using an FPGA.

    109 parts1
  • 2 layers90 × 60 mmMixers, the printed circuit board in 3D

    Mixers

    k1zmt/SSB85MultiPCB

    WIP! Don't try repeating!

    133 parts1

Questions

How big is the Gantry shield PCB?

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

What parts does the Gantry shield use?

26 parts, built around the TL084 and BS170FTA. 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 Gantry shield KiCad files?

From the Cosys-Lab/lab-scale-gantry-crane repository on GitHub, at the commit this page was made from: the board is arduino/arduino-shield-hardware/gantry-shield.kicad_pcb and its schematic arduino/arduino-shield-hardware/gantry-shield.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Gantry 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).