
Pump controller reva
UWARG/pump-controller-hardware
Hardware for Competition 2026 Water Pump Controller on Project Valkyrie

Tercio B1 brushless FOC driver (planning)
Tercio B1 is an open-source printed circuit board by Kerol-Dev, from the Kerol-Dev/Tercio-B1 repository on GitHub, published under the Apache-2.0 licence. It is a 6-layer board of 46 × 46 mm with 163 parts on 116 nets, routed with 1,237 tracks and 340 vias.
It is built around the STM32G431CBT6, MT6835GT-STD-R and TLV75533PDBVR-MS, with the BSC030N08NS5, M2.5 and RLP25FEGR001 among its other parts. Its parts include 58 capacitors, 53 resistors, 8 diodes, 8 connectors and 6 transistors. It belongs with the robots and motor control boards and the STM32 boards of this library.
Brushless FOC on the Tercio bus.
A 46 × 46 mm field-oriented-control driver for gimbal, quasi-direct-drive and hobby brushless motors.
10–52 V, a 21-bit encoder on board, and the same bus, browser panel and libraries as the Tercio S1.
Rev A is designed and 100 % routed, and its firmware runs on a simulated motor. Nothing has run on real hardware yet:
every rating on this page is a design target until the bench tests confirm it.
Hardware · Firmware · Simulator · Spec vs moteus · Plan
A Tercio machine can already put closed-loop steppers and an IMU on one CAN bus, set up from a browser. Some joints want a brushless motor instead: gimbals that must be smooth at a crawl, legs and arms on quasi-direct-drive actuators, anything that needs torque control rather than position alone.
Good brushless controllers exist, but each comes with its own adapter, its own tools and its own library. The Tercio B1 joins the bus you already have. It speaks Tercio protocol v2 as device class 2, appears in Tercio Control next to your S1 drivers and IMUs, and is driven from the same Python and Arduino libraries. It aims at the mjbots moteus-x1 and moteus-n1 on that ecosystem and on value: a target of $99–119.
| On the Tercio bus | Protocol v2, device class 2. Discovery, node IDs, parameters, telemetry and fault events work as on the S1, through the same Tercio FD adapter. |
| 21-bit encoder on board | An MT6835 sits on the shaft axis under the board. The aux port takes an output-side encoder (SPI, I²C or quadrature), step/dir, RC PWM and a motor NTC. |
| 10–52 V, 80 V FETs | A DRV8353RS 100 V-class gate driver with drain-source over-current protection, six 80 V / 3 mΩ BSC030N08NS5, 1 mΩ Kelvin shunts, and a regen clamp in firmware from day one. |
| Fast loops | PWM at 15–40 kHz (30 kHz by default), the current loop at the PWM rate, the position or velocity loop every second tick. |
| Calibrates itself | Measures current-sense offsets, resistance, inductance, pole pairs, direction, encoder offset and flux linkage. In simulation, R, L and flux linkage come out within 1 % on the 5010 and 2204 test motors; the gimbal's resistance reads 3.5 % high. |
| Both bus speeds | 500 k / 2.5 Mbit/s and 1 M / 5 Mbit/s bus profiles from the first release. |
| Generated by code | Schematic, placement, copper and routing are all Python that writes KiCad 10 files, authored by AI, and checked by KiCad itself: ERC 0, DRC 0, 0 schematic-parity issues. |
hardware/tools/jlc_fab.py writes the gerbers, BOM and placement file for JLCPCB assembly.flowchart LR
BUS["CAN FD bus<br/>Tercio protocol v2"] --- CAN["MCP2562FD"]
CAN --- MCU["STM32G431<br/>FOC at 30 kHz"]
ENC["MT6835<br/>21-bit encoder"] -- "SPI" --> MCU
MCU -- "6 × PWM" --> DRV["DRV8353RS<br/>gate driver + 3 current amps"]
DRV --> FET["3 half-bridges<br/>6 × BSC030N08NS5"]
PWR["XT30<br/>10–52 V"] --> FET
FET --> MOT(("Motor"))
FET -. "1 mΩ Kelvin shunts" .-> DRV
DRV -- "phase currents" --> MCUFocCore takes the ADC sample and returns the duties: Clarke and Park transforms, a d/q current controller with decoupling and latency compensation, space-vector PWM and per-tick protection. It is plain C++ with no HAL, so the same code runs on the MCU, in the unit tests and in the simulator.Joint runs the protocol-v2 states, the position, velocity, torque and impedance modes on the S1's trajectory planner, the regen clamp, a 1 s host deadman and temperature derating.
The firmware above, unchanged, runs at 30 kHz in real time against a model of the motor and the board.
cd firmware
node simulator/server.mjs # http://127.0.0.1:8770, builds the simulator first if needed| Supply | 10–52 V (3S–12S, 48 V supplies); input TVS SMCJ54A; over-voltage fault ≤ 58 V |
| Phase current | ~80 A peak by design; 15 A continuous without cooling as the target. Both are published only after measurement. |
| PWM and current loop | 15–40 kHz, 30 kHz by default |
| MCU | STM32G431CBT6, Arm Cortex-M4F at 170 MHz (STM32G474CBT6 as a pin-compatible alternate) |
| Power stage | DRV8353RS, 6 × BSC030N08NS5 (80 V, 3.0 mΩ), 1 mΩ 2512 Kelvin shunts |
| Encoder | MT6835, 21-bit absolute, on board |
| Aux port | JST-GH 8: SPI, I²C, quadrature, step/dir, RC PWM, GPIO, motor NTC, 3.3 V (PTC-limited) |
| Bus | CAN FD, 500 k / 2.5 Mbit/s and 1 M / 5 Mbit/s, Tercio protocol v2; 2 × JST-GH 4 for daisy chaining; 120 Ω termination by solder jumper |
| Power connector | XT30 (right angle) and phase solder pads |
| Board | 46 × 46 mm, 6 layers, height ≤ 10 mm target, ≤ 16 g target |
| Host tools | Tercio Control in the browser and the Python and Arduino libraries, through the Tercio FD |
The comparison with moteus-x1, n1 and r4.11 is in docs/02.
cd firmware
~/.platformio/penv/bin/pio test -e native # host tests on simulated motorspython3 hardware/build.py # schematic → netlist check → ERC → PDF
python3 -I hardware/verify_bom.py # every LCSC code checked live against JLCPCBThe board scripts need KiCad 10's own Python, for pcbnew:
KPY=/Applications/KiCad/KiCad.app/Contents/Frameworks/Python.framework/Versions/3.9/bin/python3
cd hardware
$KPY layout.py # place, copper, route, fill, DRC, renders
$KPY tools/jlc_fab.py # build/jlc: gerbers, BOM, CPL for JLCPCBThe files in hardware/kicad/ are generated: change the code and regenerate rather than editing them in KiCad. The full flow, the router and the checks are in hardware/README.md.
| Done | Plan and decisions; rev A schematic, board and routing, DRC clean; JLC fabrication files; firmware milestone F0 (FOC core, calibration, joint) with host tests 1–6 and the real-time simulator |
| Next | Regen and fault-reaction tests in simulation; the CAN and protocol layer; bring-up firmware; order rev A |
| Schedule | Rev A order around 21 December 2026, rev B after Chinese New Year, launch around June 2027 (docs/09) |
| Guardrail | The Tercio S1 and FD launch on 1 December 2026 comes first: no B1 changes to the other Tercio repositories before then, and a B1 freeze from 23 November to 7 December |
| # | Document | Contents |
|---|---|---|
| 1 | Requirements and the wedge | Decisions, functional requirements, positioning against moteus/ODrive, rating method |
| 2 | Spec versus moteus-x1 | Side-by-side with x1, n1 and r4.11 |
| 3 | Part shortlist | Live LCSC/JLCPCB stock and prices (2026-10-12), choices and alternates |
| 4 | Block diagram and pin map | Power tree, STM32G431 pin map, TIM1/ADC sync, aux and CAN connectors, floor plan |
| 5 | BOM cost and PCB plan | Planning estimate ≈ $45/board at 10, ≈ $25.50 at 100 (landed); stackup and layout rules |
| 6 | KiCad as code | Python-generated schematic and board, routing, kicad-cli checks and outputs |
| 7 | Firmware plan | S1 architecture reuse, FOC core, calibration and identification, protocol additions, bus profiles, host simulator |
| 8 | Bring-up and test plan | Equipment, regen handling, 14 staged tests with pass criteria |
| 9 | Risks and schedule | Risk register; 3 spins; launch ~June 2027; ≈ $4,000–4,500 to launch |
docs/ the plan: requirements, spec, parts, architecture, BOM, KiCad as code, firmware, bring-up, risks
data/ live part data, BOM estimate, pin map
tools/ part lookup (JLCPCB + LCSC), BOM estimate, CAN bus-time budget
hardware/
├── b1/ the Tercio B1 circuit, one module per sheet; placement, copper, routing plan, silkscreen
├── gen/ the generator: KiCad file writer, symbols, footprints, board engine, router
├── tools/ JLCPCB fabrication files, routing report, XT30 3D model
├── kicad/ the generated KiCad 10 project (open tercio-b1.kicad_pro to review)
└── lib/ IBM Plex fonts for the silkscreen (project footprints and symbols are in kicad/lib/)
firmware/
├── src/ foc/, control/, app/ (MCU and host); sim/, simulator/ (host only)
├── simulator/ Node server and web UI
└── test/ host tests| Path | What |
|---|---|
tools/parts_lookup.py | Live JLCPCB + LCSC stock and price lookup (standard library only). Reads tools/candidates*.txt |
tools/bom_estimate.py | BOM cost at 10/100 boards from the lookup data → data/bom-estimate.csv |
tools/can_budget.py | CAN FD bus-time budget per node and rate (python3 tools/can_budget.py 1000000 5000000) |
data/parts-live-2026-10-12*.csv | 686 rows of live part data from 2026-10-12 |
data/pinmap-g431cbt6.csv | Pin map as a table, for the generator |
Re-run before any order (stock moves daily):
python3 -I tools/parts_lookup.py && python3 -I tools/parts_lookup.py tools/candidates-extra.txt && python3 -I tools/bom_estimate.pyDecided with Kerol on 2026-10-12:
| Topic | Decision |
|---|---|
| Power class | Smaller class first → 10–52 V (DRV8353RS makes 12S/48 V possible) |
| Peak current | Design for ~80 A peak; lead marketing with continuous current |
| Target motors | Gimbal, QDD 5010/6010, small drone/hobby BLDC |
| Price | $99–119 |
| Size | ~46 × 46 mm |
| Encoder | Onboard MT6835 (21-bit) + aux port for an output-side encoder |
| MCU | STM32G431CBT6 (G474CBT6 as a pin-compatible alternate) |
| Gate driver | DRV8353RS |
| CAN connector | 2 × JST-GH 4-pin, daisy chain |
| Power connector | 1 × XT30 + motor solder pads |
| Extras | Motor thermistor, PWM and step/dir input, spare GPIO/analog |
| USB | No (CAN only, via the FD) |
| Bus | 500k/2.5M and 1M/5M, both from the B1's first release |
| Licence | Apache-2.0 |
| Name | Tercio B1 |
| KiCad flow | Code owns everything, including routing |
| Timing | Start the schematic now, in parallel with the launch |
| S1 and the 1M/5M bus | No S1s are built yet: the shipping firmware carries the bus profile |
| Repository | Private GitHub repo Kerol-Dev/Tercio-B1 (named Tercio-bldc until 2026-10-18) |
Still open:
| Topic | Notes |
|---|---|
| Weekly time cap before launch | Yours to set; the schedule assumes part-time |
| Electrolytic on board vs on the XT30 pigtail | Height (10 mm) vs cable damping. Rev A carries a 22 µF 100 V can on board |
| Mounting-hole pattern | Check against the 5010/6010 motors on rev A |
| Retail price inside $99–119, volume tiers, starter bundle | After rev B, when the BOM and ratings are firm |
Apache-2.0, see LICENSE.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 14 | 100nF 16V | Capacitor_SMD:C_0402_1005Metric | C106, C210, C214, C401, C402, C403, C405, C408, C411, C415, C501, C601, C602, C701 |
| 9 | 10µF 100V | Capacitor_SMD:C_1210_3225Metric | C102, C201, C204, C304, C305, C306, C307, C308, C309 |
| 8 | 100 | Resistor_SMD:R_0402_1005Metric | R404, R405, R406, R701, R702, R703, R704, R705 |
| 7 | 1nF 50V | Capacitor_SMD:C_0402_1005Metric | C103, C313, C314, C315, C412, C413, C414 |
| 6 | 0R | Resistor_SMD:R_0402_1005Metric | R301, R302, R305, R306, R309, R310 |
| 6 | 10k | Resistor_SMD:R_0402_1005Metric | R209, R211, R401, R407, R502, R707 |
| 6 | 1µF 25V | Capacitor_SMD:C_0402_1005Metric | C104, C107, C208, C209, C406, C502 |
| 6 | BSC030N08NS5 | Package_TO_SOT_SMD:TDSON-8-1 | Q301, Q302, Q303, Q304, Q305, Q306 |
| 4 | 100k | Resistor_SMD:R_0603_1608Metric | R101, R313, R315, R317 |
| 4 | 4.7k | Resistor_SMD:R_0402_1005Metric | R205, R206, R708, R709 |
| 4 | 5.1k | Resistor_SMD:R_0402_1005Metric | R102, R314, R316, R318 |
| 4 | M2.5 | MountingHole:MountingHole_2.7mm_M2.5 | H101, H102, H103, H104 |
| 3 | 100nF 100V | Capacitor_SMD:C_0805_2012Metric | C310, C311, C312 |
| 3 | 10nF 50V | Capacitor_SMD:C_0402_1005Metric | C108, C212, C407 |
| 3 | 1mΩ 3W | Tercio_B1:R_2512_Kelvin | R303, R307, R311 |
| 3 | 1nF 100V | Capacitor_SMD:C_0603_1608Metric | C301, C302, C303 |
| 3 | 22 | Resistor_SMD:R_0402_1005Metric | R408, R409, R501 |
| 3 | 4.7 | Resistor_SMD:R_0805_2012Metric | R304, R308, R312 |
| 2 | 10 | Resistor_SMD:R_0603_1608Metric | R201, R202 |
| 2 | 12pF 50V C0G | Capacitor_SMD:C_0402_1005Metric | C409, C410 |
| 2 | 1k | Resistor_SMD:R_0402_1005Metric | R403, R706 |
| 2 | 1µF 50V | Capacitor_SMD:C_0603_1608Metric | C206, C207 |
| 2 | 4.7µF 16V | Capacitor_SMD:C_0603_1608Metric | C105, C404 |
| 2 | 60.4 | Resistor_SMD:R_0402_1005Metric | R601, R602 |
| 2 | GH-4 CAN | Connector_JST:JST_GH_SM04B-GHS-TB_1x04-1MP_P1.25mm_Horizontal | J601, J602 |
| 2 | GND | Tercio_B1:TestPad_D0.9mm | TP102, TP106 |
| 2 | TPD4E05U06DQAR | Package_SON:USON-10_2.5x1.0mm_P0.5mm | D701, D702 |
| 1 | +3.3VA | Tercio_B1:TestPad_D0.9mm | TP105 |
| 1 | +3V3 | Tercio_B1:TestPad_D0.9mm | TP104 |
| 1 | +5V | Tercio_B1:TestPad_D0.9mm | TP103 |
| 1 | 1 | Resistor_SMD:R_0805_2012Metric | R207 |
| 1 | 1.5k | Resistor_SMD:R_0402_1005Metric | R210 |
| 1 | 100k | Resistor_SMD:R_0402_1005Metric | R208 |
| 1 | 100nF 100V | Capacitor_SMD:C_0603_1608Metric | C202 |
| 1 | 100µH | Inductor_SMD:L_Sunlord_SWPA6045S | L201 |
| 1 | 10k B3434 | Resistor_SMD:R_0603_1608Metric | TH301 |
| 1 | 150k | Resistor_SMD:R_0603_1608Metric | R204 |
| 1 | 16MHz | Crystal:Crystal_SMD_3225-4Pin_3.2x2.5mm | Y401 |
| 1 | 1µF 100V | Capacitor_SMD:C_0805_2012Metric | C203 |
| 1 | 2.2k | Resistor_SMD:R_0402_1005Metric | R402 |
| 1 | 200k | Resistor_SMD:R_0603_1608Metric | R203 |
| 1 | 22µF 100V | Capacitor_SMD:CP_Elec_6.3x7.7 | C101 |
| 1 | 22µF 25V | Capacitor_SMD:C_0805_2012Metric | C213 |
| 1 | 4.7nF 50V | Capacitor_SMD:C_0402_1005Metric | C603 |
| 1 | 470nF 25V | Capacitor_SMD:C_0603_1608Metric | C211 |
| 1 | 47nF 100V | Capacitor_SMD:C_0603_1608Metric | C205 |
| 1 | 50mA | Fuse:Fuse_0603_1608Metric | F701 |
| 1 | 600Ω@100MHz | Inductor_SMD:L_0603_1608Metric | FB101 |
| 1 | DRV8353RSRGZR | Package_DFN_QFN:Texas_RGZ0048A_VQFN-48-1EP_7x7mm_P0.5mm_EP5.15x5.15mm_ThermalVias | U201 |
| 1 | DRV_nFAULT | Tercio_B1:TestPad_D0.9mm | TP208 |
| 1 | GH-8 AUX | Connector_JST:JST_GH_SM08B-GHS-TB_1x08-1MP_P1.25mm_Horizontal | J701 |
| 1 | GLA | Tercio_B1:TestPad_D0.9mm | TP204 |
| 1 | GLB | Tercio_B1:TestPad_D0.9mm | TP205 |
| 1 | GLC | Tercio_B1:TestPad_D0.9mm | TP206 |
| 1 | MBR1H100SFT3G | Diode_SMD:D_SOD-123F | D201 |
| 1 | MCP2562FDT-E/SN | Package_SO:SOIC-8_3.9x4.9mm_P1.27mm | U601 |
| 1 | MOTOR A | Tercio_B1:MotorPad_3.6x6mm | J301 |
| 1 | MOTOR B | Tercio_B1:MotorPad_3.6x6mm | J302 |
| 1 | MOTOR C | Tercio_B1:MotorPad_3.6x6mm | J303 |
| 1 | MT6835GT-STD-R | Package_SO:TSSOP-16_4.4x5mm_P0.65mm | U501 |
| 1 | NTC | Jumper:SolderJumper-2_P1.3mm_Bridged_RoundedPad1.0x1.5mm | JP701 |
| 1 | NUP2105LT1G | Package_TO_SOT_SMD:SOT-23 | D601 |
| 1 | PESD5V0S1BA | Diode_SMD:D_SOD-323 | D501 |
| 1 | SMCJ54A | Diode_SMD:D_SMC | D101 |
| 1 | SOA | Tercio_B1:TestPad_D0.9mm | TP201 |
| 1 | SOB | Tercio_B1:TestPad_D0.9mm | TP202 |
| 1 | SOC | Tercio_B1:TestPad_D0.9mm | TP203 |
| 1 | STM32G431CBT6 | Package_QFP:LQFP-48_7x7mm_P0.5mm | U401 |
| 1 | SW | Tercio_B1:TestPad_D0.9mm | TP207 |
| 1 | SWD | Tercio_B1:SWD_Pads_1x05_P2.54mm | J401 |
| 1 | TERM | Jumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mm | JP601 |
| 1 | TLV75533PDBVR | Package_TO_SOT_SMD:SOT-23-5 | U101 |
| 1 | VBUS | Tercio_B1:TestPad_D0.9mm | TP101 |
| 1 | XT30PW-M | Connector_AMASS:AMASS_XT30PW-M_1x02_P2.50mm_Horizontal | J101 |
| 1 | green | LED_SMD:LED_0805_2012Metric | D401 |
| 1 | red | LED_SMD:LED_0603_1608Metric | D402 |
It measures 46 × 46 mm and has 6 copper layers, 1.6 mm thick.
163 parts, built around the STM32G431CBT6, MT6835GT-STD-R, TLV75533PDBVR-MS and BSC030N08NS5. 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.
From the Kerol-Dev/Tercio-B1 repository on GitHub, at the commit this page was made from: the board is hardware/kicad/tercio-b1.kicad_pcb and its schematic hardware/kicad/aux.kicad_sch. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the Apache-2.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

UWARG/pump-controller-hardware
Hardware for Competition 2026 Water Pump Controller on Project Valkyrie

punkfab/pcb-corpus
235 real KiCad boards from open-source hardware repositories, prepared as a placement and routing benchmark


AndreiVladescu/Vector-UGV
An 18-DOF hexapod research platform: a smart controller per leg on CAN, a Raspberry Pi CM5 carrier, camera and SDR payload, ELRS / Wi-Fi / 4G links. Built for the PCBWay 9th Project Design Contest.

jackw01/scanlight
A better light source for scanning color negative film



another-greg/MT6835_encoder_breakout_board
Simple breakout board for the MT6835 magnetic rotary encoder.