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
53
Nets
94
Pads
226
Tracks, vias
361, 32
Pours
6
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 53 parts on 94 nets, routed with 361 tracks and 32 vias.

It is built around the ESP32-WROOM-32D and TL3342F160QG. Its parts include 10 connectors, 5 capacitors, 5 ICs, 3 switches and 1 transistor. It belongs with the robots and motor control boards and the ESP32 and NXP (LPC, Kinetis, i.MX RT) boards of this library.

Main components

2

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

53
QtyValueFootprintReferences
5100nFCapacitor_SMD:C_0603_1608MetricDC_1, DC_2, DC_3, DC_4, DC_6
510kResistor_SMD:R_0603_1608Metric1k_1, 10k_1, 10k_4, 10k_5, 10k_8
310uFCapacitor_SMD:C_0805_2012MetricC25, C27, DC_5
320kResistor_SMD:R_0603_1608Metric20k_1, 20k_21, R20k_4
3Conn_01x03Connector_PinHeader_2.54mm:PinHeader_1x03_P2.54mm_VerticalJ12, J13, J15
21kResistor_SMD:R_0603_1608Metric1k_21, 1k_22
2Conn_01x01Connector_Wire:SolderWire-2sqmm_1x01_D2mm_OD3.9mmJ24, J25
2Conn_01x01Connector_PinSocket_2.54mm:PinSocket_1x01_P2.54mm_VerticalJ22, J23
2TL3342F160QGButton_Switch_SMD:SW_Push_SPST_NO_Alps_SKRKS11, S12
1100nFCapacitor_SMD:C_0805_2012MetricC21
1120Resistor_SMD:R_0603_1608MetricR_120
112_DCDC_5MP2_DFN_Custom_parts:12_DCDC_5U24
15kResistor_SMD:R_0603_1608Metric5k_2
1BLUELED_SMD:LED_0603_1608MetricD_BLU2
1C_Polarized_Small_USCapacitor_Tantalum_SMD:CP_EIA-3216-18_Kemet-AC23
1Conn_01x04Connector_JST:JST_PH_B4B-PH-K_1x04_P2.00mm_VerticalCAN1
1Conn_01x06Connector_JST:JST_PH_B6B-PH-K_1x06_P2.00mm_VerticalMESC1
1Conn_01x07Connector_JST:JST_PH_B7B-PH-K_1x07_P2.00mm_VerticalJ21
1Conn_01x18Connector_PinSocket_2.54mm:my_PinSocket_3x07_P2.54mm_VerticalJ1
1ESP32-WROOM-32DRF_Module:ESP32-WROOM-32DU11
1LD1117S18TR_SOT223Package_TO_SOT_SMD:SOT-223-3_TabPin2U21
1LED BLULED_SMD:LED_0603_1608MetricD_BLU21
1LED GRNLED_SMD:LED_0603_1608MetricD_GRN1
1LED REDLED_SMD:LED_0603_1608MetricD_RED1
1SERIAL1Connector_PinHeader_2.54mm:PinHeader_1x04_P2.54mm_VerticalJ14
1SolderJumper_3_OpenJumper:SolderJumper-3_P1.3mm_Open_Pad1.0x1.5mmJP1
1SpeakerCDS-13138-SMT-TR:SPKR_CDS-13138-SMT-TRLS1
1TJA1050T/CM,118Package_SO:SOIC-8_3.9x4.9mm_P1.27mmU1
1TL3342F160QGButton_Switch_SMD:SW_SPST_B3SL-1022PS1
1Teensy4.0teensy:Teensy40U2
1my_BC337Package_TO_SOT_SMD:SOT-23Q1

The 49 most common of 53 parts.

More from owhite/balancing-robot-notes

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

    59 partsMIT
  • 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.

    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

  • 4 layers16.9 × 119.4 mmOrbit, the printed circuit board in 3D

    Orbit

    earthtojake/text-to-cad

    Design physical products with AI

    182 parts26kMIT
  • 2 layers192.4 × 50 mmOmote, the printed circuit board in 3D

    Omote

    OMOTE-Community/OMOTE-Hardware

    Open Source Remote - Hardware

    187 parts157GPL-3.0
  • 2 layers37.5 × 99 mmDiy oled 3d controller, the printed circuit board in 3D

    Diy oled 3d controller

    open3doled/open-3d-oled

    If running windows 11 or 10 with DPI scaling be sure to disable it as follows. 1) Right click properties on 3dplayer.exe in the 3DPlayer folder 2) Click on "Compatability" tab then click on the button at the bottom…

    42 parts98
  • 8 layers424.5 × 336.3 mmBarebones, the printed circuit board in 3D

    Barebones

    nzevh/barebones

    fully open source laptop based on the RK3588 Soc

    1,033 parts23CERN-OHL-S-2.0
  • 6 layers85.9 × 77.5 mmFrob2354, the printed circuit board in 3D

    Frob2354

    tschak909/frob-modern

    The Frob, An Apple II Atari 2600 Development System, re-made as an RP2354 based device.

    80 parts8
  • 2 layers14.8 × 20 mmKits prettyvis, the printed circuit board in 3D

    Kits prettyvis

    SpinWearables/SpinWheelHardware

    The hardware design files for the SpinWheel.

    57 parts2GPL-3.0
  • 6 layers76.5 × 69 mmFmc usb gpio spi jtag, the printed circuit board in 3D

    Fmc usb gpio spi jtag

    vowstar/rocket-pcb-orig

    FMC template board

    146 parts2Apache-2.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?

53 parts, built around the ESP32-WROOM-32D and TL3342F160QG. 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.2/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).