How to Visually Tune PID Control Loops
This video shows how I tuned the PID control loop of a balancing robot. The behavior of the robot is shown, and perhaps more importantly, I also show live graphs of the error, set point, proportional component, integral component and derivative component. Finally the source code is shown and explained. The video starts with a brief demo of how the robot performs with a tuned PID control loop. The balancing robot does not have any wheel encoders or other position feedback, so the only control loop inputs are the pitch of the robot and the throttle input from the user. Because of that, the robot can drift a little if it picks up speed, but even so, with a properly tuned PID control loop it performs fairly well. I then show a proportional-only control loop and we see how it performs when the gain is too low or too high. Next I add the integral part, forming a PI control loop. Again, I show how it looks when the gain is set too low or too high. Then I add the derivative part, forming the PID control loop. The derivative part helps to dampen oscillations and really brings everything together. Like before, I also show how it behaves when the gain is too low or too high. Finally I show the source code written for an STM32F0 microcontroller, and explain how it works. The source code is available here: https://github.com/farrellf/Balancing... This video is part of a series showing how to build a balancing robot: Part 1: Modify RC Servos for Continuous Rotation and External H-Bridge Control • Modify RC Servos for Continuous Rotation a... Part 2: Building a Robot Chassis with Brass Square Tube, a Dremel, and Solder • Building a Robot Chassis with Brass Square... Part 3: First Steps with a GY-86 10DOF Sensor: MPU6050, HMC5883L and MS5611 • First Steps with a GY-86 10DOF Sensor: MPU... Part 4: 6DOF & 9DOF Sensor Fusion with Madgwick's Filter, MPU6050, HMC5883L (GY-86 Module) • 6DOF & 9DOF Sensor Fusion with Madgwick's ... Part 5: How to Use CC2500 PA LNA 2.4GHz Wireless RF Modules • How to Use CC2500 PA LNA 2.4GHz Wireless R... Part 6: GPU-Accelerated Data Logging and Telemetry • GPU-Accelerated Arduino Data Logging and T... Part 7: [THIS VIDEO] How to Tune PID Control Loops Visually • How to Visually Tune PID Control Loops

What does a PID controller do?

Running AI robotics experiments at home with LeRobot and SO-ARM100

What is a PID Controller? | DigiKey

What Is PID Control? | Understanding PID Control, Part 1

MPU-6050 6dof IMU tutorial for auto-leveling quadcopters with Arduino source code

I Built an Internal Cycloidal Robotic Actuator

PIDs Simplified

Anti-windup for PID control | Understanding PID Control, Part 2

Ecuador – Curaçao Highlights | Gruppe E, FIFA WM 2026 | sportstudio

This Battery Doesn't Need Lithium and It Just Hit Mass Production

Watch Ukrainian Drones OBLITERATE a Russian Jet

Creator of C++: Bell Labs, Negative Overhead Abstraction, Mistakes | Bjarne Stroustrup

I made a GPU at home

Empirical PID gain tuning (Kevin Lynch)

Deep Dive into LLMs like ChatGPT

the true reason C++ always wins

Something is jamming GPS over Europe. Here's what we found

Introduction to PID Control

How Self Balancing Robots Work! (Theory, Components, Design, PID)

