If you march sufficiently deep into the wilderness of control theory, you’ll no doubt encounter the inverted pendulum problem. These balancing a

Ball Balancing Wheel Puts A Spin On Inverted Pendulums

submited by
Style Pass
2021-07-20 17:30:07

If you march sufficiently deep into the wilderness of control theory, you’ll no doubt encounter the inverted pendulum problem. These balancing acts have emerged with a number of variants over the years, but just because it’s been done before doesn’t mean there’s no space for something new. Here, [David Gonzalez], has taken this classic problem and given it an original own spin–literally–where the balancing act is now a ball balanced precariously upon a spinning wheel. (Video, embedded below.) Mix in a little computer vision for sensing, a dash of brushless motor control, a bit of math, and you have yourself a closed-loop system that’s bound to turn a few heads.

[David’s] implementation is a healthy mix of classic control theory with some modern electronics. From the theory bucket, there’s a state-space controller to drive both the angle and angular velocity of the ball to zero. The “state” is a combination of four terms: the ball angle, the ball’s angular velocity, the wheel angle, and the wheel’s angular velocity. [David] weights each of these terms and sums them together to create an input value to adjust the motor velocity driving the wheel and balance the ball.

From the electronics bin, [David] opted for an ESP32 running Arduino, the custom Janus Brushless Motor Controller running SimpleFOC, and a Maix Bit Microcontroller with an added camera running MicroPython to compute the ball angle. Finally, if you’re curious to dig into the source code, [David] has kindly posted the firmware on Github.

Leave a Comment