All projects
EMBEDDED & CONTROLS

PID minibot

A robot for learning how control feels.

  • ESP32
  • Heading control
  • ESP-NOW
The ESP32 minibot prototype with its electronics, motors and distance sensor.
The first-revision reference prototype I designed for the workshop series.

A heading-controlled robot and live PID-tuning remote, developed as a reference for a 14-week WE FIRST workshop series.

I designed the mechanics, electronics and firmware of the first prototype myself to test the concept. We then taught club members how to design and build something similar through a 14-week series.

My contribution

  • Design and build the first mechanical and electrical prototype.
  • Implement heading PID using IMU data.
  • Build an ESP-NOW remote for live tuning and heading commands.
  • Use the prototype to teach control and robot development.
01 / THE PROCESS

A controller you can experiment with

The PID loop used IMU gyro/yaw data to regulate heading. A separate handheld controller let me update P, I and D independently and display their current values. A joystick changed the heading setpoint, and ESP-NOW carried the updates to the robot.

The distance sensor could detect walls, but I pointed mine toward the table so the robot could detect an edge and stop before driving off.

02 / THE PROCESS

Keeping the loop responsive

Non-blocking software allowed the robot to read the IMU and update PID without waiting for controller transmissions or other slower tasks.

That separation became a useful pattern in later ESP32 work: time-sensitive control should not have to wait for unrelated input.

03 / THE PROCESS

What the filtering could—and could not—fix

Vibration made yaw drift difficult to manage. High- and low-pass filtering, EMA smoothing and a dead zone reduced the problem, but did not eliminate it. Manual joystick nudges could compensate during a demo, but were not a complete solution.

If I rebuilt it, I would consider motor encoders and a magnetometer with sensor fusion. Those are redesign ideas, not features of this prototype. The imperfect behaviour itself became something useful to explain in a control demonstration.

WHERE IT LANDED

A prototype that became a teaching tool.

The robot made live control tuning tangible and supported the workshop series. It also made a limitation clear: filtering alone was not a complete answer to accumulated yaw drift.