Skip to the content
2 layers28 × 31 mmAS5600 Encoder Node, the printed circuit board in 3D

CAN-connected closed-loop DC motor controller node — KiCad hardware (STM32F103, DRV8874, SN65HVD230) with an AS5600 encoder sub-PCB

Size
28 × 31 mm
Copper layers
2
Thickness
1.6 mm
Parts
9
Nets
7
Pads
55
Tracks, vias
29, 0
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
11 Sep 2026
Updated
11 Sep 2026

Overview

AS5600 Encoder Node is an open-source printed circuit board by mohamed-belal-10, from the mohamed-belal-10/can-motor-controller-node repository on GitHub, published under the MIT licence. It is a 2-layer board of 28 × 31 mm with 9 parts on 7 nets, routed with 29 tracks and 0 vias.

It is built around the AS5600-ASOT. Its parts include 2 capacitors, 1 IC and 1 connector. It belongs with the robots and motor control and interfaces and adapters boards and the STM32 boards of this library.

Main components

1

README

README.md

CAN-Connected Closed-Loop DC Motor Controller Node

A single PCB "smart joint" for robot arms, rovers, or any multi-actuator robotic system: it bolts onto a DC gearmotor, closes a cascaded current → speed → position control loop locally on an STM32, and takes setpoints over a shared CAN bus instead of running dedicated wires back to a central controller. Multiple nodes share one twisted-pair CAN bus, each addressed independently.

A portfolio project by Mohamed Belal ("Belo") — Mechatronics Engineering, GUC.


Why this project

  • First board with a real power stage. Current in the amps range, not the milliamps of a typical digital-signal board — Kelvin sensing considerations, thermal copper, and return-path separation under switching noise.
  • Introduces CAN bus as a communication protocol, end to end: transceiver hardware, bxCAN peripheral configuration, bit-timing, and a companion USB-CAN adapter to test it from a laptop.
  • Introduces cascaded multi-loop control (current → speed → position), the conceptual step up from a single-loop PID.
  • Built from and cross-checked against two open reference designs: CVRA's motor-control-board (KiCad, CC-BY) and Cormack's STM32L433 motor driver.

System overview

text
                    ┌──────────────┐      ┌──────────────┐
   12V IN  ────────▶│ LM2596S-5V   │─5V──▶│ AMS1117-3.3  │────▶ 3.3V rail
   (motor            │ buck (switch)│      │ LDO (linear) │      │
    supply)          └──────────────┘      └──────────────┘      │
        │                                                          │
        │ (direct, unregulated)                                    │
        ▼                                                          ▼
   ┌──────────┐    PWM x2      ┌──────────┐   IPROPI    ┌─────────────┐
   │ DRV8874  │◀───────────────│ STM32F103│◀────────────│ (internal to │
   │ H-bridge │                │  C8T6    │             │  DRV8874)    │
   └────┬─────┘                └────┬─────┘             └─────────────┘
        │ motor terminals            │  I²C
        ▼                            ▼
   ┌──────────┐                ┌──────────┐        ┌──────────────┐
   │ DC MOTOR │────coupled────▶│  AS5600  │        │ SN65HVD230   │◀──▶ CAN H/L
   │          │  (shaft end)   │ (angle)  │        │ (transceiver)│    to bus
   └──────────┘                └──────────┘        └──────────────┘

Two boards are designed here:

BoardRoleLocation
motor_controllerMain node — MCU, power stage, H-bridge, CAN interfacehardware/motor_controller/
AS5600_Encoder_NodeSmall sub-PCB carrying the bare AS5600 angle sensor, linked to the main board over a 4-pin JST-SH cablehardware/AS5600_Encoder_Node/

The AS5600 lives on its own tiny PCB — not a generic breakout module — specifically so the main board's own calculated I²C pull-up resistors are the only pull-ups on the bus (most off-the-shelf breakout modules bundle their own, which would silently change the bus's effective pull-up value).


Gallery

Main board — motor_controller

PCB layout (KiCad, top copper + silkscreen)

motor_controller PCB layout

3D render

motor_controller 3D render

Sub-board — AS5600_Encoder_Node

PCB layout

AS5600_Encoder_Node PCB layout

3D render

AS5600_Encoder_Node 3D render

Repository structure

text
.
├── README.md
├── LICENSE
├── docs/                                       Design documentation
│   ├── CAN_Motor_Controller_Node_Spec.md           Full BOM, design decisions, CAN protocol, pin map
│   └── CAN_Motor_Controller_Node_PCB_Layout_Guidelines.md   Placement, routing, plane strategy, DRC targets
└── hardware/
    ├── motor_controller/                       Main CAN motor controller node
    │   ├── motor_controller.kicad_pro/.kicad_sch/.kicad_pcb/.kicad_prl
    │   ├── PCB_design.png                          PCB layout screenshot
    │   ├── hardware_design.png                     3D render
    │   └── manufacturing/
    │       ├── gerbers/                            Gerber + drill files
    │       └── motor_controller-gerbers.zip         Fab-ready zip (JLCPCB format)
    └── AS5600_Encoder_Node/                    AS5600 magnetic encoder sub-PCB
        ├── AS5600_Encoder_Node.kicad_pro/.kicad_sch/.kicad_pcb/.kicad_prl
        ├── PCB_design.png                          PCB layout screenshot
        ├── hardware_design.png                     3D render
        └── manufacturing/
            ├── gerbers/
            └── AS5600_Encoder_Node-gerbers.zip

All KiCad projects are KiCad 8+ format.


Main board — motor_controller

Core components

SubsystemPartNotes
MCUSTM32F103C8T6 (LQFP-48)72 MHz, bxCAN, runs all 3 PID loops + CAN stack
Clock8 MHz HSE crystal, C_L = 20 pFRequired for reliable 500 kbps CAN bit timing (HSI is too loose)
Motor driverDRV8874 (HTSSOP-16, PowerPAD)Integrated current sense (IPROPI) and cycle-by-cycle current chopping — no external shunt/amplifier needed
Power stageLM2596S-5V (buck) → AMS1117-3.3 (LDO)Two-stage: switching for efficiency, then linear to give the current-sense ADC a clean reference
CAN transceiverSN65HVD230 (SOIC-8)3.3V-only, high-speed mode, NUP2105L TVS array for bus ESD protection
EncoderAS5600 (on its own sub-PCB)12-bit absolute angle over I²C — see below
ActuatorJGA25-370, 12V, 133 RPM, 20 kg·cmBrushed DC gearmotor, 1:78 gearbox

Electrical specs

  • Motor supply: 12 V nominal (6–18 V DRV8874 range)
  • Current limit: 2.0 A hardware trip (I_TRIP, VREF divider-set), cycle-by-cycle chopping
  • PWM switching frequency: 20 kHz (H-bridge), 150 kHz (buck)
  • Stackup: 4-layer — L1 signal, L2 solid GND, L3 split power (VM/3.3V), L4 signal
  • CAN bus: 500 kbps, standard 11-bit IDs, JST-XH 3-pos daisy-chain connectors (IN/OUT), jumper-selectable 120 Ω termination

CAN protocol

FrameDirectionIDPayload
Commandhost → node0x100 + node_idfloat32 setpoint, uint8 mode (0=position, 1=speed, 2=current)
Telemetrynode → host0x200 + node_idfloat32 position, uint16 current (mA), uint8 fault flags

node_id is assigned in firmware at flash time — no address jumpers on the board.

Design status

  • ✅ All five schematic sheets complete (Power Stage, MCU Core, Motor Drive, CAN Bus, Sensing), ERC clean.
  • ✅ Every component value and part number closed, across four audit passes (full history in docs/CAN_Motor_Controller_Node_Spec.md).
  • ✅ Layout complete; gerbers generated (see manufacturing/).
  • ⚠️ Flagged, unresolved: DRV8874 power-up sequencing (VCC vs. VM order) not verified against the datasheet.
  • ⚠️ Open before re-ordering: cross-check the main board's AS5600 link connector pin order against the sub-PCB's J1/J7 connector — both footprints were placed independently.
  • 🚚 Externally sourced, not yet in hand: DRV8874 (not stocked locally — ordered internationally), diametrically-magnetized magnet (must confirm magnetization type with seller before buying).

Sub-board — AS5600_Encoder_Node

A minimal breakout for the bare AS5600 magnetic rotary position sensor (SOP-8), designed specifically to avoid the double-pull-up problem that off-the-shelf AS5600 modules introduce.

ItemDetail
SensorAS5600 (SOP-8), 12-bit absolute angle over I²C
Power wiringVDD5V and VDD3V3 tied together, fed from the main board's 3.3V rail (required for correct 3.3V single-supply operation per datasheet)
Decoupling100 nF + 10 µF in parallel across the tied VDD node → GND (matches datasheet Fig. 13, 3.3V-mode)
Direction select3-pad solder jumper (DIR: GND = CW-increasing, VDD = CCW-increasing) — bridged at assembly time once motor orientation is known
Link to main boardJST-SH, 1.0 mm pitch, 4-position — carries +3V3, SCL, SDA, GND
MountingGlued flat to the motor's rear shaft-stub end face, read through a 1.0–1.5 mm air gap by a 6 mm diametric NdFeB magnet
Encoder resolution4096 counts/rev at the motor shaft → 319,488 counts/rev at the JGA25-370's output shaft (through its 1:78 gearbox)

The AS5600 mounting bracket (clamp-style, sized to the motor's 25 mm body OD) is specified mechanically in docs/CAN_Motor_Controller_Node_Spec.md but deliberately not finalized until the physical sub-PCB and motor are in hand to confirm dimensions.


Documentation

DocumentCovers
docs/CAN_Motor_Controller_Node_Spec.mdFull BOM with sourcing/pricing notes, design-decision rationale, CAN protocol definition, STM32 pin assignment tracker, CAN-adapter companion tool, AS5600 mounting bracket spec
docs/CAN_Motor_Controller_Node_PCB_Layout_Guidelines.mdTrace sizing, via strategy, floorplan, placement rules, ground/power plane strategy, CAN routing, thermal, DRC targets, pre-routing checklist

Build sequence

  1. Schematic capture (CAN node + power stage + DRV8874 + AS5600) — done
  2. ERC clean — done
  3. Layout — done
  4. DRC clean, JLCPCB stackup check, order
  5. Bring-up: power rails → CAN enumeration → AS5600 sanity read → close current loop → speed loop → position loop
  6. Bring up the companion CAN-USB adapter and drive the node from a laptop with real command/telemetry frames

Full detail on each step, including the CAN-USB adapter's own BOM, wiring, and firmware plan, is in docs/CAN_Motor_Controller_Node_Spec.md.


Fabrication

Both boards are designed for JLCPCB (4-layer main board, 2-layer sub-PCB). Ready-to-upload gerber/drill packages are checked in under each board's manufacturing/ folder. Re-export from KiCad's Plot dialog after any layout change rather than editing the checked-in gerbers by hand.

Reference designs

  • CVRA motor-control-board — KiCad, CC-BY, near-identical spec; source for the CAN daisy-chain connector and termination-jumper approach.
  • Cormack's STM32L433 motor driver — single-board layout reasoning, undervoltage-lockout-as-safety-feature technique.

License

MIT — see LICENSE.

This repository contains PCB hardware design files (KiCad schematics, layouts, and manufacturing outputs) alongside documentation. The MIT License is applied for simplicity and consistency with the author's other portfolio repositories; no warranty is made or implied about the fitness of any hardware design herein for use with live mains, high-current, or safety-critical applications. Build and operate at your own risk.

Parts

9
QtyValueFootprintReferences
4MountingHole_PadMountingHole:MountingHole_3.2mm_M3_Pad_ViaH5, H6, H7, H8
1100nFCapacitor_SMD:C_0603_1608MetricC19
110uFCapacitor_SMD:C_0603_1608MetricC20
1AS5600-ASOTexternal_footprint:SOIC-8_L5.0-W4.0-P1.27-LS6.0-BLU6
1Conn_01x04Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_HorizontalJ7
1SolderJumper_3_OpenJumper:SolderJumper-3_P1.3mm_Open_RoundedPad1.0x1.5mmJP1

More from mohamed-belal-10/can-motor-controller-node

1
  • 4 layers92.1 × 62.8 mmMotor controller, the printed circuit board in 3D

    Motor controller

    mohamed-belal-10/can-motor-controller-node

    CAN-connected closed-loop DC motor controller node — KiCad hardware (STM32F103, DRV8874, SN65HVD230) with an AS5600 encoder sub-PCB

    55 partsMIT

Similar boards

  • 4 layers65.6 × 91.8 mmKronos V1, the printed circuit board in 3D

    Kronos V1

    AddeyX/Kronos-Hardware

    Kronos - By AddeyX

    229 parts1
  • 2 layers40 × 40 mmCurcuitV4, the printed circuit board in 3D

    CurcuitV4

    banbatakumi/BLDC

    97 parts1
  • 2 layers18 × 27.7 mmMagneticEncorder, the printed circuit board in 3D

    MagneticEncorder

    koji1027/RoboCupJunior2021-2022_Lightweight

    高崎高校物理部 ロボカップジュニア2023 ライトウェイト部門

    8 parts1
  • 4 layers39.7 × 37 mmDisqo, the printed circuit board in 3D

    Disqo

    lerouxb/disqo

    Smartwatch / Wearable Synth

    74 parts1
  • 2 layers35.7 × 33.1 mmBreakout board, the printed circuit board in 3D

    Breakout board

    alientanya/stm32-and-as5600-breakout-board

    stm32f102c8t6 breakout board with as5600 encoder and usb c connections

    31 parts
  • 2 layersEncoder, the printed circuit board in 3D

    Encoder

    luihp/encoder_pcb

    9 parts
  • 2 layers42 × 42 mmMotor Driver PCB, the printed circuit board in 3D

    Motor Driver PCB

    max-proj17/Self-Balancing-Bot

    Self-balancing two-wheeled robot with PID control — includes firmware, PCB designs, and 3D files.s.

    27 partsGPL-3.0

Questions

How big is the AS5600 Encoder Node PCB?

It measures 28 × 31 mm and has 2 copper layers, 1.6 mm thick.

What parts does the AS5600 Encoder Node use?

9 parts, built around the AS5600-ASOT. 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 AS5600 Encoder Node KiCad files?

From the mohamed-belal-10/can-motor-controller-node repository on GitHub, at the commit this page was made from: the board is hardware/AS5600_Encoder_Node/AS5600_Encoder_Node.kicad_pcb and its schematic hardware/AS5600_Encoder_Node/AS5600_Encoder_Node.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the AS5600 Encoder Node 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).