Robot Balances Ball On A Plate

Imagine trying to balance a heavy metal ball bearing on a cafeteria tray. It’s not the easiest thing in the world! In fact, it’s perhaps a task better automated, as [skulkami3000] demonstrates with this robotic build.

The heart of the build is a flat platform fitted with a resistive touchscreen panel on top. The panel is hooked up to a Teensy 4.0 microcontroller. When a heavy ball bearing is placed on the touch panel, the Teensy is thus able to accurately read its position. It then controls a pair of NEMA 17 stepper motors via TCM2208 drivers in order to tilt the panel in two axes in order to keep the ball in the centre of the panel. Thanks to its quick reactions and accurate sensing, it does a fine job of keeping the ball centred, even when the system is perturbed.

Projects like these are a great way to learn the basics of PID control. Understanding these concepts will serve you well in all sorts of engineering contexts, from controlling industrial processes to building capable quadcopter aircraft. Continue reading “Robot Balances Ball On A Plate”

Ball Balancing Wheel Puts A Spin On Inverted Pendulums

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.

We love seeing folks mix a bit of control theory into an amalgamation of familiar electronics. And as both precision sensors and motor controllers continue to improve, we’re excited to see how the landscape of projects changes yet again. Hungry for more folks closing the loop on unstable systems? Look no further than [UFactory’s] ball balancing robot and [Gear Down for What’s] two wheeled speedster.

Continue reading “Ball Balancing Wheel Puts A Spin On Inverted Pendulums”