Skip to the content
2 layersZ1-encoder passthrough pcb, the printed circuit board in 3D

Z1-encoder passthrough pcb

Ocanath/networked-encoder1

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

1

README

README.md

Networked 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

PathContents
embedded/encoder-rs485STM32G031 encoder application firmware
embedded/encoder-bootloaderDARTT-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/:

SubmodulePurpose
dartt-protocolDARTT framing, parsing, read/write helpers
byte-stuffingCOBS encode/decode
serial-cross-platformCross-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
QtyValueFootprintReferences
4THRU_HOLE_PADadapter-encoder:THRU_HOLEM1, M2, M3, M4
1DF52-4S-0.8H(21)adapter-encoder:DF52-4S-0.8H(21)U1
1THRU_HOLE_PADadapter-encoder:MECH_THRU_HOLEM5

More from Ocanath/networked-encoder

1

Similar boards

  • 4 layersFoc pcb, the printed circuit board in 3D

    Foc pcb

    Ocanath/doomba-bdc-pcb

    brushed dc motor controller PCB 4 da doomba

    88 parts
  • 4 layers27.5 × 35.8 mmRobot cortex, the printed circuit board in 3D

    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 mmSwitch, the printed circuit board in 3D

    Switch

    byrantech/laptop

    anyon_e, a highly integrated, high end, open source laptop. Attempt the impossible.

    6 parts4.3kMIT
  • 2 layers14.6 × 33 mmBrain board SD Card 1, the printed circuit board in 3D

    Brain board SD Card 1

    rusefi/rusefi

    rusefi - GPL internal combustion engine control unit

    6 parts1.2k
  • 2 layers9 × 9 mmDpoint, the printed circuit board in 3D

    Dpoint

    Jcparkyn/dpoint

    Open-source digital stylus using camera tracking and inertial measurements

    6 parts1.1kMIT
  • 2 layers51.5 × 16.6 mmMicroswitchXY Endstop, the printed circuit board in 3D

    MicroswitchXY Endstop

    VoronDesign/Voron-Hardware

    Cool Hardware designed by the Voron Design group

    6 parts1.1kGPL-3.0
  • 2 layers21.9 × 76.7 mmAmiga External, the printed circuit board in 3D

    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 mmBusinesscard, the printed circuit board in 3D

    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.