Skip to the content
2 layers110 × 110 mmArm Subsystem PCB, the printed circuit board in 3D

Arm Subsystem PCB

lnpanini/Falali

An AMR-style under-ride platform that drives beneath a textile trolley, uses upward-facing time-of-flight sensors to confirm it is under the trolley and centred, clamps onto the underside, and then moves the trolley.

Size
110 × 110 mm
Copper layers
2
Thickness
1.6 mm
Parts
24
Nets
45
Pads
114
Tracks, vias
210, 9
Pours
2
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
15 Jun 2026
Updated
31 Aug 2026

Overview

Arm Subsystem PCB is an open-source printed circuit board by lnpanini, from the lnpanini/Falali repository on GitHub. It is a 2-layer board of 110 × 110 mm with 24 parts on 45 nets, routed with 210 tracks and 9 vias.

It is built around the ESP32-S3-DEVKITC-1-N8. Its parts include 12 switches, 3 connectors and 1 IC. It belongs with the ESP32 boards of this library.

Main components

1

README

README.md

Falali — a 30.007 project

An AMR-style under-ride platform that drives beneath a textile trolley, uses upward-facing time-of-flight sensors to confirm it is under the trolley and centred, clamps onto the underside, and then moves the trolley. ESP32-S3 firmware, hardware and documentation.

This is also the whole-project home for Falali — One AMR Fits All (SUTD 30.007 Engineering Design Innovation, Group 10): a low-profile autonomous mobile robot that moves existing fabric trolleys in a textile factory by driving underneath them, clamping on, and transporting them — no changes to the trolleys or the factory floor.

  • Controller: ESP32-S3-WROOM-1 N16R8 (16 MB flash, 8 MB octal PSRAM)
  • No LiDAR, camera, ROS 2, SLAM, or mapping.

Hardware documentation lives in docs/hardware/ — power-up runbook, component list, per-connector pinouts for all three PCBs (extracted from the KiCad netlists, not inferred), and a fabrication/repair guide. docs/hardware-architecture.md is the older companion and is partly superseded by it. The pin table further down this README is the pre-PCB design intent and does not match the fabricated board.

Full design: docs/superpowers/specs/2026-07-06-falali-esp32-docking-design.md.

Results against requirements

RequirementTargetResult
Fit under trolley clearance≤ 200 mm167 mm, validated on the physical chassis
Move loaded trolley≥ 100 kgPassed — load moved with two people standing on top
Clamp holding force≥ 300 NWeakest-link analysis: clamp capacity 403 N (SF 1.34×)
Clamp vertical reach≥ 200 mmMet
Docking time≤ 1 minUnder 60 s in testing
Worst-case castor misalignmentAll 4 orientationsMoves under all

Derivations, test protocols and data: docs/pdr-falali-amr.pdf (Preliminary Design Review deck, 11 Aug 2026).

Delivered system

text
ESP-BASE (Wheel Drive PCB)                  ESP-ARM (Arm Subsystem PCB)
docking state machine                       arm axes X/Y, flipper servos, clamp
mecanum mixing, 4× corner ToF centring   ⇄  limit switches, homing
clamp handoff                             ESP-NOW over Wi-Fi (channel 1)

operator: BLE gamepad ([bench_ble/](bench_ble/))

Commercial AMRs don't fit this job: platform AMRs are too tall to get under the trolleys, tow tractors need turning space, side-docking systems need the trolley modified. The answer is under-entry capture: fit under the ≤200 mm clearance, strafe beneath an existing trolley with mecanum drive, confirm centring sensor-only, clamp and carry.

Falali final prototype

Safety principle

The clamp must not engage unless the alignment logic CONFIRMS the platform is centred. Limit switches only confirm clamp travel; they never authorise clamping. SafetyMonitor is the single gate (confirmed && no faults && !E-stop), and the docking state machine reaches the clamp handoff only after a sustained CONFIRM. The clamp/arm mechanism itself is an external subsystem that plugs in at the IClamp port.

Architecture — hexagonal (ports & adapters)

text
lib/ports      pure C++ interfaces + shared types (no Arduino)
lib/domain     the hand-written core:  CornerEdgeDetector · DeadReckonOdometry · SafetyMonitor · DockingStateMachine
lib/drive      MecanumDrive (mixes body-frame vx/vy/omega -> 4 wheels)
lib/fakes      desktop test doubles for every port
lib/hal_esp32  Arduino adapters over popular libraries
include/       config.h (tunables) · pins.h (GPIO map)
src/main.cpp   composition root: builds adapters, wires domain, runs the loop
test/          host unit tests (Unity)

Dependency rule: domain → ports only; adapters → ports; main → everything. The domain never includes Arduino, so it compiles and tests on a laptop. Commodity work uses popular libraries (pololu/VL53L0X, Bounce2, ArduinoJson, SerialCommands, ESP32 LEDC); only the docking sequence, corner edge detection, odometry, and safety logic are hand-written — and that is the part under test.

Alignment method: with a solid trolley board and 4 corner ToF sensors, docking is a deterministic geometric sequence — APPROACH → ORIENT (rotate until both front corners see the edge) → CENTER_X (odometry-centre between near/far edges) → CENTER_Y (same, strafing) → CONFIRM → clamp handoff. Centring uses dead-reckoning odometry; driving to the midpoint between two edge events makes it robust to calibration error.

ToF wiring, both ESPs: all four corner sensors keep their factory address 0x29 and are brought up one at a time via XSHUT re-addressing — Vl53l0xArray on the base, TofSensorArray in arm/. An earlier design multiplexed them through the PCA9548A breakout in KiCad/PCA9548A Breakout/; final firmware uses no mux, and the breakout is kept as history of that era.

Build, test, flash

bash
# Host unit tests of the pure core — no hardware needed:
pio test -e native

# Compile / upload the firmware (fetches lib_deps):
pio run -e esp32s3
pio run -e esp32s3 -t upload
pio device monitor -b 115200

Arm subsystem firmware has its own project: arm/.

Operator interface — Xbox gamepad over BLE

The robot is driven from a gamepad, not a serial console. bench_ble/ runs Bluepad32, which owns stdin: Console is output-only and Serial is never begin()-ed, so typed commands cannot reach the firmware. Every operator control is a gamepad button. See docs/gotchas.md §6.

The base prints status to the console as it runs; that is one-way.

A DOCK/ABORT/UNCLAMP/STATUS serial protocol was designed and the parser written, but it never ran on hardware — see Project history below.

Pin map — ESP32-S3-N16R8

🛑 The table below is WRONG. Do not wire or flash from it.

It is the pre-PCB design intent and does not match the fabricated board. On the real board GPIO4–7 are the ToF XSHUT lines, not wheel SV, and GPIO38/39 are motor brake lines, not I²C. Using this map would drive the I²C bus as motor enables.

The real map is include/pins.h, extracted from the KiCad netlist, with per-connector pinouts in docs/hardware/boards.md.

Kept here only because it is referenced by older notes. It should be deleted.

Reserved on the N16R8: GPIO26–37 (flash + octal PSRAM) and GPIO19/20 (USB-CDC).

GroupSignalsGPIO
Wheel speed (SV, PWM)FL/FR/RL/RR4, 5, 6, 7
Wheel direction (F/R)FL/FR/RL/RR15, 16, 17, 18
Wheel enable / brake (ganged)EN / BRK8 / 9
Clamp (BTS7960)RPWM / LPWM / EN11 / 12 / 13
Clamp current sense (ADC1)IS close / open1 / 2
Limit switchesopen / closed14 / 21
ToF I²CSDA / SCL38 / 39

Hardware bring-up checklist (before trusting it under a trolley)

These adapters were validated on the assembled robot over the 2026 term. Kept as a bring-up order for a rebuild, or after a board respin:

  1. PWM API — a PwmPin shim supports Arduino-ESP32 core 2.x and 3.x automatically.
  2. BLD120A polarities — F/R forward sense, and active-low EN/BRK (Bld120aMotor.h). There is no ALARM: the driver has no such terminal, only a front-panel LED.
  3. Mecanum + orient signs — confirm forward / strafe / yaw directions (MecanumDrive.cpp) and the ORIENT rotate-direction sign in DockingStateMachine.cpp (rotate toward the lagging corner).
  4. ToF corners — FL/FR/RL/RR on their XSHUT pins (pins::kTofXSHUT; Vl53l0xArray is the default backend since the mux approach was retired); set the board height band (makeCornerConfig).
  5. Odometry calibration — measure max_lin_mm_s / max_ang_rad_s (makeOdometryCal); tune the centring tolerance/offsets in makeDockConfig.
  6. Per-wheel current sense — calibrate cfg::kWheelStallAmps under a loaded trolley. Note the ACS758 outputs are not currently wired to J9/J12/J14/J17, so this reads nothing until they are (docs/hardware/components.md §4). The clamp is on the arm board, not this one.
  7. Dry-run the alignment and watch the JSON telemetry (corners, x_mm, y_mm, confirmed). The clamp/arm subsystem is external and validated separately at the IClamp handoff.

Custom PCBs

Connector-level references for all boards (every pin extracted from the KiCad netlists): docs/hardware/boards.md.

BoardSizeKiCad projectJob
Wheel Drive PCB130 × 105 mmKiCad/Wheel Drive PCB/base ESP + 4 motor-driver adapters + all base sensors
Driver PCB ×442.8 × 33.8 mmKiCad/Driver PCB/3.3 V → open-collector adapter, one per motor
Arm Subsystem PCB110 × 110 mmKiCad/Arm Subsystem PCB/arm ESP + 2 H-bridges + servos + 8 limit switches
PCA9548A breakout—KiCad/PCA9548A Breakout/I²C mux — historical, see ToF note above

JLCPCB fab outputs ship with each project (fab-output/ folders; the Arm board's zip is in its folder). Board designs by Kai Xiang & Heng Li (arm/wheel sensor side) and Bryan Lim (base).

Demos

Load test — ≥100 kg requirement load, two people on top
Mecanum base driving and strafing
Arm extension / flipper / release sequence
Clamped onto a trolley

(GitHub renders <video> tags in markdown; if your viewer doesn't, open the files under docs/media/videos/.)

All clips kept in the repo
FileWhat it shows
trolley-carry-demo.mp4full trolley-carry run (1:49)
clamping-on-sequence.mp4clamp engaging under the trolley (0:56)
rail-strength-test.mp4rail strength durability test (0:29)
img-3340.mp4bench footage (0:51)
img-3350.mp4bench footage (0:43)
video-2026-07-13.mp4mid-build progress clip (0:16)
video-2026-07-17.mp4mid-build progress clip (0:10)
clip-20260707.mp4early drive test (0:05)

Function diagrams

System flowArm subsystem
System flow function diagramArm subsystem function diagram

(SVGs render inline above; click through for the higher-resolution PNGs.)

More photos
Team after final presentationExhibition dayFablab exhibition
Laser cutting the enclosure

All photos: docs/media/photos/.

Team — Group 10

MemberFocus areas
Chan Long Nammechanical structure & clamping system
Chong Shao Yihchassis & integration
Chua Heng Lielectronics: arm-subsystem & wheel-drive PCBs, power wiring, arm firmware
Jacelyn Tansystems analysis & testing
Lim Nguyen Ping, Bryandrive firmware, sensing & base architecture (this repo)
Lucas Lim Kong Keongclamping mechanism & materials
Soh Kai Siangpower distribution & wiring; co-author of arm firmware

Rows are initial attributions — each member, feel free to refine your own.

Repository map

PathWhat it is
src/firmware entry + bench bring-up sketches
lib/hexagonal core: ports, domain, drive, fakes, ESP32 adapters
include/tunables (config.h) and GPIO map (pins.h)
test/host unit tests (Unity, pio test -e native)
arm/vendored arm-subsystem firmware (ESP-NOW slave)
KiCad/four custom board projects + fab outputs
bench_ble/BLE-gamepad bench firmware
tools/PCB production test
docs/specs, gotchas, hardware references, runbooks, session history, media

Project history — what was tried and dropped

Kept because knowing what was attempted saves repeating it. None of the below is part of the delivered machine.

AbandonedWhat it wasWhy it went
AS5600 wheel encodersfour magnetic encoders, one per wheel, for closed-loop speedNever worked on the fabricated board: pin 1 of every 1×04 encoder header is unconnected, and all four parts share address 0x36 on a commoned bus. The sensors and shaft magnets are still physically mounted on the motors, unwired and undriven. docs/gotchas.md §13
TCA9548A / PCA9548A I²C muxfitted to give the four encoders separate addressesWent with the encoders. An external PCA9548-type mux overheated and failed with more than two AS5600 attached. The ToF sensors never needed it — they use XSHUT re-addressing. Board files kept at KiCad/PCA9548A Breakout/
Raspberry Pi 5 as main controllerPi 5 driving two ESP32s over USB serial, with a link watchdogNever used. The delivered prototype runs on the two ESP32s alone, base ↔ arm over ESP-NOW. Design retained at docs/superpowers/specs/2026-08-04-rpi5-main-controller-design.md
DOCK/ABORT/UNCLAMP/STATUS serial protocoltext commands in, JSON telemetry outThe parser was written but Bluepad32 owns stdin, so it never ran. Operator control is the gamepad. docs/gotchas.md §6
Hardware E-stop inputa GPIO for an emergency-stop buttonDiscussed, never implemented. The red mushroom button on the robot is wired as an enable for the 12 V arm rail — docs/hardware/startup.md §1
Base-board clamp driverBTS7960 clamp driven from the base ESPMoved to the arm subsystem. The base pins remain kNoPin so the one-ESP firmware still compiles

Code for the encoders, the mux and the Pi was deleted on 2026-08-31 rather than left to rot — git log --diff-filter=D recovers any of it. What was worth keeping is the analysis of why each failed, which lives in docs/gotchas.md and docs/hardware/.

Acknowledgements

  • Course 30.007 Engineering Design Innovation, SUTD; reviewed by Prof. Bradley Camburn and Prof. Wai Lee Chan
  • Firmware drafting and design-analysis support used AI tooling (Claude, Gemini), as disclosed in the PDR

Parts

24
QtyValueFootprintReferences
4MountingHoleMountingHole:MountingHole_3.2mm_M3H1, H2, H3, H4
1Arm Motor XConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ1
1Arm Motor YConnector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalJ2
1ESP32-S3-DevKitCHengLi's Footprint Library:ESP32-S3-DevKitC-N16R8U1
1External Buck 5V and GNDTerminalBlock_Phoenix:TerminalBlock_Phoenix_MKDS-1,5-2-5.08_1x02_P5.08mm_HorizontalJ3
1Limit Switch X1Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalSW1
1Limit Switch X2Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalSW4
1Limit Switch Y1Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalSW2
1Limit Switch Y2Connector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalSW5
1Servo X1Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalS1
1Servo X2Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalS2
1Servo Y1Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalS3
1Servo Y2Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalS4
1ToF X1Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalTOF1
1ToF X2Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalTOF3
1ToF Y1Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalTOF2
1ToF Y2Connector_PinHeader_2.54mm:PinHeader_1x06_P2.54mm_VerticalTOF4
1X Limit MaxConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalSW3
1X Limit MinConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalSW7
1Y Limit MaxConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalSW8
1Y Limit MinConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalSW6

More from lnpanini/Falali

2
  • 2 layers42.8 × 33.8 mmDriver PCB, the printed circuit board in 3D

    Driver PCB

    lnpanini/Falali

    An AMR-style under-ride platform that drives beneath a textile trolley, uses upward-facing time-of-flight sensors to confirm it is under the trolley and centred, clamps onto the underside, and then moves the trolley.

    16 parts
  • 2 layers66 × 76.2 mmPCA9548A Breakout, the printed circuit board in 3D

    PCA9548A Breakout

    lnpanini/Falali

    An AMR-style under-ride platform that drives beneath a textile trolley, uses upward-facing time-of-flight sensors to confirm it is under the trolley and centred, clamps onto the underside, and then moves the trolley.

    11 parts

Similar boards

  • 4 layers95 × 95 mmCube motherboard, the printed circuit board in 3D

    Cube motherboard

    willem-pennings/balancing-cube

    A cube that balances itself in a corner or edge using reaction wheels

    52 parts1.1kGPL-3.0
  • 2 layers129.9 × 63.6 mmTraeger rev 2.3.0.kicad pro, the printed circuit board in 3D

    Traeger rev 2.3.0.kicad pro

    jazzmonger/Traeger-PID-Controller

    Traeger Smoker/Grill Controller based on an

    45 parts36
  • 2 layers168.8 × 78.9 mmGameboy3, the printed circuit board in 3D

    Gameboy3

    ohasanov-hbrw/tribit32-advanced

    A tri-microcontroller, overengineered GameBoy Advance clone. More value was given to the controls and the exterior look, which is cool!

    61 parts8
  • 2 layers134.6 × 49.5 mmMem esp, the printed circuit board in 3D

    Mem esp

    fread/visvitalis

    A very simple modular relay computer

    71 parts7
  • 2 layers90 × 102 mmPL Toon, the printed circuit board in 3D

    PL Toon

    pl-toon/pl-toon-codes

    PL-TOON material

    39 parts7
  • 2 layers119.4 × 98.9 mmPCB Pami, the printed circuit board in 3D

    PCB Pami

    FIPATECH/CDFR26_PAMI

    Open source firmware and PCB for a differential mobile robot (PAMI) based on ESP32-S3 - Coupe de France de Robotique

    25 parts6
  • 2 layers76.2 × 40.6 mmEspressifESP32toExpressAdaptor, the printed circuit board in 3D

    EspressifESP32toExpressAdaptor

    dnhutchins/ETC_Express_Reverse_Eng

    The ultimate goal of this work is to develop an interface to use the control surface from a legacy ETC Express 24/48 lighting controller as a modern EOSNomad compatible programming and fader wing.

    3 parts5
  • 2 layersE ink multi sensor, the printed circuit board in 3D

    E ink multi sensor

    heckler/esphome-device-configs

    Configuration definitions for local ESPHome files

    11 parts4Apache-2.0

Questions

How big is the Arm Subsystem PCB PCB?

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

What parts does the Arm Subsystem PCB use?

24 parts, built around the ESP32-S3-DEVKITC-1-N8. 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 Arm Subsystem PCB KiCad files?

From the lnpanini/Falali repository on GitHub, at the commit this page was made from: the board is KiCad/Arm Subsystem PCB/Arm Subsystem PCB.kicad_pcb and its schematic KiCad/Arm Subsystem PCB/Arm Subsystem PCB.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Arm Subsystem PCB design in my own project?

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