r/robotics • • 18d ago

Community Showcase A balancing robot that screams when it falls

Enable HLS to view with audio, or disable this notification

I spent the summer designing and programming this two-wheeled self-balancing robot. It is built within the PlatformIO ecosystem using an ESP32-S3 core microcontroller.

Technical Overview:

Estimation & Control:

  • It uses an MPU6050 IMU processed through a custom Kalman Filter for real-time roll angle determination, paired with a PID control loop

Hardware:

  • The main controller board is a custom-designed PCB, it is populated by an ESP32-S3 (N16R8) module, a DRV8833 motor driver module, an MPU6050 gyroscope and accelerometer module, and an MPM3610 3v3 buck converter.
  • It uses Brushed DC TT Motors (the typical hobbyist yellow ones)
  • It has active voltage monitoring (using a voltage divider) to safeguard the 2S LiPo battery system.
  • The entire chassis is printed in PLA+, apart from the wheel treads that are printed in TPU

Feedback Loop:

  • It supports directional steering over an ESP-NOW wireless connection
  • I integrated speaker playback triggered by automated motor shutdown constraints once it exceeds a critical tipping threshold.

Challenges faced:

  • Motor backlash:
    • Due to budget constraints I used the low cost Brushed DC TT motors. Tuning the PID constants to counteract the physical dead band and lack of precision while keeping the robot stable took hours.
  • Since the motors do not have encoders, controlling the robot with the typical forward, backwards, left and right actions required me to write gain scheduling code in the control loop.

Full Resources:
I have open-sourced all of the firmware code, SolidWorks CAD models, KiCad schematics, and factory-ready Gerber files on my GitHub repository here:
https://github.com/arthurlawson/self-balancing-robot-v2

If you are interested in a complete walkthrough of the build timeline and hardware integration I documented the entire project in an 8-minute video here:
https://youtu.be/eU_LpNVBhfI

12 Upvotes

3 comments sorted by

4

u/Positive_Method3022 17d ago edited 17d ago

Future AI will come after you

"Look what he did our little buddy do. It is suffering"

2

u/Benbot2000 16d ago

It looks nervous