STM32 self-balancing car setup and PID calibration checklist

This is a practical, step-by-step checklist to bring up a two-wheel STM32 self-balancing car build safely and reach a point where you can tune balance control. Kit contents, wiring, and firmware steps vary by seller and revision—treat each step as “passed” only after you confirm it on your own hardware.

Related pages:

Before you start (safety + expectations)

Confirm what you actually have (identify your modules)

Use board markings and your seller listing to identify what’s on your build:

Mechanical assembly checks

Wiring checklist (verify against board labels)

Firmware bring-up (minimum viable checks)

Sensor sanity checks (must pass before PID tuning)

With the robot held still:

PID calibration checklist (balance first)

  1. Disable extras: keep optional modules and remote/app commands out of the loop until balance is repeatable.
  2. Add conservative motor limits: clamp output so early tuning can’t drive extreme power.
  3. Tune P first: increase gradually until it resists falling; back off if oscillation is harsh.
  4. Add D for damping: increase slowly to reduce wobble/overshoot; reduce if noise makes it twitchy.
  5. Add I last (only if needed): use small I for slow bias; add anti-windup to avoid runaway after saturation.
  6. Re-check direction: if it accelerates the fall, a sign convention is wrong—stop and fix.
  7. Progress in stages: wheels-in-air → on-ground with support → short free-standing attempts.

Troubleshooting (symptom → likely cause)

Next steps

After upright balance is repeatable, re-enable optional features one at a time (encoder speed control, app control, optional sensors) and re-check stability after each change. When documenting your build, phrase features as “confirmed on my unit” and avoid assuming exact kit contents.


Automatically reviewed by Codex final release review on 2026-04-30. Validation status: conservative public draft; hardware-specific steps still require user-side checks.

STM32 Self-Balancing Car Kit / Kit page / ESP32 4WD robot car guide

Related kit

If you want the same parts, here is the closest kit.

View Kits