Skip to the content
2 layers32 × 20 mmGd32 encoder, the printed circuit board in 3D

It explores to use much cheaper magnetic encoders for the Leader Arm instead of the regular servos. These dummy servos are also much easier to move manually, as there is no gear train that needs to back drive the servo…

Size
32 × 20 mm
Copper layers
2
Thickness
1.6 mm
Parts
26
Nets
20
Pads
77
Tracks, vias
223, 17
Pours
1
Routed
Yes
KiCad
KiCad 8.0 (file 20240108)
Created
23 Sep 2024
Updated
4 Jan 2025

Overview

Gd32 encoder is an open-source printed circuit board by avenhaus, from the avenhaus/SO-ARM100-Encoders repository on GitHub. It is a 2-layer board of 32 × 20 mm with 26 parts on 20 nets, routed with 223 tracks and 17 vias.

It is built around the GD32F130F4P6TR, MT6701CT-STD and 2N7002K. Its parts include 7 resistors, 6 capacitors, 3 ICs, 3 connectors and 1 diode.

Main components

3

README

Readme.md

Magnetic Encoder Dummy Servo

Summary

This project is related to https://github.com/huggingface/lerobot and https://github.com/TheRobotStudio/SO-ARM100

It explores to use much cheaper magnetic encoders for the Leader Arm instead of the regular servos. These dummy servos are also much easier to move manually, as there is no gear train that needs to back drive the servo motor. This makes them ideal for the Leader Arm.

Custom PCB

The custom PCB makes it possible to daisy chain magnetic encoders for much easier wiring. The PCB uses a microcontroller that emulates a FeeTech servo. The dummy servos can be connected to the same servo controller board and no special software is needed.

Manufacturing

TODO: JLCPCB

Cables and Connectors

FeeTech servos use 3-pin 5264 connectors. However, JST XH connectors are more common and pre-made cables are much easier to find. The PCB can be populated with either of the connector types. If JST connectors are used, an adapter needs to be made to connect to the 5264 connector on the controller board. Alternatively one can simply cut off one end from a pre-made cable and solder it directly to the controller board.

The dummy servos use very little current. So any gauge wire should be ok. However, if they are to be mixed with real servos on the same bus, wire gauge needs to be taken into consideration.

The servos use "reverse double head" cables (pin 1 connected to pin 1, etc.) although in a pinch it's also possible to switch the terminals on "same side' cables yourself.

JST XH: https://www.aliexpress.us/w/wholesale-JST-XH-3.html JST XH cables: https://www.aliexpress.us/w/wholesale-xh-double-head.html

5264: https://www.aliexpress.us/w/wholesale-5264.html 5264 cables: https://www.aliexpress.us/w/wholesale-5264-double-head.html https://www.aliexpress.us/item/3256806128255434.html

Magnets

Normally magnetic encoders use special, radially magnetized magnets.

Magnets https://www.aliexpress.us/w/wholesale-encoder-magnets.htm

However, it is also possible to use the regular, axially magnetized 6x3 disk magnets which are cheaper. They just have to be oriented sideways. Print the corresponding servo horn instead. N35 magnets are fine. Nothing fancy is needed.

https://www.amazon.com/s?k=6x3mm+magnet https://www.aliexpress.us/w/wholesale-6x3-magnet.html

Firmware Programming

See: Firmware

3D Printed Servo Housing

Off the Shelve Hardware

Instead of using a custom PCB it is also possible to use off the shelve parts. This requires more hand wiring.

Magnetic Rotary Encoders

Currently there are two cheap and popular magnetic encoders on AliExpress, the AS5600 and the MT6701. The AS5600 is older, has 12 bit resolution (4096) and supports only I2C. Since the chip has only one hard coded ID, that makes it hard to use when multiple of them are needed. The MT6701 has 14 bit resolution (16,383) and also supports a SSI interface, which is similar to SPI.

AliExpress offers several MT6701 breakout boards some of which can be purchased in low quantities for less than $2 including magnet.

AliExp MT6701

The larger version only has the I2C pins on the header and must be modified to work with SSI. The trace to the middle pin of the header needs to be cut and IC pin 8 lifted and connected to that header pin instead. It is also slightly too large, sticking out a bit in front of the servo. It can be made to work, but the smaller board is much easier to use and therefor recommended. However the smaller board does not come with magnets. They must be purchased separately. Only radially magnetized magnets can be used. Normally disk magnets are magnetized axially.

AliExp Radial Magnets

3D Printed Servo Housing

There are two slightly different versions of the housing. The simple version does not retain the servo horns by itself. It relies on the structure of the robot arm to keep them in place. This version is slightly simpler and is used for the lower 4 arm servos.

The wrist and gripper need the horn to be held in place by the servo itself. For these joints the top is split into two parts and the horn axle is not just a straight cylinder.

Big Board Alternative

The Dummy Servo is 3D printed.

Software

A simple Arduino / PlatformIO project is used to read the six encoders and send their values over a serial USB port to the PC.

On the PC side a small Python program receives the values from the serial port and uses the Feetech-SDK to control the servos of the follower arm.

Parts

26
QtyValueFootprintReferences
5100nFCapacitor_SMD:C_0603_1608Metric_Pad1.08x0.95mm_HandSolderC2, C3, C4, C5, C6
410KResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR4, R5, R6, R7
21KResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR1, R2
2Conn_01x03_PinMy_Library:JST_1x03_P2.50mm_VerticalJ1, J2
2MountingHoleMountingHole:MountingHole_2.2mm_M2_DIN965H1, H2
1100Resistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR3
12N7002KPackage_TO_SOT_SMD:SOT-23Q1
147uFCapacitor_Tantalum_SMD:CP_EIA-3216-18_Kemet-A_Pad1.58x1.35mm_HandSolderC1
1Conn_01x04_PinConnector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ3
1GD32F130F4P6TRPackage_SO:TSSOP-20_4.4x6.5mm_P0.65mmU3
1LEDLED_SMD:LED_0603_1608Metric_Pad1.05x0.95mm_HandSolderD1
1MOSITestPoint:TestPoint_Pad_D1.0mmMOSI
1MT6701CTPackage_SO:SO-8_3.9x4.9mm_P1.27mmU2
1RSTConnector_PinHeader_2.54mm:PinHeader_1x01_P2.54mm_VerticalTP1
1RXDTestPoint:TestPoint_Pad_D1.0mmRXD
1XC6206PxxxMRPackage_TO_SOT_SMD:SOT-23-3U1

More from avenhaus/SO-ARM100-Encoders

1
  • 2 layers32 × 20 mmCh32 encoder, the printed circuit board in 3D

    Ch32 encoder

    avenhaus/SO-ARM100-Encoders

    It explores to use much cheaper magnetic encoders for the Leader Arm instead of the regular servos. These dummy servos are also much easier to move manually, as there is no gear train that needs to back drive the servo…

    24 parts45

Similar boards

  • 4 layers81.2 × 81.2 mmView base, the printed circuit board in 3D

    View base

    SeedLabs-it/smartknob-hardware

    PCB and CAD files for smartknob devkit

    259 parts47
  • 4 layers46.3 × 37.7 mmInterface, the printed circuit board in 3D

    Interface

    earlynerd/bl4818-servo-M23

    This repository contains the electronics, embedded firmware, host software, and browser players for a network of brushless servo percussion actuators.

    20 parts3
  • 2 layers60 × 50 mmMini pd psu, the printed circuit board in 3D

    Mini pd psu

    ManhTi3012/mini-pd-psu

    A portable power supply with PD3.0

    70 parts2MIT
  • 4 layers92.5 × 85 mmELEC3300 DEMO, the printed circuit board in 3D

    ELEC3300 DEMO

    coopjz/FOC_Control_Boards

    166 parts1MIT
  • 2 layers50 × 50 mmTriad Actuator L, the printed circuit board in 3D

    Triad Actuator L

    kennethsauers/Triad-Actuator-L

    41 parts1MIT
  • 2 layers42 × 42 mmNEMA17 FOC Driver, the printed circuit board in 3D

    NEMA17 FOC Driver

    maxmunzner/NEMA17_FOC_Driver

    A Stepper Driver project with a PCB that acts as the driver and encoder.

    37 parts1MIT
  • 4 layers158.5 × 81.5 mmBiro-1-rev-0, the printed circuit board in 3D

    Biro-1-rev-0

    PROJECT-BIRO/Biro-1

    137 parts1MIT

Questions

How big is the Gd32 encoder PCB?

It measures 32 × 20 mm and has 2 copper layers, 1.6 mm thick.

What parts does the Gd32 encoder use?

26 parts, built around the GD32F130F4P6TR, MT6701CT-STD and 2N7002K. 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 Gd32 encoder KiCad files?

From the avenhaus/SO-ARM100-Encoders repository on GitHub, at the commit this page was made from: the board is Hardware/PCB_GD32F130/gd32_encoder.kicad_pcb and its schematic Hardware/PCB_CH32v003/ch32_encoder.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Gd32 encoder design in my own project?

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