Skip to the content
2 layers65 × 40 mmDexter pcb, the printed circuit board in 3D

Six-axis robotic arm I designed and built end to end: custom STM32H562 controller PCB, bare-metal C firmware, RS485 multi-motor bus, and a PID current-feedback gripper that holds an egg without cracking it. Includes KiCad, CAD, firmware, and host tests.

Size
65 × 40 mm
Copper layers
2
Thickness
1.6 mm
Parts
36
Nets
73
Pads
166
Tracks, vias
183, 22
Pours
26
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
8 Sep 2026
Updated
27 Oct 2026

Overview

Dexter pcb is an open-source printed circuit board by clucasjiang, from the clucasjiang/dexter_v1 repository on GitHub. It is a 2-layer board of 65 × 40 mm with 36 parts on 73 nets, routed with 183 tracks and 22 vias.

It is built around the MAX3485ED, XT60PW-M and DW127R-22-14-23. Its parts include 14 capacitors, 8 resistors, 4 ICs, 2 connectors and 1 diode. It belongs with the interfaces and adapters and robots and motor control boards and the STM32 boards of this library.

Main components

3

README

README.md

Dexter — Six-Axis Robotic Arm

Dexter is a six-degree-of-freedom robotic arm with a force-controlled gripper, a PETG-CF 3D-printed structure, custom controller electronics, and embedded C firmware. The project brings together mechanical design, PCB design, motor communications, and feedback control—from an early prototype to a fully assembled arm that can hold an egg without breaking it.

I designed, built, assembled, programmed, and tested Dexter independently. The stepper-driven arm and the firmware in this repository are the completed, tested first version of an ongoing robotics project. I am now developing a second version with BLDC motors to improve motion quality, control performance, and overall results.

Core technologies: KiCad · STM32H562 · Embedded C · RS485 · PID control · Motor current feedback

Demonstrations

Gentle graspingArm motion
Dexter holding an egg using a PID force loopDexter performing a waving motion
A PID force loop regulates the grip to hold an egg without breaking it.A wave demonstration shows the assembled arm in motion.

The egg demonstration highlights the central controls challenge: applying enough force to retain a delicate object while limiting additional closing motion after contact.

Mechanical Design

Early prototypeFully assembled arm
Very early Dexter prototype with exposed belts and motorsFully assembled Dexter arm with printed housings and gripper
An early build used to develop the mechanical arrangement.The completed assembly integrates the joints, housings, wiring, and gripper.
  • Printed structure: PETG-CF (carbon-fiber-filled PETG) forms the arm's structural parts and housings, with metal motors, reducers, bearings, and fasteners integrated into the assembly.
  • Six articulated joints plus a gripper: Seven addressed motor axes separate arm positioning from grasp-force control.
  • Harmonic reduction: Reducers transmit motor motion to the joints. J1–J3 use 42 mm motors with 50:1 reduction, and J4–J6 use 35 mm motors with 30:1 reduction.
  • Internal belt-and-pulley transmission: Belts transfer motion within the links, allowing motors and transmission components to fit inside the printed structure.
  • Portable mechanical deliverable: The Dexter STEP assembly can be inspected in standard CAD tools.

Inside Dexter: stepper motors, a 50:1 harmonic reducer, and the hidden belt-and-pulley transmission

Inside the housings: stepper motors, harmonic reduction, and the pulley structure that drives the arm.

Electronics

The KiCad controller project includes the schematic, PCB layout, component libraries, footprints, and 3D models.

The stepper motors have built-in drivers from ZDT, so the STM32 can send movement commands directly over RS485 and read back position, speed, and motor current. Each motor has its own address on the bus.

SubsystemImplementation
Main controllerSTM32H562 microcontroller running the arm application and peripheral interfaces.
Power24 V input through an XT60 connector and an AP63203 regulator for the 3.3 V logic supply.
Motor busMAX3485 RS485 transceiver; firmware addresses joints as 1–6 and the gripper as 7 at 115200 baud.
Grip feedbackThe claw motor's built-in phase-current feedback, read over RS485 in milliamps and used as a proxy for grip load.
Development interfacesDebug/programming connections, reset/boot circuitry, and a serial command console.
External stop inputPC13 accepts a normally closed emergency-stop loop; an open input requests a stop. This connection is external to the current controller PCB.

The firmware pin assignments match the controller PCB: PA0/PA1 carry the UART4 motor bus, PA2 controls the MAX3485 transmit enable, and PB5/PB6 provide the UART5 serial console.

Firmware and Control

The firmware uses a bare-metal C11 application with separate board, protocol, joint-control, gripper-control, and scheduling layers.

Joint motion and motor feedback

arm.c converts joint angles and speeds into motor commands using each joint's reduction and direction. It supports absolute joint moves, configurable travel and speed limits, manual reference capture, explicit arming, and individual or whole-arm stops. Feedback monitoring checks following error, lack of progress, motion deadlines, stale telemetry, and driver faults.

zdt.c implements the ZDT X-firmware protocol over RS485, including trapezoidal position moves, current-limited commands, configuration checks, and telemetry decoding. Transactions validate reply framing and acknowledgements, use bounded timeouts, and avoid automatic motion retries. Decoded feedback includes position, speed, following error, current, voltage, temperature, and driver status.

Force-controlled gripper

gripper.c uses the claw stepper's built-in phase-current feedback as a proxy for grip load. The application polls aggregate status from motor 7 every 20 ms, obtaining current, position, speed, and driver flags together.

The outer PID turns measured phase current into small opening or closing corrections:

  1. Ramp the current target gradually to soften initial contact.
  2. Filter measured current and its derivative to reduce noise.
  3. Apply PID control with derivative on measurement, integral anti-windup, and a current deadband.
  4. Accumulate small corrections at the drive's 0.1° resolution, with a maximum requested step of 0.2°.
  5. Wait for fresh motor feedback and completion of the previous move before issuing another correction. If a closing step reaches the requested load while stationary before its endpoint, stop the remaining step and read feedback again so the loop can hold or release.

The application dispatches finite, current-limited position moves (0xCD), using the drive's internal control loops. Unfiltered current limits, reply freshness, and gripper travel checks remain active while a move is pending. Communication errors, driver faults, or loss of the claw's volatile reference marker stop operation. The installed motors run X firmware in closed-loop mode.

Current is a proxy for motor torque and grip load, not a calibrated jaw-force measurement in newtons. Friction, jaw geometry, and direction affect the relationship. GRIP takes milliamps. The tested configuration uses a 100 mA maximum target, 150 mA drive limit/software trip, 40 mA/s target ramp, and 3 mA deadband. These limits and the PID gains are used by the completed stepper-driven arm, including the gentle grasping demonstration above. Limits live in robot_config.h, and PID defaults in gripper.c.

Scheduling, diagnostics, and fault handling

  • 100 Hz application scheduling target: Late updates skip missed releases. Blocking motor transactions affect the achieved rate; one arm joint is polled per update.
  • At most 50 Hz PID corrections: A 20 ms minimum interval, fresh samples, and motor completion determine the actual correction rate.
  • 500 ms nominal independent watchdog: Refreshed only after a completed application update. Startup requests motor stops and leaves motion disarmed.
  • Observable runtime: STATUS reports joint positions and targets, claw phase current and target in mA, feedback validity and age, faults, measured loop frequency, missed releases, longest update, and watchdog-reset status.
  • Buffered serial console: Interrupt-driven receive/transmit queues keep console traffic separate from command processing; damaged or oversized input lines are discarded.

Current application motion is joint-space control with manual referencing; Cartesian inverse kinematics, automatic homing, and coordinated trajectory planning are not implemented.

Build and Explore

Start with the Dexter STEP assembly for the mechanism, the KiCad schematic for electronics, and robot_app.c for application behavior.

Build the firmware

Requires CMake 3.22+, Ninja, and the GNU Arm Embedded toolchain (arm-none-eabi-*) on PATH. From the repository root:

sh
cd Firmware
cmake --preset Debug
cmake --build --preset Debug

Outputs are build/Debug/dexter_legacy.elf, .hex, and .bin. A Release preset is also provided. dexter_legacy.ioc contains the STM32CubeMX project configuration.

Run host tests

The tests run on a computer without connecting the arm. With CMake and a native C compiler, run from the repository root:

sh
cmake -S Firmware/tests -B Firmware/build/host-tests
cmake --build Firmware/build/host-tests --config Debug
ctest --test-dir Firmware/build/host-tests -C Debug --output-on-failure

The claw tests check that it closes when current is low, opens when current is high, and stops on too much current or old feedback. There are also tests for the motor protocol and loop timing. The full firmware has also been tested on the assembled arm; the demonstrations at the top of this page show the resulting motion and grip control.

Serial operation

Connect a 3.3 V serial adapter to the console at 115200 baud, 8N1. Commands are uppercase and newline-terminated.

CommandPurpose
HELP, STATUSShow commands or runtime diagnostics.
ZERO, ARMCapture the manually positioned zero pose, then permit motion. Place the gripper fully open before ZERO.
MOVE joint degrees deg/sMove one joint to an absolute angle relative to the captured zero.
GRIP milliamps, OPENRegulate measured motor phase current (default range: greater than 0 through 100 mA), or return the gripper to its open reference.
DEMOFrom the zero pose, move each joint sequentially to 5° and back at 2°/s. This is a commissioning routine separate from the wave GIF.
STOP [joint], DISARM, CLEARStop all axes or one axis (1–7), stop and disarm, or clear a fault while disarmed.

After placing the joints at zero and the claw fully open, use ZERO, then ARM, then select a tested GRIP target in mA. The position reference is lost on reset. Stop commands preserve motor enable where possible, but software stops and the MCU watchdog cannot guarantee holding torque after power or communication loss; gravity-loaded joints need physical support during commissioning.

Repository Map

PathContents
CAD/Portable STEP assembly of the complete mechanism.
PCB/main_controller/KiCad controller design and supporting libraries.
Firmware/App/Motor protocol, arm and gripper controllers, command interface, and scheduler.
Firmware/Board/UART/RS485, external stop-input, and watchdog interfaces.
Firmware/Core/STM32 startup and system initialization; vendor support resides in Firmware/Drivers/.
Firmware/tests/C tests for the motor protocol, claw control, and loop timing.
README/Demonstration GIFs and photographs of the design process and assembly.

Parts

36
QtyValueFootprintReferences
8100nFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC1, C2, C3, C4, C5, C9, C11, C12
30Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR3, R4, R5
210uFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC6, C10
22.2uFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC7, C8
222uFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC13, C14
2390Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR6, R8
2XT60PW-Measyeda2kicad:CONN-TH_XT60PW-MCN1, CN2
110KResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR2
1120Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR7
13.9uHInductor_SMD:L_Changjiang_FNR4030SL1
14.7KResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR1
1AP63203WU-7Package_TO_SOT_SMD:TSOT-23-6_HandSolderingU2
1DW127R-22-14-23easyeda2kicad:HDR-TH_14P-P1.27-V-M-R2-C7-S1.27-2H1
1HX 2.54-2P WTeasyeda2kicad:CONN-SMD_2P-P2.54-XH2.54-WTU4
1LEDLED_SMD:LED_0603_1608Metric_Pad1.05x0.95mm_HandSolderD1
1MAX3485Package_SO:SOIC-8_3.9x4.9mm_P1.27mmU3
1STM32H562RGTxPackage_QFP:LQFP-64_10x10mm_P0.5mmU1
1SW_PushButton_Switch_SMD:SW_SPST_TS-1088-xR020SW1

The 32 most common of 36 parts.

Similar boards

  • 6 layers56.1 × 88 mmBldc&foc motor controller, the printed circuit board in 3D

    Bldc&foc motor controller

    bejaouihamza/bldc-foc-pcb

    This open-source hardware project is a compact, single-board FOC (Field-Oriented Control) motor driver designed for precision robotics, drones, CNC machines, and automation systems.

    108 parts16
  • 4 layers262 × 110.5 mmHM CENTRAL-02 painel, the printed circuit board in 3D

    HM CENTRAL-02 painel

    BenjamimKrug/robo_humanoide

    Repositorio para arquivos gerais necessários para o desenvolvimento do Robô humanoide

    303 parts10
  • 4 layers100 × 70 mmElonMux, the printed circuit board in 3D

    ElonMux

    EPFLXplore/Power_HW

    KiCad design files for the power boards of the Xplore rover.

    329 parts7
  • 2 layersPowerBoard2, the printed circuit board in 3D

    PowerBoard2

    geisel-m/NULunabotics

    The repository for everything related to NU Lunabotics

    26 parts5
  • 6 layers100 × 100 mmBms board, the printed circuit board in 3D

    Bms board

    AerospaceNU/bms-pcb-design

    373 parts4
  • 4 layers70.8 × 100 mmFlapjack, the printed circuit board in 3D

    Flapjack

    Caleb646/Flapjack

    A custom VTOL drone platform — from airframe to PCB to firmware.

    116 parts4
  • 2 layers71.7 × 75.3 mmPi HAT V2, the printed circuit board in 3D

    Pi HAT V2

    danielwilczak101/EasyControls

    Originally part of the NASA Asteroid flyer program has been repurposed by the EPPL to allow anyone interested in controls to go online and connect with a real working device and test their own control algorithms on a…

    42 parts4
  • 4 layers13.4 × 4.5 mmLre avio daq2, the printed circuit board in 3D

    Lre avio daq2

    IITB-Rocket-Team-Avionics/Ember

    Experimental Flight Computer with potential mitigations of previous issues faced by FLYTE and a testbed for new systems.

    172 parts4MIT

Questions

How big is the Dexter pcb PCB?

It measures 65 × 40 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Dexter pcb use?

36 parts, built around the MAX3485ED, XT60PW-M and DW127R-22-14-23. 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 Dexter pcb KiCad files?

From the clucasjiang/dexter_v1 repository on GitHub, at the commit this page was made from: the board is PCB/main_controller/dexter_pcb.kicad_pcb and its schematic PCB/main_controller/dexter_pcb.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Dexter pcb design in my own project?

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