Skip to the content
4 layers84.5 × 64 mmMESC brain board, the printed circuit board in 3D

A control theory and software development repo for a balancing robot.

Size
84.5 × 64 mm
Copper layers
4
Thickness
1.6 mm
Parts
59
Nets
59
Pads
197
Tracks, vias
355, 25
Pours
4
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
3 Aug 2025
Updated
24 Jun 2026

Overview

MESC brain board is an open-source printed circuit board by owhite, from the owhite/balancing-robot-notes repository on GitHub, published under the MIT licence. It is a 4-layer board of 84.5 × 64 mm with 59 parts on 59 nets, routed with 355 tracks and 25 vias.

It is built around the LD1117S33TR(MS), RBT10W24S05 and SM24CANB-02HTG, with the APT1608SGC, T491A106K006AT and TL1015AF160QG among its other parts. Its parts include 6 connectors, 5 capacitors, 5 ICs, 4 resistors and 3 diodes. It belongs with the robots and motor control boards and the NXP (LPC, Kinetis, i.MX RT) boards of this library.

Main components

6

README

PCBs/brainboardV1.4/README.md

MESC BRAIN BOARD

A PCB and software development project for a balancing robot.

The goal is to use a hobby Electronic Speed Controller (one open source example, and this circuit for a brain board, a teensy 4.0, and an ESP-32, in combination with MESC firmware.

GENERAL APPROACH

A separation of concerns is divided across these architectures:

  • Teensy: Runs the high-level brain → gait generator, balance estimator, RC inputs
  • MESC: The firmware on the ESC for control → torque or velocity loops per joint
  • ESP32: Easy to log and analyze later → pumps UDP to the computer
  • Desktop computer → perfectly adequate way of viewing high speed data with UDP

TEENSY 4.0

  • 600+ MHz ARM Cortex-M7 — plenty of headroom for filtering, control loops, gait logic, telemetry
  • Tons of I/O for IMU, encoders, RC input, WiFi (via ESP add-on), etc.
  • Precise timing with elapsedMicros or interrupts for deterministic control
  • Great for real-time control, sensor fusion, and behavior modeling

MESC MOTOR CONTROLLER

  • Deploys on simple DIY or commercially available ESC boards
  • Executes low-level Field-Oriented Control (FOC) motor control
  • Built-in support for encoders, FOC, and torque estimation
  • Accurate low-level motor control using current sensing
  • Reads angular position from the MT6701 encoder via SPI or PWM
  • UART/CAN interface (RX + TX) Real-time communication with the Teensy
  • PWM / FOC commutation w/ efficient, smooth motor operation

OTHER BRAIN BOARD FEATURES

  • RC receiver connector (for PWM/PPM/SBUS input)
  • ESP32 UART serial programmer
  • Power input connector
  • Voltage divider (to monitor battery voltage)
  • Push-button E-stop connector
  • Power button (for system on/off)
  • IMU connector (e.g., MPU-6050)
  • Buzzer (for system alerts or E-stop signal)
  • MESC I/O
  • Reserved 2 GPIO pins on Teensy for emergency shutoff to MESC
  • CAN connector (for MESC motor control)

CAN BUS

  • Full-duplex communication between Teensy and motor controllers
  • Carries:
    • Commands: set_torque, set_velocity, enable_motor, zero_encoder, etc.
    • Telemetry: encoder position, estimated torque, velocity, fault codes
  • Real-time performance with minimal latency
  • Can support multiple motor controllers on the same bus

MANY THANKS

This project would never happen without:

NOTES

Ever wanted to change all the names of kicad files at once?

use this:

text
python3 replace_kicad_names.py VESC_brain_board MESC_brain_board

[LINK]

STILL NEEDS WORK

  • Not great design w/ DC-DC conversion from high voltage VBat
  • Replace out the IMU for a ICM-42688-P
  • Order / revise pushbuttons for programming the ESP32
  • Ensure 3.3V CAN transciever

VERSIONS

  • See github tag pcb-v1 for V1.0
  • Retreive with this command: "git checkout pcb-v1"

Parts

59
QtyValueFootprintReferences
610kResistor_SMD:R_0603_1608Metric1k_21, 10k_21, 10k_22, 10k_24, 10k_26, 47k_22
4100nFCapacitor_SMD:C_0603_1608MetricDC_21, DC_22, DC_23, DC_24
460Resistor_SMD:R_0603_1608MetricR60_21, R60_22, R60_23, R60_24
4TestPointConnector_PinSocket_2.54mm:PinSocket_1x01_P2.54mm_VerticalTP21, TP22, TP23, TP24
3100nFCapacitor_SMD:C_0805_2012MetricDC_31, DC_32, DC_33
3Conn_01x01Connector_PinSocket_2.54mm:PinSocket_1x01_P2.54mm_VerticalJ21, J22, J23
3Conn_01x04Connector_JST:JST_PH_B4B-PH-K_1x04_P2.00mm_VerticalCAN1, CAN2, ESP1
210uFCapacitor_SMD:C_0805_2012MetricC23, C24
220kResistor_SMD:R_0603_1608Metric20k_21, 20k_31
24.7nFCapacitor_SMD:C_0603_1608MetricC21, C22
2Conn_01x01Connector_Wire:SolderWire-2sqmm_1x01_D2mm_OD3.9mmJ24, J25
2SM24CANB-02HTGSM24CANB-02HTG:SOT95P230X117-3ND21, D22
2SolderJumper_2_OpenJumper:SolderJumper-2_P1.3mm_Open_RoundedPad1.0x1.5mmJP21, JP22
2TCAN334GDRPackage_SO:SOIC-8_3.9x4.9mm_P1.27mmU22, U23
15kResistor_SMD:R_0603_1608Metric5k_21
1APT1608SGCLED_SMD:LED_0603_1608MetricD_GRN21
1Conn_01x07Connector_JST:JST_PH_B7B-PH-K_1x07_P2.00mm_VerticalIMU1
1Conn_01x18Connector_PinSocket_2.54mm:my_PinSocket_3x07_P2.54mm_VerticalJ2
1D_Small_FilledDiode_SMD:D_SMAD23
1LD1117S33TRPackage_TO_SOT_SMD:SOT-223-3_TabPin2U31
1LED BLULED_SMD:LED_0603_1608MetricD_BLU21
1LED REDLED_SMD:LED_0603_1608MetricD_RED21
1RBT10W24S05MP2_DFN_Custom_parts:12_DCDC_5U30
1SI2302DDS-T1-BE3Package_TO_SOT_SMD:SOT-23Q21
1SpeakerCDS-13138-SMT-TR:SPKR_CDS-13138-SMT-TRLS21
1T491A106K006ATCapacitor_Tantalum_SMD:CP_EIA-3216-18_Kemet-AC25
1TL1015AF160QGButton_Switch_SMD:SW_Push_SPST_NO_Alps_SKRKS21
1Teensy4.0teensy:Teensy40U21

The 55 most common of 59 parts.

More from owhite/balancing-robot-notes

7
  • 4 layers90.5 × 68.6 mmMESC brain board, the printed circuit board in 3D

    MESC brain board

    owhite/balancing-robot-notes

    A control theory and software development repo for a balancing robot.

    55 partsMIT
  • 4 layers84.5 × 64 mmMESC brain board, the printed circuit board in 3D

    MESC brain board

    owhite/balancing-robot-notes

    A control theory and software development repo for a balancing robot.

    53 partsMIT
  • 4 layers84.5 × 64 mmMESC brain board, the printed circuit board in 3D

    MESC brain board

    owhite/balancing-robot-notes

    A control theory and software development repo for a balancing robot.

    45 partsMIT
  • 2 layers59.1 × 59.1 mmESC caddyV1.0, the printed circuit board in 3D

    ESC caddyV1.0

    owhite/balancing-robot-notes

    A control theory and software development repo for a balancing robot.

    26 partsMIT
  • 2 layers49.7 × 38 mmMoteus adaptor, the printed circuit board in 3D

    Moteus adaptor

    owhite/balancing-robot-notes

    A control theory and software development repo for a balancing robot.

    14 partsMIT
  • 4 layers38.4 × 30 mmMT6701 ENCODER, the printed circuit board in 3D

    MT6701 ENCODER

    owhite/balancing-robot-notes

    A control theory and software development repo for a balancing robot.

    11 partsMIT
  • 2 layers13.9 × 23.1 mmMT6701 ENCODER, the printed circuit board in 3D

    MT6701 ENCODER

    owhite/balancing-robot-notes

    A control theory and software development repo for a balancing robot.

    7 partsMIT

Similar boards

  • 6 layers151.5 × 71 mmBe iot v v1 0, the printed circuit board in 3D

    Be iot v v1 0

    hamit3/brn_pcb

    nrf9160 sens publisher

    150 parts
  • 2 layers18.5 × 21.3 mmRing base3, the printed circuit board in 3D

    Ring base3

    sophia-08/ergo-pcb

    28 parts1
  • 4 layers60 × 80 mmDigitalPCB, the printed circuit board in 3D

    DigitalPCB

    dwynnychuk/SmartSmoker

    Upgrades for Traeger to add smart capability

    111 parts
  • 2 layers39.3 × 33.6 mmHeliSR Rev4.0, the printed circuit board in 3D

    HeliSR Rev4.0

    genbean/UH1-Collective

    A small board for hat Rev 4 in the Huey head Rev 5 (Head/Rev5/Hat). It carries an ALPS RKJXM1015004 8-direction stick switch with a centre push, and screws to four bosses printed on the back of the lower panel.

    33 partsGPL-3.0
  • 4 layers86.2 × 56.2 mmTeacup t41, the printed circuit board in 3D

    Teacup t41

    thingino/teacup-neo

    Universal Ingenic SoC development platform: one carrier + per-SoC interposer modules (T10 through A1, any package) on a DDR4 card edge, with an ESP32-S3 BMC for autonomous LLM-driven development.

    123 parts1GPL-3.0
  • 2 layers50.8 × 68.6 mmMCU Board, the printed circuit board in 3D

    MCU Board

    caipiblack/STM32-CAN-Bus-board

    This is an STM32F042K6T6 based board that can be used to build sensors that communicate over a CAN bus

    26 parts5GPL-3.0
  • 4 layers40 × 26.5 mmStandardModuleV2, the printed circuit board in 3D

    StandardModuleV2

    ilicmiljan/open-can-controller

    Open-source CAN bus controller for BMW E9X instrument clusters (Firmware + PCB)

    41 parts5GPL-3.0

Questions

How big is the MESC brain board PCB?

It measures 84.5 × 64 mm and has 4 copper layers, 1.6 mm thick.

What parts does the MESC brain board use?

59 parts, built around the LD1117S33TR(MS), RBT10W24S05, SM24CANB-02HTG and APT1608SGC. 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 MESC brain board KiCad files?

From the owhite/balancing-robot-notes repository on GitHub, at the commit this page was made from: the board is PCBs/brainboardV1.6/MESC_brain_board.kicad_pcb and its schematic PCBs/ESC_caddyV1.0/ESC_caddyV1.0.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the MESC brain board 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).