Skip to the content
2 layers53 × 66.6 mmLiquorice PCB, the printed circuit board in 3D

A self-balancing two-wheeled robot. an inverted pendulum stabilized by IMU feedback and PID motor control, being built up toward full 4-state LQR control on a custom PCB.

Size
53 × 66.6 mm
Copper layers
2
Thickness
1.6 mm
Parts
23
Nets
42
Pads
110
Tracks, vias
181, 24
Pours
1
Routed
Yes
KiCad
KiCad 9.0 (file 20241229)
Created
1 Jun 2026
Updated
1 Nov 2026

Overview

Liquorice PCB is an open-source printed circuit board by SohumNigam, from the SohumNigam/StabilityBot_MK1 repository on GitHub. It is a 2-layer board of 53 × 66.6 mm with 23 parts on 42 nets, routed with 181 tracks and 24 vias.

It is built around the BMI320. Its parts include 7 connectors, 6 capacitors, 4 resistors and 2 ICs.

Main components

1

README

readme.md

Liquorice MK1

Currently in prototype phase

A self-balancing two-wheeled robot. an inverted pendulum stabilized by IMU feedback and PID motor control, being built up toward full 4-state LQR control on a custom PCB.

Full write-up / showcase: sohumnigam.github.io/projects/stability_bot_MK1.html

Why I built this

I wanted a project that went past the usual "balance a robot with a PID loop" hobby build. Something that let me go deep on control theory (state-space modeling, LQR, Kalman filtering), embedded firmware, and PCB design all at once. The long-term goal is a robot that balances using a full 4-state LQR controller (θ, θ̇, x, ẋ) on hardware I designed myself.

Photos

Early prototype alt text alt text alt text

Web interface on mobile. This interface was created with AI as a quick way to validate the behavior I was observing and for much needed live tuning and debugging.

alt text

Demo Video

This initial prototype version used PID to validate the hardware setup and learn about basic control theory.

alt text

LQR control testing has not been done yet but videos are soon to come.

PCB Schematics

This is the schematic of the current prototype version. The esp32 interfaces with an MPU6050 for angle readings and L293D for motor control. This vesion is simple a concept validation and more sophisticated hardware is going to be implemented very soon. alt text

Below you can see the polished design for the final version of the robot This is the schematic for the main board which connects to motors, encoders and 2s battery. alt text

The custom contactles encoder schematic is below. Encoders will be used to track wheel position and allow full 4 state LQR control

alt text

Current Features

  • Active motor balancing response
  • IMU sensor fusion (complementary filter, Kalman filter in progress)
  • PID control loop
  • Live web dashboard (WebSocket telemetry: pitch, motor output, PID tuning sliders) served from the ESP32 in SoftAP mode

Hardware Overview

ComponentCurrentPlanned Upgrade
ComputeESP32 Devboard-
IMUMPU6050Bosch BMI320 (SPI)
Motor driverL293DTB6612FNG
MotorsStandard yellow DC geared motors—
BatteryELEGOO battery packWill be compatible with any 2s Battery
Chassis3D printed—
EncodersNoneAS5600

Software Overview

FreeRTOS control task

  • IMU readings
  • PID calculations (LQR planned once encoders are integrated)
  • Motor PWM control

FreeRTOS web interface task

  • Digital logging
  • Mobile control
  • Remote PID tuning

How to Assemble

  1. 3D print the chassis in PLA (files: hardware/cad/step)
  2. Mount motors and wheels using M2.5 screws
  3. Wire motors, encoders and battery to the main PCB as according to silkscreen labels
  4. Secure battery pack and PCB to minimize vibration.

How to Flash

  1. Clone this repo into your ESP-IDF project directory
  2. Confirm your wiring matches the pin assignments in main/
  3. Build and flash with idf.py build flash monitor
  4. Connect to the robot's WebSocket dashboard to tune PID live

Rough Bill of Materials

See the full BOM in BOM.csv. Still a work in progress as some passive parts are not yet finalized.

CategoryQtyPartValueLCSC Part #Price/unitExtended DescriptionLink
Compute1ESP32 WROVER DevKitCEspressif ESP32-WROVER-DevKitC-$11Purchased from DigiKeyDigiKey
IMU1BMI320 IMUBosch BMI320C22391148$0.99SPI IMULCSC
Mechanics2Diametric Magnets———MUST be driametrically magnetizedDigiKey
Encoder1AS5600 Magnetic EncoderAMS AS5600C499458$1.1855For wheel position trackingLCSC
Motor Driver1TB6612FNG Motor DriverToshiba TB6612FNGC141517$1.1659Target PCB driver; STBY tied to GPIOLCSC
Mechanical2DC Gear Motors—$20—Includes wheelsAmazon
Mechanical1Chassis / Frame (custom)———Onshape CAD; STEP in hardware/cad/step/—

Full robot rough cost ~$170 + shipping

Known Issues

  • IMU signal occasionally drops out. Issue was traced to watchdog timer triggers on esp32 and temporary wiring affecting signal integrity.
  • 4-state LQR not yet running on hardware. Pending encoder integration.

Credits

Parts

23
QtyValueFootprintReferences
5Conn_01x02_PinConnector_PinHeader_2.54mm:PinHeader_1x02_P2.54mm_VerticalJ1, J2, J3, J4, J5
4100nFCapacitor_SMD:C_0805_2012Metric_Pad1.18x1.45mm_HandSolderC5, C6, C7, C10
45.1kResistor_SMD:R_0603_1608Metric_Pad0.98x0.95mm_HandSolderR1, R2, R3, R4
210uFCapacitor_Tantalum_SMD:CP_EIA-3216-18_Kemet-A_HandSolderC8, C9
2Conn_01x19_PinConnector_PinHeader_2.54mm:PinHeader_1x19_P2.54mm_VerticalJ6, J7
1BMI320Package_LGA:Bosch_LGA-14_3x2.5mm_P0.5mmU3
1TB6612FNGPackage_SO:SSOP-24_5.3x8.2mm_P0.65mmU1

The 19 most common of 23 parts.

More from SohumNigam/StabilityBot_MK1

3
  • 2 layers16 × 22 mmBMI320, the printed circuit board in 3D

    BMI320

    SohumNigam/StabilityBot_MK1

    A self-balancing two-wheeled robot. an inverted pendulum stabilized by IMU feedback and PID motor control, being built up toward full 4-state LQR control on a custom PCB.

    11 parts1
  • 2 layers17 × 16.5 mmAS5600, the printed circuit board in 3D

    AS5600

    SohumNigam/StabilityBot_MK1

    A self-balancing two-wheeled robot. an inverted pendulum stabilized by IMU feedback and PID motor control, being built up toward full 4-state LQR control on a custom PCB.

    7 parts1
  • 2 layers25.5 × 29 mmTB6612FNG, the printed circuit board in 3D

    TB6612FNG

    SohumNigam/StabilityBot_MK1

    A self-balancing two-wheeled robot. an inverted pendulum stabilized by IMU feedback and PID motor control, being built up toward full 4-state LQR control on a custom PCB.

    7 parts1

Similar boards

  • 2 layers65 × 56 mmPi servo hat, the printed circuit board in 3D

    Pi servo hat

    earthtojake/text-to-cad

    Design physical products with AI

    23 parts26kMIT
  • 2 layers14 × 100 mmYunomi, the printed circuit board in 3D

    Yunomi

    google/mozc-devices

    Circuit diagrams and firmware source code for Gboard DIY keyboards

    23 parts3kApache-2.0
  • 2 layers50.8 × 52.2 mmFuhhni, the printed circuit board in 3D

    Fuhhni

    hackclub/OnBoard

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

    23 parts915
  • 2 layers138.8 × 89.8 mmKeyboard pcb, the printed circuit board in 3D

    Keyboard pcb

    diepala/cantor

    Cantor keyboard, a 42 key diodeless split keyboard.

    23 parts756GPL-3.0
  • 2 layers32.9 × 53.3 mmGoatgdo, the printed circuit board in 3D

    Goatgdo

    Kaldek/rat-ratgdo

    Open source schematics for ratgdo PCB

    23 parts511MIT
  • 2 layers35.5 × 50 mmTobo, the printed circuit board in 3D

    Tobo

    kelu124/echomods

    Open source ultrasound processing modules and building blocks

    23 parts463
  • 2 layers19 × 19 mmKeybit, the printed circuit board in 3D

    Keybit

    notaroomba/keybytes

    A truly modular keyboard

    23 parts444
  • 2 layers88.5 × 28 mmExpBreakout, the printed circuit board in 3D

    ExpBreakout

    Duet3D/Duet-2-Hardware

    The KiCAD source for the Duet 3d printer controller see www.duet3d.com

    23 parts258

Questions

How big is the Liquorice PCB PCB?

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

What parts does the Liquorice PCB use?

23 parts, built around the BMI320. 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 Liquorice PCB KiCad files?

From the SohumNigam/StabilityBot_MK1 repository on GitHub, at the commit this page was made from: the board is hardware/PCB/Liquorice_PCB/Liquorice_PCB.kicad_pcb and its schematic hardware/PCB/AS5600/AS5600.kicad_sch. PCBKit opens the board in the browser, with nothing to install.

Can I use the Liquorice PCB design in my own project?

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