

Z1-encoder passthrough pcb
RS485 encoder
- Copper layers
- 2
- Thickness
- 1 mm
- Parts
- 6
- Nets
- 4
- Pads
- 11
- Tracks, vias
- 7, 0
- Pours
- 2
- Routed
- Yes
- KiCad
- KiCad 7 (file 20221018)
- Created
- 23 Sep 2024
- Updated
- 19 Aug 2026
Overview
Z1-encoder passthrough pcb is an open-source printed circuit board by Ocanath, from the Ocanath/networked-encoder repository on GitHub. It is a 2-layer board with 6 parts on 4 nets, routed with 7 tracks and 0 vias.
It is built around the DF52-4S-0.8H(21). It belongs with the interfaces and adapters boards of this library.
Main components
1README
README.mdNetworked Encoder
A compact RS-485 magnetic encoder system powered by DARTT, designed for daisy-chaining multiple encoder nodes on a shared bus. The system consists of STM32-based firmware, a host-side C++ API, and a CLI tool for calibration, address assignment, and firmware flashing.
What it does
Each encoder node sits on an RS-485 bus and responds to two address classes:
- Motor address — a minimal framing mode optimized for high-rate angle polling, intended for real-time motion control.
- Misc address — full DARTT register access for calibration (sin/cos bounds, angular offset, orthogonality error), device control (save to flash, restart, enter bootloader), and diagnostics.
Addresses are assigned per-device and persisted to flash. The bootloader (also DARTT-based) supports firmware updates over the same RS-485 bus with no additional hardware interface.
Repository Structure
| Path | Contents |
|---|---|
embedded/encoder-rs485 | STM32G031 encoder application firmware |
embedded/encoder-bootloader | DARTT-based RS-485 bootloader |
api/ | Host-side C++ encoder controller library |
cli/ | Command-line tool for calibration, addressing, and flashing |
scripts/ | Helper scripts for first-time device setup and firmware updates |
Dependencies
The API and CLI pull in three submodules under api/external/:
| Submodule | Purpose |
|---|---|
dartt-protocol | DARTT framing, parsing, read/write helpers |
byte-stuffing | COBS encode/decode |
serial-cross-platform | Cross-platform serial port |
Initialize all submodules after cloning with git submodule update --init --recursive.
Building
Requires CMake 3.22+ and a C++20-capable compiler. The primary build target is encoder-cli. VSCode launch and build tasks are provided in .vscode/.
CLI
The CLI (encoder-cli) takes a DARTT device address as its first argument followed by a port and baud rate. It supports streaming angle data, reading raw ADC values, running an interactive calibration session, reassigning device addresses, and flashing firmware over RS-485 via the bootloader. Run encoder-cli --help for the full command reference.
First-time Device Setup
Use scripts/init_flash.sh to set up a brand-new device. The bootloader ships at address 255 and the encoder application defaults to address 0. The script flashes firmware, starts the application, then assigns a permanent address. For subsequent updates on an already-configured device, use scripts/update_firmware.sh.
Using the API
api/ is designed to be consumed as a CMake add_subdirectory dependency. Link against encoder_controller and construct an Encoder object with the device address and a pointer to an already-connected Serial object. The caller owns the Serial lifetime.
Parts
6| Qty | Value | Footprint | References |
|---|---|---|---|
| 4 | THRU_HOLE_PAD | adapter-encoder:THRU_HOLE | M1, M2, M3, M4 |
| 1 | DF52-4S-0.8H(21) | adapter-encoder:DF52-4S-0.8H(21) | U1 |
| 1 | THRU_HOLE_PAD | adapter-encoder:MECH_THRU_HOLE | M5 |
More from Ocanath/networked-encoder
1- 4 layers14 × 15.6 mm

Similar boards
- 4 layers

- 4 layers27.5 × 35.8 mm

Robot cortex
Ocanath/robot-coprocessor-pcb
ESP32+STM32 Coprocessor. Standalone, with vendored PCB design out of the old coprocessor repository
91 parts - 2 layers18.5 × 11.1 mm

Switch
byrantech/laptop
anyon_e, a highly integrated, high end, open source laptop. Attempt the impossible.
6 parts4.3kMIT - 2 layers14.6 × 33 mm

- 2 layers9 × 9 mm

Dpoint
Jcparkyn/dpoint
Open-source digital stylus using camera tracking and inertial measurements
6 parts1.1kMIT - 2 layers51.5 × 16.6 mm

MicroswitchXY Endstop
VoronDesign/Voron-Hardware
Cool Hardware designed by the Voron Design group
6 parts1.1kGPL-3.0 - 2 layers21.9 × 76.7 mm

Amiga External
hoglet67/RGBtoHDMI
Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI
6 parts1kGPL-3.0 - 2 layers88.9 × 50.8 mm

Businesscard
hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!
6 parts915
Questions
What parts does the Z1-encoder passthrough pcb use?
6 parts, built around the DF52-4S-0.8H(21). 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 Z1-encoder passthrough pcb KiCad files?
From the Ocanath/networked-encoder repository on GitHub, at the commit this page was made from: the board is PCB/z1-encoder-passthrough-pcb.kicad_pcb and its schematic PCB/adapter-encoder-pcb.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Can I use the Z1-encoder passthrough pcb design in my own project?
Its repository states no licence, so its author keeps all rights: ask Ocanath before reusing the design.