Skip to the content
PCBKitNew board
2 layers58 × 47.5 mmArmPCB, the printed circuit board in 3D

RS485 encoder interface board for accurate joint position feedback on UMD Mars Rover Team's autonomous arm. Supports a multi-drop RS485 encoder bus with CAN integration to an STM32-based control system.

Size
58 × 47.5 mm
Copper layers
2
Thickness
1.6 mm
Parts
28
Nets
51
Pads
111
Tracks, vias
147, 15
Pours
1
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
27 Aug 2026
Updated
27 Aug 2026

Overview

ArmPCB is an open-source printed circuit board by AaravD356, from the AaravD356/RS485-Encoder-PCB repository on GitHub. It is a 2-layer board of 58 × 47.5 mm with 28 parts on 51 nets, routed with 147 tracks and 15 vias.

It is built around the MAX485ED. Its parts include 10 connectors, 8 capacitors, 6 resistors and 2 ICs. It belongs with the interfaces and adapters and robots and motor control boards of this library.

Main components

1

README

README.md

Arm-Encoder-PCB

RS485 encoder interface board for accurate joint position feedback on the UMD Mars Rover Team's autonomous arm. The board polls a multi-drop bus of RS485 absolute encoders and relays live position and velocity data over CAN to the rest of the rover's control system, with an STM32 handling the protocol translation.

Overview

Each joint on the autonomous arm is fitted with an RS485 absolute encoder (AMT21x / AMT212 series). This board's STM32 firmware manages a bus of these encoders, round-robin polling each one, validating the returned data, and tracking position/velocity per node. That data is exposed over CAN so the arm's main controller can request live feedback for any specific joint on demand.

Node Addressing

Each encoder on the bus is assigned a unique node ID, sent directly as the command byte for a standard position read:

Up to a configurable max number of encoders can be registered at once, each tracked independently with its own node ID, resolution, poll period, last-known position, and online/offline status. Four encoders are loaded by default at startup, but encoders can be added or cleared at runtime, with duplicate node IDs rejected.

Bus Polling

The system round-robins through registered encoders rather than polling all of them every cycle, respecting each encoder's individual poll period. Each controller cycle:

  1. Checks whether the current encoder's poll interval has elapsed.
  2. If due, sends that encoder's node-addressed command and reads back the 2-byte response.
  3. Validates the response using the AMT21 parity check (two check bits derived from the data payload).
  4. Decodes the position from the response, scaled to the encoder's configured resolution (up to 14-bit).
  5. Computes velocity from the position delta between reads, unwrapping across the resolution's modulo range to handle wraparound at the 0/max boundary.
  6. Advances to the next encoder for the following cycle.

Encoders that fail to respond or fail checksum validation are marked offline, with failed/successful read counters tracked per node — this lets the system distinguish a genuinely disconnected encoder from an occasional dropped packet.

RS485 Transport

Direction control (TX/RX switching) is handled either automatically by the UART hardware or manually via a GPIO-driven DE pin, depending on configuration. Before every transmission, the receive buffer is flushed to avoid stale data corrupting the next read. Transmit completion is polled with a timeout rather than assumed, so a bus fault or non-responding node can't hang the polling loop indefinitely.

CAN Integration

The board exposes encoder data over CAN request/response:

  • Request — the controller specifies a target encoder's node ID.
  • Response — the board replies with that node's ID, position (in 0.1° units), and velocity (in 0.01°/s units), scaled from raw encoder counts based on the encoder's resolution.

Requests are matched to a registered encoder by node ID; if the encoder isn't found or isn't currently online, no meaningful data is returned. This request/response model means the main controller can poll specific joints on demand rather than needing to parse a continuous broadcast stream.

Reliability Notes

  • Per-node online/offline tracking rather than a single global "encoder ok" flag
  • Failed reads don't stall the polling loop — the round-robin simply moves to the next node
  • Position wraparound is explicitly handled in velocity calculation, avoiding large erroneous velocity spikes when an encoder crosses its zero point
  • Duplicate node IDs are rejected at registration, preventing bus address collisions from being configured accidentally

Parts

28
QtyValueFootprintReferences
610uCapacitor_SMD:C_0402_1005Metric_Pad0.74x0.62mm_HandSolderC2, C3, C5, C6, C7, C8
310kResistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolderR5, R7, R8
3Conn_01x03_PinConnector_JST:JST_XH_S3B-XH-A_1x03_P2.50mm_HorizontalJ6, J7, J8
220kResistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolderR1, R4
2Conn_01x04_PinConnector_JST:JST_PH_S4B-PH-K_1x04_P2.00mm_HorizontalJ9, J10
2Conn_02x08_Odd_EvenConnector_PinHeader_2.54mm:PinHeader_2x08_P2.54mm_VerticalJ2, J3
2MountingHoleMountingHole:MountingHole_3.2mm_M3_DIN965H1, H2
10.1uCapacitor_SMD:C_0402_1005Metric_Pad0.74x0.62mm_HandSolderC1
1100nCapacitor_SMD:C_0402_1005Metric_Pad0.74x0.62mm_HandSolderC4
1120Resistor_SMD:R_0402_1005Metric_Pad0.72x0.64mm_HandSolderR3
1AP2127N-2.8Package_TO_SOT_SMD:SOT-223-3_TabPin2U2
1Conn_01x02_PinConnector_JST:JST_XH_S2B-XH-A_1x02_P2.50mm_HorizontalJ5
1Conn_01x04_PinConnector_JST:JST_XH_S4B-XH-A_1x04_P2.50mm_HorizontalJ4
1Conn_02x07_Odd_EvenConnector_PinHeader_2.54mm:PinHeader_2x07_P2.54mm_VerticalJ1
1MAX485EPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU1

Questions

How big is the ArmPCB PCB?

It measures 58 × 47.5 mm and has 2 copper layers, 1.6 mm thick.

What parts does the ArmPCB use?

28 parts, built around the MAX485ED. 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 ArmPCB KiCad files?

From the AaravD356/RS485-Encoder-PCB repository on GitHub, at the commit this page was made from: the board is ArmPCB.kicad_pcb and its schematic ArmPCB.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the ArmPCB design in my own project?

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

Similar boards

  • 2 layers63 × 46 mmPi485, the printed circuit board in 3D

    Pi485

    bvarner/pi485

    An open-source TTL UART <-> RS485 converter, intended for a Raspberry Pi or Arduino

    31 parts41MIT
  • 2 layers150 × 50 mmEsp32-led smps, the printed circuit board in 3D

    Esp32-led smps

    lucysrausch/esp32-led-smps

    230V main LED smps. 2x30W Constant Current.

    179 parts30
  • 4 layers96 × 172 mmServo cpu, the printed circuit board in 3D

    Servo cpu

    wiciu15/servo2

    Servo inverter for 3-phase AC motor with/out encoder feedback

    167 parts29
  • 2 layers60 × 30 mmScoring table hardware, the printed circuit board in 3D

    Scoring table hardware

    GrappleRobotics/JMS

    Another alternative field management system for the FIRST Robotics Competition.

    30 parts18
  • 2 layers68.6 × 53.3 mmXyloShield, the printed circuit board in 3D

    XyloShield

    StefanKrupop/XyloShield

    Shield for Arduino that hosts a RFM26W radio module and allows DMX-512 connectivity

    19 parts17
  • 2 layers65 × 56.5 mmPool pi v1.1, the printed circuit board in 3D

    Pool pi v1.1

    ChaseDurand/Pool-Pi

    Hardware+software solution for controlling a Goldline/Hayward Aqualogic pool control board over WiFi via a Raspberry Pi.

    28 parts14
  • 2 layers53 × 68.7 mmEEC IV Reader, the printed circuit board in 3D

    EEC IV Reader

    flxkrmr/eec-iv-reader-arduino

    Arduino based diagnostics-tool for Fords EEC IV ECUs

    39 parts14GPL-3.0