Skip to the content
PCBKitNew board
4 layers14 × 15.6 mmAdapter encoder pcb, the printed circuit board in 3D

Adapter encoder pcb

Ocanath/networked-encoder1

RS485 encoder

Size
14 × 15.6 mm
Copper layers
4
Thickness
1 mm
Parts
31
Nets
38
Pads
127
Tracks, vias
208, 52
Pours
1
Routed
Yes
KiCad
KiCad 7 (file 20221018)
Created
23 Sep 2024
Updated
19 Aug 2026

Overview

Adapter encoder pcb is an open-source printed circuit board by Ocanath, from the Ocanath/networked-encoder repository on GitHub. It is a 4-layer board of 14 × 15.6 mm with 31 parts on 38 nets, routed with 208 tracks and 52 vias.

It is built around the STM32G031G6U6, TLE5009E1000FUMA1 and DF52-4S-0.8H(21), with the SPX3819M5-L-3-3, ECS-1633-480-BN-TR and THVD2410VDRCREP among its other parts. Its parts include 18 capacitors, 8 ICs, 2 resistors and 1 diode. It belongs with the interfaces and adapters boards and the STM32 boards of this library.

Main components

6

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

31
QtyValueFootprintReferences
10100nFadapter-encoder:C_0402_1005MetricC2, C3, C4, C5, C9, C11, C13, C14, C16, C18
64.7uFadapter-encoder:C_0603_1608MetricC1, C8, C10, C12, C15, C17
2100nFCapacitor_SMD:C_0402_1005MetricC6, C7
2DF52-4S-0.8H(21)adapter-encoder:DF52-4S-0.8H(21)U3, U6
2SPX3819M5-L-3-3adapter-encoder:SOT-23-5U4, U7
2THRU_HOLE_PADadapter-encoder:PAD-SMT-SMALLM1, M2
1120adapter-encoder:R_0402_1005MetricR3
1C2901617adapter-encoder:ECS-1633-480-BN-TRU5
1LEDadapter-encoder:LED_0603_1608MetricD1
1Resistoradapter-encoder:R_0402_1005MetricR1
1STM32G031G6U6adapter-encoder:UFQFPN28U2
1THVD2410VDRCRadapter-encoder:THVD2410VDRCRIC1
1TLE5009E1000FUMA1adapter-encoder:SOIC8-TLE5009U1

Questions

How big is the Adapter encoder pcb PCB?

It measures 14 × 15.6 mm and has 4 copper layers, 1 mm thick.

What parts does the Adapter encoder pcb use?

31 parts, built around the STM32G031G6U6, TLE5009E1000FUMA1, DF52-4S-0.8H(21) and SPX3819M5-L-3-3. 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 Adapter encoder pcb KiCad files?

From the Ocanath/networked-encoder repository on GitHub, at the commit this page was made from: the board is PCB/adapter-encoder-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 Adapter encoder pcb design in my own project?

Its repository states no licence, so its author keeps all rights: ask Ocanath before reusing the design.

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
  • 4 layers90 × 70 mmRobot hub rev3, the printed circuit board in 3D

    Robot hub rev3

    dustin-lehmann/TWIPR

    See https://github.com/dustin-lehmann/TWIPR/wiki for descriptions on how to use the hardware and software

    278 parts1
  • 6 layers80.7 × 79.8 mmMotorKontrollerV1, the printed circuit board in 3D

    MotorKontrollerV1

    HaddiS2/Complete-Field-Oriented-Control-Module-for-BLDC-Motors-BO26EB-41

    Custom field-oriented control (FOC) motor controller with USB-C Power Delivery.

    105 parts
  • 4 layers100 × 35 mmOBC, the printed circuit board in 3D

    OBC

    Mig-M27/Avionics-PCBs

    Este repositório é usado para gerir as versões dos projetos KiCAD do sistema de Avionics da Porto Space Team. Está dividido em 2 secções: 1.

    114 parts
  • 2 layers30 × 60 mmSplitFlapDriverATtiny1616V4, the printed circuit board in 3D

    SplitFlapDriverATtiny1616V4

    adamgmakes/SplitFlapDisplay

    A modular, 3D-printed split-flap display controllable over RS485 from a Raspberry Pi. Each module holds 64 characters and modules can be chained together to build a display of any width.

    25 parts190
  • 4 layers35.6 × 17.8 mmLofive, the printed circuit board in 3D

    Lofive

    mwelling/lofive

    RISC-V microcontroller board based on SiFive FE310.

    35 parts161
  • 2 layers25.6 × 23 mmBreakout, the printed circuit board in 3D

    Breakout

    skorokithakis/tiny-ESP8266-breakout

    A very small and basic ESP8266 breakout board

    12 parts115BSD-2-Clause