Skip to the content
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.

Size
42.8 × 33.8 mm
Copper layers
2
Thickness
1.6 mm
Parts
16
Nets
12
Pads
37
Tracks, vias
60, 0
Routed
Yes
KiCad
KiCad 10.0 (file 20260206)
Created
15 Jun 2026
Updated
31 Aug 2026

Overview

Driver PCB is an open-source printed circuit board by lnpanini, from the lnpanini/Falali repository on GitHub. It is a 2-layer board of 42.8 × 33.8 mm with 16 parts on 12 nets, routed with 60 tracks and 0 vias.

Its parts include 7 resistors, 3 transistors and 2 connectors.

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

16
QtyValueFootprintReferences
4MountingHole_3.2mm_M3MountingHole_3.2mm_M3H1, H2, H3, H4
3100kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR4, R5, R6
310kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR1, R2, R3
32N3904PCM_Package_TO_SOT_THT_AKL:TO-92_Inline_Wide_EBCQ1, Q2, Q3
11.5kResistor_THT:R_Axial_DIN0207_L6.3mm_D2.5mm_P7.62mm_HorizontalR7
1BLD-120AConnector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_VerticalJ2
1ESPConnector_PinHeader_2.54mm:PinHeader_1x05_P2.54mm_VerticalJ1

More from lnpanini/Falali

2
  • 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.

    24 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

  • 2 layers140.5 × 30 mmType e, the printed circuit board in 3D

    Type e

    google/mozc-devices

    Circuit diagrams and firmware source code for Gboard DIY keyboards

    16 parts3kApache-2.0
  • 2 layers41.4 × 14.5 mmU2f zero, the printed circuit board in 3D

    U2f zero

    conorpp/u2f-zero

    U2F USB token optimized for physical security, affordability, and style

    16 parts2.4k
  • 2 layers122 × 37 mmV0-UmbilicalBoard, the printed circuit board in 3D

    V0-UmbilicalBoard

    VoronDesign/Voron-Hardware

    Cool Hardware designed by the Voron Design group

    16 parts1.1kGPL-3.0
  • 2 layers152 × 57.6 mmVideoslotadapter, the printed circuit board in 3D

    Videoslotadapter

    hoglet67/RGBtoHDMI

    Bare-metal Raspberry Pi project that provides pixel-perfect sampling of Retro Computer RGB/YUV video and conversion to HDMI

    16 parts1kGPL-3.0
  • 2 layers36 × 63.4 mmSmart ringfinal layout, the printed circuit board in 3D

    Smart ringfinal layout

    hackclub/OnBoard

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

    16 parts915
  • 2 layers60 × 40 mmHASwitchPlate, the printed circuit board in 3D

    HASwitchPlate

    aderusha/HASwitchPlate

    LCD touchscreen for Home Automation

    16 parts738MIT
  • 2 layers21.1 × 26.9 mmDemo, the printed circuit board in 3D

    Demo

    easyw/kicadStepUpMod

    kicadStepUp: ECAD to MCAD FreeCAD WorkBench

    16 parts704

Questions

How big is the Driver PCB PCB?

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

What parts does the Driver PCB use?

16 parts. 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 Driver PCB KiCad files?

From the lnpanini/Falali repository on GitHub, at the commit this page was made from: the board is KiCad/Driver PCB/Driver 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 Driver PCB design in my own project?

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