

Adapter encoder pcb
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
6STM32G031G6U6
UFQFPN-28(4x4)-40℃~+85℃ 1.7V~3.6V 12bit 26 32 Bit 32KB 64MHz 8KB ARM Cortex-M0+ Built-in+External FLASH UFQFPN-28(4x4) Microcontrollers (MCU/MPU/SOC) ROHSSTMicroelectronicsMicrocontrollers (MCU/MPU/SOC)TLE5009E1000FUMA1
SO-8-40℃~+150℃ 0°~360° 1.75mm 3V~3.6V 4mm 5mm 7mA No Rotary position sensor SO-8 Position Sensors ROHSInfineon TechnologiesPosition SensorsDF52-4S-0.8H(21)
SMD,P=0.8mm,卧贴-40℃~+85℃ 0.8mm 1 100V 1x4P 2A 4 4P Black Copper alloy Surface Mount, Right Angle UL94V-0 SMD,P=0.8mm,卧贴 Wire To Board Connector ROHSHirose ElectricWire To Board ConnectorSPX3819M5-L-3-3
SOT-23-5-40℃~+85℃@(Ta) 1 20V 3.3V 420mV@(100mA) 500mA 5uA 70dB@(1kHz) Fixed Over Current Protection、Over Temperature Protection、Enable Positive SOT-23-5 Voltage Regulators - Linear, Low Drop Out (LDO) Regulators ROHSTECH PUBLICVoltage Regulators - Linear, Low Drop Out (LDO) RegulatorsECS-1633-480-BN-TR
SMD2016-4PSMD2016-4P Crystal Oscillators ROHSECSCrystal OscillatorsTHVD2410VDRCREP
VSON-10(3x3)VSON-10(3x3) RS-485 / RS-422 ICs ROHSTexas InstrumentsRS-485 / RS-422 ICs
README
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
31| Qty | Value | Footprint | References |
|---|---|---|---|
| 10 | 100nF | adapter-encoder:C_0402_1005Metric | C2, C3, C4, C5, C9, C11, C13, C14, C16, C18 |
| 6 | 4.7uF | adapter-encoder:C_0603_1608Metric | C1, C8, C10, C12, C15, C17 |
| 2 | 100nF | Capacitor_SMD:C_0402_1005Metric | C6, C7 |
| 2 | DF52-4S-0.8H(21) | adapter-encoder:DF52-4S-0.8H(21) | U3, U6 |
| 2 | SPX3819M5-L-3-3 | adapter-encoder:SOT-23-5 | U4, U7 |
| 2 | THRU_HOLE_PAD | adapter-encoder:PAD-SMT-SMALL | M1, M2 |
| 1 | 120 | adapter-encoder:R_0402_1005Metric | R3 |
| 1 | C2901617 | adapter-encoder:ECS-1633-480-BN-TR | U5 |
| 1 | LED | adapter-encoder:LED_0603_1608Metric | D1 |
| 1 | Resistor | adapter-encoder:R_0402_1005Metric | R1 |
| 1 | STM32G031G6U6 | adapter-encoder:UFQFPN28 | U2 |
| 1 | THVD2410VDRCR | adapter-encoder:THVD2410VDRCR | IC1 |
| 1 | TLE5009E1000FUMA1 | adapter-encoder:SOIC8-TLE5009 | U1 |
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- 2 layers

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 - 4 layers90 × 70 mm

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 mm

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 mm

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 mm

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 mm

- 2 layers25.6 × 23 mm

Breakout
skorokithakis/tiny-ESP8266-breakout
A very small and basic ESP8266 breakout board
12 parts115BSD-2-Clause