Skip to the content
2 layers134.5 × 70 mm6dof, the printed circuit board in 3D

Open-source 6-DOF robot arm controller using STM32F411, Dynamixel servos, custom KiCad PCB, PWM gripper control, data logging, and planned ESP32-C3 wireless communication.

Size
134.5 × 70 mm
Copper layers
2
Thickness
1.6 mm
Parts
17
Nets
69
Pads
154
Tracks, vias
158, 16
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
10 Aug 2026
Updated
5 Sep 2026

Overview

6dof is an open-source printed circuit board by Ramahabir, from the Ramahabir/6-DOF-Robotics-Arm-Dynamixel repository on GitHub, published under the MIT licence. It is a 2-layer board of 134.5 × 70 mm with 17 parts on 69 nets, routed with 158 tracks and 16 vias.

It is built around the STM32F411CEU6, 74LS241P-E and XL4016E1. Its parts include 11 connectors and 2 ICs. It belongs with the robots and motor control boards and the STM32 boards of this library.

Main components

3

README

README.md

STM32F411 6-DOF Robot Arm Controller

Firmware for a 6-degree-of-freedom robot arm based on an STM32F411CEU6 (Black Pill). The controller is designed to operate four Dynamixel joints over a half-duplex serial bus and two conventional PWM servos for the end effector.

The project uses STM32Cube HAL with PlatformIO and is uploaded/debugged through ST-Link.

System overview

  • 4 × Dynamixel joints — controlled through USART2 using Dynamixel Protocol 1.0
  • 1 × wrist/gripper rotation servo — PWM output on PA8
  • 1 × gripper servo — PWM output on PA6
  • USB-to-TTL data logger — connected through USART1
  • ESP32-C3 Super Mini — planned wireless interface through USART6
  • 74LS241 buffer — converts the Dynamixel UART connection into a controlled half-duplex bus

Hardware

  • STM32F411CEU6 Black Pill development board
  • Dynamixel AX-series actuators (the driver currently targets the AX-12A control table)
  • 74LS241 tri-state buffer for the Dynamixel half-duplex bus
  • Two PWM-compatible hobby servos
  • USB-to-TTL serial adapter
  • ST-Link programmer/debugger
  • ESP32-C3 Super Mini (planned)
  • Suitable external power supplies for the Dynamixel and hobby servos

Controller PCB

The repository includes the editable KiCad source for the custom controller PCB. The board combines the STM32F411 Black Pill, ESP32-C3 Super Mini, 74LS241 Dynamixel interface, power input, actuator connectors, and development headers on one carrier board.

Open pcb/6dof.kicad_pro in KiCad 9.0 or newer to view or modify the complete project.

Schematic

6-DOF robot arm controller schematic

Editable source: pcb/6dof.kicad_sch

PCB layout

6-DOF robot arm controller PCB layout

Editable source: pcb/6dof.kicad_pcb

3D preview

3D preview of the 6-DOF robot arm controller PCB

The KiCad files are active design sources. Review the schematic, complete the design-rule checks, and verify all footprints and routing before ordering a PCB. Gerber files, drill files, and a bill of materials are not included yet.

Pin assignment

STM32F411CEU6 robot arm controller pinout

FunctionSTM32 peripheralPinDirectionNotes
Dynamixel TXUSART2_TXPA2Output1 Mbps, 8-N-1
Dynamixel RXUSART2_RXPA3InputReceives Dynamixel status packets
74LS241 directionGPIOPB0OutputHigh = transmit, low = receive/bus released
Data logger TXUSART1_TXPA9OutputConnect to USB-to-TTL RX
Data logger RXUSART1_RXPA10InputConnect to USB-to-TTL TX
ESP32-C3 TXUSART6_TXPA11OutputPlanned wireless link; connect to ESP32 RX
ESP32-C3 RXUSART6_RXPA12InputPlanned wireless link; connect to ESP32 TX
Gripper rotation servoTIM1_CH1PA8PWM outputRotates the gripper
Gripper servoTIM3_CH1PA6PWM outputOpens and closes the gripper
Built-in status LEDGPIOPC13OutputActive-low on the Black Pill

The USART1 pin assignment above follows the target hardware pinout. The generated firmware currently maps USART1 to PB6/PB7; update the alternate-function configuration to PA9/PA10 before wiring the logger to those target pins.

Dynamixel bus

Dynamixel Protocol 1.0 uses a single bidirectional data wire. USART2 provides separate TX and RX signals, so the 74LS241 is used to control when the STM32 drives the bus.

text
STM32 PA2 (USART2_TX) ──> 74LS241 input
STM32 PB0 (DIR)       ──> 74LS241 output-enable/direction control
74LS241 bus output    ──> Dynamixel DATA
STM32 PA3 (USART2_RX) <── Dynamixel DATA / receive path

STM32 GND ─────────────── Dynamixel interface GND

The firmware sets PB0 high while transmitting and returns it low before waiting for a servo response. USART2 is configured for 1,000,000 baud, 8 data bits, no parity, and 1 stop bit.

Do not power the actuators from the STM32 board. Use correctly rated external supplies and connect the grounds of the STM32, servo supplies, Dynamixel bus, USB-to-TTL adapter, and ESP32 interface.

Joint IDs and calibration

The earlier arm configuration stored in this repository uses the following IDs and zero offsets:

JointDynamixel IDHome positionApprox. offsetPositive direction
Base1493144.57°Counterclockwise
Shoulder930890.32°Counterclockwise
Elbow13481141.35°Counterclockwise

The current test program in src/main.c controls Dynamixel ID 4, moving it between raw positions 350 and 650. Confirm every actuator ID and mechanical zero before enabling torque on the assembled arm.

For AX-series position control, raw values 0..1023 represent approximately 0..300°:

text
angle = raw_position × 300 / 1023

Firmware status

Currently implemented:

  • USART2 Dynamixel Protocol 1.0 communication at 1 Mbps
  • Half-duplex direction control through PB0
  • Ping, 8/16-bit read and write, torque, LED, goal-position, speed, and present-position commands
  • Packet validation for ID, length, checksum, timeout, and servo-reported errors
  • TIM1 channel 1 configuration for PA8
  • TIM3 channel 1 configuration for PA6
  • USART1 configuration at 115200 baud

Still to be integrated into the active application:

  • Initialize USART1 and move its GPIO mapping from PB6/PB7 to PA9/PA10
  • Add and initialize USART6 on PA11/PA12
  • Initialize TIM1 and TIM3 and start both PWM channels
  • Add coordinated control for all six axes
  • Define the command protocol between the STM32 and ESP32-C3
  • Add data-logger output to the active control loop

At present, main() initializes only GPIO and USART2. The other peripheral configuration files exist but are not yet called by the active program.

Building and uploading

Requirements

  • Visual Studio Code with the PlatformIO extension, or PlatformIO Core
  • ST-Link programmer connected to SWDIO, SWCLK, GND, and 3.3 V reference

PlatformIO commands

Build the firmware:

sh
pio run

Upload through ST-Link:

sh
pio run --target upload

Open the serial monitor for logger output once USART1 logging is enabled:

sh
pio device monitor --baud 115200

The PlatformIO environment is genericSTM32F411CE, using the STM32Cube framework and ST-Link for upload and debugging.

Project structure

text
.
├── include/
│   ├── dynamixel.h       # Dynamixel driver API and control-table addresses
│   ├── gpio.h
│   ├── main.h
│   ├── tim.h
│   └── usart.h
├── docs/
│   ├── 3dpcb.png         # Render of the assembled controller PCB
│   ├── pcb_footprint.png # PCB routing and footprint preview
│   ├── schematic.png     # Controller schematic preview
│   └── stm32pinout.png   # STM32 peripheral pin assignment
├── pcb/
│   ├── 6dof.kicad_pcb    # Editable PCB layout
│   ├── 6dof.kicad_pro    # KiCad project settings
│   └── 6dof.kicad_sch    # Editable schematic
├── src/
│   ├── dynamixel.c       # Protocol 1.0 packet transport and commands
│   ├── gpio.c            # LED and 74LS241 direction GPIO setup
│   ├── main.c            # Active test application
│   ├── tim.c             # PA8 and PA6 PWM timer configuration
│   └── usart.c           # USART1 and USART2 configuration
├── main_lama/            # Earlier application code kept for reference
└── platformio.ini        # PlatformIO target and build configuration

Safety notes

  • Test one actuator at a time before operating the complete arm.
  • Verify Dynamixel IDs and baud rates before enabling torque.
  • Keep the arm clear of people and objects during first motion tests.
  • Use a current-limited actuator supply and provide an accessible emergency power cutoff.
  • Set conservative position and speed limits in software to prevent mechanical collisions.
  • Never connect 5 V logic directly to a non-5-V-tolerant STM32 input; verify the complete 74LS241 interface and supply arrangement before powering it.

License

This project is open-source software available under the MIT License.

Parts

17
QtyValueFootprintReferences
174LS241Package_DIP:DIP-20_W7.62mmU2
1Conn_01x11Connector_PinHeader_2.54mm:PinHeader_1x11_P2.54mm_VerticalJ10
1Conn_02x07_Counter_ClockwiseConnector_PinHeader_2.54mm:PinHeader_2x07_P2.54mm_VerticalJ11
1Dynamixel ConnectorConnector_Molex:Molex_KK-254_AE-6410-03A_1x03_P2.54mm_VerticalJ1
1FEMALE DC JACKConnector_BarrelJack:BarrelJack_CUI_PJ-102AH_HorizontalJ6
1GripperConnector_Molex:Molex_KK-254_AE-6410-03A_1x03_P2.54mm_VerticalJ4
1Gripper WristConnector_Molex:Molex_KK-254_AE-6410-03A_1x03_P2.54mm_VerticalJ3
1STM32 DEV HEADERConnector_PinHeader_2.54mm:PinHeader_2x12_P2.54mm_VerticalJ12
1STM32F411CEU6buatan aing nih:STM32F411CEU6J2
1UART_LOGGERConnector_Molex:Molex_KK-254_AE-6410-05A_1x05_P2.54mm_VerticalJ5
1XL4016E1buatan aing nih:XL4016E1J8
1XT60Connector_AMASS:AMASS_XT60PW-M_1x02_P7.20mm_HorizontalJ7
1~buatan aing nih:ESP32 C3 SUPERMINIU1

The 13 most common of 17 parts.

Similar boards

  • 2 layers299 × 82.5 mmPixelWave, the printed circuit board in 3D

    PixelWave

    hackclub/OnBoard

    💡 Join 1,000 teenagers and make your first PCB with a $100 grant!

    663 parts915
  • 2 layersRobot MGR, the printed circuit board in 3D

    Robot MGR

    rayvburn/diff_drive_mapping_robot

    ROS driver for the Raspberry Pi based differential drive robot

    95 parts27
  • 2 layers85.5 × 51 mmBenchpsu, the printed circuit board in 3D

    Benchpsu

    3stan-H/Bench-Power-Supply

    A mains-powered, adjustable bench power supply designed in KiCad, converting 120V AC wall input into a regulated 1–20V DC output.

    33 parts
  • 2 layers299 × 82.5 mmPixelWave, the printed circuit board in 3D

    PixelWave

    Badbird5907/PixelWave

    663 parts
  • 2 layers120 × 100 mmCh bot, the printed circuit board in 3D

    Ch bot

    doabayomi/horizon-pcb

    PCB Design for the Horizon Controller Prototype (REV 1)

    271 parts
  • 4 layers98 × 58 mmEdf esc, the printed circuit board in 3D

    Edf esc

    iamdarshg/edf-esc

    Open hardware and firmware for a compact 98 mm × 58 mm, four-layer board with two independent 6S sensorless BLDC/EDF controller channels.

    99 partsMIT
  • 4 layers45 × 75 mmCamera Cooler, the printed circuit board in 3D

    Camera Cooler

    lukaslibar/Camera-Cooler

    Cooling solution for Svbony SV705C astronomy camera.

    118 parts

Questions

How big is the 6dof PCB?

It measures 134.5 × 70 mm and has 2 copper layers, 1.6 mm thick.

What parts does the 6dof use?

17 parts, built around the STM32F411CEU6, 74LS241P-E and XL4016E1. 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 6dof KiCad files?

From the Ramahabir/6-DOF-Robotics-Arm-Dynamixel repository on GitHub, at the commit this page was made from: the board is pcb/6dof.kicad_pcb and its schematic pcb/6dof.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the 6dof design in my own project?

Its repository publishes it under the MIT licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).